/* ─────────────────────────────────────────────
   Hriday Jain — dark editorial, warm minimal
   ───────────────────────────────────────────── */

/* Fonts are loaded via <link> in each page's <head> (faster than @import,
   which is render-blocking and only discovered after this CSS downloads). */

:root {
  /* Backgrounds — dark amber-tinted, not black */
  --bg:      #100e09;
  --bg-1:    #151208;
  --bg-2:    #1a1709;
  --bg-3:    #201d0e;
  --border:  #272310;
  --border-2:#322e18;

  /* Text — warm scale */
  --ink:     #ede8d8;
  --ink-2:   #b4ae9e;
  --ink-3:   #756e60;
  --muted:   #48453c;

  /* Primary accent — gold. Used sparingly: links, active states, highlights. */
  --gold:    #c49a3c;
  --gold-d:  rgba(196,154,60,.1);

  /* Secondary palette — all desaturated, all warm-adjacent */
  --amber:   #a06c28;
  --sage:    #4a8464;
  --slate:   #5a68a0;
  --rose:    #9a4e5c;
  --stone:   #7a6e5c;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease:  cubic-bezier(.22,1,.36,1);

  --nav-bg: rgba(14,12,8,.92);
}

/* Skip-to-content link — keyboard accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 6px;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Light theme — refined warm paper ── */
html[data-theme="light"] {
  --bg:      #f6efde;
  --bg-1:    #fbf6e8;
  --bg-2:    #efe5cb;
  --bg-3:    #e3d6b3;
  --border:  #d6c89e;
  --border-2:#bfae82;
  --ink:     #1c1810;
  --ink-2:   #3a3220;
  --ink-3:   #6a5f44;
  --muted:   #968a6a;

  --gold:    #8a5e18;
  --gold-d:  rgba(138,94,24,.09);
  --amber:   #7a4818;
  --sage:    #2f6e54;
  --slate:   #3e4f88;
  --rose:    #7a3848;
  --stone:   #6a5e48;

  --nav-bg: rgba(251,246,232,.86);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 1200px 800px at 18% -10%, rgba(196,154,60,.07), transparent 60%),
    radial-gradient(ellipse 900px 600px at 95% 12%, rgba(154,78,92,.05), transparent 55%),
    radial-gradient(ellipse 1000px 700px at 50% 110%, rgba(74,132,100,.05), transparent 55%);
  background-attachment: fixed;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.7;
  letter-spacing: -.005em;
  overflow-x: hidden;
}
html[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 1200px 800px at 18% -10%, rgba(138,94,24,.10), transparent 60%),
    radial-gradient(ellipse 900px 600px at 95% 12%, rgba(122,56,72,.07), transparent 55%),
    radial-gradient(ellipse 1000px 700px at 50% 110%, rgba(47,110,84,.07), transparent 55%);
}

::selection { background: var(--gold-d); color: var(--ink); }

/* ── Reading bar ── */
.reading-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.reading-bar > span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--amber)); transition: width .05s linear; }

/* ── Layout ── */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 36px; }

/* ─────────── Nav ─────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: center;
  padding: 20px 16px 12px;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 1px;
  padding: 5px;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 12px 36px rgba(0,0,0,.22);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
}
html[data-theme="light"] .nav-pill {
  box-shadow: 0 1px 2px rgba(60,40,10,.06), 0 12px 32px rgba(60,40,10,.08);
}
.brand-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px;
  text-decoration: none; border: none; border-radius: 9px;
  color: var(--ink); font-family: var(--serif); font-size: 15px;
  transition: background .2s;
}
.brand-pill:hover { background: var(--bg-3); border-bottom: none; }
.brand-pill .mark {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #f0d070, #b07820 75%);
  box-shadow: 0 0 8px rgba(196,154,60,.3);
}
.nav-divider { width: 1px; height: 16px; background: var(--border); margin: 0 3px; }
.nav-link {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--ink-3); text-decoration: none; border: none;
  padding: 7px 12px; border-radius: 9px;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-3); border-bottom: none; }
.nav-link.active { color: var(--gold); background: var(--gold-d); }

/* ─────────── Hero — centered full-viewport ─────────── */
.hero-center {
  position: relative;
  min-height: calc(100vh - 76px);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 36px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-center::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 420px at 18% 88%, rgba(74,132,100,.04), transparent 70%),
    radial-gradient(ellipse 620px 420px at 88% 12%, rgba(154,78,92,.03), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
html[data-theme="light"] .hero-center::before {
  background:
    radial-gradient(ellipse 600px 420px at 18% 88%, rgba(47,110,84,.06), transparent 70%),
    radial-gradient(ellipse 620px 420px at 88% 12%, rgba(122,56,72,.05), transparent 70%);
}
.hero-center > * { position: relative; z-index: 1; }

/* Top-left: short identity note (overridden by the block in theme-toggle section) */

/* Top-right: reach link */
.hero-reach {
  position: absolute; top: 38px; right: 36px;
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); border: none;
  letter-spacing: .04em;
  transition: color .2s;
}
.hero-reach:hover { color: var(--gold); border: none; }

/* Center block */
.hero-center-text {
  text-align: center; max-width: 700px;
  display: flex; flex-direction: column; align-items: center;
}
.hero-eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: ""; display: inline-block; width: 24px; height: 1px;
  background: var(--border-2);
}
.hero-main {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 9vw, 112px);
  line-height: .98; letter-spacing: -.035em; color: var(--ink);
  margin: 0 0 22px;
}
.hero-main em {
  color: var(--gold); font-style: italic;
}
.hero-sub {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.5; color: var(--ink-3);
  max-width: 560px; margin: 0 0 38px;
}
.hero-cta-btn {
  position: relative; z-index: 1; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--bg); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 17px 40px;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.10);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
html[data-theme="light"] .hero-cta-btn {
  box-shadow: 0 8px 22px rgba(30,24,12,.22), 0 1px 2px rgba(30,24,12,.10);
}
.hero-cta-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, var(--gold) 0%, var(--amber) 100%);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .55s var(--ease);
}
.hero-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(196,154,60,.42), 0 2px 4px rgba(0,0,0,.16);
  border-color: var(--gold);
}
html[data-theme="light"] .hero-cta-btn:hover {
  box-shadow: 0 16px 36px rgba(138,94,24,.40), 0 2px 4px rgba(30,24,12,.10);
}
.hero-cta-btn:hover::before { transform: scaleX(1); }
.hero-cta-btn .cta-arrow {
  font-family: var(--serif); font-size: 18px;
  letter-spacing: 0; display: inline-block;
  transition: transform .35s var(--ease);
}
.hero-cta-btn:hover .cta-arrow { transform: translateX(6px); }

/* ─────────── Scatter field (thought cards tossed on screen) ─────────── */
.scatter-field {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 4px 2px 8px;
}
.scatter-card {
  transform: rotate(var(--rot, 0deg));
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s var(--ease);
  position: relative; z-index: 1;
}
.scatter-card:hover {
  transform: rotate(0deg) translateY(-3px);
  z-index: 3;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
/* span variants */
.scatter-card.wide { grid-column: span 2; }
.scatter-card.tall { grid-row: span 2; }

/* Live line */
.live-line {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.live-line .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(74,132,100,.5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,132,100,.45); }
  100% { box-shadow: 0 0 0 7px rgba(74,132,100,0); }
}

/* ─────────── Section head ─────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 96px 0 32px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
  position: relative;
}
.section-head::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 48px; height: 1px; background: var(--gold);
}
.section-head h2 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 3vw, 34px); line-height: 1;
  letter-spacing: -.02em; color: var(--ink); text-transform: none;
}
.section-head .meta {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase;
}

/* ─────────── Thought cards ─────────── */
.garden-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.garden-grid .wide { grid-column: span 2; }
.garden-grid .full { grid-column: 1 / -1; }

