/* Layout: a calm personal site. Serif headlines over a stone-white page, text-first lists,
   hairline dividers and very few boxes. Color stays muted and carries meaning only:
   clay is Kevin (his decisions), slate is the AI team's work. */
:root {
  --paper: #F4F4F1;
  --paper-2: #EBEBE6;
  --surface: #FBFBF9;
  --ink: #18181A;
  --ink-2: #3D3D40;
  --muted: #6B6B70;
  --line: #E1E1DC;
  --line-2: #CBCBC5;

  --accent: #475A72;
  --accent-soft: #E5E8EC;
  --accent-line: #B4BECB;
  --human: #9A573F;
  --human-soft: #EFE3DC;

  --live: #4C7A5B;
  --live-soft: #E2EBE3;
  --progress: #87672E;
  --progress-soft: #EFE8D9;
  --done: #6B6B70;
  --done-soft: #E9E9E4;

  --band: #18181A;
  --band-2: #2A2A2D;
  --band-ink: #F4F4F1;
  --band-muted: #9C9C98;

  --dot: rgba(24, 24, 26, 0.12);
  --shadow-1: 0 1px 2px rgba(24, 24, 26, 0.04), 0 6px 18px -12px rgba(24, 24, 26, 0.14);
  --shadow-2: 0 1px 2px rgba(24, 24, 26, 0.04), 0 18px 40px -24px rgba(24, 24, 26, 0.22);

  /* Self-contained surfaces that look the same in both themes */
  --book-1: #5E7A8C; --book-2: #A5584A; --book-3: #C9A65A; --book-4: #C7959C; --book-5: #C27C4E;
  --book-6: #4E6B5C; --book-7: #6B6A8E; --book-8: #8FA184; --book-9: #8A5A40;
  --book-ink-light: #FBF7F0; --book-ink-dark: #2A2219;
  --film-bg: #111113; --film-ink: #ECEBE7; --yt: #FF0033;
  --window: #DDB36E;
  --shelf: #3D3D40;

  --f-display: "Newsreader", Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  --f-body: "Hanken Grotesk", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC", monospace;

  --t-hero: clamp(3rem, 6.4vw, 5.6rem);
  --t-h2: clamp(2.2rem, 4.6vw, 3.8rem);
  --t-h3: clamp(1.5rem, 2.4vw, 2.1rem);
  --t-lede: clamp(1.075rem, 1.35vw, 1.2rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-label: 0.75rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --header-h: 68px;
  --gut-l: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px));
  --gut-r: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141414; --paper-2: #1B1B1B; --surface: #1E1E1F; --ink: #ECEBE7; --ink-2: #C8C7C2;
    --muted: #95948F; --line: #2B2B2C; --line-2: #3A3A3B;
    --accent: #A3B2C6; --accent-soft: #252A31; --accent-line: #4D5A6B;
    --human: #D59C82; --human-soft: #382821;
    --live: #8EB898; --live-soft: #1F2B22; --progress: #CDB27C; --progress-soft: #2E281C;
    --done: #A2A19C; --done-soft: #252525;
    --band: #0E0E0E; --band-2: #232323; --band-ink: #ECEBE7; --band-muted: #8F8E89; --shelf: #3A3A3B;
    --dot: rgba(236, 235, 231, 0.08);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 18px -12px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -24px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141414; --paper-2: #1B1B1B; --surface: #1E1E1F; --ink: #ECEBE7; --ink-2: #C8C7C2;
  --muted: #95948F; --line: #2B2B2C; --line-2: #3A3A3B;
  --accent: #A3B2C6; --accent-soft: #252A31; --accent-line: #4D5A6B;
  --human: #D59C82; --human-soft: #382821;
  --live: #8EB898; --live-soft: #1F2B22; --progress: #CDB27C; --progress-soft: #2E281C;
  --done: #A2A19C; --done-soft: #252525;
  --band: #0E0E0E; --band-2: #232323; --band-ink: #ECEBE7; --band-muted: #8F8E89; --shelf: #3A3A3B;
  --dot: rgba(236, 235, 231, 0.08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 18px -12px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -24px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
em { font-style: normal; }
::selection { background: var(--accent); color: var(--surface); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--f-body); font-variant-numeric: tabular-nums; }
.code, .log { font-family: var(--f-mono); }
.human { color: var(--human); }
.agent { color: var(--accent); }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--paper); text-decoration: none;
  transform: translateY(-160%); transition: transform 0.3s var(--ease-out);
}
.skip:focus { transform: translateY(0); }

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-left: var(--gut-l);
  padding-right: var(--gut-r);
}

/* ---------- Buttons and links ---------- */
.btn {
  --btn-h: 48px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  height: var(--btn-h); padding-inline: 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 500 0.975rem/1 var(--f-body);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-sm { --btn-h: 38px; padding-inline: 16px; font-size: 0.9rem; }
.btn-lg { --btn-h: 60px; padding-inline: 30px; font-size: 1.05rem; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); color: var(--paper); }
.btn-line { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--surface); border-color: var(--ink); }
.btn-paper { background: var(--band-ink); color: var(--band); }
.btn-paper:hover { background: var(--human); color: #fff; }
.arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-weight: 500; text-decoration: none;
  color: var(--accent);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease-out);
}
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; transition: transform 0.4s var(--ease-out); }
.link-arrow:hover svg { transform: translate(2px, -2px); }

.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.icon-btn:hover { background: var(--surface); border-color: var(--line-2); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: transform 0.5s var(--ease-out), background-color 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.bar {
  height: var(--header-h);
  max-width: 1280px; margin-inline: auto;
  padding-left: var(--gut-l); padding-right: var(--gut-r);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.2rem/1 var(--f-display); letter-spacing: -0.005em; }
.brand-mark {
  position: relative; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--accent); display: grid; place-items: center;
}
.brand-mark i { width: 10px; height: 10px; border-radius: 50%; background: var(--human); }
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.brand-mark::before { top: -3px; right: 2px; }
.brand-mark::after { bottom: 0; left: -3px; }
.brand:hover .brand-mark { animation: spin 1.4s var(--ease-out); }
@keyframes spin { to { transform: rotate(360deg); } }

