/* Aurora Mesh Gradients — antjanus.com redesign #029
   Color lives in the atmosphere (the aurora field, rims, glows); text stays neutral
   so contrast holds in both themes. */

/* ---------- Primitives ---------- */
:root {
  --night-950: #05060c;
  --night-900: #090b15;
  --night-850: #0e1120;
  --night-800: #141830;
  --slate-brand: #364f6a;
  --fog-50: #f7f6fb;
  --fog-100: #efedf7;
  --white: #ffffff;

  --aurora-teal: #2de2c4;
  --aurora-cyan: #3ab8ff;
  --aurora-violet: #8b6cff;
  --aurora-magenta: #ff5ca8;
  --aurora-amber: #ffb86b;

  --font-sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shell: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Semantic tokens: dark (default — "night") ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--night-950);
  --bg-raised: var(--night-900);
  --surface: rgba(255, 255, 255, .045);
  --surface-strong: rgba(255, 255, 255, .075);
  --surface-solid: var(--night-850);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --ink: #eff1fa;
  --ink-2: #bcc1d4;
  --ink-3: #9197b0;
  --link: #9ddcff;
  --focus: #9ddcff;
  --c-ai: #b9a8ff;
  --c-garden: #6ff0d8;
  --c-tools: #ffc98b;
  --c-story: #ff9cc8;
  --c-proj: #8fd8ff;
  --c-ok: #6ff0b0;
  --c-warn: #ffd27a;
  --c-bad: #ff9a8f;
  --aurora-opacity: .72;
  --aurora-blend: screen;
  --glass-blur: blur(18px) saturate(140%);
  --shadow-glow: 0 30px 80px -30px rgba(139, 108, 255, .45), 0 10px 40px -20px rgba(45, 226, 196, .35);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 20px 50px -30px rgba(0, 0, 0, .9);
  --code-bg: #0a0c17;
  --code-ink: #dfe3f3;
  --btn-primary-ink: #06070d;
  --grain-opacity: .07;
}

/* ---------- Semantic tokens: light ("dawn") ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: var(--fog-50);
  --bg-raised: var(--white);
  --surface: rgba(255, 255, 255, .62);
  --surface-strong: rgba(255, 255, 255, .85);
  --surface-solid: var(--white);
  --line: rgba(22, 24, 58, .10);
  --line-strong: rgba(22, 24, 58, .2);
  --ink: #0c0f1f;
  --ink-2: #363b55;
  --ink-3: #555b77;
  --link: #3136c9;
  --focus: #3136c9;
  --c-ai: #5a3ad6;
  --c-garden: #0b6f62;
  --c-tools: #8f4f00;
  --c-story: #ab1d63;
  --c-proj: #0a60a0;
  --c-ok: #16704f;
  --c-warn: #7e5a00;
  --c-bad: #a02b22;
  --aurora-opacity: .5;
  --aurora-blend: multiply;
  --shadow-glow: 0 30px 70px -35px rgba(90, 58, 214, .45), 0 10px 40px -24px rgba(11, 111, 98, .35);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 20px 40px -30px rgba(22, 24, 58, .35);
  --code-bg: #0d1022;
  --code-ink: #e3e6f5;
  --btn-primary-ink: #ffffff;
  --grain-opacity: .05;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--aurora-violet) 45%, transparent); color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--surface-solid); color: var(--ink); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ---------- The aurora field ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  --b1: var(--aurora-violet); --b2: var(--aurora-teal); --b3: var(--aurora-cyan); --b4: var(--aurora-magenta);
}
body[data-aurora="garden"] .aurora { --b1: var(--aurora-teal); --b2: var(--aurora-cyan); --b3: #2fd08a; --b4: var(--aurora-violet); }
body[data-aurora="ai"] .aurora { --b1: var(--aurora-violet); --b2: var(--aurora-magenta); --b3: var(--aurora-cyan); --b4: #5b5bff; }
body[data-aurora="proj"] .aurora { --b1: var(--aurora-cyan); --b2: var(--aurora-teal); --b3: var(--aurora-violet); --b4: var(--aurora-amber); }
body[data-aurora="about"] .aurora { --b1: var(--aurora-amber); --b2: var(--aurora-magenta); --b3: var(--aurora-violet); --b4: var(--aurora-teal); }
body[data-aurora="patterns"] .aurora { --b1: var(--aurora-cyan); --b2: var(--aurora-violet); --b3: var(--aurora-teal); --b4: #4a6d8c; }
.aurora::before {
  /* the slate-blue brand as the night sky itself */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--slate-brand) 55%, transparent), transparent 70%);
}
:root[data-theme="light"] .aurora::before { background: radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--slate-brand) 18%, transparent), transparent 70%); }
.aurora .blob {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: var(--aurora-opacity); mix-blend-mode: var(--aurora-blend);
  will-change: transform;
}
.aurora .b1 { width: 62vmax; height: 34vmax; left: -12vmax; top: -14vmax; background: radial-gradient(closest-side, var(--b1), transparent); animation: drift-a 29s var(--ease) infinite alternate; }
.aurora .b2 { width: 54vmax; height: 30vmax; right: -16vmax; top: -6vmax; background: radial-gradient(closest-side, var(--b2), transparent); animation: drift-b 37s var(--ease) infinite alternate; }
.aurora .b3 { width: 48vmax; height: 22vmax; left: 18vmax; top: 10vmax; background: radial-gradient(closest-side, var(--b3), transparent); animation: drift-c 23s var(--ease) infinite alternate; opacity: calc(var(--aurora-opacity) * .7); }
.aurora .b4 { width: 40vmax; height: 26vmax; right: 4vmax; bottom: -18vmax; background: radial-gradient(closest-side, var(--b4), transparent); animation: drift-d 41s var(--ease) infinite alternate; opacity: calc(var(--aurora-opacity) * .55); }
.aurora .ribbon {
  position: absolute; left: -10%; right: -10%; top: 4vmax; height: 26vmax;
  background: conic-gradient(from 200deg at 50% 120%, transparent 0 20%, var(--b2) 28%, var(--b1) 36%, var(--b3) 44%, transparent 55% 100%);
  filter: blur(60px); opacity: calc(var(--aurora-opacity) * .45); mix-blend-mode: var(--aurora-blend);
  transform: skewY(-8deg); animation: ribbon 47s linear infinite alternate;
}
.aurora .grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--grain-opacity); mix-blend-mode: overlay; }
.aurora .fade { position: absolute; inset: auto 0 0 0; height: 60vh; background: linear-gradient(to bottom, transparent, var(--bg) 85%); }
@keyframes drift-a { to { transform: translate3d(14vmax, 8vmax, 0) rotate(18deg) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-18vmax, 10vmax, 0) rotate(-22deg) scale(.9); } }
@keyframes drift-c { to { transform: translate3d(-10vmax, -4vmax, 0) scale(1.3); } }
@keyframes drift-d { to { transform: translate3d(-20vmax, -12vmax, 0) rotate(30deg); } }
@keyframes ribbon { to { transform: skewY(-3deg) translateX(8%); } }

