/* ── TOKENS ─────────────────────────────────────── */
:root {
  --bg:          #faf9f6;
  --bg2:         #f2f0ea;
  --bg3:         #e8e5dc;
  --surface:     #ffffff;
  --text:        #1a1814;
  --text2:       #4a4640;
  --text3:       #9a958e;
  --accent:      #c8102e;
  --accent2:     #8b0b20;
  --nav-bg:      #111010;
  --nav-text:    #f5f2ec;
  --border:      rgba(26,24,20,0.1);
  --border2:     rgba(26,24,20,0.06);
  --serif:       'Source Serif 4', Georgia, serif;
  --display:     'Playfair Display', Georgia, serif;
  --sans:        'DM Sans', system-ui, sans-serif;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] {
  --bg:          #111010;
  --bg2:         #181714;
  --bg3:         #201e1b;
  --surface:     #1c1a17;
  --text:        #f0ece4;
  --text2:       #b0a89e;
  --text3:       #625d56;
  --accent:      #e83050;
  --accent2:     #ff5070;
  --nav-bg:      #0a0908;
  --nav-text:    #f0ece4;
  --border:      rgba(240,236,228,0.08);
  --border2:     rgba(240,236,228,0.04);
}

/* ── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── NAV ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--nav-bg);
  border-bottom: 2px solid var(--accent);
  transition: background var(--transition);
  /* drawer needs this */
  overflow: visible;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  color: var(--nav-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo .of {
  color: var(--accent);
  font-style: italic;
}
.nav-links {
  display: none;
  gap: 0;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav-links li a {
  display: block;
  padding: 0 1rem;
  height: 58px;
  line-height: 58px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nav-text);
  opacity: 0.6;
  transition: opacity 0.2s;
}
.nav-links li a:hover { opacity: 1; }
.nav-links li a.active {
  opacity: 1;
  border-bottom: 2px solid var(--accent);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-text);
  transition: background 0.2s, border-color 0.2s;
}
.mode-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }
.mode-icon { font-size: 13px; }

/* ── HAMBURGER ──────────────────────────────────── */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE DRAWER ──────────────────────────────── */
.nav-drawer {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  border-bottom: 2px solid var(--accent);
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 199;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s cubic-bezier(0.4,0,0.2,1);
}
.nav-drawer.open { max-height: 400px; }
.nav-drawer ul { list-style: none; padding: 0.5rem 0 1rem; }
.nav-drawer ul li a {
  display: block;
  padding: 0.85rem 1.5rem;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nav-text);
  opacity: 0.65;
  transition: opacity 0.2s, background 0.2s;
}
.nav-drawer ul li a:hover,
.nav-drawer ul li a.active { opacity: 1; background: rgba(255,255,255,0.04); }
.nav-drawer ul li a.active { border-left: 2px solid var(--accent); }

/* ── SERIES BANNER ──────────────────────────────── */
.series-banner {
  background: var(--accent);
  padding: 7px 2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.series-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.series-pill {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.22);
  padding: 3px 9px;
  border-radius: 2px;
}
.series-text {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
}
.series-text strong { color: #fff; }

/* ── HERO ───────────────────────────────────────── */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem 2.5rem;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  align-items: start;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}
.eyebrow-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
}
.eyebrow-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text3);
}
.hero-title {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 800;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.hero-subtitle {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text2);
  margin-bottom: 2rem;
}
.hero-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.meta-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.meta-value {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.hero-image {
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg2);
}
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── ARTICLES GRID ──────────────────────────────── */
.articles {
  padding: 3rem 2rem;
  border-bottom: 1px solid var(--border);
}
.articles-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.articles-header {
  margin-bottom: 3rem;
}
.section-title {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.section-subtitle {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  color: var(--text2);
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}
.article-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.article-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.article-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg2);
}
.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-card-content {
  padding: 1.5rem;
}
.article-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 1rem;
}
.article-card-date {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.article-card-topic {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 4px 8px;
  border-radius: 2px;
}
.article-card-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.article-card-excerpt {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text2);
}

/* ── FOOTER ────────────────────────────────────── */
footer {
  background: var(--nav-bg);
  color: var(--nav-text);
  padding: 3rem 2rem;
  border-top: 2px solid var(--accent);
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(245,242,236,0.1);
}
.footer-section h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer-section ul {
  list-style: none;
}
.footer-section ul li {
  margin-bottom: 0.75rem;
}
.footer-section ul li a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  opacity: 0.8;
  transition: opacity var(--transition);
}
.footer-section ul li a:hover {
  opacity: 1;
}
.footer-logo {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: block;
}
.footer-logo span {
  color: var(--accent);
  font-style: italic;
}
.social-row {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0;
}
.social-link {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.8;
  transition: opacity var(--transition);
}
.social-link:hover {
  opacity: 1;
}

/* ── ARTICLE CONTENT ────────────────────────────– */
.article-hero {
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}
.article-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.article-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.article-title {
  font-family: var(--display);
  font-size: 52px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.article-subtitle {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text2);
}
.article-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.article-body p {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.article-body h2 {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}
.article-body figure {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg2);
  border-radius: 4px;
}
.article-body figure img {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}
.article-body figcaption {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--text3);
  line-height: 1.6;
}

/* ── ABOUT PAGE ────────────────────────────────– */
.about-hero {
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
}
.about-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.about-title {
  font-family: var(--display);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: var(--text);
}
.about-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.about-body p {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.about-body strong {
  font-weight: 600;
  color: var(--accent);
}

/* ── SEARCH MODAL ───────────────────────────────– */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  padding: 2rem;
}
.search-modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.search-modal-content {
  background: var(--surface);
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  padding: 2rem;
}
.search-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.search-modal-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.search-modal-close {
  font-size: 24px;
  opacity: 0.5;
  transition: opacity var(--transition);
  cursor: pointer;
}
.search-modal-close:hover {
  opacity: 1;
}
.search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 1rem;
}
.search-results {
  max-height: 400px;
  overflow-y: auto;
}

/* ── RESPONSIVE ────────────────────────────────– */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-title {
    font-size: 42px;
  }
  .section-title {
    font-size: 32px;
  }
  .article-title {
    font-size: 36px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .nav-links {
    display: none;
  }
}
@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }
  .section-title {
    font-size: 24px;
  }
  .article-title {
    font-size: 28px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
}