.nav { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
.nav a {
  position: relative; z-index: 1;
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.925rem; font-weight: 500; text-decoration: none; color: var(--muted);
  transition: color 0.3s;
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav-indicator {
  position: absolute; left: 0; top: 4px; height: calc(100% - 8px); width: 0;
  border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-1);
  opacity: 0; transition: transform 0.55s var(--ease-out), width 0.55s var(--ease-out), opacity 0.3s;
}
.bar-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle svg { width: 18px; height: 18px; overflow: visible; }
.sun-core { fill: var(--ink); transition: r 0.5s var(--ease-out), fill 0.3s; }
.moon-bite { transition: transform 0.6s var(--ease-out); }
.sun-rays { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; fill: none; transform-origin: 12px 12px; transition: transform 0.6s var(--ease-out), opacity 0.4s; }
:root[data-theme="dark"] .sun-core { r: 7px; }
:root[data-theme="dark"] .moon-bite { transform: translate(-8px, 6px); }
:root[data-theme="dark"] .sun-rays { transform: rotate(90deg) scale(0.4); opacity: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sun-core { r: 7px; }
  :root:not([data-theme="light"]) .moon-bite { transform: translate(-8px, 6px); }
  :root:not([data-theme="light"]) .sun-rays { transform: rotate(90deg) scale(0.4); opacity: 0; }
}
.menu-open body { overflow: hidden; }
.menu-btn { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-btn span { display: block; width: 16px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform 0.45s var(--ease-out); }
.menu-open .menu-btn span:first-child { transform: translateY(3.3px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-3.3px) rotate(-45deg); }

.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }

.menu-sheet {
  position: fixed; inset: 0; z-index: 45;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 24px);
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  padding-left: var(--gut-l); padding-right: var(--gut-r);
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--paper);
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0s linear 0.45s;
}
.menu-open .menu-sheet { opacity: 1; visibility: visible; transition: opacity 0.45s var(--ease-out), visibility 0s; }
.menu-links { display: grid; gap: 4px; }
.menu-links a {
  font: 500 clamp(2.4rem, 11vw, 3.6rem)/1.1 var(--f-display);
  letter-spacing: -0.02em; text-decoration: none; padding-block: 6px;
  border-bottom: 1px solid var(--line);
}
.menu-meta { font-size: var(--t-label); color: var(--muted); letter-spacing: 0.005em; }

/* ---------- Shared section parts ---------- */
.section { padding-block: clamp(88px, 12vw, 168px); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 860px; }
.section-head-row { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 48px; }
.section-head-row > .head-main { display: grid; gap: 18px; max-width: 760px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: italic 400 1.25rem/1.2 var(--f-display); letter-spacing: 0;
  color: var(--muted);
}
h2 {
  font-family: var(--f-display); font-weight: 500;
  font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.018em;
  text-wrap: balance;
}
.section-sub { color: var(--muted); max-width: 58ch; font-size: var(--t-lede); line-height: 1.55; text-wrap: pretty; }
.split-word { display: inline-block; will-change: transform; }

.status {
  display: inline-flex; align-items: center; gap: 7px; width: max-content;
  padding: 0; border-radius: 999px;
  font: 500 0.6875rem/1 var(--f-body); letter-spacing: 0.005em; white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--live); }
.status-progress { color: var(--progress); }
.status-done { color: var(--done); }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  80%, 100% { box-shadow: 0 0 0 7px transparent; }
}

[data-spot] { position: relative; }
[data-spot]::after { display: none;
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 9%, transparent), transparent 62%);
  opacity: 0; transition: opacity 0.5s var(--ease-out);
}
[data-spot]:hover::after { opacity: 1; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.about-copy { display: grid; gap: 18px; min-width: 0; }
.about-copy h2 { margin-bottom: 6px; }
.about-copy p { font-size: var(--t-lede); line-height: 1.65; color: var(--ink-2); max-width: 54ch; text-wrap: pretty; }
.timeline { position: relative; display: grid; gap: 26px; padding-left: 30px; margin-top: 8px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line-2); }
.timeline li { position: relative; display: grid; gap: 4px; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: 5px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--accent);
}
.timeline li.is-now::before { background: var(--human); border-color: var(--human); box-shadow: 0 0 0 5px var(--human-soft); }
.tl-when { font: italic 500 1.05rem/1.2 var(--f-display); color: var(--accent); }
.timeline li.is-now .tl-when { color: var(--human); }
.tl-what { color: var(--ink-2); line-height: 1.55; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(36px, 6vw, 88px));
  padding-bottom: clamp(48px, 6vw, 80px);
  isolation: isolate;
}
.hero::before { content: none; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(36px, 5vw, 80px); align-items: center;
}
.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%;
  padding: 0; border-radius: 999px;
  background: none; border: 0;
  font: 500 0.8125rem/1.3 var(--f-body); color: var(--ink-2);
}
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; }
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live); animation: pulse 2.2s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3.2); opacity: 0; } }

