*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #ffffff;
  --bg2:          #f5f5f5;
  --bg3:          #eeeeee;
  --purple:       #6d28d9;
  --purple-dark:  #5b21b6;
  --purple-light: #f3eeff;
  --text:         #333333;
  --text-mid:     #555555;
  --text-muted:   #888888;
  --border:       #e5e5e5;
  --border-dark:  #cccccc;
  --shadow-nav:   0 1px 0 #e5e5e5;
  --shadow-card:  0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.13);
  --mono:         'DM Mono', 'Courier New', monospace;
  --sans:         'Open Sans', sans-serif;
  --heading:      'Montserrat', sans-serif;
}

html[data-theme="dark"] {
  --bg:           #0f0f11;
  --bg2:          #18181b;
  --bg3:          #27272a;
  --purple:       #a78bfa;
  --purple-dark:  #8b5cf6;
  --purple-light: #1e1b2e;
  --text:         #fafafa;
  --text-mid:     #d4d4d8;
  --text-muted:   #71717a;
  --border:       #27272a;
  --border-dark:  #3f3f46;
  --shadow-nav:   0 1px 0 #27272a;
  --shadow-card:  0 2px 12px rgba(0,0,0,0.4);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.5);
}

/* ── Base ────────────────────────────────────────────────── */

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.857;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); }

/* ── Navigation ──────────────────────────────────────────── */

nav {
  background: var(--bg);
  box-shadow: var(--shadow-nav);
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 0;
}

.logo {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--purple);
  text-decoration: none;
  margin-right: 40px;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  height: 80px;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 0 15px;
  height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: color 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-dark);
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg);
}

.search-form input {
  border: none;
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 0.8125rem;
  width: 160px;
  background: transparent;
  color: var(--text);
}

.search-form input:focus { outline: none; }

.search-form button {
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-dark);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: background 0.15s, color 0.15s;
  transform: none;
}

.search-form button:hover {
  background: var(--purple);
  color: #fff;
  transform: none;
  opacity: 1;
}

.btn-subscribe {
  background: var(--purple);
  color: #fff !important;
  padding: 8px 20px;
  border: none;
  border-radius: 3px;
  font-family: var(--heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.03em;
  transition: background 0.18s;
  display: inline-block;
  border-bottom: none !important;
  height: auto !important;
  text-transform: uppercase;
}

.btn-subscribe:hover {
  background: var(--purple-dark);
  color: #fff !important;
  border-bottom-color: transparent !important;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.nav-user a {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  white-space: nowrap;
}

.nav-user a:hover { color: var(--purple); }

.nav-user span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.nav-user form { display: inline; }

.nav-user form button {
  background: none;
  border: none;
  color: var(--text-mid);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0;
  transform: none;
  opacity: 1;
}

.nav-user form button:hover { color: var(--purple); }

/* ── Main container ──────────────────────────────────────── */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 30px 80px;
  animation: fadeUp 0.35s ease both;
}

/* ── Alerts ──────────────────────────────────────────────── */

.alert-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 30px 0;
}

.alert {
  padding: 12px 18px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  border: 1px solid;
  border-radius: 3px;
}

.alert.error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert.success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

html[data-theme="dark"] .alert.error   { background: #2d1010; color: #fca5a5; border-color: #7f1d1d; }
html[data-theme="dark"] .alert.success { background: #0d2414; color: #86efac; border-color: #14532d; }

/* ── Hero (home) ─────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 50px;
}

.hero h1 {
  font-family: var(--heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 span { color: var(--purple); }

.hero p {
  font-family: var(--sans);
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ── Section header ──────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-title {
  font-family: var(--heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.view-all {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
}

.view-all:hover { text-decoration: underline; color: var(--purple-dark); }

/* ── Post card grid ──────────────────────────────────────── */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.post-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.post-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--bg3) 100%);
  display: block;
}

.post-card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-date {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.post-card-title {
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
  transition: color 0.18s;
}

.post-card:hover .post-card-title { color: var(--purple); }

.post-card-excerpt {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 14px;
}

.read-more {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--purple);
}

