/* ─────────────────────────────────────────────────────────────────
   Niranta — design system
   Editorial, restrained, Stratechery-leaning. One amber, used sparingly.
   Hierarchy via type, not color.
   ───────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&display=swap');

/* ── DESIGN TOKENS ──────────────────────────────────────────────── */
:root {
  /* Brand — one amber, deepened for contrast (5.1:1 on white) */
  --brand:        #D8801A;
  --brand-soft:   #FBF3E7;
  --brand-deep:   #B36412;

  /* Ink — text + neutral progression */
  --ink:          #111111;
  --ink-2:        #353535;
  --ink-3:        #5A5A5A;     /* meta, captions */
  --ink-4:        #8A8A8A;     /* labels, muted ui */
  --ink-5:        #B8B8B8;     /* dim borders, footer */

  /* Surface — paper to desk */
  --surface:      #FFFFFF;
  --surface-2:    #FBFAF6;     /* warm paper / callouts */
  --surface-3:    #F1EEE6;     /* desk light */
  --surface-4:    #E5E1D5;     /* desk dark */
  --surface-ink:  #121212;     /* footer */
  --surface-code: #F5F3EE;

  /* Rules */
  --rule:         #EAE7DD;
  --rule-strong:  #C8C4B8;

  /* Type — single family, opinionated weights */
  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;

  /* Type scale — 8 steps, opinionated */
  --t-eyebrow:    11px;
  --t-meta:       12.5px;
  --t-h4:         12px;        /* section labels */
  --t-tight:      16px;        /* cards, secondary copy */
  --t-body:       17.5px;      /* article prose */
  --t-h3:         19px;
  --t-h2:         26px;
  --t-h1:         44px;        /* hero, article title */

  /* Spacing — 4px base */
  --s-1:  4px;  --s-2:  8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;   --s-8: 32px;  --s-10: 40px;
  --s-12: 48px; --s-14: 56px;  --s-16: 64px; --s-20: 80px;
  --s-24: 96px;

  /* Radii */
  --r-1: 2px;  --r-2: 4px;  --r-3: 8px;

  /* Elevation */
  --shadow-1: 0 1px 2px rgba(20,18,12,0.04);
  --shadow-2: 0 2px 8px rgba(20,18,12,0.06);
  --shadow-3: 0 12px 28px rgba(20,18,12,0.08), 0 2px 6px rgba(20,18,12,0.04);
  --shadow-page:
    0 1px 0 rgba(0,0,0,0.02),
    0 4px 14px rgba(20,18,12,0.05),
    0 24px 56px rgba(20,18,12,0.07);

  /* Motion */
  --ease:    cubic-bezier(0.2, 0, 0, 1);
  --t-fast:  120ms;
  --t-base:  200ms;
  --t-slow:  320ms;

  /* Layout */
  --max-w:     1200px;
  --reading-w:  720px;
  --a4-w:       794px;
  --rail-w:     220px;
  --header-h:    76px;

  /* ── Backwards-compat aliases (do not edit; remove after refactor) ── */
  --brand-light: var(--brand-soft);
  --brand-mid:   #F0A140;       /* legacy gradient mid — used only on home hero */
  --brand-dark:  var(--brand-deep);
  --gradient:    linear-gradient(135deg, var(--brand) 0%, #F0A140 100%);
  --text:        var(--ink);
  --text-2:      var(--ink-2);
  --text-muted:  var(--ink-4);
  --border:      var(--rule);
  --bg:          var(--surface);
  --bg-warm:     var(--surface-2);
  --bg-dark:     var(--surface-ink);
  --code-bg:     var(--surface-code);
  --font-head:   var(--font-display);
  --font-ui:     var(--font-display);
  --max-w-wide:  1320px;
}

/* ── RESET + BASELINE ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* Focus rings — restrained, accessible */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-1);
}

/* ── READING PROGRESS ──────────────────────────────────────────── */
#reading-progress, .reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; width: 0%;
  background: var(--brand);
  z-index: 300;
  transition: width 80ms linear;
}