.hero-title {
  font-family: var(--f-display); font-weight: 500;
  font-size: var(--t-hero); line-height: 0.98; letter-spacing: -0.02em;
}
.hero-title .line { display: block; overflow: hidden; padding-block: 0.04em 0.08em; margin-block: -0.04em -0.08em; }
.hero-title .line-in { display: inline-block; will-change: transform; }
.hero-title .line-sub { font-size: 0.5em; line-height: 1.12; letter-spacing: -0.01em; }
.hero-title .line-sub:first-of-type { margin-top: 0.3em; }
.hero-title em, .statement-text em, h2 em { font-style: italic; }
.lede { font-size: var(--t-lede); line-height: 1.6; color: var(--ink-2); max-width: 56ch; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: var(--t-label); color: var(--muted); letter-spacing: 0.04em; }
.key { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.key-human { background: var(--human); }
.key-agent { background: var(--accent); margin-left: 8px; }

.intro-pending .hero-title .line-in { transform: translateY(110%); }
.intro-pending .hero [data-intro],
.intro-pending .org,
.intro-pending .facts li { opacity: 0; }

/* Company OS diagram */
.org {
  min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 16px 0; box-shadow: var(--shadow-1);
  overflow: hidden;
}
.org-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.6875rem; letter-spacing: 0.005em; color: var(--muted);
  padding: 2px 4px 8px;
}
.org-live { display: inline-flex; align-items: center; gap: 7px; color: var(--live); }
.org-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.org-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.org-colhead { fill: var(--muted); font: 500 11.5px var(--f-body); letter-spacing: 0.01em; }
.org-edge { fill: none; stroke: var(--line-2); stroke-width: 1.2; transition: stroke 0.45s var(--ease-out), stroke-width 0.45s var(--ease-out), opacity 0.45s; }
.org-edge.is-hot { stroke: var(--accent); stroke-width: 1.8; }
.org-edge.is-hot.from-kevin { stroke: var(--human); }
.org-flow { fill: none; stroke: var(--accent-line); stroke-width: 1.2; stroke-dasharray: 1.5 7; opacity: 0.5; animation: flow 1.4s linear infinite; pointer-events: none; }
@keyframes flow { to { stroke-dashoffset: -17; } }
.org-svg.is-focused .org-edge:not(.is-hot) { opacity: 0.45; }
.org-node { cursor: pointer; }
.org-node rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; transition: fill 0.45s var(--ease-out), stroke 0.45s var(--ease-out); }
.org-node text { fill: var(--ink); font: 500 12.5px var(--f-body); pointer-events: none; transition: fill 0.45s; }
.org-big text { font-weight: 600; }
.org-node text.org-title { font: 600 9.5px var(--f-body); letter-spacing: 0.08em; fill: var(--muted); }
.org-node.is-hot text.org-title { fill: var(--accent); }
.org-kevin { cursor: pointer; }
.org-node.is-hot rect { fill: var(--accent-soft); stroke: var(--accent); }
.org-node.is-hot text { fill: var(--accent); }
.org-lane rect { fill: var(--paper); }
.org-lane.is-hot rect { fill: var(--accent); stroke: var(--accent); }
.org-lane.is-hot text { fill: var(--surface); }
.org-kevin circle.core { fill: var(--human); }
.org-kevin circle.halo { fill: none; stroke: var(--human); stroke-width: 1.2; opacity: 0.5; transform-box: fill-box; transform-origin: center; animation: halo 2.6s var(--ease-out) infinite; }
@keyframes halo { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }
.org-kevin text { fill: #fff; font: 600 11.5px var(--f-body); }
.org-kevin text.sub { fill: var(--muted); font: 500 9.5px var(--f-body); letter-spacing: 0.005em; }
.org-pulse { fill: var(--accent); }
.org-pulse.human { fill: var(--human); }
.org-caption {
  display: grid; gap: 3px; margin: 8px -16px 0; padding: 14px 20px 16px;
  border-top: 1px dashed var(--line); min-height: 76px; background: var(--paper);
}
.org-cap-name { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.005em; color: var(--accent); }
.org-cap-text { font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
.org-caption.is-human .org-cap-name { color: var(--human); }

/* Facts */
.facts {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.facts li { display: grid; gap: 6px; padding: 22px 24px 4px 0; align-content: start; }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.fact-v { font: 500 clamp(2.1rem, 3.4vw, 2.9rem)/1 var(--f-display); letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.fact-l { font-size: var(--t-small); color: var(--muted); line-height: 1.4; max-width: 24ch; }

/* ---------- Work ---------- */
.work-list { display: grid; gap: clamp(20px, 2.4vw, 28px); }
.work-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; min-width: 0;
}
.work-feature { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
.work-reverse .work-visual { order: -1; }
.work-text { display: grid; gap: 18px; align-content: start; padding: clamp(24px, 3.6vw, 52px); min-width: 0; }
.work-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.role { font-size: 0.75rem; letter-spacing: 0.005em; color: var(--muted); }
.work-title {
  font-family: var(--f-display); font-weight: 500;
  font-size: var(--t-h3); line-height: 1.04; letter-spacing: -0.018em; text-wrap: balance;
}
.work-sub { color: var(--ink-2); line-height: 1.55; text-wrap: pretty; max-width: 52ch; }
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: var(--t-small); color: var(--ink-2); line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 12px; height: 7px;
  border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg) scale(0.8); transform-origin: 30% 60%;
}
.work-foot { font-size: var(--t-label); letter-spacing: 0.005em; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.work-visual {
  position: relative; min-width: 0;
  display: grid; place-items: center; align-content: center; gap: 14px;
  padding: clamp(20px, 3.4vw, 48px);
  background: var(--paper-2);
}
.visual-note { font-size: 0.6875rem; letter-spacing: 0.005em; color: var(--muted); justify-self: center; }

/* Hirvo mock */
.mock {
  width: 100%; max-width: 540px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); overflow: hidden; font-size: 0.9rem;
}
.mock-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.mock-bar span { margin-left: 10px; font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.04em; }
.job { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px dashed var(--line); }
.job-main { min-width: 0; }
.job-role { font-weight: 600; line-height: 1.3; }
.job-co { font-size: 0.6875rem; color: var(--muted); margin-top: 2px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 500 0.6875rem/1 var(--f-body); padding: 6px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.tag-ok { background: var(--live-soft); color: var(--live); }
.rw { display: grid; gap: 12px; padding: 16px; }
.rw-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.rw-label { font-size: 0.625rem; letter-spacing: 0.005em; color: var(--muted); }
.rw-row p { line-height: 1.5; }
.rw-source p { color: var(--muted); }
mark.fab {
  position: relative; color: inherit; background: transparent; border-radius: 4px; padding: 0 0.15em;
  transition: background-color 0.45s var(--ease-out), color 0.45s var(--ease-out);
}
mark.fab.is-flagged { background: var(--human-soft); color: var(--human); }
mark.fab::after {
  content: ""; position: absolute; left: 0; right: 0; top: 54%; height: 1.5px; background: var(--human);
  transform: scaleX(var(--strike, 1)); transform-origin: 0 50%;
}
.flags { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.75rem; color: var(--human); }
.flag { display: inline-block; }
.rw-final p { font-weight: 500; color: var(--ink); }
.ok-dot {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px;
  border-radius: 50%; background: var(--live-soft); color: var(--live); font-size: 0.6875rem; font-weight: 700;
}

/* Bookshelf */
.shelf { position: relative; width: 100%; max-width: 540px; }
.shelf-cover {
  position: absolute; z-index: 3; top: 0; left: 0; width: 150px; margin: 0;
  border-radius: 5px; overflow: hidden; background: var(--surface); pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 26px 40px -18px rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden; transform-origin: 50% 100%;
  transform: translate3d(var(--cx, 0px), 34px, 0) rotate(-6deg) scale(0.55);
  transition: opacity 0.35s var(--ease-out), transform 0.65s var(--ease-out), visibility 0s linear 0.35s;
}
.shelf-cover.is-on {
  opacity: 1; visibility: visible; transform: translate3d(var(--cx, 0px), 0, 0) rotate(-3deg) scale(1);
  transition: opacity 0.35s var(--ease-out), transform 0.65s var(--ease-out), visibility 0s;
}
.shelf-cover img { display: block; width: 100%; height: auto; }
.shelf-books { display: flex; align-items: flex-end; gap: 5px; height: 248px; padding: 0 14px; }
.book {
  position: relative; flex: 0 1 var(--w); min-width: 22px; height: var(--h);
  display: flex; align-items: center; justify-content: center;
  background: var(--c); color: var(--t);
  border-radius: 4px 4px 2px 2px;
  box-shadow: inset -7px 0 0 rgba(0, 0, 0, 0.13), inset 2px 0 0 rgba(255, 255, 255, 0.22);
  transform-origin: 50% 100%;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
  cursor: default; outline-offset: 4px;
}
.book::before, .book::after { content: ""; position: absolute; left: 6px; right: 9px; height: 2px; background: currentColor; opacity: 0.55; }
.book::before { top: 12px; }
.book::after { bottom: 12px; }
.book span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 700 0.625rem/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: calc(100% - 40px);
}
.book > a {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: inherit; text-decoration: none; border-radius: inherit; cursor: pointer;
}
.book > a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.book:hover, .book:focus-visible, .book:focus-within, .book.is-lift { transform: translateY(-16px) rotate(-1.5deg); box-shadow: inset -7px 0 0 rgba(0, 0, 0, 0.13), inset 2px 0 0 rgba(255, 255, 255, 0.22), 0 14px 18px -10px rgba(0, 0, 0, 0.35); }
.shelf-board { height: 12px; border-radius: 3px; background: var(--shelf); box-shadow: 0 16px 24px -14px rgba(0, 0, 0, 0.45); }
.shelf-readout { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 0.75rem; color: var(--muted); }
.shelf-current { color: var(--ink); text-align: right; transition: opacity 0.3s; }
.flow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 540px; font-size: 0.6875rem; }
.flow li {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: border-color 0.4s var(--ease-out), color 0.4s, transform 0.5s var(--ease-out), box-shadow 0.4s;
}
.flow li b { color: var(--accent); font-weight: 600; }
.flow li.human b { color: var(--human); }
.flow li.is-on { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); box-shadow: 0 0 0 3px var(--accent-soft); }
.flow li.human.is-on { border-color: var(--human); box-shadow: 0 0 0 3px var(--human-soft); }