/* ---------- Layout ---------- */
.shell { width: min(var(--shell), 100% - 2 * var(--gutter)); margin-inline: auto; }
.shell-narrow { width: min(820px, 100% - 2 * var(--gutter)); margin-inline: auto; }
main { display: block; }
.section { padding-block: clamp(56px, 8vw, 112px); position: relative; }
.section-tight { padding-block: clamp(36px, 5vw, 64px); }
.stack > * + * { margin-top: 1rem; }

/* ---------- Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 14px 0; }
.nav-bar {
  display: flex; align-items: center; gap: 12px;
  width: min(var(--shell), 100% - 2 * var(--gutter)); margin-inline: auto;
  padding: 8px 8px 8px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px -20px rgba(0, 0, 0, .6);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -.02em; margin-right: auto; min-height: 44px; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; }
.brand-word small { font-family: var(--font-mono); font-size: .8125rem; font-weight: 400; color: var(--ink-3); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-size: .9375rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-strong); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-strong); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav-links a.nav-ai { position: relative; color: var(--ink); }
.nav-links a.nav-ai::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(120deg, var(--aurora-teal), var(--aurora-violet), var(--aurora-magenta));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-strong); border-color: var(--line-strong); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
.nav-search { position: relative; display: flex; }
.nav-search input {
  width: 160px; min-height: 44px; padding: 0 14px 0 38px; border-radius: 999px; font: inherit; font-size: .9375rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.nav-search input::placeholder { color: var(--ink-3); }
.nav-search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; color: var(--ink-3); }
.menu-toggle { display: none; }
@media (max-width: 1020px) {
  .nav-search { display: none; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .nav-links {
    display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 4px);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 10px; border-radius: 24px;
    background: color-mix(in srgb, var(--bg-raised) 92%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--line-strong); box-shadow: var(--shadow-glow);
  }
  .nav-links a { min-height: 48px; font-size: 1.0625rem; }
  .site-header.is-open .nav-links { display: flex; }
}

/* ---------- Type pieces ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-violet)); }
.eyebrow.ai { color: var(--c-ai); } .eyebrow.garden { color: var(--c-garden); } .eyebrow.tools { color: var(--c-tools); }
.eyebrow.story { color: var(--c-story); } .eyebrow.proj { color: var(--c-proj); }
.display {
  font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: .98; letter-spacing: -0.045em; font-weight: 600;
}
.display em, .h2 em, .page-title em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em;
}
.glow-text {
  background: linear-gradient(100deg, var(--aurora-teal) 0%, var(--aurora-cyan) 22%, var(--aurora-violet) 48%, var(--aurora-magenta) 72%, var(--aurora-amber) 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sweep 14s ease-in-out infinite alternate;
  padding-right: .06em;
}
:root[data-theme="light"] .glow-text {
  background-image: linear-gradient(100deg, #0b6f62 0%, #0a60a0 22%, #5a3ad6 48%, #ab1d63 72%, #8f4f00 100%);
}
@keyframes sweep { to { background-position: 100% 0; } }
.h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.035em; }
.h3 { font-size: 1.375rem; letter-spacing: -0.02em; }
.lede { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); color: var(--ink-2); max-width: 62ch; line-height: 1.6; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .stack { max-width: 640px; }
.more-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9375rem;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s, background .15s;
}
.more-link:hover { border-color: var(--line-strong); background: var(--surface-strong); }
.more-link span[aria-hidden] { transition: translate .15s var(--ease); }
.more-link:hover span[aria-hidden] { translate: 3px 0; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 0; transition: transform .15s var(--ease), box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  color: var(--btn-primary-ink);
  background: linear-gradient(110deg, var(--aurora-teal), var(--aurora-cyan) 35%, var(--aurora-violet) 70%, var(--aurora-magenta));
  box-shadow: 0 10px 40px -10px color-mix(in srgb, var(--aurora-violet) 70%, transparent);
}
:root[data-theme="light"] .btn-primary { background: linear-gradient(110deg, #0b6f62, #0a60a0 35%, #5a3ad6 70%, #ab1d63); }
.btn-primary:hover { box-shadow: 0 14px 50px -8px color-mix(in srgb, var(--aurora-violet) 85%, transparent); }
.btn-ghost { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.btn-ghost:hover { background: var(--surface-strong); }
.btn-link { color: var(--ink-2); padding: 0 6px; min-height: 44px; font-weight: 500; }
.btn-link:hover { color: var(--ink); text-decoration: underline; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Glass cards with a lit rim + pointer spotlight ---------- */
.glass {
  position: relative; background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  isolation: isolate;
}
.rim::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--rim-angle, 210deg), transparent 0 55%, var(--rim-a, var(--aurora-teal)) 68%, var(--rim-b, var(--aurora-violet)) 80%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .9;
}
.spot { overflow: hidden; }
.spot::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--rim-a, var(--aurora-violet)) 22%, transparent), transparent 60%);
  opacity: 0; transition: opacity .25s;
}
.spot:hover::after, .spot:focus-within::after { opacity: 1; }
.hue-ai { --rim-a: var(--aurora-violet); --rim-b: var(--aurora-magenta); }
.hue-garden { --rim-a: var(--aurora-teal); --rim-b: var(--aurora-cyan); }
.hue-tools { --rim-a: var(--aurora-amber); --rim-b: var(--aurora-magenta); }
.hue-story { --rim-a: var(--aurora-magenta); --rim-b: var(--aurora-violet); }
.hue-proj { --rim-a: var(--aurora-cyan); --rim-b: var(--aurora-teal); }