.thought-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 4px 14px rgba(0,0,0,.08);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease), box-shadow .35s var(--ease);
}
html[data-theme="light"] .thought-card {
  box-shadow: 0 1px 2px rgba(60,40,10,.04), 0 4px 14px rgba(60,40,10,.05);
}
.thought-card:hover {
  border-color: var(--border-2); background: var(--bg-2);
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(0,0,0,.18), 0 16px 36px rgba(0,0,0,.22);
}
html[data-theme="light"] .thought-card:hover {
  box-shadow: 0 3px 8px rgba(60,40,10,.08), 0 16px 36px rgba(60,40,10,.10);
}
.thought-card .tc-label {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .09em;
}
.thought-card h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 21px; line-height: 1.22; letter-spacing: -.02em;
  color: var(--ink); margin: 0;
}
.thought-card p {
  margin: 0; font-size: 14px; color: var(--ink-3); line-height: 1.65;
}
.thought-card .tc-foot { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

/* Left accent — used very selectively */
.thought-card.stripe-gold   { border-left: 2px solid var(--gold); }
.thought-card.stripe-sage   { border-left: 2px solid var(--sage); }
.thought-card.stripe-slate  { border-left: 2px solid var(--slate); }
.thought-card.stripe-rose   { border-left: 2px solid var(--rose); }
.thought-card.stripe-amber  { border-left: 2px solid var(--amber); }
/* legacy aliases */
.thought-card.stripe-yellow { border-left: 2px solid var(--gold); }
.thought-card.stripe-teal   { border-left: 2px solid var(--sage); }
.thought-card.stripe-purple { border-left: 2px solid var(--slate); }
.thought-card.stripe-orange { border-left: 2px solid var(--amber); }

/* Currently row */
.currently-row {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 13.5px; color: var(--ink-3);
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.currently-row:last-child { border-bottom: none; }
.currently-row .cr-label {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em; min-width: 72px;
}
.currently-row .cr-val { color: var(--ink-2); }

/* ─────────── Pills ─────────── */
.pill {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  padding: 2px 8px 3px; border-radius: 4px; white-space: nowrap;
}
.pill.yellow, .pill.gold   { background: rgba(196,154,60,.1); color: var(--gold);  border: 1px solid rgba(196,154,60,.2); }
.pill.orange, .pill.amber  { background: rgba(160,108,40,.1); color: var(--amber); border: 1px solid rgba(160,108,40,.2); }
.pill.teal,   .pill.sage   { background: rgba(74,132,100,.1); color: var(--sage);  border: 1px solid rgba(74,132,100,.2); }
.pill.purple, .pill.slate  { background: rgba(90,104,160,.1); color: var(--slate); border: 1px solid rgba(90,104,160,.2); }
.pill.rose                 { background: rgba(154,78,92,.1);  color: var(--rose);  border: 1px solid rgba(154,78,92,.2); }
.pill.ghost                { background: transparent; color: var(--ink-3); border: 1px solid var(--border-2); }

.eyebrow { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; display: inline-block; margin-bottom: 14px; }

/* ─────────── Typography ─────────── */
h1,h2,h3,h4 { font-family: var(--serif); color: var(--ink); font-weight: 400; line-height: 1.08; letter-spacing: -.022em; margin: 1.6em 0 .45em; }
h1 { font-size: clamp(30px, 5vw, 50px); margin-top: 0; }
h2 { font-size: clamp(20px, 3vw, 28px); margin-top: 2em; }
h3 { font-size: 18px; }

p { margin: 0 0 1.1em; }

a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(196,154,60,.22); transition: border-color .2s ease; }
a:hover { border-bottom-color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

em, i { font-style: italic; font-family: var(--serif); }
strong, b { font-weight: 600; color: var(--ink); }
hr { border: 0; height: 1px; background: var(--border); margin: 40px 0; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: .4em; }
li::marker { color: var(--muted); }

blockquote {
  margin: 2em 0; padding: 20px 24px;
  border-left: 2px solid var(--gold);
  background: var(--gold-d);
  border-radius: 0 8px 8px 0;
  font-family: var(--serif); font-style: italic;
  font-size: 19px; line-height: 1.5; color: var(--ink);
}
blockquote p:last-child { margin: 0; }

code {
  font-family: var(--mono); font-size: .85em;
  background: var(--bg-3); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; color: var(--gold);
}

/* ─────────── Mixed grid (thoughts + essays interlocked) ─────────── */
.mixed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}

/* ─────────── Essay cards ─────────── */
.essay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.essay-grid .essay-featured { grid-column: 1 / -1; }

.essay-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  text-decoration: none; border-bottom: none; color: inherit;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 8px 24px rgba(0,0,0,.14);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .35s var(--ease);
}
html[data-theme="light"] .essay-card {
  box-shadow: 0 1px 2px rgba(60,40,10,.05), 0 6px 20px rgba(60,40,10,.06);
}
.essay-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0,0,0,.22), 0 24px 56px rgba(0,0,0,.32);
}
html[data-theme="light"] .essay-card:hover {
  box-shadow: 0 4px 10px rgba(60,40,10,.10), 0 24px 56px rgba(60,40,10,.14);
}