/* Pair */
.work-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; gap: inherit; }
.work-compact { display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 0; }
.work-compact .work-visual { padding: 22px; min-height: 280px; }
.work-compact .work-text { padding: clamp(22px, 2.6vw, 32px); gap: 14px; }
.work-compact .work-sub { font-size: var(--t-small); }

/* 對藥 */
.rx { position: relative; width: 100%; max-width: 360px; display: grid; gap: 12px; }
.rx::before { content: ""; position: absolute; left: 22px; top: 20px; bottom: 20px; width: 1.5px; background: var(--line-2); }
.rx-step {
  position: relative; display: grid; gap: 8px; padding: 11px 14px 12px 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), transform 0.5s var(--ease-out);
}
.rx-step::before {
  content: ""; position: absolute; left: 17px; top: 16px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line-2); transition: background-color 0.4s, border-color 0.4s;
}
.rx-step.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); transform: translateX(4px); }
.rx-step.is-on::before { background: var(--accent); border-color: var(--accent); }
.rx-k { font-size: 0.625rem; letter-spacing: 0.005em; color: var(--muted); }
.rx-items { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-chip { font-size: 0.8125rem; padding: 4px 9px; border-radius: 6px; background: var(--paper-2); border: 1px solid var(--line); }
.rx-chip-sheet { border-style: dashed; }
.rx-p { font-size: 0.875rem; line-height: 1.4; }
.rx-p b { color: var(--accent); font-weight: 600; }
.rx-voice { display: flex; align-items: center; gap: 12px; }
.rx-lang { font-size: 0.75rem; color: var(--ink-2); }
.wave { display: flex; align-items: center; gap: 3px; height: 24px; }
.wave i { width: 3px; height: var(--wh, 40%); border-radius: 2px; background: var(--accent); transform-origin: 50% 50%; }
.wave i:nth-child(1) { --wh: 30%; } .wave i:nth-child(2) { --wh: 60%; } .wave i:nth-child(3) { --wh: 90%; }
.wave i:nth-child(4) { --wh: 50%; } .wave i:nth-child(5) { --wh: 75%; } .wave i:nth-child(6) { --wh: 100%; }
.wave i:nth-child(7) { --wh: 45%; } .wave i:nth-child(8) { --wh: 80%; } .wave i:nth-child(9) { --wh: 35%; }
.wave i:nth-child(10) { --wh: 65%; } .wave i:nth-child(11) { --wh: 90%; } .wave i:nth-child(12) { --wh: 40%; }
.wave i:nth-child(13) { --wh: 55%; } .wave i:nth-child(14) { --wh: 25%; }
.rx-say.is-on .wave i { animation: talk 0.9s ease-in-out infinite alternate; }
.rx-say.is-on .wave i:nth-child(3n) { animation-delay: -0.3s; }
.rx-say.is-on .wave i:nth-child(3n+1) { animation-delay: -0.6s; }
@keyframes talk { 0% { transform: scaleY(0.35); } 100% { transform: scaleY(1); } }

/* YouAreExtinct player */
.player { width: 100%; max-width: 580px; display: grid; gap: 12px; }
.yt {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate;
  border-radius: var(--r-md); background: var(--film-bg); color: var(--film-ink); text-decoration: none;
  box-shadow: var(--shadow-2);
}
.yt-link { position: absolute; inset: 0; display: block; color: inherit; text-decoration: none; }
.yt:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.yt-link:focus-visible { outline: none; }
.yt-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.02); transition: transform 1.4s var(--ease-out), opacity 0.45s var(--ease-out);
}
.yt-thumb.is-swapping { opacity: 0; }
.yt:hover .yt-thumb { transform: scale(1.07); }
.yt-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(4, 6, 14, 0.72)); }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 51px; translate: -50% -50%;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45)); transition: transform 0.55s var(--ease-out);
}
.yt-play svg { display: block; width: 100%; height: 100%; }
.yt-play-bg { fill: var(--yt); }
.yt-play-arrow { fill: #fff; }
.yt:hover .yt-play, .yt-link:focus-visible .yt-play { transform: scale(1.14); }
.yt-label {
  position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; align-items: center; gap: 8px;
  font-size: 0.75rem; letter-spacing: 0.005em;
}
.yt-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--yt); flex: none; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pl-item {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 8px 12px 8px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  text-align: left; cursor: pointer;
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}
.pl-item:hover { transform: translateY(-2px); border-color: var(--line-2); }
.pl-item.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pl-thumb { position: relative; flex: none; width: 76px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--film-bg); }
.pl-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pl-thumb::after {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -40% -50%;
  border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.pl-text { display: grid; gap: 2px; min-width: 0; }
.pl-text b { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-text span { font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.04em; }
.flow-start { justify-content: flex-start; }

/* AI influencers */
.types { display: grid; gap: 14px; }
.type { display: grid; gap: 4px; padding-left: 16px; border-left: 2px solid var(--line-2); }
.type dt { font: 500 1.25rem/1.2 var(--f-display); letter-spacing: -0.01em; }
.type dd { margin: 0; font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); }
.type-funny { border-left-color: var(--progress); }
.type-classic { border-left-color: var(--accent); }
.clips { display: flex; justify-content: center; gap: clamp(14px, 2vw, 24px); width: 100%; }
.clip { margin: 0; display: grid; gap: 12px; width: min(100%, 248px); }
.clip-frame {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border: 6px solid var(--film-bg); border-radius: 26px; background: var(--film-bg);
  box-shadow: var(--shadow-2);
}
.clip-video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.clip-sound {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(17, 17, 19, 0.55); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color 0.3s var(--ease-out), transform 0.4s var(--ease-out);
}
.clip-sound:hover { background: rgba(17, 17, 19, 0.75); transform: scale(1.06); }
.clip-sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.clip-sound .i-on, .clip-sound[aria-pressed="true"] .i-off { display: none; }
.clip-sound[aria-pressed="true"] .i-on { display: block; }
.clip figcaption { display: grid; gap: 2px; text-align: center; }
.clip figcaption b { font-size: 0.9375rem; font-weight: 600; }
.clip figcaption span { font-size: 0.8125rem; color: var(--muted); }

/* UHOME isometric */
.iso { position: relative; width: 100%; max-width: 420px; }
.iso-svg { display: block; width: 100%; height: auto; overflow: visible; }
.iso-tag {
  position: absolute; top: 0; left: 0;
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 0.625rem; letter-spacing: 0.005em; color: var(--muted);
}
.iso-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.iso-tag b { font-weight: 500; color: var(--ink); }
.iso-grid { stroke: var(--line-2); stroke-width: 0.6; opacity: 0.8; fill: none; }
.iso-face { stroke: var(--ink-2); stroke-width: 0.8; stroke-linejoin: round; }
.iso-top { fill: var(--surface); }
.iso-left { fill: var(--paper); }
.iso-right { fill: var(--line); }
.iso-edge { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-linejoin: round; opacity: 0; }
.iso-win { fill: var(--line-2); stroke: none; transition: fill 0.5s var(--ease-out); }
.iso-win.is-lit { fill: var(--window); }
.iso-tree-top { fill: var(--live); opacity: 0.75; }
.iso-tree-trunk { stroke: var(--ink-2); stroke-width: 1.2; }

/* ---------- How it runs ---------- */
.how { position: relative; }
.how-pin { padding-block: clamp(88px, 12vw, 168px); }
.how-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.how-col { position: relative; min-width: 0; }
.how-rail { display: none; }
.how-steps { display: grid; counter-reset: step; }
.how-step { border-top: 1px solid var(--line); padding-block: 26px; }
.how-step:last-child { border-bottom: 1px solid var(--line); }
.how-copy { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
.how-num { font-size: 0.8125rem; font-weight: 500; color: var(--accent); padding-top: 0.45em; letter-spacing: 0.06em; }
.how-text { display: grid; gap: 10px; min-width: 0; }
.how-sub { font-size: 1.05rem; }
.how-text h3 {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em;
  transition: color 0.5s var(--ease-out);
}
.how-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.6s var(--ease-out), opacity 0.5s var(--ease-out); }
.how-body > div { overflow: hidden; min-height: 0; }
.how-body p { color: var(--ink-2); line-height: 1.6; max-width: 48ch; text-wrap: pretty; }
.how-visual { margin-top: 22px; display: grid; place-items: center; min-width: 0; }
.how-stage { display: none; }

/* Pinned desktop mode */
.how.is-pinned .how-pin { min-height: 100vh; display: flex; align-items: center; padding-block: calc(var(--header-h) + 8px) 24px; }
.how.is-pinned .how-pin > .wrap { width: 100%; }
.how.is-pinned .section-head { margin-bottom: clamp(24px, 4vh, 48px); }
.how.is-pinned .how-grid { align-items: center; }
.how.is-pinned .how-col { padding-left: 22px; }
.how.is-pinned .how-rail { display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); border-radius: 2px; }
.how.is-pinned .how-rail span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--ink-2); transform-origin: 50% 0; transform: scaleY(0); }
.how.is-pinned .how-step { padding-block: 18px; border: 0; cursor: pointer; }
.how.is-pinned .how-step:last-child { border: 0; }
.how.is-pinned .how-step:not(.is-active) .how-body { grid-template-rows: 0fr; opacity: 0; }
.how.is-pinned .how-step:not(.is-active) h3 { color: var(--muted); }
.how.is-pinned .how-step:not(.is-active) .how-num { color: var(--muted); }
.how.is-pinned .how-step:not(.is-active):hover h3 { color: var(--ink-2); }
.how.is-pinned .how-stage { display: grid; position: relative; min-height: min(520px, 62vh); }
.how.is-pinned .how-stage .how-visual { grid-area: 1 / 1; margin: 0; visibility: hidden; }
.how.is-pinned .how-stage .how-visual.is-current { visibility: visible; }