/* ── SITE HEADER ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--s-12);
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6);
}
.logo-link {
  display: flex; align-items: center; gap: var(--s-3);
  text-decoration: none; color: inherit; flex-shrink: 0;
}
.logo-img { height: 48px; width: auto; display: block; }
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.logo-wordmark {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand); line-height: 1;
}
.logo-tagline {
  font-family: var(--font-body); font-style: italic;
  font-size: 13px; color: var(--ink-4); line-height: 1.2;
}
.main-nav { display: flex; align-items: center; gap: var(--s-8); }
.main-nav a {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.04em; color: var(--ink-2);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--brand);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: var(--brand); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.nav-search {
  background: none; border: none; cursor: pointer;
  color: var(--ink-4);
  transition: color var(--t-fast) var(--ease);
  padding: var(--s-1);
  display: flex; align-items: center;
}
.nav-search:hover { color: var(--brand); }

.mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: var(--s-1);
}
.mobile-toggle span {
  width: 22px; height: 2px; background: var(--ink);
  display: block; border-radius: 2px; transition: all var(--t-base) var(--ease);
}

.mobile-nav {
  display: none; position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: white; z-index: 190;
  padding: var(--s-8); flex-direction: column; gap: 4px; overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600;
  color: var(--ink); text-decoration: none;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--rule);
  transition: color var(--t-fast) var(--ease);
}
.mobile-nav a:hover { color: var(--brand); }

/* ── HOME HERO ─────────────────────────────────────────────────── */
.hero {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.hero-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: var(--s-20) var(--s-12);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--s-20);
  align-items: center;
}
.hero-inner.hero-inner-solo {
  grid-template-columns: 1fr;
  max-width: 820px;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-5);
}

/* Restrained editorial badge — outline, not a gradient pill */
.badge {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand);
  background: transparent;
  border: 1px solid var(--brand);
  padding: 4px 10px; border-radius: var(--r-1);
}
.badge-scheduled {
  color: var(--ink-3); border-color: var(--ink-5); background: transparent;
}

.eyebrow-label {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-4);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.8vw, 54px);
  font-weight: 500; line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: var(--s-5);
}
.hero-title em { font-style: italic; color: var(--brand); }
.hero-meta {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--t-meta);
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
}
.hero-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-5); }
.hero-meta .cat { font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--t-eyebrow); }
.hero-excerpt {
  font-family: var(--font-body);
  font-size: 18px; line-height: 1.7;
  color: var(--ink-2);
  max-width: 580px;
  margin-bottom: var(--s-8);
}

/* Solid amber button — restraint over gradient */
.read-btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: white;
  background: var(--brand);
  border: 1px solid var(--brand);
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--r-1);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.read-btn:hover {
  background: var(--brand-deep); border-color: var(--brand-deep);
  transform: translateY(-1px);
}
.read-btn svg { width: 14px; height: 14px; }

.hero-card {
  background: var(--surface-2);
  border-left: 3px solid var(--brand);
  padding: var(--s-8) var(--s-10);
  border-radius: var(--r-1);
}
.hero-card-quote {
  font-family: var(--font-display); font-style: italic;
  font-size: 19px; line-height: 1.5;
  color: var(--ink); margin-bottom: var(--s-4);
}
.hero-card-source {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-4);
}

/* ── CATEGORY BAR ──────────────────────────────────────────────── */
.cat-bar { border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.cat-bar-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: var(--s-4) var(--s-12);
  display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap;
}
.cat-bar-label {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-4);
}
.cat-tab {
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--r-1);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.cat-tab:hover { color: var(--brand); background: var(--brand-soft); }
.cat-tab.active {
  color: white; background: var(--brand);
}

/* ── POST GRID ─────────────────────────────────────────────────── */
.posts-section {
  max-width: var(--max-w); margin: 0 auto;
  padding: var(--s-16) var(--s-12);
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--s-8); gap: var(--s-6); flex-wrap: wrap;
}
.section-label {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-4);
}
.view-all {
  font-family: var(--font-display);
  font-size: var(--t-meta); font-weight: 600;
  color: var(--brand); text-decoration: none;
}
.view-all:hover { text-decoration: underline; }

.posts-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.post-card {
  display: block;
  padding: var(--s-8) var(--s-8) var(--s-10);
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  text-decoration: none; color: inherit;
  transition: background var(--t-fast) var(--ease);
}
.post-card:nth-child(3n) { border-right: none; }
.post-card:hover { background: var(--surface-2); }
.post-card.featured {
  grid-column: span 2;
  background: var(--surface-2);
}
.post-card-cat {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--s-3);
}
.post-card-title {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 500;
  line-height: 1.32; color: var(--ink);
  margin-bottom: var(--s-3);
  letter-spacing: -0.005em;
}
.post-card.featured .post-card-title { font-size: 26px; line-height: 1.22; }
.post-card-excerpt {
  font-family: var(--font-body);
  font-size: 14.5px; line-height: 1.6;
  color: var(--ink-3);
  margin-bottom: var(--s-4);
}
.post-card-meta {
  font-family: var(--font-display);
  font-size: var(--t-meta);
  color: var(--ink-4);
  display: flex; align-items: center; gap: var(--s-2);
}
.post-card-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-5);
}