/* ---------- Start-here shelf ---------- */
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.shelf li { position: relative; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.shelf a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px 26px 28px; color: inherit; text-decoration: none; transition: background .2s; }
.shelf a:hover { background: var(--surface-strong); }
.shelf .num { font-family: var(--font-serif); font-style: italic; font-size: 3.2rem; line-height: 1; }
.shelf h3 { font-size: 1.25rem; line-height: 1.25; }
.shelf a:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.shelf p { font-size: 1rem; color: var(--ink-2); }
.shelf .meta { margin-top: auto; font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
@media (max-width: 860px) { .shelf { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Home hero ---------- */
.hero, .page-head, .article-hero, main { overflow-x: clip; }
.hero { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy .lede { margin-top: 24px; }
.hero-copy .btn-row { margin-top: 32px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; margin-bottom: 28px;
  font-size: .9375rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); text-decoration: none;
}
.status-chip b { font-family: var(--font-mono); font-size: .8125rem; font-weight: 500; color: var(--btn-primary-ink); padding: 3px 9px; border-radius: 999px; background: linear-gradient(110deg, var(--aurora-teal), var(--aurora-violet)); }
:root[data-theme="light"] .status-chip b { background: linear-gradient(110deg, #0b6f62, #5a3ad6); }
.portrait {
  position: relative; border-radius: var(--radius-xl); aspect-ratio: 4 / 5; isolation: isolate;
}
.portrait::before {
  /* aurora rim light bleeding out behind the photo */
  content: ""; position: absolute; inset: -18px; z-index: -1; border-radius: calc(var(--radius-xl) + 18px);
  background: conic-gradient(from 0deg, var(--aurora-teal), var(--aurora-cyan), var(--aurora-violet), var(--aurora-magenta), var(--aurora-amber), var(--aurora-teal));
  filter: blur(42px); opacity: .75; animation: spin 24s linear infinite;
}
:root[data-theme="light"] .portrait::before { opacity: .5; }
.portrait-frame {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; padding: 1px;
  background: linear-gradient(140deg, rgba(255,255,255,.55), rgba(255,255,255,.05) 40%, rgba(255,255,255,.25));
}
.portrait-frame img, .portrait-fallback { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; border-radius: calc(var(--radius-xl) - 1px); background: linear-gradient(160deg, var(--night-800), var(--slate-brand)); }
.portrait-caption {
  position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px; color: #eef0f8; font-size: .9375rem;
  background: rgba(8, 10, 20, .58); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.14);
}
.portrait-caption .mono { font-size: .8125rem; color: #c9cee0; }
@keyframes spin { to { transform: rotate(360deg); } }

.stat-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 40px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat-strip > div { background: color-mix(in srgb, var(--bg) 70%, transparent); padding: 16px 18px; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.stat-strip dt { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.stat-strip dd { margin: 4px 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ---------- Angled aurora band (Stripe-style skewed section) ---------- */
.band {
  position: relative; isolation: isolate; padding-block: clamp(80px, 10vw, 140px); margin-block: clamp(24px, 4vw, 48px);
  clip-path: polygon(0 9%, 100% 0, 100% 91%, 0 100%);
}
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 90% at 15% 30%, color-mix(in srgb, var(--aurora-teal) 85%, transparent), transparent 70%),
    radial-gradient(50% 80% at 55% 70%, color-mix(in srgb, var(--aurora-violet) 90%, transparent), transparent 70%),
    radial-gradient(45% 80% at 90% 20%, color-mix(in srgb, var(--aurora-magenta) 85%, transparent), transparent 70%),
    radial-gradient(40% 70% at 80% 95%, color-mix(in srgb, var(--aurora-amber) 70%, transparent), transparent 70%),
    url("assets/aurora-band.webp") center / cover no-repeat,
    #1a1f4a;
  background-size: 160% 160%, 160% 160%, 160% 160%, 160% 160%, cover; animation: band-move 26s ease-in-out infinite alternate;
}
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 7, 18, .72), rgba(6, 7, 18, .35) 60%, rgba(6, 7, 18, .5)); }
.band, .band h2, .band p { color: #f4f5fb; }
.band p { color: #e3e6f2; }
.band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.1); }
.band .btn-light { background: #fff; color: #0c0f1f; }
.band .btn-light:hover { box-shadow: 0 10px 40px -8px rgba(255,255,255,.5); }
@keyframes band-move { to { background-position: 100% 100%; } }

/* ---------- Cards: posts ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.bento > .span-4 { grid-column: span 4; grid-row: span 2; }
.bento > .span-2 { grid-column: span 2; }
.bento > .span-3 { grid-column: span 3; }
.post-card { display: flex; flex-direction: column; overflow: hidden; }
.post-card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--rim-a, var(--aurora-violet)) 40%, var(--night-850)), var(--night-850)); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--bg) 55%, transparent), transparent 55%); }
.post-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card h3 { font-size: 1.25rem; line-height: 1.25; }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.post-card h3 a:focus-visible { outline: none; }
.post-card:has(h3 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.post-card p { color: var(--ink-2); font-size: 1rem; }
.post-card .meta { margin-top: auto; padding-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); }
.post-card.big h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.03em; }
.post-card.big .thumb { aspect-ratio: auto; flex: 1 1 auto; min-height: 280px; }
.post-card.big .thumb img { position: absolute; inset: 0; }
.post-card.big .body { flex: 0 0 auto; }
.post-card.big p { font-size: 1.0625rem; }
.post-card.textonly .thumb { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rim-a, var(--aurora-violet)); box-shadow: 0 0 12px var(--rim-a, var(--aurora-violet)); flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 11px; border-radius: 999px;
  font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); text-decoration: none;
}
a.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { font-family: var(--font-mono); font-size: .8125rem; font-weight: 500; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }
.badge.new { color: var(--c-garden); }
.badge.updated { color: var(--c-ai); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.card-grid.two { grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); }

/* list rows */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.row-link {
  position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 24px; align-items: baseline;
  padding: 22px 12px; color: inherit; text-decoration: none; border-radius: 14px; transition: background .2s;
}
.row-link:hover { background: var(--surface); }
.row-link time { font-family: var(--font-mono); font-size: .875rem; color: var(--ink-3); }
.row-link h3 { font-size: 1.25rem; transition: color .15s; }
.row-link:hover h3 { color: var(--c-garden); }
.row-link p { margin-top: 6px; color: var(--ink-2); font-size: 1rem; }
.row-link .arrow { color: var(--ink-3); font-size: 1.25rem; transition: translate .2s var(--ease), color .2s; }
.row-link:hover .arrow { translate: 4px 0; color: var(--ink); }
.rows.ai .row-link:hover h3 { color: var(--c-ai); }
.rows.tools .row-link:hover h3 { color: var(--c-tools); }

/* feature tiles */
.tile { padding: 26px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.tile h3 { font-size: 1.1875rem; }
.tile p { color: var(--ink-2); font-size: 1rem; }
.tile .glyph { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-strong); border: 1px solid var(--line); }
.tile .glyph svg { width: 26px; height: 26px; }
.tile .type { font-family: var(--font-mono); font-size: .8125rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.tile .foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
a.tile:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- Page headers ---------- */
.page-head { padding-top: clamp(48px, 8vw, 110px); padding-bottom: clamp(32px, 5vw, 64px); }
.page-title { font-size: clamp(2.8rem, 8vw, 6.4rem); line-height: .96; letter-spacing: -0.05em; margin-top: 18px; }
.page-head .lede { margin-top: 22px; }
.head-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: end; }
.head-art { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--night-800), var(--slate-brand)); border: 1px solid var(--line); box-shadow: var(--shadow-glow); }
.head-art img { width: 100%; height: 100%; object-fit: cover; }
.head-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, transparent 40%, color-mix(in srgb, var(--rim-a, var(--aurora-violet)) 45%, transparent)); mix-blend-mode: screen; }