.empty-state {
  text-align: center;
  padding: 60px 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state a { color: var(--purple); }

/* ── Subscribe banner ────────────────────────────────────── */

.subscribe-banner {
  background: var(--purple);
  padding: 60px 30px;
}

.subscribe-banner-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.subscribe-banner-text h2 {
  font-family: var(--heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.subscribe-banner-text p {
  font-family: var(--sans);
  color: rgba(255,255,255,0.8);
  font-size: 0.9375rem;
}

.subscribe-form {
  display: flex;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 4px;
  overflow: hidden;
  min-width: 340px;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.9375rem;
  min-width: 0;
}

.subscribe-form input[type="email"]::placeholder { color: rgba(255,255,255,0.55); }

.subscribe-form input[type="email"]:focus {
  outline: none;
  background: rgba(255,255,255,0.22);
  box-shadow: none;
  border-color: transparent;
}

.subscribe-form button[type="submit"] {
  padding: 12px 22px;
  background: #fff;
  color: var(--purple);
  border: none;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  white-space: nowrap;
  transition: background 0.18s;
  transform: none;
  opacity: 1;
  flex-shrink: 0;
}

.subscribe-form button[type="submit"]:hover {
  background: var(--bg2);
  transform: none;
  opacity: 1;
}

/* ── Article subscribe box ───────────────────────────────── */

.article-subscribe {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 40px;
  text-align: center;
  margin-top: 50px;
}

.article-subscribe h3 {
  font-family: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.article-subscribe p {
  font-family: var(--sans);
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.9375rem;
}

.article-subscribe .subscribe-form {
  border: 1px solid var(--border-dark);
  max-width: 420px;
  margin: 0 auto;
}

.article-subscribe .subscribe-form input[type="email"] {
  background: var(--bg);
  color: var(--text);
}

.article-subscribe .subscribe-form input[type="email"]::placeholder { color: var(--text-muted); }
.article-subscribe .subscribe-form input[type="email"]:focus { background: var(--bg); }

.article-subscribe .subscribe-form button[type="submit"] {
  background: var(--purple);
  color: #fff;
}

.article-subscribe .subscribe-form button[type="submit"]:hover { background: var(--purple-dark); }

/* ── Footer ──────────────────────────────────────────────── */

footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 14px;
}

.footer-brand p {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 300px;
}

.social-links { display: flex; gap: 8px; }

.social-link {
  width: 34px;
  height: 34px;
  background: var(--bg3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  transition: background 0.18s, color 0.18s;
}

.social-link:hover { background: var(--purple); color: #fff; }

.footer-col h4 {
  font-family: var(--heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.footer-col ul a {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s;
}

.footer-col ul a:hover { color: var(--purple); }

.footer-bottom { border-top: 1px solid var(--border); }

.footer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Forms ───────────────────────────────────────────────── */

form div { margin-bottom: 18px; }

label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border-dark);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9375rem;
  border-radius: 3px;
  transition: border-color 0.18s, box-shadow 0.18s;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.1);
}

textarea { resize: vertical; min-height: 120px; }

button,
.button {
  display: inline-block;
  padding: 10px 24px;
  background: var(--purple);
  color: #ffffff;
  border: none;
  font-family: var(--heading);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.18s, transform 0.15s;
}

button:hover,
.button:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
  opacity: 1;
}

.button.ghost {
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border-dark);
}

.button.ghost:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: transparent;
  transform: translateY(-1px);
}

.button.danger { background: #dc2626; color: #fff; }
.button.danger:hover { background: #b91c1c; }

/* ── Image upload / editor toolbar ──────────────────────── */

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg2);
  border: 1px solid var(--border-dark);
  border-radius: 3px;
  color: var(--purple);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  transform: none;
}

.toolbar-btn:hover {
  background: var(--purple-light);
  border-color: rgba(109,40,217,0.3);
  transform: none;
  opacity: 1;
}

.toolbar-hint {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
}

textarea.drag-over {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.12);
  background: var(--purple-light);
}

/* ── Article page ────────────────────────────────────────── */

.article-wrap {
  max-width: 750px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 30px;
  transition: color 0.18s;
}

.back-link:hover { color: var(--purple); }

.entry-header { margin-bottom: 24px; }

.entry-meta {
  margin-bottom: 12px;
}

.entry-date {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-status-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  border: 1px solid rgba(109,40,217,0.3);
  background: var(--purple-light);
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 10px;
  display: block;
  width: fit-content;
}

.entry-title {
  font-family: var(--heading);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0;
}

.post-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0 32px;
}

.post-actions {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

/* ── Article body (.entry-content) ──────────────────────── */

.entry-content {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.857;
}

.entry-content p { margin-bottom: 1.4em; }

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 1.8em 0 0.6em;
}

.entry-content h1 { font-size: 2em; }
.entry-content h2 { font-size: 1.7em; }
.entry-content h3 { font-size: 1.5em; }
.entry-content h4 { font-size: 1.3em; }

.entry-content h2:first-child,
.entry-content h3:first-child { margin-top: 0; }

.entry-content ul,
.entry-content ol { margin: 0 0 1.4em 1.5em; }

.entry-content li { margin-bottom: 0.4em; }
.entry-content li > ul,
.entry-content li > ol { margin-top: 0.3em; margin-bottom: 0; }

.entry-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.entry-content code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 2px;
}

.entry-content pre {
  background: #1e1e2e;
  border-radius: 4px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.6em 0;
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #e2e8f0;
}

.entry-content blockquote {
  border-left: 4px solid var(--purple);
  padding: 6px 20px;
  margin: 1.6em 0;
  color: var(--text-mid);
  font-style: italic;
  background: var(--bg2);
}

.entry-content a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--purple-dark); }

.entry-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  margin: 1.6em 0;
  border-radius: 3px;
}