.v {
  width: 100%; max-width: 500px; display: grid; gap: 14px;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
.v-note { font-size: 0.8125rem; color: var(--muted); }
.v-q { font: 500 1.35rem/1.25 var(--f-display); letter-spacing: -0.01em; }
.idea { position: relative; display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--paper); }
.idea-k { font-size: 0.625rem; letter-spacing: 0.005em; color: var(--muted); }
.idea p { position: relative; width: fit-content; max-width: calc(100% - 92px); font-weight: 500; line-height: 1.4; }
.idea-killed p { color: var(--muted); }
.idea-killed p::after { content: ""; position: absolute; left: 0; right: 0; top: 55%; height: 1.5px; background: var(--human); transform: scaleX(var(--strike, 1)); transform-origin: 0 50%; }
.stamp {
  position: absolute; right: 14px; top: 50%; translate: 0 -50%;
  padding: 5px 9px; border: 2px solid currentColor; border-radius: 6px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  transform: rotate(-8deg);
}
.stamp-kill { color: var(--human); }
.stamp-build { color: var(--live); transform: rotate(-5deg); }

.code-head { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.06em; }
.code { margin: 0; padding: 16px 18px; border-radius: 12px; background: var(--paper-2); overflow-x: auto; font: 0.8125rem/1.75 var(--f-mono); color: var(--ink-2); }
.code code { font: inherit; display: block; }
.cl { display: block; width: max-content; white-space: pre; min-height: 1.75em; }
.c-k { color: var(--accent); }
.c-t { color: var(--ink); font-weight: 600; }
.c-g { color: var(--human); font-weight: 600; }