/* Future / scheduled treatment — restrained, no harsh gray */
.hero-scheduled .hero-title { color: var(--ink-3); }
.hero-scheduled .hero-title em { color: var(--ink-4); }
.hero-scheduled .hero-excerpt { color: var(--ink-4); }
.hero-scheduled .hero-meta .cat { color: var(--ink-3); }
.hero-scheduled .read-btn {
  color: var(--ink-2); background: transparent; border-color: var(--ink-2);
}
.hero-scheduled .read-btn:hover {
  background: var(--ink); color: white; border-color: var(--ink);
}
/* Future-dated cards: muted styling AND non-interactive until their date.
   pointer-events: none disables the click; cursor: not-allowed signals it.
   aria-disabled="true" + tabindex="-1" (set by template) make this
   accessible to keyboard + screen-reader users. */
.post-card.is-future {
  background: var(--surface-2);
  pointer-events: none;
  cursor: not-allowed;
  user-select: none;
}
.post-card.is-future .post-card-cat { color: var(--ink-4); }
.post-card.is-future .post-card-title { color: var(--ink-3); }
.post-card.is-future .post-card-excerpt { color: var(--ink-4); }
.post-card.is-future .post-card-meta { color: var(--ink-5); }
.post-card.is-future:hover .post-card-title { color: var(--ink-3); }   /* no hover lift */

/* ── HOME QUOTE BAND ───────────────────────────────────────────── */
.quote-band {
  background: var(--surface-ink); color: white;
  padding: var(--s-24) var(--s-12);
}
.quote-band-inner {
  max-width: 900px; margin: 0 auto; text-align: center;
}
.quote-band-mark {
  font-family: var(--font-display);
  font-size: 80px; line-height: 0.5;
  color: var(--brand); margin-bottom: var(--s-6);
}
.quote-band-text {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(22px, 2.6vw, 32px); line-height: 1.45;
  margin-bottom: var(--s-6);
}
.quote-band-source {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-4);
}

/* ── FOOTER ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface-ink); color: var(--ink-5);
  padding: var(--s-16) var(--s-12) var(--s-8);
  margin-top: auto;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s-14); margin-bottom: var(--s-12);
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: white;
  margin-bottom: var(--s-4);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--s-2); }
.footer-col a {
  font-family: var(--font-display);
  font-size: 13px; color: var(--ink-5);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--brand); }
.footer-brand .logo-wordmark {
  color: var(--brand); margin-bottom: var(--s-2); display: block;
}
.footer-brand p {
  font-size: 13px; line-height: 1.7;
  color: var(--ink-5); max-width: 320px;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--s-6);
  border-top: 1px solid #2A2A2A;
  gap: var(--s-4);
}
.footer-bottom span, .footer-bottom a {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow);
  color: #777;
  text-decoration: none;
}
.footer-bottom a:hover { color: var(--brand); }

/* Hide Pagefind metadata spans — visually invisible, still indexed. */
.pf-meta { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── SEARCH BUTTON CHIP ────────────────────────────────────────── */
.nav-search {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 5px var(--s-2) 5px var(--s-3);
  border-radius: var(--r-1);
  border: 1px solid var(--rule);
  color: var(--ink-3);
  background: var(--surface);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.nav-search:hover {
  color: var(--brand); border-color: var(--brand);
}
.nav-search-kbd {
  font-family: 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-4);
  background: var(--surface-2);
  border-radius: var(--r-1);
  padding: 1px 5px;
}

/* ── SEARCH MODAL (Cmd/Ctrl + K) ───────────────────────────────── */
.search-modal {
  position: fixed; inset: 0;
  z-index: 500;
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 8vh 16px 16px;
}
.search-modal.open { display: flex; }
body.search-open { overflow: hidden; }

.search-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 18, 12, 0.40);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.search-modal-panel {
  position: relative;
  width: 100%; max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
  max-height: 80vh;
  overflow: hidden;
  animation: search-pop var(--t-base) var(--ease);
}
@keyframes search-pop {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.search-modal-input-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--rule);
}
.search-modal-icon { color: var(--ink-4); flex-shrink: 0; }
.search-modal-input {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: none; outline: none;
  padding: 4px 0;
}
.search-modal-input::placeholder { color: var(--ink-4); font-style: italic; }
.search-modal-close {
  font-family: 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 11px; font-weight: 600;
  color: var(--ink-4);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  padding: 3px var(--s-2);
  cursor: pointer;
}
.search-modal-close:hover { color: var(--brand); border-color: var(--brand); }