.entry-content strong { font-weight: 700; }
.entry-content em { font-style: italic; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.9375rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.entry-content th {
  background: var(--bg2);
  font-family: var(--heading);
  font-weight: 600;
  font-size: 0.875rem;
}

/* ── Page (About / Contact) ──────────────────────────────── */

.page-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.page-hero {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-family: var(--heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}

.page-hero p {
  font-family: var(--sans);
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.about-body {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.857;
}

.about-body p { margin-bottom: 1.4em; }

.about-body h2 {
  font-family: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 2em 0 0.6em;
}

.about-body ul { margin: 0 0 1.4em 1.5em; }
.about-body li { margin-bottom: 0.4em; }
.about-body a { color: var(--purple); }

.contact-grid {
  margin: 0 0 36px;
}

.contact-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px;
}

.contact-card h3 {
  font-family: var(--heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.contact-card p {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.65;
}

.contact-card a {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.contact-card a:hover { text-decoration: underline; }

.contact-form-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 36px;
}

.contact-form-wrap h2 {
  font-family: var(--heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

/* ── Search results ──────────────────────────────────────── */

.search-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.search-header h1 {
  font-family: var(--heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.search-header p {
  font-family: var(--sans);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── Auth pages ──────────────────────────────────────────── */

.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
}

.auth-wrap .page-eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 10px;
  font-weight: 700;
}

.auth-wrap h1 {
  font-family: var(--heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.auth-wrap .subtitle {
  font-family: var(--sans);
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.9375rem;
}

.auth-wrap .subtitle a { color: var(--purple); }

/* ── Post editor ─────────────────────────────────────────── */

.post-form-wrap { max-width: 800px; }

.post-form-wrap .page-eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 10px;
  font-weight: 700;
}

.post-form-wrap h1 {
  font-family: var(--heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 30px;
  line-height: 1.2;
}

/* ── Theme toggle ────────────────────────────────────────── */

.theme-toggle {
  background: none;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  flex-shrink: 0;
  transform: none;
  opacity: 1;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: transparent;
  transform: none;
  opacity: 1;
}


/* ── Animations ──────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */

/* ── Hamburger button (hidden on desktop) ────────────────── */

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  color: var(--text);
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transform: none;
  opacity: 1;
  flex-shrink: 0;
  line-height: 1;
}

.nav-burger:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: transparent;
  transform: none;
  opacity: 1;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .subscribe-banner-inner { flex-direction: column; text-align: center; gap: 24px; }
  .subscribe-form { min-width: unset; width: 100%; max-width: 400px; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-inner { padding: 0 16px; position: relative; flex-wrap: wrap; height: auto; min-height: 64px; }
  .logo { margin-right: 0; }
  .nav-burger { display: flex; }
  .search-form { display: none; }
  .btn-subscribe { display: none; }
  .nav-user { display: none; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 8px 0 12px;
    height: auto;
    order: 3;
  }

  .nav-links.nav-open { display: flex; }

  .nav-links a {
    height: auto;
    padding: 10px 4px;
    font-size: 0.9375rem;
    border-bottom: none;
    border-left: 2px solid transparent;
  }

  .nav-links a:hover {
    border-bottom: none;
    border-left-color: var(--purple);
    padding-left: 10px;
  }

  .nav-right { margin-left: auto; gap: 8px; }

  /* Layout */
  main { padding: 28px 16px 56px; }

  /* Hero */
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: clamp(1.5rem, 6vw, 2.2rem); }

  /* Posts */
  .posts-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Article */
  .article-wrap { padding: 0; }
  .entry-title { font-size: clamp(1.4rem, 5vw, 2rem); }
  .entry-content { font-size: 0.9375rem; }
  .entry-content pre { padding: 14px 16px; font-size: 0.8125rem; }
  .post-actions { flex-wrap: wrap; }
  .article-subscribe { padding: 28px 20px; }

  /* Pages */
  .page-wrap { padding: 0; }
  .page-hero h1 { font-size: clamp(1.4rem, 5vw, 2rem); }
  .contact-form-wrap { padding: 24px 20px; }

  /* Post form */
  .post-form-wrap h1 { font-size: 1.5rem; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 32px 16px; }
  .footer-bottom-inner { flex-direction: column; gap: 4px; text-align: center; padding: 14px 16px; }
  .subscribe-banner { padding: 40px 16px; }
}

@media (max-width: 480px) {
  .logo { font-size: 1.05rem; }

  /* Forms — bigger touch targets */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  textarea,
  select { font-size: 1rem; padding: 12px 14px; }

  button, .button { padding: 12px 20px; }

  .subscribe-form { flex-direction: column; }
  .subscribe-form input[type="email"],
  .subscribe-form button[type="submit"] { width: 100%; }

  /* Auth */
  .auth-wrap { padding: 0 4px; }

  /* Post card body */
  .post-card-body { padding: 16px 18px 20px; }
}