.crew-head { display: flex; align-items: center; gap: 10px; }
.crew-kevin { padding: 5px 10px; border-radius: 999px; background: var(--human); color: #fff; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; }
.crew-manager { background: var(--accent); }
.crew-sub { font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.005em; }
.crew { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.crew li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px;
  padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line);
}
.crew b { font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.crew span { grid-column: 1; font-size: 0.75rem; color: var(--muted); line-height: 1.35; }
.st {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-style: normal; font-size: 0.5625rem; letter-spacing: 0.005em;
  padding: 4px 7px; border-radius: 999px; transition: background-color 0.3s, color 0.3s;
}
.st[data-s="queued"] { background: var(--done-soft); color: var(--done); }
.st[data-s="running"] { background: var(--progress-soft); color: var(--progress); }
.st[data-s="done"] { background: var(--live-soft); color: var(--live); }

.gate {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 14px; align-items: center;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper);
  transition: border-color 0.45s var(--ease-out);
}
.gate-text { display: grid; gap: 2px; min-width: 0; }
.gate-text b { font-weight: 600; font-size: 0.9375rem; }
.gate-text span { font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.04em; }
.switch { position: relative; width: 40px; height: 23px; border-radius: 999px; background: var(--line-2); transition: background-color 0.45s var(--ease-out); }
.switch i { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.5s var(--ease-out); }
.gate-state { grid-column: 1 / -1; font-size: 0.6875rem; letter-spacing: 0.005em; color: var(--progress); }
.gate.is-ok { border-color: color-mix(in srgb, var(--human) 45%, var(--line)); }
.gate.is-ok .switch { background: var(--human); }
.gate.is-ok .switch i { transform: translateX(17px); }
.gate.is-ok .gate-state { color: var(--human); }