/* jump / filter pills */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  font: inherit; font-size: .9375rem; font-weight: 500; color: var(--ink-2); text-decoration: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); transition: all .15s;
}
.pill:hover { color: var(--ink); border-color: var(--line-strong); }
.pill[aria-pressed="true"], .pill.is-active { color: var(--ink); background: var(--surface-strong); border-color: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--aurora-violet) 70%, transparent), 0 0 24px -6px color-mix(in srgb, var(--aurora-violet) 60%, transparent); }
.pill .count { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); }
.jump-bar { position: sticky; top: 84px; z-index: 20; padding: 10px 0; }
.jump-bar .pill-row { padding: 6px; border-radius: 999px; width: fit-content; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); scrollbar-width: none; }
.jump-bar .pill { white-space: nowrap; border-color: transparent; background: transparent; }

/* ---------- Forms ---------- */
.field {
  min-height: 48px; padding: 0 16px; border-radius: 14px; font: inherit; font-size: 1rem; width: 100%;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
}
.field::placeholder { color: var(--ink-3); }
.field:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.subscribe { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe .field { flex: 1 1 200px; }
.form-note { font-size: .9375rem; color: var(--ink-3); margin-top: 10px; }
.form-note.is-success { color: var(--c-ok); }
select.field { cursor: pointer; padding-right: 36px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg-raised) 80%, transparent)); position: relative; }
.site-footer::before { content: ""; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--aurora-teal), var(--aurora-violet), var(--aurora-magenta), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 40px; padding-block: 64px 40px; }
.footer-grid h2 { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-grid ul a { display: inline-flex; min-height: 36px; align-items: center; color: var(--ink-2); text-decoration: none; }
.footer-grid ul a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px 40px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .9375rem; }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-cyan), var(--aurora-violet), var(--aurora-magenta)); box-shadow: 0 0 18px var(--aurora-violet); }
.progress-pct { position: fixed; right: 16px; bottom: 16px; z-index: 40; font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.article-hero { padding-top: clamp(32px, 6vw, 80px); }
.crumbs { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9375rem; color: var(--ink-3); }
.crumbs a { color: var(--c-garden); text-decoration: none; font-weight: 500; }
.crumbs a:hover { text-decoration: underline; }
.article-title { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1; letter-spacing: -0.045em; margin-top: 20px; max-width: 16ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; font-family: var(--font-mono); font-size: .875rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.article-meta a { color: var(--ink-2); }
.hero-media { position: relative; margin-top: clamp(32px, 5vw, 56px); border-radius: var(--radius-xl); isolation: isolate; max-width: 1000px; }
.hero-media::before { content: ""; position: absolute; inset: 6% 4% -8%; z-index: -1; background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-violet), var(--aurora-magenta)); filter: blur(60px); opacity: .55; }
.hero-media img { width: 100%; height: auto; border-radius: inherit; border: 1px solid var(--line-strong); background: linear-gradient(135deg, var(--night-800), var(--slate-brand)); }
.article-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); margin-top: clamp(40px, 6vw, 72px); align-items: start; }
.toc { position: sticky; top: 104px; }
.toc h2 { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { position: relative; display: block; padding: 7px 0 7px 16px; color: var(--ink-3); text-decoration: none; font-size: .9375rem; line-height: 1.35; transition: color .15s; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); }
.toc a[aria-current="true"]::before { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: linear-gradient(var(--aurora-teal), var(--aurora-violet)); box-shadow: 0 0 12px var(--aurora-teal); }
.toc-extras { margin-top: 24px; display: grid; gap: 8px; }
.toc-mobile { display: none; margin-bottom: 32px; }
.toc-mobile summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-family: var(--font-mono); font-size: .875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-size: 1.25rem; color: var(--ink-3); }
.toc-mobile[open] summary::after { content: "–"; }
.toc-mobile ol { margin: 0; padding: 0 18px 16px 38px; }
.toc-mobile li { padding: 5px 0; }
.toc-mobile a { color: var(--ink-2); }