.search-modal-results {
  flex: 1 1 auto; overflow-y: auto;
  padding: var(--s-2);
}
.search-modal-msg {
  padding: var(--s-6);
  font-family: var(--font-body);
  font-size: 14px; color: var(--ink-4);
  font-style: italic;
}
.search-modal-err { color: var(--bad, #b03a2e); font-style: normal; }

.search-modal-local {
  font-style: normal; color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 14px; line-height: 1.6;
  padding: var(--s-3) var(--s-4);
}
.search-modal-local-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--ink); margin-bottom: var(--s-2);
}
.search-modal-local-body {
  color: var(--ink-3);
  margin: var(--s-2) 0;
}
.search-modal-local-body code {
  font-family: 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--surface-code);
  padding: 1px 5px; border-radius: var(--r-1);
}
.search-modal-local-body kbd {
  font-family: 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 11px; font-weight: 600;
  background: var(--surface);
  color: var(--ink-3);
  padding: 1px 5px;
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
}
.search-modal-local-cmd {
  font-family: 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--surface-code);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
  margin: var(--s-3) 0;
  overflow-x: auto;
}

.search-result {
  display: block;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2);
  text-decoration: none; color: inherit;
  transition: background var(--t-fast) var(--ease);
}
.search-result:hover, .search-result.is-active {
  background: var(--surface-2);
}
.search-result-meta {
  display: flex; align-items: center; gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.search-result-cat {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand);
}
.search-result-date,
.search-result-rt {
  font-family: var(--font-display);
  font-size: var(--t-eyebrow);
  color: var(--ink-4);
  letter-spacing: 0.04em;
}
.search-result-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-5);
  flex-shrink: 0;
}
.search-result-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 500;
  line-height: 1.32;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.search-result-excerpt {
  font-family: var(--font-body);
  font-size: 13.5px; line-height: 1.5;
  color: var(--ink-3);
}
.search-result-excerpt mark {
  background: var(--brand-soft);
  color: var(--ink);
  padding: 0 2px; border-radius: 2px;
  font-weight: 500;
}

.search-modal-foot {
  display: flex; gap: var(--s-5); flex-wrap: wrap;
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--rule);
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 11px; color: var(--ink-4);
}
.search-modal-foot kbd {
  font-family: 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 10px; font-weight: 600;
  background: var(--surface);
  color: var(--ink-3);
  padding: 1px 5px;
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  margin-right: 4px;
}

@media (max-width: 640px) {
  .search-modal { padding: 4vh 8px 8px; }
  .search-modal-panel { max-height: 92vh; border-radius: var(--r-2); }
  .nav-search-kbd { display: none; }
}

/* ── MOBILE BOTTOM NAV ─────────────────────────────────────────── */
.mobile-bottom-nav { display: none; }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--s-12); padding: var(--s-14) var(--s-8); }
  .header-inner { padding: 0 var(--s-6); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card.featured { grid-column: span 2; }
  .post-card:nth-child(3n) { border-right: 1px solid var(--rule); }
  .post-card:nth-child(2n) { border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
}
@media (max-width: 820px) {
  .hero-inner { padding: var(--s-12) var(--s-6); }
  .hero-card { padding: var(--s-6) var(--s-5); }
  .hero-card-quote { font-size: 17px; }
  .hero-title { font-size: 30px; }
  .hero-excerpt { font-size: 16px; margin-bottom: var(--s-6); }
  .read-btn { padding: 11px 18px; }
  .post-card { padding: var(--s-6) var(--s-5) var(--s-6); }
  .post-card.featured .post-card-title { font-size: 22px; }
  .cat-bar-inner { padding: var(--s-3) var(--s-6); gap: var(--s-3); }
  .cat-tab { font-size: 11px; padding: 5px 10px; }
}
@media (max-width: 640px) {
  .header-inner { padding: 0 var(--s-4); height: 60px; }
  .logo-img { height: 36px; }
  .logo-tagline { display: none; }
  .main-nav { display: none; }
  .cat-bar { display: none; }
  .nav-search { display: none; }
  .mobile-toggle { display: flex; }
  .mobile-nav { top: 60px; }
  .hero-inner { padding: var(--s-10) var(--s-5); }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: span 1; }
  .post-card { border-right: none !important; }
  .posts-section { padding: var(--s-10) var(--s-5); }
  .quote-band { padding: var(--s-14) var(--s-5); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-inner { padding: 0; }
  .site-footer { padding: var(--s-10) var(--s-5) calc(60px + env(safe-area-inset-bottom, 0px)); }

  .mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--rule);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mbn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center;
    padding: var(--s-2) 2px var(--s-2); text-decoration: none;
    color: var(--ink-4); gap: 3px; min-height: 52px;
    transition: color var(--t-fast) var(--ease);
  }
  .mbn-item.active, .mbn-item:hover { color: var(--brand); }
  .mbn-icon { width: 20px; height: 20px; flex-shrink: 0; }
  .mbn-label {
    font-family: var(--font-display);
    font-size: 9px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
  }
}