.v-route { gap: 16px; }
.route-task {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 14px 16px; border-radius: 12px; background: var(--human-soft); border: 1px solid color-mix(in srgb, var(--human) 35%, transparent);
}
.route-k { font-size: 0.75rem; color: var(--human); font-weight: 600; }
.route-task b { font: 500 1.25rem/1.2 var(--f-display); }
.route-split { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 22px; }
.route-split::before {
  content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 22px;
  border: 1.5px solid var(--accent-line); border-bottom: 0; border-radius: 12px 12px 0 0;
}
.route-split::after { content: ""; position: absolute; top: -8px; left: 50%; width: 1.5px; height: 8px; background: var(--accent-line); }
.route-owner { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.route-who { font: 500 1.3rem/1 var(--f-display); color: var(--accent); }
.route-role { font-size: 0.8125rem; color: var(--muted); }
.route-owner ul { display: grid; gap: 6px; }
.route-owner li { font-size: 0.875rem; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }

/* ---------- How I build ---------- */
.loop { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); }
.loop::before {
  content: ""; position: absolute; z-index: 0; left: 10%; right: 10%; top: 38px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent-line) 0 8px, transparent 8px 16px);
  background-size: 32px 2px; animation: loop-flow 1.1s linear infinite;
}
@keyframes loop-flow { to { background-position: 32px 0; } }
@keyframes loop-flow-v { to { background-position: 0 32px; } }
.loop-step {
  position: relative; z-index: 1; display: grid; gap: 12px; align-content: start;
  padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); 
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.loop-step:hover { transform: translateY(-3px); }
.loop-k { font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.loop-step h3 { font: 500 1.9rem/1.05 var(--f-display); letter-spacing: -0.015em; }
.loop-step p { color: var(--ink-2); line-height: 1.6; }
.loop-claude { border-color: var(--accent-line); background: var(--accent-soft); }
.loop-tracks { display: grid; gap: 8px; }
.loop-track { display: grid; gap: 2px; padding: 11px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.loop-track b { font-weight: 600; font-size: 0.9375rem; }
.loop-track span { font-size: 0.875rem; line-height: 1.45; color: var(--muted); }

/* ---------- Learning ---------- */
.learn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.learn-card {
  display: grid; gap: 14px; align-content: start; padding: 0 0 8px;
  border-radius: 0; background: none; border: 0;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.learn-card:hover .learn-art { background: var(--line); }
.learn-card h3 { font: 500 1.55rem/1.15 var(--f-display); letter-spacing: -0.015em; }
.learn-card p { font-size: var(--t-small); line-height: 1.6; color: var(--ink-2); }
.learn-art { height: 128px; padding: 18px 20px; border-radius: var(--r-md); background: var(--paper-2); overflow: hidden; transition: background-color 0.5s var(--ease-out); }
.learn-art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.learn-evals { display: grid; align-content: center; gap: 8px; }
.ev-row { display: grid; grid-template-columns: minmax(0, 1fr) 14px; gap: 12px; align-items: center; }
.ev-row i { height: 8px; border-radius: 4px; background: var(--line-2); transform-origin: 0 50%; animation: ev-fill 5s var(--ease-out) infinite; }
.ev-row:nth-child(2) i { width: 72%; } .ev-row:nth-child(3) i { width: 86%; } .ev-row:nth-child(4) i { width: 64%; } .ev-row:nth-child(5) i { width: 92%; }
.ev-row b { width: 14px; height: 14px; border-radius: 50%; animation: ev-mark 5s var(--ease-out) infinite; }
.ev-pass { background: var(--live); }
.ev-fail { background: var(--human); }
.ev-row:nth-child(2) i, .ev-row:nth-child(2) b { animation-delay: 0.25s; }
.ev-row:nth-child(3) i, .ev-row:nth-child(3) b { animation-delay: 0.5s; }
.ev-row:nth-child(4) i, .ev-row:nth-child(4) b { animation-delay: 0.75s; }
.ev-row:nth-child(5) i, .ev-row:nth-child(5) b { animation-delay: 1s; }
@keyframes ev-fill { 0% { transform: scaleX(0); } 22%, 100% { transform: scaleX(1); } }
@keyframes ev-mark { 0%, 18% { transform: scale(0); } 30%, 100% { transform: scale(1); } }
.tune-grid { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 5; }
.tune-curve { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; animation: tune-draw 4.5s var(--ease-out) infinite; }
.tune-dot { fill: var(--human); animation: tune-dot 4.5s ease infinite; }
@keyframes tune-draw { 0% { stroke-dashoffset: 100; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes tune-dot { 0%, 50% { opacity: 0; } 62%, 100% { opacity: 1; } }
.chip-trace { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-linecap: round; }
.chip-pulse { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 27.33; animation: chip-flow 1.8s linear infinite; }
@keyframes chip-flow { to { stroke-dashoffset: -33.33; } }
.chip-body { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.5; }
.chip-core { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; animation: chip-glow 2.4s ease-in-out infinite; }
@keyframes chip-glow { 50% { fill: var(--accent-line); } }

/* ---------- Statement ---------- */
.statement { padding-block: clamp(40px, 8vw, 120px) clamp(80px, 12vw, 180px); }
.statement-text {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(2.1rem, 5.6vw, 5rem); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 17ch; text-wrap: balance;
}
.sw { display: inline; }

/* ---------- Lanes ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); width: max-content; max-width: 100%; }
.filter {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 0; background: transparent; color: var(--muted); font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: background-color 0.4s var(--ease-out), color 0.4s;
}
.filter span { font: 500 0.6875rem/1 var(--f-body); padding: 3px 6px; border-radius: 999px; background: var(--paper-2); color: var(--muted); transition: inherit; }
.filter:hover { color: var(--ink); }
.filter.is-on { background: var(--ink); color: var(--paper); }
.filter.is-on span { background: color-mix(in srgb, var(--paper) 18%, transparent); color: var(--paper); }

.lane-list { border-top: 1px solid var(--line); }
.lane { border-bottom: 1px solid var(--line); }
.lane.is-out { display: none; }
.lane-row {
  width: 100%;
  display: grid; grid-template-columns: 128px minmax(0, 220px) minmax(0, 1fr) 120px 28px;
  grid-template-areas: "status name one kind plus";
  align-items: center; gap: 12px 24px;
  padding: 22px 10px; border: 0; background: transparent; text-align: left; cursor: pointer;
  border-radius: 12px;
  transition: background-color 0.35s var(--ease-out);
}
.lane-row:hover { background: color-mix(in srgb, var(--surface) 75%, transparent); }
.lane-row .status { grid-area: status; }
.lane-name {
  grid-area: name;
  font-family: var(--f-display); font-weight: 500;
  font-size: 1.375rem; line-height: 1.15; letter-spacing: -0.02em;
  transition: transform 0.5s var(--ease-out), color 0.3s;
}
.lane-row:hover .lane-name { transform: translateX(6px); }
.lane-one { grid-area: one; color: var(--muted); font-size: var(--t-small); line-height: 1.45; }
.lane-kind { grid-area: kind; justify-self: end; font-size: 0.6875rem; letter-spacing: 0.005em; color: var(--muted); text-align: right; }
.lane-plus { grid-area: plus; position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); transition: transform 0.5s var(--ease-out), background-color 0.3s, border-color 0.3s; }
.lane-plus::before, .lane-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px; background: var(--ink); border-radius: 2px; transition: background-color 0.3s; }
.lane-plus::after { transform: rotate(90deg); }
.lane.is-open .lane-plus { transform: rotate(135deg); background: var(--ink); border-color: var(--ink); }
.lane.is-open .lane-plus::before, .lane.is-open .lane-plus::after { background: var(--paper); }
.lane-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-out); }
.lane.is-open .lane-detail { grid-template-rows: 1fr; }
.lane-in { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s linear 0.6s; }
.lane.is-open .lane-in { visibility: visible; transition: visibility 0s; }
.lane-in dl {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px;
  padding: 4px 10px 30px calc(128px + 24px + 10px);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out);
}
.lane.is-open .lane-in dl { opacity: 1; transform: none; transition-delay: 0.12s; }
.lane-in dt { font-size: 0.6875rem; letter-spacing: 0.005em; color: var(--accent); margin-bottom: 6px; }
.lane-in dd { font-size: var(--t-small); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.lane-in dd a { color: var(--accent); text-underline-offset: 3px; }

/* ---------- Stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack-card {
  display: grid; gap: 12px; align-content: start;
  padding: 22px 0 0; border-top: 1px solid var(--line-2);
}
.stack-card h3 { font: 500 1.45rem/1.2 var(--f-display); letter-spacing: -0.015em; }
.stack-card p { font-size: var(--t-small); color: var(--muted); line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.chips li { font-size: var(--t-small); color: var(--ink-2); line-height: 1.5; }

/* ---------- Contact band ---------- */
.contact { position: relative; background: var(--band); color: var(--band-ink); overflow: hidden; padding-top: clamp(88px, 12vw, 168px); }
.contact .kicker { color: var(--band-muted); }
.contact-in { display: grid; gap: 28px; }
.contact-title { max-width: 20ch; font-size: clamp(2.2rem, 5.2vw, 4.4rem); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.contact-note { color: var(--band-muted); max-width: 44ch; }
.wordmark {
  margin: clamp(64px, 9vw, 120px) 0 0; padding-left: var(--gut-l); padding-right: var(--gut-r);
  font: 400 clamp(4.5rem, 17vw, 15rem)/0.9 var(--f-display); letter-spacing: -0.035em;
  color: var(--band-2); white-space: nowrap; overflow: hidden; user-select: none;
  max-width: 1280px; margin-inline: auto;
}
.site-footer { padding-block: 28px max(28px, env(safe-area-inset-bottom, 0px)); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 0.875rem; color: var(--band-muted); }
.foot .mono { font-size: 0.75rem; letter-spacing: 0.06em; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--band-ink); }

/* ---------- View transition for the theme switch ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .loop, .learn-grid { grid-template-columns: minmax(0, 1fr); }
  .loop::before {
    left: 38px; right: auto; top: 8%; bottom: 8%; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--accent-line) 0 8px, transparent 8px 16px);
    background-size: 2px 32px; animation-name: loop-flow-v;
  }
  .work-pair { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .work-compact { grid-row: auto; grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .work-compact .work-text { align-content: center; }
}
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .org { max-width: 620px; }
  .work-feature { grid-template-columns: minmax(0, 1fr); }
  .work-feature .work-visual { order: -1; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .lane-row { grid-template-columns: 116px minmax(0, 180px) minmax(0, 1fr) 28px; grid-template-areas: "status name one plus"; }
  .lane-kind { display: none; }
  .lane-in dl { grid-template-columns: minmax(0, 1fr); padding-left: 10px; }
  .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .nav, .bar-actions .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts li { padding-bottom: 20px; }
  .work-compact { grid-template-columns: minmax(0, 1fr); }
  .lane-row {
    grid-template-columns: minmax(0, 1fr) 28px;
    grid-template-areas: "status plus" "name plus" "one plus";
    gap: 8px 16px; padding: 20px 4px;
  }
  .lane-in dl { padding-inline: 4px; }
  .stack-grid { grid-template-columns: minmax(0, 1fr); }
  .player-list { grid-template-columns: minmax(0, 1fr); }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; border-radius: 18px; }
  .filter { justify-content: space-between; }
  .crew { grid-template-columns: minmax(0, 1fr); }
  .idea p { max-width: calc(100% - 84px); }
}
@media (max-width: 420px) {
  .shelf-books { gap: 3px; padding: 0 6px; height: 220px; }
  .btn-lg { --btn-h: 54px; padding-inline: 22px; }
  .rw-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  }