.essay-cover { height: 170px; position: relative; overflow: hidden; flex-shrink: 0; }
.essay-cover.saas      { background: linear-gradient(140deg, #0c0a1c 0%, #1a0830 40%, #2e0a50 65%, #7a2800 100%); }
.essay-cover.agents    { background: linear-gradient(140deg, #020c18 0%, #051e34 40%, #083428 65%, #2e1600 100%); }
.essay-cover.blueprint { background: linear-gradient(140deg, #02080e 0%, #081828 40%, #0e2840 65%, #082018 100%); }
.essay-cover.dream     { background: linear-gradient(140deg, #14081c 0%, #2a0838 40%, #482060 65%, #5e2818 100%); }
.essay-cover.search    { background: linear-gradient(140deg, #02101c 0%, #08203c 40%, #0a3a58 65%, #1a4a3a 100%); }
.essay-cover.geo       { background: linear-gradient(140deg, #0a140e 0%, #0e2a1c 40%, #1a3e2c 65%, #382e08 100%); }
/* Older post-card style aliases */
.card-cover.dream      { background: linear-gradient(140deg, #14081c 0%, #2a0838 40%, #482060 65%, #5e2818 100%); }
.card-cover.search     { background: linear-gradient(140deg, #02101c 0%, #08203c 40%, #0a3a58 65%, #1a4a3a 100%); }
.card-cover.geo        { background: linear-gradient(140deg, #0a140e 0%, #0e2a1c 40%, #1a3e2c 65%, #382e08 100%); }

/* Light-mode essay covers — softer, muted palette that pairs with cream */
html[data-theme="light"] .essay-cover.saas      { background: linear-gradient(140deg, #4d3870 0%, #6a3460 40%, #8a4a30 70%, #b87a28 100%); }
html[data-theme="light"] .essay-cover.agents    { background: linear-gradient(140deg, #1f3a5a 0%, #2d5a52 40%, #3a6630 70%, #7a5818 100%); }
html[data-theme="light"] .essay-cover.blueprint { background: linear-gradient(140deg, #283b62 0%, #36527a 40%, #4a6a82 70%, #386054 100%); }
html[data-theme="light"] .essay-cover.dream     { background: linear-gradient(140deg, #4a2870 0%, #6a3088 40%, #95527a 70%, #c87a58 100%); }
html[data-theme="light"] .essay-cover.search    { background: linear-gradient(140deg, #243a62 0%, #2f5a82 40%, #3a7888 70%, #4f8870 100%); }
html[data-theme="light"] .essay-cover.geo       { background: linear-gradient(140deg, #2a4032 0%, #3a604e 40%, #527c52 70%, #8a6028 100%); }
html[data-theme="light"] .card-cover.dream      { background: linear-gradient(140deg, #4a2870 0%, #6a3088 40%, #95527a 70%, #c87a58 100%); }
html[data-theme="light"] .card-cover.search     { background: linear-gradient(140deg, #243a62 0%, #2f5a82 40%, #3a7888 70%, #4f8870 100%); }
html[data-theme="light"] .card-cover.geo        { background: linear-gradient(140deg, #2a4032 0%, #3a604e 40%, #527c52 70%, #8a6028 100%); }
html[data-theme="light"] .card-cover.saas       { background: linear-gradient(140deg, #4d3870 0%, #6a3460 40%, #8a4a30 70%, #b87a28 100%); }
html[data-theme="light"] .card-cover.agents     { background: linear-gradient(140deg, #1f3a5a 0%, #2d5a52 40%, #3a6630 70%, #7a5818 100%); }
html[data-theme="light"] .card-cover.blueprint  { background: linear-gradient(140deg, #283b62 0%, #36527a 40%, #4a6a82 70%, #386054 100%); }
.essay-cover::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .5; mix-blend-mode: overlay;
}
.essay-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,.5) 100%);
}
.essay-cover .cover-pill { position: absolute; top: 14px; left: 14px; z-index: 2; }
.essay-cover .cover-num {
  position: absolute; bottom: 12px; right: 14px; z-index: 1;
  font-family: var(--mono); font-size: 48px; font-weight: 500;
  color: rgba(255,255,255,.05); line-height: 1; user-select: none;
}

/* SEO-friendly tag chips */
.essay-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.essay-tag {
  display: inline-block;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px 4px; border-radius: 999px;
  background: transparent; color: var(--ink-3);
  border: 1px solid var(--border);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.essay-card:hover .essay-tag { border-color: var(--border-2); }

/* Genre filter strip */
.cat-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 24px 0 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cat-chip {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px;
  background: transparent; color: var(--ink-3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .25s var(--ease);
}
.cat-chip:hover { color: var(--ink); border-color: var(--border-2); }
.cat-chip.active {
  color: var(--bg); background: var(--ink); border-color: var(--ink);
}
.cat-count {
  margin-left: 6px; opacity: .55; font-size: 10px;
}
.essay-card.is-hidden { display: none !important; }

.essay-body { padding: 16px 22px 18px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.essay-body h3 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(18px, 2.1vw, 22px); line-height: 1.18;
  letter-spacing: -.02em; color: var(--ink);
  transition: color .25s var(--ease);
}
.essay-card:hover .essay-body h3 { color: var(--gold); }
.essay-body p {
  margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.essay-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 14px; margin-top: auto;
  border-top: 1px solid var(--border);
}
.essay-footer .date { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.essay-footer .arrow {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink-3);
  transition: all .25s var(--ease);
}
.essay-card:hover .essay-footer .arrow {
  background: var(--gold); border-color: var(--gold);
  color: var(--bg); transform: rotate(-45deg);
}

/* ─────────── Card covers (old post-card style, keep for compatibility) ─────────── */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.post-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; text-decoration: none; border-bottom: none; color: inherit;
  display: flex; flex-direction: column;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.post-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.post-card.featured { grid-column: 1 / -1; }
.card-cover { height: 160px; position: relative; overflow: hidden; }
.card-cover.saas      { background: linear-gradient(140deg, #0c0a1c 0%, #1a0830 40%, #2e0a50 65%, #7a2800 100%); }
.card-cover.agents    { background: linear-gradient(140deg, #020c18 0%, #051e34 40%, #083428 65%, #2e1600 100%); }
.card-cover.blueprint { background: linear-gradient(140deg, #02080e 0%, #081828 40%, #0e2840 65%, #082018 100%); }
.cover-pill { position: absolute; top: 12px; left: 12px; z-index: 2; }
.cover-num {
  position: absolute; bottom: 10px; right: 12px;
  font-family: var(--mono); font-size: 48px; font-weight: 500;
  color: rgba(255,255,255,.05); line-height: 1; user-select: none;
}
.card-body { padding: 18px 20px 16px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-family: var(--serif); font-size: 18px; color: var(--ink); margin: 0 0 8px; line-height: 1.2; letter-spacing: -.015em; font-weight: 400; }
.card-body p { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; flex: 1; margin: 0 0 16px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.card-footer .date { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.card-footer .arrow { font-size: 14px; color: var(--ink-3); transition: color .2s, transform .2s; }
.post-card:hover .card-footer .arrow { color: var(--gold); transform: rotate(-45deg); }

/* ─────────── Article layout + TOC ─────────── */
.article-layout {
  display: grid; grid-template-columns: 1fr 220px;
  gap: 52px; align-items: start;
  max-width: 1040px; margin: 0 auto; padding: 0 36px;
}

/* Breadcrumb trail (visible + matches BreadcrumbList JSON-LD) */
.breadcrumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 40px 0 -8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .04em;
}
.breadcrumbs a {
  color: var(--ink-3); text-decoration: none; border: none;
  transition: color .2s var(--ease);
}
.breadcrumbs a:hover { color: var(--gold); border: none; }
.breadcrumbs .bc-sep { color: var(--muted); opacity: .6; }
.breadcrumbs .bc-current {
  color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 50vw;
}

.article-head { margin: 24px 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-head .meta-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; font-family: var(--mono); font-size: 11px;
  color: var(--muted); flex-wrap: wrap;
}
.article-head .sep { color: var(--border-2); }
.article-head h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 5vw, 48px); line-height: 1.06;
  letter-spacing: -.025em; color: var(--ink); margin: 0;
}

.article-body p  { font-size: 17px; color: var(--ink-2); line-height: 1.8; }
.article-body h2 { scroll-margin-top: 100px; }
.article-body h3 { scroll-margin-top: 100px; }

/* Comparison / data tables inside posts */
.article-body .post-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0 32px;
  font-size: 15px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.article-body .post-table thead {
  background: var(--bg-2);
}
.article-body .post-table th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-2);
}
.article-body .post-table td {
  padding: 14px 18px;
  color: var(--ink-2);
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
}
.article-body .post-table tbody tr:last-child td { border-bottom: none; }
.article-body .post-table tbody td:first-child {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  font-size: 16px;
  width: 28%;
}
@media (max-width: 720px) {
  .article-body .post-table { font-size: 14px; }
  .article-body .post-table th,
  .article-body .post-table td { padding: 10px 12px; }
}

/* Inline figures with captions */
.article-body .post-figure {
  margin: 32px 0;
  padding: 18px 22px;
  background: var(--bg-1);
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  text-align: center;
}
.article-body .post-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  border-radius: 6px;
}
.article-body .post-figure figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

/* Pretty list for the 3 search types (or any similar "named items" list) */
.article-body .search-type-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.article-body .search-type-list li {
  padding: 14px 16px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
.article-body .search-type-list li strong { font-weight: 400; }

/* Two-card comparison (e.g. LLM vs Agent) */
.article-body .compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 22px 0 28px;
}
.article-body .compare-card {
  padding: 22px 22px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
}
.article-body .compare-card .compare-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.article-body .compare-card p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* Named-role bulleted list (multi-agent roles, etc.) */
.article-body .agent-role-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-body .agent-role-list li {
  position: relative;
  padding: 12px 14px 12px 38px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}
.article-body .agent-role-list li::before {
  content: "";
  position: absolute;
  left: 16px; top: 50%;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateY(-50%);
}
.article-body .agent-role-list li strong {
  color: var(--ink);
  font-weight: 500;
}

/* Closing hashtag (e.g. #HIREAGENTSNOTHUMANS) */
.article-body .post-hashtag {
  margin-top: 36px !important;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--gold);
  text-align: center;
  background: var(--gold-d);
  border-top: 1px solid rgba(196,154,60,.25);
  border-bottom: 1px solid rgba(196,154,60,.25);
}

.article-foot {
  margin-top: 60px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: end; gap: 20px;
}
.article-foot .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.next-essay a { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--gold); border-bottom-color: rgba(196,154,60,.22); }

/* ─────────── Related reading (internal linking) ─────────── */
.related-posts { margin: 48px 0 8px; }
.related-head {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 18px;
}
.related-grid { display: grid; gap: 12px; }
.related-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 12px; text-decoration: none; border-bottom: none;
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.related-card:hover {
  border-color: var(--border-2);
  transform: translateX(3px);
  background: var(--bg-2);
}
.related-cat { flex-shrink: 0; }
.related-title {
  flex: 1; font-family: var(--serif); font-size: 17px;
  color: var(--ink); line-height: 1.25; letter-spacing: -.01em;
  transition: color .25s var(--ease);
}
.related-card:hover .related-title { color: var(--gold); }
.related-arrow {
  flex-shrink: 0; font-family: var(--serif); font-size: 18px;
  color: var(--ink-3); transition: transform .25s var(--ease), color .25s var(--ease);
}
.related-card:hover .related-arrow { color: var(--gold); transform: translateX(3px); }

/* ─────────── Author box (E-E-A-T) ─────────── */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  margin: 36px 0 8px; padding: 24px;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 14px;
}
.author-avatar {
  flex-shrink: 0; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 20px; color: var(--bg);
  background: linear-gradient(140deg, var(--gold), var(--amber));
  border-radius: 50%; letter-spacing: -.01em;
}
.author-info { display: flex; flex-direction: column; gap: 4px; }
.author-kicker {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.author-name {
  font-family: var(--serif); font-size: 20px; color: var(--ink);
  letter-spacing: -.01em; line-height: 1.1;
}
.author-bio {
  font-size: 14px; color: var(--ink-3); line-height: 1.6;
  margin: 4px 0 10px; max-width: 56ch;
}
.author-bio a { color: var(--gold); border-bottom-color: rgba(196,154,60,.22); }
.author-links { display: flex; flex-wrap: wrap; gap: 16px; }
.author-links a {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .04em; color: var(--ink-2); text-decoration: none;
  border-bottom: 1px solid var(--border-2); padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.author-links a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* Cover banner on article pages */
.card-cover.saas, .card-cover.agents, .card-cover.blueprint {
  width: 100%;
}

/* TOC */
.toc-sidebar {
  position: sticky; top: 84px;
  padding: 18px; background: var(--bg-1);
  border: 1px solid var(--border); border-radius: 12px;
  max-height: calc(100vh - 120px); overflow-y: auto;
}
.toc-sidebar::-webkit-scrollbar { width: 3px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
.toc-header {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .09em;
  margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between;
}
.toc-progress-text { color: var(--gold); }
.toc-progress-wrap { height: 1px; background: var(--border-2); border-radius: 99px; margin-bottom: 14px; overflow: hidden; }
.toc-progress-bar { height: 100%; width: 0%; background: var(--gold); border-radius: 99px; transition: width .08s linear; }
.toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1px; }
.toc-list li a {
  display: block; font-family: var(--sans); font-size: 12.5px; line-height: 1.4;
  color: var(--ink-3); padding: 5px 9px; border-radius: 6px; border: none;
  border-left: 2px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.toc-list li a:hover { color: var(--ink-2); background: var(--bg-3); }
.toc-list li.active a { color: var(--gold); background: var(--gold-d); border-left-color: var(--gold); }
.toc-list li.h3 a { padding-left: 18px; font-size: 11.5px; }

/* ─────────── About / Contact ─────────── */
.hero { padding: 64px 0 40px; }
.accent { color: var(--gold); }
.lede { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 600px; margin-top: 20px; }

.info-rows { margin: 24px 0; border-top: 1px solid var(--border); }
.info-rows .row {
  display: grid; grid-template-columns: 120px 1fr; gap: 16px;
  padding: 16px 8px; border-bottom: 1px solid var(--border);
  align-items: baseline;
  transition: background .2s, padding .2s var(--ease); border-radius: 4px;
}
.info-rows .row:hover { background: var(--bg-1); padding-left: 14px; }
.info-rows .row .lbl { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.info-rows .row .val { font-family: var(--serif); font-size: 18px; color: var(--ink); font-weight: 400; }
.info-rows .row .val a { color: var(--gold); border-bottom-color: rgba(196,154,60,.22); }

.timeline { list-style: none; padding: 0; margin: 24px 0; border-left: 1px solid var(--border); }
.timeline li { position: relative; padding: 0 0 26px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 8px;
  width: 9px; height: 9px; background: var(--bg);
  border: 2px solid var(--gold); border-radius: 50%;
  transition: transform .3s var(--ease);
}
.timeline li:hover::before { transform: scale(1.35); background: var(--gold); }
.timeline .when { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.timeline .what { display: block; font-family: var(--serif); font-size: 18px; color: var(--ink); margin-bottom: 3px; line-height: 1.2; }
.timeline .where { display: block; font-size: 13.5px; color: var(--ink-3); }

/* Copy button */
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  background: var(--bg-3); border: 1px solid var(--border-2);
  padding: 4px 10px; border-radius: 5px; cursor: pointer;
  transition: all .2s; text-decoration: none;
}
.copy-btn:hover { color: var(--gold); border-color: rgba(196,154,60,.35); background: var(--gold-d); border-bottom: 1px solid rgba(196,154,60,.35); }

/* ─────────── Theme toggle — Uiverse rocker switch (fixed top-right) ─────────── */
.rocker {
  display: inline-block;
  position: fixed;
  top: 16px;
  right: 22px;
  z-index: 9999;
  font-family: var(--mono);
  font-size: 2em;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  color: #888;
  width: 7em;
  height: 4em;
  overflow: hidden;
  border-bottom: 0.5em solid #d4cebe;
}

.rocker-small {
  font-size: 0.55em;
  margin: 0;
}

html[data-theme="light"] .rocker {
  border-bottom-color: #888;
}

.rocker::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1a1814;
  border: 0.5em solid #d4cebe;
  border-bottom: 0;
}
html[data-theme="light"] .rocker::before {
  background-color: #999;
  border-color: #888;
}

.rocker input { opacity: 0; width: 0; height: 0; }

.switch-left,
.switch-right {
  cursor: pointer;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5em;
  width: 3em;
  transition: 0.2s;
  user-select: none;
}

.switch-left {
  height: 2.4em;
  width: 2.75em;
  left: 0.85em;
  bottom: 0.4em;
  background-color: #ddd;
  color: #888;
  transform: rotate(15deg) skewX(15deg);
}

.switch-right {
  right: 0.5em;
  bottom: 0;
  background-color: #c49a3c;   /* DARK mode active — gold sun-like glow */
  color: #1a1814;
}

.switch-left::before,
.switch-right::before {
  content: "";
  position: absolute;
  width: 0.4em;
  height: 2.45em;
  bottom: -0.45em;
  background-color: #b8af9a;
  transform: skewY(-65deg);
}
.switch-left::before { left: -0.4em; }
.switch-right::before {
  right: -0.375em;
  background-color: transparent;
  transform: skewY(65deg);
}

/* Checked = LIGHT mode active */
input:checked + .switch-left {
  background-color: #c49a3c;
  color: #1a1814;
  bottom: 0px;
  left: 0.5em;
  height: 2.5em;
  width: 3em;
  transform: rotate(0deg) skewX(0deg);
}
input:checked + .switch-left::before {
  background-color: transparent;
  width: 3.0833em;
}
input:checked + .switch-left + .switch-right {
  background-color: #ddd;
  color: #888;
  bottom: 0.4em;
  right: 0.8em;
  height: 2.4em;
  width: 2.75em;
  transform: rotate(-15deg) skewX(-15deg);
}
input:checked + .switch-left + .switch-right::before {
  background-color: #b8af9a;
}

/* Keyboard focus */
input:focus + .switch-left            { color: #333; }
input:checked:focus + .switch-left    { color: #1a1814; }
input:focus + .switch-left + .switch-right { color: #1a1814; }
input:checked:focus + .switch-left + .switch-right { color: #333; }

/* ─────────── News stream (what's new) ─────────── */
.news-stream {
  list-style: none; padding: 0; margin: 24px 0 0;
}
.news-stream li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  padding: 22px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .3s var(--ease), padding .3s var(--ease), border-color .3s var(--ease);
  border-radius: 6px;
  align-items: baseline;
  position: relative;
}
.news-stream li::before {
  content: ""; position: absolute; left: 16px; top: 50%;
  width: 0; height: 1px; background: var(--gold);
  transition: width .35s var(--ease);
  transform: translateY(-50%);
  opacity: 0;
}
.news-stream li:hover {
  background: var(--bg-1); padding-left: 26px;
  border-bottom-color: var(--border-2);
}
.news-stream li:hover::before { width: 14px; opacity: 1; }
.news-when {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .12em;
  padding-top: 4px;
}
.news-what {
  font-family: var(--serif); font-style: italic;
  font-size: 20px; color: var(--ink-2); line-height: 1.5;
  letter-spacing: -.005em;
}
.news-what em { color: var(--ink); font-style: italic; }
.news-what a { color: var(--gold); border-bottom-color: rgba(196,154,60,.28); }

@media (max-width: 600px) {
  .news-stream li { grid-template-columns: 1fr; gap: 4px; }
  .news-what { font-size: 17px; }
}

/* Hero tagline — two-line, top-left */
.hero-tagline {
  position: fixed; top: 44px; left: 38px; z-index: 50;
  display: flex; flex-direction: column; gap: 3px;
  max-width: 260px;
}
.tagline-name {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 18px;
  color: var(--ink); letter-spacing: -.012em;
  line-height: 1;
}
.tagline-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(196,154,60,.55);
  flex-shrink: 0;
}
.tagline-role {
  font-family: var(--serif); font-style: italic;
  font-size: 13.5px; color: var(--ink-3);
  letter-spacing: -.003em;
  margin-left: 17px;
  line-height: 1.3;
}

/* ─────────── Hero "What's new" left panel ─────────── */
.hero-news {
  position: absolute;
  top: 50%; left: 38px;
  transform: translateY(-50%);
  width: 304px;
  max-width: 30vw;
  z-index: 12;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.16), 0 16px 40px rgba(0,0,0,.20);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html[data-theme="light"] .hero-news {
  background: rgba(251,246,232,.92);
  box-shadow: 0 2px 6px rgba(60,40,10,.07), 0 16px 40px rgba(60,40,10,.10);
}
.hero-news-head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.hn-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 0 rgba(74,132,100,.45);
  animation: pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}
.hn-label {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2);
}
.hero-news-scroll {
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.hero-news-scroll::-webkit-scrollbar { width: 4px; }
.hero-news-scroll::-webkit-scrollbar-track { background: transparent; }
.hero-news-scroll::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
.hn-item {
  display: flex; flex-direction: column;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none; border: none;
  border-bottom: 1px solid var(--border);
  transition: background .3s var(--ease), padding .3s var(--ease);
  position: relative;
}
.hn-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 5px;
}
.hn-item:last-child { border-bottom: none; }
.hn-item::before {
  content: ""; position: absolute; left: 10px; top: 50%;
  width: 0; height: 1px; background: var(--gold);
  transition: width .3s var(--ease);
  transform: translateY(-50%);
}
.hn-item:hover { background: var(--bg-2); padding-left: 28px; }
.hn-item:hover::before { width: 12px; }
.hn-date {
  font-family: var(--mono); font-size: 9.5px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .12em;
}
.hn-title {
  font-family: var(--serif); font-size: 15px;
  color: var(--ink); line-height: 1.22; letter-spacing: -.015em;
  transition: color .25s;
  flex: 1;
}
.hn-item:hover .hn-title { color: var(--gold); }
.hn-tag {
  font-size: 9.5px; padding: 2px 7px; flex-shrink: 0;
}
.hn-blurb {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: 12.5px; line-height: 1.5;
  color: var(--ink-3);
  max-height: 0; opacity: 0; margin-top: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease), opacity .3s ease, margin-top .35s var(--ease);
}
.hn-item:hover .hn-blurb {
  max-height: 120px; opacity: 1; margin-top: 7px;
}
.hero-news-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); border: none;
  border-top: 1px solid var(--border);
  transition: color .25s, background .25s;
}
.hero-news-foot:hover { color: var(--gold); background: var(--bg-2); }
.hero-news-foot span { font-family: var(--serif); font-size: 14px; transition: transform .25s var(--ease); }
.hero-news-foot:hover span { transform: translateX(4px); }

@media (max-width: 1080px) {
  .hero-news { width: 260px; }
}
@media (max-width: 900px) {
  .hero-news { display: none; }
}

/* ─────────── Hero "A quick ask" right panel ─────────── */
.hero-ask {
  position: absolute;
  top: 50%; right: 38px;
  transform: translateY(-50%);
  width: 304px;
  max-width: 30vw;
  z-index: 12;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.16), 0 16px 40px rgba(0,0,0,.20);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html[data-theme="light"] .hero-ask {
  background: rgba(251,246,232,.92);
  box-shadow: 0 2px 6px rgba(60,40,10,.07), 0 16px 40px rgba(60,40,10,.10);
}
.hero-ask-head {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.ask-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 0 rgba(154,78,92,.45);
  animation: pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}
.ask-label {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2);
}
.hero-ask-body { padding: 18px 20px 14px; }
.ask-question {
  font-family: var(--serif); font-style: italic;
  font-size: 17px; line-height: 1.35;
  color: var(--ink); margin: 0 0 16px;
  letter-spacing: -.01em;
  min-height: 3em;
}
.ask-form {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color .25s, box-shadow .25s;
}
.ask-form:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,154,60,.10);
}
.ask-input {
  flex: 1; min-width: 0;
  background: transparent;
  border: none; outline: none;
  font-family: var(--sans);
  font-size: 13px; color: var(--ink);
  padding: 6px 0;
}
.ask-input::placeholder { color: var(--muted); font-style: italic; }
.ask-submit {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--bg);
  border: none; border-radius: 999px;
  cursor: pointer; font-size: 15px; line-height: 1;
  transition: background .25s, transform .25s;
  font-family: var(--serif);
}
.ask-submit:hover { background: var(--gold); transform: translateX(2px); }
.ask-submit:disabled { opacity: .4; cursor: not-allowed; transform: none; background: var(--ink); }
.ask-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.ask-skip {
  background: none; border: none; padding: 0;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); cursor: pointer;
  transition: color .25s;
}
.ask-skip:hover { color: var(--gold); }
.ask-count { color: var(--muted); }
.hero-ask-thanks {
  display: none;
  padding: 28px 20px;
  flex-direction: column;
  align-items: center; gap: 12px;
  text-align: center;
}
.hero-ask-thanks.show {
  display: flex;
  animation: thanksFade .45s var(--ease) both;
}
@keyframes thanksFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.thanks-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-d); color: var(--gold);
  border-radius: 999px; font-size: 17px;
  border: 1px solid var(--gold);
}
.thanks-text {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--ink-2);
}
@media (max-width: 1080px) {
  .hero-ask { width: 260px; }
}
@media (max-width: 900px) {
  .hero-ask { display: none; }
}

/* ─────────── Small floating note blocks — paper feel ─────────── */
.postit {
  position: absolute;
  width: 158px;
  padding: 14px 14px 13px;
  background: linear-gradient(155deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  transform: rotate(var(--rot, 0deg));
  transition: box-shadow .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), transform .4s var(--ease);
  z-index: 35;
  box-shadow:
    0 1px 1px rgba(0,0,0,.16),
    0 3px 6px rgba(0,0,0,.14),
    0 10px 20px rgba(0,0,0,.18);
  cursor: default;
  text-align: left;
}
html[data-theme="light"] .postit {
  background: linear-gradient(155deg, #fefae8 0%, #f5edd0 100%);
  border-color: rgba(184,168,116,.55);
  color: var(--ink-2);
  box-shadow:
    0 1px 1px rgba(80,55,15,.06),
    0 3px 6px rgba(80,55,15,.07),
    0 10px 22px rgba(80,55,15,.09);
}

/* GLOW on hover — gentle lift + warm light */
.postit:hover {
  border-color: var(--gold);
  transform: rotate(0deg) translateY(-3px);
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 30px rgba(196,154,60,.30),
    0 12px 30px rgba(0,0,0,.28);
  color: var(--ink);
}
html[data-theme="light"] .postit:hover {
  box-shadow:
    0 0 0 1px var(--gold),
    0 0 30px rgba(138,94,24,.22),
    0 12px 30px rgba(80,55,15,.14);
}

a.postit {
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--ink-2);
}
html[data-theme="light"] a.postit { color: var(--ink-2); }
a.postit:hover { color: var(--ink); }

.postit em.read {
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--gold);
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .postit { display: none; }
}

/* Basketball canvas — fixed full-screen background layer */
#bball-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 30;
}

/* Score popup */
.score-popup {
  position: fixed; top: 36%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold);
  background: var(--bg-1);
  border: 1px solid var(--border-2);
  padding: 8px 20px; border-radius: 99px;
  pointer-events: none; z-index: 9999;
  animation: scorePopup 1.8s ease forwards;
}
@keyframes scorePopup {
  0%   { opacity: 0; transform: translate(-50%, -65%) scale(.85); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
  65%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -38%) scale(.96); }
}

/* ─────────── Footer ─────────── */
.site-footer {
  margin-top: 120px; padding: 40px 0 28px;
  border-top: 1px solid var(--border);
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 1px; background: var(--gold);
}
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .08em;
}
.site-footer a { color: var(--ink-3); border: none; transition: color .25s; }
.site-footer a:hover { color: var(--gold); }

/* ─────────── Scroll reveals ─────────── */
/* Reveal: visible by default. JS adds .pre-reveal to start hidden, then .in fades in.
   Content is never invisible if JS fails. */
.reveal { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.pre-reveal { opacity: 0; transform: translateY(6px); }
.reveal.in { opacity: 1; transform: none; }

/* ─────────── Responsive ─────────── */
@media (max-width: 900px) {
  .hero-center { padding: 80px 24px 52px; min-height: auto; }
  .hero-tagline { position: static; top: auto; left: auto; z-index: auto; margin-bottom: 32px; max-width: none; }
  .hero-reach { top: 16px; right: 20px; }
  .scatter-field { grid-template-columns: 1fr 1fr; }
  .scatter-card.wide { grid-column: span 1; }
  .garden-grid { grid-template-columns: 1fr 1fr; }
  .garden-grid .wide, .garden-grid .full { grid-column: span 1; }
  .mixed-grid { grid-template-columns: 1fr 1fr; }
  .mixed-grid [style*="grid-column:span 2"] { grid-column: span 2; }
  .essay-grid { grid-template-columns: 1fr; }
  .essay-grid .essay-featured { grid-column: 1; }
  .card-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: 1; }
  .article-layout { grid-template-columns: 1fr; padding: 0 20px; }
  .toc-sidebar { position: static; margin-bottom: 32px; max-height: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .scatter-field { grid-template-columns: 1fr; }
  .mixed-grid { grid-template-columns: 1fr !important; }
  .mixed-grid [style*="grid-column:span 2"] { grid-column: span 1 !important; }
  .garden-grid { grid-template-columns: 1fr; }
  .site-header { padding: 12px 12px 8px; }
  .nav-link { padding: 6px 9px; font-size: 12.5px; }
  .brand-pill { padding: 5px 10px 5px 6px; font-size: 14px; }
  .info-rows .row { grid-template-columns: 1fr; gap: 4px; }
  .hero-center { padding: 72px 20px 48px; }
  .hero-tagline { font-size: 10.5px; }
  .article-layout { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ═════════════════════════════════════════════
   PHONE — proper mobile UX (not desktop-shrunk)
   ═════════════════════════════════════════════ */

/* Global text + tap behavior */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  -webkit-tap-highlight-color: rgba(196,154,60,.15);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a, button, input, .rocker, .nav-link, .brand-pill,
.essay-card, .hn-item, .hero-cta-btn {
  -webkit-touch-callout: none;
}

/* ── Touch devices: kill hover states, add tap feedback ── */
@media (hover: none) and (pointer: coarse) {
  .essay-card:hover { transform: none; }
  .essay-card:hover .essay-footer .arrow { transform: none; background: var(--bg-3); border-color: var(--border-2); color: var(--ink-3); }
  .essay-card:hover .essay-body h3 { color: var(--ink); }
  .essay-card:hover .essay-tag { border-color: var(--border); }
  .hero-cta-btn:hover { transform: none; box-shadow: 0 8px 22px rgba(0,0,0,.28); border-color: var(--ink); }
  .hero-cta-btn:hover::before { transform: scaleX(0); }
  .hero-cta-btn:hover .cta-arrow { transform: none; }
  .scatter-card:hover { transform: rotate(var(--rot, 0deg)); box-shadow: none; }
  .postit:hover { transform: rotate(var(--rot, 0deg)); }
  .hn-item:hover { background: transparent; }
  .nav-link:hover { background: transparent; color: var(--ink-3); }
  .cat-chip:hover { background: transparent; color: var(--ink-3); border-color: var(--border); }
  /* Hide hover-only basketball canvas */
  #bball-canvas { display: none !important; }

  /* Tactile press feedback on tap */
  .essay-card:active { transform: scale(.985); transition: transform .12s ease-out; }
  .hero-cta-btn:active { transform: scale(.97); transition: transform .12s ease-out; }
  .hn-item:active { background: var(--bg-2); }
  .cat-chip:active { background: var(--bg-2); }
  .nav-link:active { background: var(--bg-3); }
}

/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {
  /* Article layout stacks; TOC moves above */
  .article-layout { grid-template-columns: 1fr; padding: 0 22px; gap: 0; }
  .toc-sidebar { position: static; margin-bottom: 28px; max-height: none; }
  .scatter-field, .garden-grid, .mixed-grid, .card-grid { grid-template-columns: 1fr 1fr; }
  .essay-grid { grid-template-columns: 1fr; }
  .essay-grid .essay-featured { grid-column: 1; }
}

/* ═══ PHONE (≤ 720px) ═══ Main mobile breakpoint */
@media (max-width: 720px) {

  /* ── Hero: clean and focused. Hide noisy side panels. ── */
  .hero-center {
    min-height: calc(100svh - 60px);   /* svh = small viewport (no URL bar) */
    padding: 88px 22px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0;
    overflow: visible;
  }
  /* Hide both side panels — too cluttered on phone, content is below */
  .hero-news, .hero-ask { display: none !important; }

  .hero-tagline {
    position: static !important;
    top: auto !important; left: auto !important;
    z-index: auto !important;
    margin: 0 0 28px !important;
    align-items: center;
  }
  .tagline-name { font-size: 14px; letter-spacing: 0; justify-content: center; }
  .tagline-dot {
    width: 7px; height: 7px;
    box-shadow: 0 0 14px rgba(196,154,60,.6);
  }
  .hero-center-text {
    width: 100%; max-width: 520px;
    display: flex; flex-direction: column; align-items: center;
    gap: 0;
  }
  .hero-main {
    font-size: clamp(56px, 17vw, 92px);
    line-height: .98; letter-spacing: -.035em;
    margin: 0 0 28px !important;
  }
  .hero-cta-btn {
    padding: 16px 32px;
    font-size: 12px;
    letter-spacing: .2em;
    gap: 12px;
    min-height: 48px;
    border-radius: 999px;
  }
  .hero-cta-btn .cta-arrow { font-size: 17px; }
  .live-line {
    position: static !important;
    transform: none !important;
    bottom: auto !important; left: auto !important;
    margin-top: 40px;
    font-size: 10.5px; letter-spacing: .08em;
  }

  /* ── Site header / nav pill ── */
  .site-header {
    padding: 10px 14px 8px;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .nav-pill { padding: 4px; border-radius: 13px; gap: 0; }
  .nav-link {
    padding: 9px 11px;
    font-size: 12px;
    min-height: 36px;
    display: inline-flex; align-items: center;
  }
  .brand-pill {
    padding: 6px 11px 6px 7px;
    font-size: 14px;
  }
  .brand-pill .mark { width: 16px; height: 16px; }
  .nav-divider { margin: 0 2px; height: 18px; }

  /* ── Theme rocker (keep accessible but unobtrusive) ── */
  .rocker.rocker-small {
    font-size: 0.42em;
    top: 14px; right: 12px;
  }

  /* ── Reading bar ── */
  .reading-bar { height: 2px; }

  /* ── Section heads ── */
  .section-head { margin-bottom: 16px; }
  .section-head h2 { font-size: clamp(28px, 8vw, 38px); }
  .section-head .meta { font-size: 11px; }

  /* ── Essay cards: single column, tactile ── */
  .essay-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }
  .essay-card {
    border-radius: 14px;
  }
  .essay-cover { height: 150px; }
  .essay-cover .cover-num { font-size: 38px; bottom: 8px; right: 12px; }
  .essay-cover .cover-pill { top: 11px; left: 12px; }
  .essay-body {
    padding: 16px 18px 14px;
    gap: 8px;
  }
  .essay-body h3 {
    font-size: 19px;
    line-height: 1.2;
  }
  .essay-body p {
    font-size: 13.5px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
  }
  .essay-tags { margin-top: 8px; gap: 5px; }
  .essay-tag { padding: 2.5px 8px; font-size: 9.5px; }
  .essay-footer {
    padding: 10px 18px 14px;
    border-top: 1px solid var(--border);
  }
  .essay-footer .date { font-size: 10px; }
  .essay-footer .arrow { width: 24px; height: 24px; font-size: 10px; }

  /* ── Blog page hero spacing ── */
  main > .wrap > .hero {
    padding-top: 36px !important;
    padding-bottom: 8px !important;
  }
  .hero h1 { font-size: clamp(40px, 11vw, 60px); line-height: 1.04; }
  .hero .lede { font-size: 15px; line-height: 1.55; }
  .eyebrow { font-size: 10px; }

  /* ── Category filter strip — scrollable on phone ── */
  .cat-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 7px;
    padding: 2px 0 14px;
    margin: 20px -22px 8px;
    padding-left: 22px;
    padding-right: 22px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-filter::-webkit-scrollbar { display: none; }
  .cat-chip {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 11px;
    min-height: 36px;
  }

  /* ── Wrap / page padding ── */
  .wrap { padding: 0 20px; }

  /* ── Article pages ── */
  .article-layout { padding: 0 20px; }
  /* Hide TOC entirely on phone — it pushes article down */
  .toc-sidebar { display: none; }

  /* Article cover banner — shrink dramatically */
  main > div.card-cover {
    height: 160px !important;
  }
  main > div.card-cover > div:last-child {
    bottom: 18px !important;
    padding: 0 22px !important;
  }

  /* Article head */
  .article-head { padding-top: 28px; padding-bottom: 8px; }
  .meta-row {
    font-size: 11px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .meta-row .pill { font-size: 9.5px; padding: 2.5px 9px; }
  .article-head h1 {
    font-size: clamp(30px, 8.4vw, 44px);
    line-height: 1.08;
    letter-spacing: -.025em;
  }

  /* Article body — comfortable reading */
  .article-body { padding: 8px 0 0; }
  .article-body p {
    font-size: 16.5px;
    line-height: 1.72;
    margin: 0 0 18px;
  }
  .article-body h2 {
    font-size: clamp(24px, 6.8vw, 30px);
    margin-top: 36px;
    margin-bottom: 12px;
    line-height: 1.18;
  }
  .article-body h3 {
    font-size: clamp(19px, 5.4vw, 23px);
    margin-top: 26px;
    margin-bottom: 8px;
  }
  .article-body h4 {
    font-size: 16px;
    margin-top: 22px;
    margin-bottom: 6px;
  }
  .article-body ul, .article-body ol {
    padding-left: 22px;
    margin: 12px 0 20px;
  }
  .article-body li {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 8px;
  }
  .article-body blockquote {
    font-size: 17px;
    padding: 16px 18px;
    margin: 22px 0;
    line-height: 1.5;
  }
  .article-body strong { color: var(--ink); }
  .article-body em { color: inherit; }

  /* Inline links — better tappable */
  .article-body a {
    padding: 1px 2px;
    border-radius: 3px;
  }

  /* Article sub-components */
  .article-body .compare-grid { grid-template-columns: 1fr !important; gap: 12px; margin: 20px 0; }
  .article-body .compare-card { padding: 18px 18px 16px; }
  .article-body .compare-card .compare-label { font-size: 10px; margin-bottom: 8px; }
  .article-body .compare-card p { font-size: 15px; }

  .article-body .search-type-list {
    grid-template-columns: 1fr !important;
    gap: 8px;
    margin: 16px 0 20px;
  }
  .article-body .search-type-list li { padding: 12px 14px; font-size: 15.5px; }

  .article-body .agent-role-list {
    margin: 14px 0 22px;
    gap: 8px;
  }
  .article-body .agent-role-list li {
    padding: 12px 14px 12px 36px;
    font-size: 15px;
  }
  .article-body .agent-role-list li::before { left: 14px; }

  .article-body .post-figure {
    padding: 14px 16px;
    margin: 22px 0;
    border-radius: 8px;
  }
  .article-body .post-figure figcaption { font-size: 13px; }

  /* Tables — horizontal scroll with shadow indicator */
  .article-body .post-table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    font-size: 13.5px;
    -webkit-overflow-scrolling: touch;
    margin: 22px -20px;
    padding: 0 20px;
    border-radius: 0;
  }
  .article-body .post-table thead { background: var(--bg-2); }
  .article-body .post-table th,
  .article-body .post-table td { padding: 10px 12px; min-width: 110px; }
  .article-body .post-table tbody td:first-child { width: auto; font-size: 15px; }

  /* Article hashtag closer */
  .article-body .post-hashtag {
    font-size: 12px;
    padding: 14px 16px;
    margin-top: 28px !important;
    letter-spacing: .1em;
  }

  /* Article footer */
  .article-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding-top: 28px;
    margin-top: 44px;
  }
  .article-foot .tags { gap: 5px; }
  .article-foot .pill { font-size: 10px; padding: 3px 9px; }
  .next-essay a { font-size: 16px; }

  /* ── About page timeline + info rows ── */
  .timeline li { padding: 14px 0; }
  .info-rows .row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }
  .info-rows .lbl { font-size: 10.5px; }
  .info-rows .val { font-size: 15.5px; }
  .card-grid.three { grid-template-columns: 1fr; }
  .garden-card { padding: 18px 18px 16px; }
  .garden-card h4 { font-size: 16px; }
  .garden-card p { font-size: 13.5px; }

  /* ── Ambient gradient: simpler for perf ── */
  .hero-center::before { display: none; }
  body { background-image: none; background-color: var(--bg); }

  /* ── Site footer ── */
  .site-footer { padding: 32px 0 28px; }
  .site-footer .wrap {
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
    font-size: 11.5px;
  }

  /* ── Safe area insets for notch phones ── */
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .site-footer .wrap {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ═══ Small phone (≤ 420px) — iPhone SE, etc. ═══ */
@media (max-width: 420px) {
  .hero-main { font-size: clamp(46px, 16vw, 64px); margin-bottom: 22px !important; }
  .hero-center { padding: 76px 18px 44px; }
  .hero-cta-btn { padding: 15px 26px; font-size: 11px; letter-spacing: .16em; }

  .nav-link { padding: 8px 8px; font-size: 11.5px; min-height: 34px; }
  .brand-pill { padding: 5px 9px 5px 6px; font-size: 13px; }
  .brand-pill .mark { width: 14px; height: 14px; }

  .wrap { padding: 0 16px; }
  .article-layout { padding: 0 16px; }

  /* Smaller cover on tiny screens */
  main > div.card-cover { height: 140px !important; }
  .article-head h1 { font-size: clamp(26px, 8vw, 36px); }
  .article-body p { font-size: 16px; }
  .article-body h2 { font-size: clamp(22px, 7vw, 27px); }

  .essay-cover { height: 130px; }
  .essay-body h3 { font-size: 17.5px; }
  .essay-body p { font-size: 13px; -webkit-line-clamp: 2; }
}

/* ═══ Landscape phone — avoid 100vh issues ═══ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero-center { min-height: auto; padding: 70px 24px 40px; }
  .hero-main { font-size: clamp(40px, 8vw, 56px); }
  .live-line { margin-top: 24px; }
}

/* iOS: prevent zoom-on-focus by ensuring input font-size ≥ 16px on phones */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 720px) {
    input[type="text"], input[type="email"], textarea, .ask-input {
      font-size: 16px !important;
    }
  }
}

/* ═════════════════════════════════════════════════════
   FORCED MOBILE FIXES — high specificity, no exceptions
   Width-based, so they fire on every phone regardless of
   hover-detection support.
   ═════════════════════════════════════════════════════ */

@media (max-width: 720px) {

  /* 1. Force hero into column. Some browsers/cached CSS were keeping
        the desktop row layout. Higher specificity wins. */
  body main section.hero-center,
  body main .hero-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex-wrap: nowrap !important;
  }

  /* 2. Basketball canvas — kill on ALL phones (width-based, not just
        hover-detection, since some Android browsers report hover:hover
        even on touch). */
  body #bball-canvas,
  canvas#bball-canvas {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* 3. Theme rocker — was overlapping the nav and rendering huge.
        Hide on phone. System dark-mode preference still works via
        prefers-color-scheme since the page respects it on first load. */
  label.rocker.theme-rocker,
  body > label.rocker {
    display: none !important;
  }

  /* 4. Nav pill: pack tighter so all 4 links + brand fit on 360-390px
        phones without the rocker overlapping. */
  body .nav-pill {
    padding: 3px !important;
    gap: 0 !important;
  }
  body .brand-pill {
    padding: 6px 9px 6px 6px !important;
    font-size: 13px !important;
    gap: 6px !important;
  }
  body .brand-pill .mark { width: 14px !important; height: 14px !important; }
  body .nav-divider { margin: 0 2px !important; }
  body .nav-link {
    padding: 7px 8px !important;
    font-size: 11.5px !important;
    min-height: 34px !important;
  }

  /* 5. Hero tagline — hidden on mobile. The nav already shows the name,
        so "Hriday Jain" above "Hi there." was redundant. */
  body .hero-tagline {
    display: none !important;
  }

  /* 6. Hero center text block forced to column */
  body .hero-center-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body .hero-main {
    text-align: center !important;
    width: 100% !important;
  }

  /* 7. Live line forced static + centered below CTA */
  body .live-line {
    position: static !important;
    transform: none !important;
    top: auto !important; bottom: auto !important;
    left: auto !important; right: auto !important;
    align-self: center !important;
    margin-top: 36px !important;
  }

  /* 8. Sticky nav header — full width so nav-pill can center properly
        and nothing fixed-positioned overlaps */
  body .site-header {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Extra-narrow phones */
@media (max-width: 380px) {
  body .nav-link { padding: 6px 6px !important; font-size: 11px !important; }
  body .brand-pill { font-size: 12.5px !important; padding: 5px 8px 5px 5px !important; }
  body .nav-divider { display: none !important; }
}

/* Related posts + author box on phones */
@media (max-width: 720px) {
  .related-posts { margin: 36px 0 8px; }
  .related-card { padding: 14px 16px; gap: 10px; }
  .related-title { font-size: 15.5px; }
  .author-box { padding: 18px; gap: 14px; margin: 28px 0 8px; }
  .author-avatar { width: 44px; height: 44px; font-size: 17px; }
  .author-name { font-size: 18px; }
  .author-bio { font-size: 13.5px; }
}

/* ═════════════════════════════════════════════════════
   Mobile performance — kill GPU-heavy effects
   ═════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  /* Backdrop-filter (blur + saturate) is the biggest GPU drain on
     mid-range Android. Vivo, Realme, Redmi etc. drop to 15-20fps.
     Replace with a flat translucent background. */
  .nav-pill,
  .hero-news,
  .hero-ask {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Body ambient gradient: kills compositor on phones. Flat color. */
  body {
    background-image: none !important;
    background-attachment: scroll !important;
  }
  .hero-center::before,
  .hero-center::after {
    display: none !important;
  }

  /* Reduce shadow complexity — large multi-layer shadows are expensive */
  .hero-cta-btn {
    box-shadow: 0 4px 14px rgba(0,0,0,.22) !important;
  }
  .nav-pill {
    box-shadow: 0 2px 8px rgba(0,0,0,.10) !important;
  }
  .essay-card {
    box-shadow: none !important;
  }
  .postit {
    box-shadow: 0 2px 4px rgba(0,0,0,.10) !important;
  }

  /* Skip the scroll-reveal animation on mobile — instant render is
     less janky than fade-in on weak GPUs. */
  .reveal, .reveal.pre-reveal, .reveal.in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Reading progress bar animations dropped to 0 to avoid scroll jank */
  .reading-bar > span { transition: width .1s linear !important; }

  /* Disable the basketball canvas at the layout level too */
  #bball-canvas { display: none !important; }

  /* Kill always-running pulse animations on mobile — they run on the
     GPU compositor at 60fps even when offscreen */
  .live-line .dot,
  .hn-pulse,
  .ask-pulse,
  .tagline-dot {
    animation: none !important;
    box-shadow: 0 0 8px rgba(196,154,60,.4) !important;
  }

  /* Disable will-change / transform hints that some browsers eagerly
     promote to GPU layers (extra memory cost on phones) */
  .essay-card, .essay-cover, .hero-cta-btn, .nav-pill {
    will-change: auto !important;
  }
}