.prose { max-width: 700px; font-size: 1.125rem; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.35em; }
.prose h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-top: 2.4em; letter-spacing: -0.03em; scroll-margin-top: 104px; }
.prose h2::before { content: ""; display: block; width: 48px; height: 3px; border-radius: 3px; margin-bottom: 18px; background: linear-gradient(90deg, var(--aurora-teal), var(--aurora-violet)); }
.prose strong { color: var(--ink); }
.prose code:not(pre code) { font-family: var(--font-mono); font-size: .88em; padding: .12em .42em; border-radius: 6px; background: var(--surface-strong); border: 1px solid var(--line); color: var(--ink); }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--ink-3); font-family: var(--font-mono); }
.callout { position: relative; padding: 20px 22px 20px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 1.0625rem; overflow: hidden; }
.callout::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--rim-a, var(--aurora-cyan)), var(--rim-b, var(--aurora-violet))); }
.callout .label { display: block; font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.callout.why { --rim-a: var(--aurora-teal); --rim-b: var(--aurora-cyan); }
.callout.why .label { color: var(--c-garden); }
.callout.question { --rim-a: var(--aurora-violet); --rim-b: var(--aurora-magenta); background: linear-gradient(120deg, color-mix(in srgb, var(--aurora-violet) 12%, transparent), var(--surface) 60%); }
.callout.question .label { color: var(--c-ai); }
.callout.note .label { color: var(--c-tools); }
.callout.note { --rim-a: var(--aurora-amber); --rim-b: var(--aurora-magenta); }
.callout.skill { --rim-a: var(--aurora-cyan); --rim-b: var(--aurora-teal); background: linear-gradient(120deg, color-mix(in srgb, var(--aurora-cyan) 12%, transparent), var(--surface) 70%); }
.callout.skill .label { color: var(--c-proj); }

.code-block { position: relative; border-radius: var(--radius); background: var(--code-bg); border: 1px solid rgba(255,255,255,.08); overflow: hidden; margin-inline: -24px; box-shadow: 0 30px 60px -40px rgba(0,0,0,.8); }
.code-block::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--aurora-teal), var(--aurora-violet), transparent); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.code-head .lang { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: #aab1cc; display: flex; gap: 10px; align-items: center; }
.code-head .lang::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--aurora-cyan); box-shadow: 0 0 10px var(--aurora-cyan); }
.copy-btn { font: inherit; font-family: var(--font-mono); font-size: .8125rem; min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; color: #dfe3f3; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.copy-btn:hover { background: rgba(255,255,255,.12); }
.copy-btn.is-success { color: #6ff0b0; border-color: #6ff0b0; }
pre[class*="language-"], .code-block pre { margin: 0; padding: 20px 22px 22px; overflow-x: auto; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.7; color: var(--code-ink); background: transparent; tab-size: 2; }
code[class*="language-"] { font-family: var(--font-mono); color: var(--code-ink); background: none; text-shadow: none; }
.token.comment, .token.prolog { color: #8a93b5; font-style: italic; }
.token.keyword, .token.module, .token.control-flow { color: #c4a8ff; }
.token.string, .token.template-string { color: #7cf0cf; }
.token.function { color: #8fd2ff; }
.token.class-name, .token.builtin { color: #ffc98b; }
.token.tag { color: #ff9cc8; }
.token.attr-name { color: #ffd6a0; }
.token.punctuation, .token.operator { color: #b5bbd3; }
.token.boolean, .token.number, .token.constant { color: #ff9cc8; }
.token.interpolation-punctuation { color: #c4a8ff; }

.share-zone { margin-top: 64px; padding: 28px; display: grid; gap: 24px; }
.share-zone .btn-row .btn { min-height: 44px; font-size: .9375rem; }
.news-card { padding: clamp(28px, 4vw, 44px); overflow: hidden; }
.news-card::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--aurora-violet) 55%, transparent), transparent); filter: blur(20px); }

/* ---------- Projects ---------- */
.feature-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden; }
.feature-panel .media { position: relative; min-height: 340px; background: linear-gradient(135deg, var(--night-800), var(--slate-brand)); }
.feature-panel .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-panel .copy { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mini-stats div { background: var(--surface-solid); padding: 12px 14px; }
.mini-stats dt { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.mini-stats dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.oss-list { display: grid; gap: 20px; }
.oss { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; }
.oss:nth-child(even) .oss-media { order: 2; }
.oss-media { position: relative; min-height: 280px; background: radial-gradient(80% 90% at 30% 30%, color-mix(in srgb, var(--rim-a, var(--aurora-cyan)) 35%, transparent), transparent), #0b0e1c; }
.oss-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oss-media.contain img { object-fit: contain; padding: 18px; }
.oss-copy { padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.oss-copy h3 { font-size: 1.625rem; }
.oss-copy h3 a { color: inherit; text-decoration: none; }
.oss-copy h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.stars { font-family: var(--font-mono); font-size: .875rem; color: var(--c-tools); }
.side-card .thumb { aspect-ratio: 16 / 10; background: radial-gradient(90% 90% at 20% 20%, color-mix(in srgb, var(--rim-a, var(--aurora-teal)) 40%, transparent), transparent), #0b0e1c; }
.side-card .thumb.noimg { display: grid; place-items: center; }
.side-card .thumb.noimg span { font-family: var(--font-serif); font-style: italic; font-size: 2.4rem; color: #eef0f8; opacity: .9; }

/* ---------- About ---------- */
.about-hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-hero .portrait { aspect-ratio: 1 / 1.1; }
.panel-dark {
  position: relative; border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 64px); overflow: hidden; isolation: isolate;
  background: #080a16; color: #dfe3f2; border: 1px solid rgba(255,255,255,.08);
}
.panel-dark::before { content: ""; position: absolute; inset: -30%; z-index: -1; background: radial-gradient(40% 40% at 20% 20%, rgba(139,108,255,.35), transparent), radial-gradient(35% 35% at 85% 70%, rgba(45,226,196,.25), transparent); filter: blur(30px); }
.panel-dark h2, .panel-dark h3 { color: #fff; }
.panel-dark .muted { color: #a9b0c8; }
.panel-dark .eyebrow { color: #a9b0c8; }
.panel-dark .chip { color: #dfe3f2; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.proverbs { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: pv; }
.proverbs li { counter-increment: pv; display: grid; grid-template-columns: 56px 1fr; align-items: baseline; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-family: var(--font-serif); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2; color: #f4f5fb; }
.proverbs li::before { content: "0" counter(pv); font-family: var(--font-mono); font-style: normal; font-size: .875rem; color: #9ddcff; }
.career-bar { display: flex; gap: 3px; margin-top: 24px; border-radius: 14px; overflow: hidden; }
.career-bar > div { position: relative; padding: 12px 10px; min-width: 0; color: #0b0d1a; font-size: .875rem; line-height: 1.25; }
.career-bar b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.career-bar span { font-family: var(--font-mono); font-size: .8125rem; opacity: .85; }
.timeline { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 16px; }
.timeline > li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; padding: 26px; }
.timeline .period { font-family: var(--font-mono); font-size: .875rem; color: var(--ink-3); }
.timeline h3 { font-size: 1.375rem; margin-bottom: 8px; }
.roles { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.roles li { padding-left: 18px; position: relative; }
.roles li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--rim-a, var(--aurora-teal)); box-shadow: 0 0 10px var(--rim-a, var(--aurora-teal)); }
.roles .role-bullets { margin-top: 6px; color: var(--ink-2); font-size: 1rem; }
details.history > summary { list-style: none; cursor: pointer; }
details.history > summary::-webkit-details-marker { display: none; }
details.history[open] .when-closed { display: none; }
details.history:not([open]) .when-open { display: none; }
.cap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.cap { padding: 26px; border-radius: var(--radius-lg); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); }
.cap h3 { font-size: 1.25rem; }
.cap p { margin: 8px 0 16px; color: #c3c9dc; }
.beyond { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: stretch; }
.beyond .photo { border-radius: var(--radius-lg); overflow: hidden; min-height: 360px; position: relative; background: linear-gradient(135deg, var(--night-800), var(--slate-brand)); }
.beyond .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Stories ---------- */
.story-card { overflow: hidden; display: flex; flex-direction: column; }
.story-card .thumb { aspect-ratio: 4 / 3; position: relative; overflow: hidden; background: radial-gradient(80% 80% at 30% 30%, rgba(255,92,168,.45), transparent), #120a1c; }
.story-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-card .part { position: absolute; top: 14px; left: 14px; font-family: var(--font-mono); font-size: .8125rem; padding: 4px 10px; border-radius: 999px; color: #fff; background: rgba(10,6,20,.6); border: 1px solid rgba(255,255,255,.25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.story-card.soon { border-style: dashed; }
.story-card.soon .thumb { display: grid; place-items: center; }
.story-card.soon .thumb span { font-family: var(--font-serif); font-style: italic; font-size: 2rem; color: #ffd0e6; }
.notice { display: flex; gap: 14px; align-items: start; padding: 18px 20px; border-radius: var(--radius); background: color-mix(in srgb, var(--aurora-amber) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--aurora-amber) 45%, transparent); }
.notice strong { color: var(--c-tools); }

/* ---------- Patterns ---------- */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ways .tile .num { font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); }
.pattern-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 16px; }
.pattern-tools .search { position: relative; }
.pattern-tools .search svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--ink-3); }
.pattern-tools .search .field { padding-left: 44px; min-height: 54px; border-radius: 999px; font-size: 1.0625rem; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 24px; }
.result-bar .count { font-family: var(--font-mono); font-size: .9375rem; color: var(--ink-2); }
.clear-btn { font: inherit; font-size: .9375rem; background: none; border: 0; color: var(--link); cursor: pointer; min-height: 44px; padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; }
.pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.pattern-card { display: flex; flex-direction: column; overflow: hidden; }
.pattern-card[hidden] { display: none; }
.p-thumb { position: relative; height: 180px; overflow: hidden; border-bottom: 1px solid var(--line); --h: 260; background: radial-gradient(70% 90% at 20% 10%, hsl(var(--h) 90% 62% / .55), transparent 70%), radial-gradient(60% 80% at 90% 100%, hsl(calc(var(--h) + 70) 90% 60% / .45), transparent 70%), #0b0e1c; }
:root[data-theme="light"] .p-thumb { background: radial-gradient(70% 90% at 20% 10%, hsl(var(--h) 90% 70% / .6), transparent 70%), radial-gradient(60% 80% at 90% 100%, hsl(calc(var(--h) + 70) 90% 70% / .5), transparent 70%), #eef0f8; }
.p-thumb .mock { position: absolute; inset: 26px 28px; display: grid; gap: 8px; }
.mock .bar { height: 12px; border-radius: 6px; background: rgba(255,255,255,.35); }
:root[data-theme="light"] .mock .bar, :root[data-theme="light"] .mock .tile-m, :root[data-theme="light"] .mock .field-m { background: rgba(12,15,31,.16); }
.mock .tile-m { border-radius: 8px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); }
.mock .field-m { height: 30px; border-radius: 8px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); }
.mock.data { grid-template-columns: repeat(8, 1fr); align-items: end; }
.mock.data .bar { height: auto; border-radius: 4px 4px 0 0; }
.mock.layout { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.mock.layout .tile-m:first-child { grid-row: span 2; }
.mock.interaction { grid-template-columns: repeat(3, 1fr); align-content: center; }
.mock.interaction .tile-m { height: 44px; }
.mock.interaction .tile-m.on { background: rgba(255,255,255,.55); box-shadow: 0 0 22px rgba(255,255,255,.5); }
.mock.forms { align-content: center; }
.mock.forms .row { display: flex; gap: 6px; }
.mock.forms .row .bar { width: 64px; height: 22px; border-radius: 999px; }
.mock.color { grid-template-columns: repeat(5, 1fr); align-items: stretch; }
.mock.color .sw { border-radius: 10px; border: 1px solid rgba(255,255,255,.3); }
.pattern-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pattern-card .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-mono); font-size: .8125rem; color: var(--ink-3); }
.pattern-card .top .cat { text-transform: uppercase; letter-spacing: .1em; color: var(--c-proj); }
.pattern-card h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
.pattern-card h2 a { color: inherit; text-decoration: none; }
.pattern-card h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pattern-card h2 a:focus-visible { outline: none; }
.pattern-card:has(h2 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.pattern-card p { font-size: 1rem; color: var(--ink-2); }
.pattern-card .good { font-size: .9375rem; color: var(--ink-3); }
.pattern-card .good b { color: var(--ink-2); font-weight: 600; }
.empty-state { text-align: center; padding: 64px 24px; }
.empty-state svg { width: 72px; height: 72px; color: var(--ink-3); margin: 0 auto 16px; }

/* pattern detail */
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.back-link:hover { color: var(--ink); }
.usecases { columns: 2; column-gap: 32px; padding-left: 1.2em; margin: 14px 0 0; }
.usecases li { padding: 4px 0; break-inside: avoid; }
.panes { overflow: hidden; margin-top: 40px; }
.panes-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { font: inherit; font-size: .9375rem; font-weight: 500; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; color: var(--ink-2); background: transparent; border: 1px solid transparent; }
.tab:hover { color: var(--ink); background: var(--surface); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--surface-strong); border-color: var(--line-strong); box-shadow: 0 0 22px -8px var(--aurora-cyan); }
.pane { padding: clamp(18px, 3vw, 32px); }
.pane[hidden] { display: none; }
.pane pre { margin: 0; padding: 20px; border-radius: 14px; background: var(--code-bg); color: var(--code-ink); overflow-x: auto; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.65; }
.pane .pane-note { margin-bottom: 16px; color: var(--ink-2); font-size: 1rem; }
.prompt-text { max-width: 70ch; font-size: 1.0625rem; }
.prompt-text p + p { margin-top: 1em; }
.prompt-text code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-strong); padding: .1em .35em; border-radius: 5px; }

/* the demo pattern itself (hairline stat strip), themed via pattern tokens */
.stage { --p-ground: #10141a; --p-surface: #191f27; --p-border: #2c3743; --p-ink: #e6ecf3; --p-dim: #97a4b4; --p-accent: #6f92bd; --p-ok: #4fbe93; --p-warn: #ddb44a; --p-bad: #ee8579;
  background: var(--p-ground); color: var(--p-ink); border-radius: 14px; padding: clamp(16px, 3vw, 28px); font-family: var(--font-sans); }
:root[data-theme="light"] .stage { --p-ground: #eef0f3; --p-surface: #ffffff; --p-border: #d2d8e0; --p-ink: #161b22; --p-dim: #56606e; --p-accent: #364f6a; --p-ok: #1c6e52; --p-warn: #7e610f; --p-bad: #a03227; }
.stage .cap { font-size: .9375rem; color: var(--p-dim); margin: 0 0 12px; background: none; border: 0; padding: 0; }
.stage .cap + .hss-strip { margin-bottom: 28px; }
.hss-strip { display: grid; gap: 1px; background: var(--p-border); border: 1px solid var(--p-border); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; }
@container stage (min-width: 21rem) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@container stage (min-width: 42rem) { .hss-strip { grid-template-columns: repeat(4, 1fr); } .hss-strip.five { grid-template-columns: repeat(5, 1fr); } }
.stage { container: stage / inline-size; }
.hss-tile { background: var(--p-surface); padding: 14px 16px; min-width: 0; text-align: left; font: inherit; color: inherit; border: 0; }
.hss-label { display: block; font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--p-dim); }
.hss-figure { display: block; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.hss-sub { display: block; font-size: .875rem; color: var(--p-dim); }
.hss-figure.empty { color: var(--p-dim); font-weight: 400; }
button.hss-tile { cursor: pointer; min-height: 44px; }
button.hss-tile:hover { background: color-mix(in srgb, var(--p-accent) 7%, var(--p-surface)); }
button.hss-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--p-accent) 18%, var(--p-surface)); box-shadow: inset 0 -3px 0 var(--p-accent); }
button.hss-tile:focus-visible { outline: 3px solid var(--p-accent); outline-offset: -3px; border-radius: 0; }
.hss-list { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--p-border); border-radius: 10px; overflow: hidden; }
.hss-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; background: var(--p-surface); border-top: 1px solid var(--p-border); font-size: 1rem; }
.hss-list li:first-child { border-top: 0; }
.hss-list li[hidden] { display: none; }
.hss-status { font-family: var(--font-mono); font-size: .8125rem; white-space: nowrap; }
.hss-status[data-s="Done"] { color: var(--p-ok); } .hss-status[data-s="Failed"] { color: var(--p-bad); } .hss-status[data-s="Downloading"] { color: var(--p-accent); } .hss-status[data-s="Queued"] { color: var(--p-dim); }
.hss-live { margin-top: 10px; font-size: .9375rem; color: var(--p-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-mobile { display: block; }
  .code-block { margin-inline: 0; }
}
@media (max-width: 960px) {
  .hero-grid, .head-grid, .about-hero, .feature-panel, .beyond { grid-template-columns: minmax(0, 1fr); }
  .hero-grid .portrait { max-width: 420px; }
  .about-hero .portrait { max-width: 380px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento > .span-4 { grid-column: span 2; grid-row: auto; }
  .bento > .span-2, .bento > .span-3 { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .oss { grid-template-columns: minmax(0, 1fr); }
  .oss:nth-child(even) .oss-media { order: 0; }
  .ways { grid-template-columns: minmax(0, 1fr); }
  .timeline > li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cap-grid { grid-template-columns: minmax(0, 1fr); }
  .head-art { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > .span-2, .bento > .span-3, .bento > .span-4 { grid-column: auto; }
  .row-link { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 18px 8px; }
  .row-link .arrow { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .stat-strip dd { font-size: 1.5rem; }
  .stat-strip > div { padding: 12px; }
  .career-bar { flex-direction: column; }
  .career-bar > div { flex: none !important; }
  .usecases { columns: 1; }
  .pattern-tools { grid-template-columns: minmax(0, 1fr); }
  .band { clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%); }
  .brand-word small { display: none; }
  .prose { font-size: 1.0625rem; }
  .proverbs li { grid-template-columns: 40px 1fr; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
