:root {
  color-scheme: light;
  --bg: #1b1815;
  --paper: #25211e;
  --shade: #2f2a26;
  --ink: #f8eee1;
  --body: #d8cbbd;
  --muted: #bdaea0;
  --line: #504740;
  --accent: #ffac8c;
  --heat: #ff825e;
  --dark: #151311;
  --display: "Space Grotesk", "Geist", system-ui, sans-serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --max: 1336px;
  --gutter: clamp(16px, 4.1vw, 64px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 94px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); }
img { display: block; max-width: 100%; }
button, a { color: inherit; }
a { text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--heat); color: #211e1b; }
[hidden] { display: none !important; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font: 500 12px/1.45 var(--mono); letter-spacing: 0.015em; }
.skip {
  position: fixed; inset: 12px auto auto 12px; z-index: 10;
  padding: 10px 16px; background: var(--ink); color: var(--dark);
  transform: translateY(calc(-100% - 16px));
}
.skip:focus { transform: none; }

/* Masthead */
.nav {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 20px; min-height: 67px;
}
.logo {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; font: 700 20px/1 var(--display); letter-spacing: -0.06em;
}
.logo-mark {
  display: grid; place-items: center; width: 27px; height: 27px;
  background: var(--heat); color: #21160f; font: 600 18px/1 var(--mono);
}
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 36px); }
.nav-links a, .nav-cta {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14px; font-weight: 600;
}
.nav-links a:hover, .nav-links a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
.nav-cta { justify-self: end; gap: 7px; }
.nav-cta:hover, .nav-cta[aria-current] { color: var(--accent); }

/* Introduction and project selector */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  margin-top: clamp(14px, 2.1vw, 30px);
  border: 1px solid var(--line);
}
.hero-copy {
  display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 3.2vw, 46px);
  padding: clamp(22px, 4vw, 56px);
  background: radial-gradient(ellipse at 8% 10%, #32251d, transparent 76%), var(--paper);
  color: var(--ink);
  min-width: 0;
}
.identity { display: flex; align-items: center; gap: 10px; margin: 0 0 27px; }
.identity img {
  width: 43px; height: 43px; object-fit: cover;
  border: 1px solid var(--line); filter: saturate(0.45) sepia(0.12);
}
.identity strong, .identity .role { display: block; }
.identity strong { font-size: 15px; line-height: 1.3; }
.identity .role { font-size: 11px; margin-top: 3px; }
h1 {
  margin: 0; font: 700 clamp(43px, 5.4vw, 79px)/0.95 var(--display);
  letter-spacing: -0.065em;
}
h1 span { display: block; color: var(--heat); }
.lede { max-width: 32ch; margin: 20px 0 0; font-size: clamp(17px, 1.57vw, 22px); line-height: 1.38; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 15px; }
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 45px; padding: 8px 12px; border: 1px solid currentColor;
  font: 650 14px/1.25 var(--sans);
}
.btn-primary { color: #21160f; background: var(--heat); border-color: var(--heat); }
.btn:hover { color: var(--accent); }
.btn-primary:hover { color: #21160f; background: var(--accent); border-color: var(--accent); }
.hero-link, .links a { display: inline-flex; align-items: center; min-height: 44px; }
.hero-link { gap: 7px; font-size: 14px; font-weight: 650; }
.hero-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.hero-socials {
  display: flex; flex-wrap: wrap; gap: 0 6px;
  border-top: 1px solid var(--line);
}
.hero-socials a {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; min-width: 44px; padding-inline: 5px;
  color: var(--body); font: 500 12px/1.3 var(--mono);
}
.hero-socials a:first-child { margin-left: -5px; }
.hero-socials a span { color: var(--accent); }
.hero-socials a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.workbench {
  position: relative; isolation: isolate; min-width: 0;
  display: flex; flex-direction: column; justify-content: end;
  background: #1b1815; color: var(--ink);
}
.stack-head {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 15px 19px 0; color: var(--body);
}
.stack-head p { margin: 0; }
.stack-head a:hover { color: var(--accent); }
.stack-art {
  position: relative; isolation: isolate; margin: 0 auto;
  width: min(100% - 24px, 473px); aspect-ratio: 1;
  background: radial-gradient(ellipse at 65% 52%, #39271e 0%, transparent 64%), #1b1815;
}
.stack-art img {
  position: absolute; inset: 0; width: 100%; height: auto;
  mix-blend-mode: screen;
}
.stack-controls, .stack-layer { position: absolute; inset: 0; pointer-events: none; }
.stack-layer { --raise: 0px; mix-blend-mode: screen; }
.layer-face, .layer-label { pointer-events: auto; }
.layer-face { position: absolute; inset: 0; clip-path: var(--outline); }
.stack-controls[role="tablist"] .layer-face {
  translate: 0 var(--raise);
  background: url("images/ai-stack-hero.webp") center / 100% 100% no-repeat;
  filter: brightness(0.9);
}
.stack-art:has([aria-selected="true"]) img { opacity: 0.16; }
.layer-label {
  position: absolute; left: 0; top: var(--height); translate: 0 -50%;
  display: flex; align-items: center; gap: 6px;
  min-height: 44px; width: 20%; color: var(--body);
  font: 500 clamp(10px, 1vw, 13px)/1 var(--mono);
}
.layer-label::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.33; }
.stack-layer:is(:hover, :focus-visible, [aria-selected="true"]) { z-index: 1; }
.stack-controls[role="tablist"] .stack-layer:is(:hover, :focus-visible, [aria-selected="true"]) { --raise: -4px; }
.stack-controls[role="tablist"] .stack-layer[aria-selected="true"] { --raise: -8px; }
.stack-controls[role="tablist"] .stack-layer:is(:hover, :focus-visible, [aria-selected="true"]) .layer-face { filter: brightness(1.15); }
.stack-layer:is(:hover, :focus-visible, [aria-selected="true"]) .layer-label { color: var(--accent); }
.stack-layer[aria-selected="true"] .layer-label::after { opacity: 1; }
.stack-layer:focus-visible { outline: 0; }
.stack-layer:focus-visible .layer-label { outline: 2px solid var(--accent); outline-offset: 3px; }

.stack-layer[data-layer="tools"] {
  --height: 15.5%;
  --outline: polygon(20% 12.5%, 57% 2%, 96% 12.6%, 96% 19.4%, 62% 31%, 20% 19.5%);
}
.stack-layer[data-layer="skills"] {
  --height: 32%;
  --outline: polygon(20% 30%, 29% 25%, 62% 31%, 88% 24%, 96% 30%, 96% 34%, 62% 45.7%, 20% 34%);
}
.stack-layer[data-layer="models"] {
  --height: 44.7%;
  --outline: polygon(21% 42.5%, 32% 38.3%, 62% 45.7%, 86% 39%, 94.5% 42.5%, 94.5% 48%, 62% 60.1%, 21% 48.5%);
}
.stack-layer[data-layer="benchmarks"] {
  --height: 59%;
  --outline: polygon(20% 55%, 29% 51%, 62% 60.1%, 84% 51%, 95.5% 55%, 95.5% 65%, 62% 77.7%, 20% 66%);
}
.stack-layer[data-layer="books"] {
  --height: 75%;
  --outline: polygon(20% 73%, 28% 68.5%, 62% 77.7%, 86% 68.5%, 95.5% 72.5%, 95.5% 83.6%, 81% 90%, 59% 97.3%, 20% 84%);
}

.stack-details { border-top: 1px solid var(--line); background: #24201c; }
.stack-preview {
  display: grid; grid-template-columns: minmax(64px, 0.47fr) minmax(0, 2fr) auto;
  align-items: center; gap: clamp(10px, 1.35vw, 19px); min-height: 109px;
  padding: 12px clamp(12px, 1.5vw, 22px);
}
.stack-preview + .stack-preview { border-top: 1px solid var(--line); }
.stack-preview img, .model-mark { width: 100%; max-width: 112px; height: auto; aspect-ratio: 1.5; object-fit: cover; }
.model-mark {
  display: grid; place-items: center; border: 1px solid var(--line);
  color: var(--accent); font: 650 clamp(18px, 1.8vw, 25px)/1 var(--mono);
}
.stack-preview h2 { font-size: clamp(20px, 2vw, 29px); line-height: 1; text-wrap: wrap; }
.stack-preview p { color: var(--body); margin: 5px 0 0; font-size: 13px; line-height: 1.32; }
.stack-preview a {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); color: var(--accent); font-size: 19px;
}
.stack-preview a:hover { border-color: var(--accent); background: #ff825e17; }

/* Arcade cabinet */
.arcade { padding-block: clamp(20px, 3.2vw, 44px) clamp(38px, 6vw, 84px); }
.arcade-grid {
  display: grid; grid-template-columns: minmax(0, 1.26fr) minmax(0, 0.74fr);
  align-items: center; gap: clamp(22px, 4vw, 55px);
  color: var(--ink); background: var(--paper);
  background-image: radial-gradient(ellipse at 8% 2%, #38291f, transparent 63%);
  border: 1px solid var(--line); padding: clamp(15px, 3.1vw, 42px);
}
.arcade-copy { grid-column: 2; grid-row: 1; }
.arcade .tag { color: var(--accent); margin-bottom: 10px; }
.arcade h2 { text-wrap: wrap; font-size: clamp(38px, 4.4vw, 65px); line-height: 0.91; }
.arcade .desc { max-width: 32ch; margin: 14px 0 0; }
.arcade-facts {
  display: flex; flex-wrap: wrap; gap: 6px 13px; padding: 0; margin: 14px 0 16px;
  list-style: none; color: var(--body);
}
.arcade-facts li + li { border-left: 1px solid #7a6152; padding-left: 13px; }
.arcade .btn-primary { color: #21160f; background: var(--accent); border-color: var(--accent); }
.arcade .btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.arcade-screen {
  position: relative; grid-column: 1; grid-row: 1;
  display: block; align-self: center; overflow: hidden;
  padding: clamp(8px, 1.3vw, 17px);
  background: #241e18; border: 1px solid #6f594a;
  box-shadow: 0 17px 32px #0e0c0aa6, inset 0 0 0 3px #352a23;
}
.arcade-screen:hover { border-color: var(--accent); }
.arcade-screen img { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid #6b5646; }
.arcade-bezel {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  min-height: clamp(45px, 6.2vw, 88px); padding: 6px clamp(10px, 1.6vw, 22px);
  background: linear-gradient(135deg, #453329, #211b16 61%);
  border: 1px solid #655145; border-top: 0;
}
.arcade-stick { position: relative; display: block; width: clamp(31px, 6vw, 80px); height: 18px; margin-top: 7px; background: #181310; border: 1px solid #665041; border-radius: 100%; }
.arcade-stick::before {
  content: ""; position: absolute; bottom: 7px; left: 50%; width: 5px; height: clamp(15px, 2.1vw, 31px); translate: -50% 0;
  background: linear-gradient(90deg, #524138, #d3b1a0, #55443a);
}
.arcade-stick::after {
  content: ""; position: absolute; left: 50%; bottom: clamp(19px, 3vw, 39px); translate: -50% 0;
  width: clamp(19px, 3.2vw, 43px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 29%, #f4b08c, #a95535 52%, #593226 84%);
  box-shadow: 0 4px 6px #120b09a0;
}
.arcade-buttons { display: flex; align-items: center; gap: clamp(7px, 1.2vw, 16px); }
.arcade-buttons i {
  width: clamp(12px, 2.6vw, 32px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 39% 30%, #ffd6bd, #ba633e 73%, #6e3925 74%);
  box-shadow: 0 2px 5px 2px #150d09;
}
.arcade-buttons i:nth-child(2) { background: radial-gradient(circle at 39% 30%, #ebc6a7, #ba8865 73%, #6c4835 74%); }
.arcade-buttons i:nth-child(3) { background: radial-gradient(circle at 39% 30%, #bcb5aa, #736453 73%, #4a3b31 74%); }
.arcade-play-mark {
  width: 37px; height: 37px; flex: 0 0 37px;
  display: grid; place-items: center; color: #25170f; background: var(--accent);
}
.arcade-play-mark::before { content: ""; margin-left: 3px; border-block: 8px solid transparent; border-left: 12px solid currentColor; }

.arcade-dialog {
  --accent: #ffac8c;
  width: min(1100px, calc(100% - 24px)); max-height: calc(100% - 16px);
  padding: 0; color: #f8eee1; background: #29211c; border: 1px solid #7a6152;
}
.arcade-dialog::backdrop { background: #14100edb; }
body:has(.arcade-dialog[open]) { overflow: hidden; }
.arcade-dialog-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 15px;
  padding: 9px 12px; border-bottom: 1px solid #5c473a;
}
.arcade-dialog-bar h2 { flex: 1 1 180px; font-size: clamp(21px, 2.7vw, 32px); }
.arcade-dialog-bar a, .arcade-close { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.arcade-dialog-bar a:hover { text-decoration: underline; }
.arcade-close { cursor: pointer; background: transparent; padding: 4px 10px; border: 1px solid #7a6152; }
.arcade-close:hover { color: #29211c; background: var(--accent); }
.arcade-game { --player-height: clamp(210px, 66dvh, 610px); position: relative; background: #120f0d; }
.arcade-viewport { min-height: var(--player-height); }
.arcade-game iframe {
  display: block; width: 100%; height: var(--player-height); border: 0;
}
.arcade-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  margin: 0; padding: 12px; background: #120f0d; color: var(--accent);
}
.arcade-help { margin: 0; padding: 9px 12px; color: #e1d1c1; font-size: 13px; }

@media (prefers-reduced-motion: no-preference) {
  .layer-face { transition: translate 300ms cubic-bezier(0.2, 0.75, 0.25, 1), filter 180ms ease-out; }
  .stack-preview.is-entering > * { animation: readout-in 230ms cubic-bezier(0.2, 0.7, 0.25, 1); }
  .arcade-play-mark { transition: transform 180ms ease-out; }
  .arcade-screen:is(:hover, :focus-visible) .arcade-play-mark { transform: translateY(-3px); }
  @keyframes readout-in { from { opacity: 0.55; transform: translateY(4px); } }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: clamp(20px, 5.4vw, 42px); }
  .identity { margin-bottom: 22px; }
  .identity img { width: 36px; height: 36px; }
  h1 { font-size: clamp(38px, 11.6vw, 80px); }
  .lede { margin-top: 15px; }
  .layer-label { font-size: clamp(9px, 2.8vw, 13px); text-shadow: 0 0 5px #171813; }
  .stack-preview { min-height: 99px; }
  .arcade-grid { grid-template-columns: 1fr; }
  .arcade-copy { grid-area: auto; }
  .arcade-screen { grid-area: auto; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 111px; }
  .nav-inner { grid-template-columns: 1fr 1fr; gap: 0; min-height: 0; padding-top: 2px; }
  .nav-links { grid-area: 2 / 1 / 3 / -1; gap: clamp(8px, 3vw, 20px); border-top: 1px solid var(--line); }
  .nav-links a, .nav-cta { font-size: 13px; }
  .nav-cta { grid-area: 1 / 2; }
  .hero-copy { padding-block: 18px; gap: 18px; }
  .identity { margin-bottom: 13px; }
  .hero .lede { margin-top: 12px; }
  .stack-head { padding-top: 12px; }
  .stack-art { width: min(100% - 32px, 274px); }
  .layer-label { left: -12px; width: calc(20% + 12px); }
  .stack-layer[data-layer="tools"] { --height: 13%; }
  .stack-layer[data-layer="skills"] { --height: 30%; }
  .stack-layer[data-layer="models"] { --height: 47%; }
  .stack-layer[data-layer="benchmarks"] { --height: 64%; }
  .stack-layer[data-layer="books"] { --height: 81%; }
  .stack-preview {
    min-height: 70px; padding-block: 9px;
    grid-template-columns: 56px minmax(0, 1fr) 44px;
  }
  .stack-preview h2 { font-size: 20px; }
  .stack-preview p { font-size: 12px; margin-top: 3px; }
}
@media (max-width: 480px) {
  .arcade-dialog-bar {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px;
  }
  .arcade-dialog-bar form { grid-area: 1 / 2 / 3; }
}
@media (max-width: 400px) {
  .layer-label { gap: 4px; }
}
@media (pointer: coarse) {
  .arcade-help { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  .arcade-dialog-bar { padding-block: 4px; }
  .arcade-game { --player-height: max(155px, calc(100dvh - 76px)); }
}

/* Shared lower-page typography and links */
.section { padding-block: clamp(42px, 6.2vw, 89px); }
.section + .section { border-top: 1px solid var(--line); }
.tag {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.075em;
}
.tag::before { content: ""; flex: 0 0 10px; height: 1px; background: currentColor; }
h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.05em; }
h2 { font-size: clamp(35px, 5.2vw, 73px); line-height: 0.98; text-wrap: balance; }
h3 { font-size: clamp(24px, 2.65vw, 38px); line-height: 1.07; }
.section-art { width: 100%; height: auto; display: block; object-fit: cover; }
.feature-media img, .stack-preview img, .arcade-screen img { filter: saturate(0.24) sepia(0.17); }
.feature { min-width: 0; }
.feature-media { aspect-ratio: 16 / 9; background: var(--shade); overflow: hidden; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-body { padding-block: 15px 0; min-width: 0; }
.meta { margin: 6px 0 0; color: var(--muted); }
.desc, .bio { margin: 10px 0 0; color: var(--body); max-width: 61ch; }
.bio a { text-decoration: underline; text-underline-offset: 4px; }
.bio a:hover { color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 0 15px; margin-top: 7px; }
.links a {
  font-size: 14px; font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 5px;
}
.links a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Public GitHub build log */
.build-section { background: var(--bg); }
.build-heading { max-width: 670px; margin-bottom: clamp(20px, 3.2vw, 42px); }
.build-heading a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.build-ledger {
  padding: clamp(16px, 2.8vw, 38px);
  border: 1px solid var(--line); background: var(--paper);
}
.build-ledger h3, .build-history h3 { font-size: clamp(21px, 2.15vw, 32px); }
.build-milestones {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none; margin: clamp(21px, 3vw, 38px) 0 18px; padding: 0;
}
.build-milestones li { position: relative; border-top: 1px solid var(--line); padding: 16px 10px 0 0; }
.build-milestones li::before {
  content: ""; position: absolute; top: -4px; left: 0;
  width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%;
  background: var(--paper);
}
.build-milestones li:last-child::before { background: var(--accent); }
.build-milestones time { display: block; color: var(--muted); }
.build-milestones strong {
  display: block; margin-top: 4px;
  font: 700 clamp(40px, 6vw, 82px)/1 var(--display); letter-spacing: -0.065em;
}
.build-milestones li:last-child strong { color: var(--accent); }
.build-stats {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  margin: 0; padding: 12px 0; border-block: 1px solid var(--line);
}
.build-stats > div { display: flex; align-items: baseline; gap: 0 8px; }
.build-stats dd {
  order: -1; margin: 0; color: var(--ink);
  font: 650 15px/1 var(--display);
}
.build-stats dt { font-size: 13px; color: var(--body); line-height: 1.35; }

.build-months { margin-bottom: -10px; }
.build-months summary {
  width: fit-content; min-height: 44px; padding-block: 10px;
  color: var(--accent); font-size: 14px; cursor: pointer;
}
.build-months summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.build-month-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 6px; margin: 0 0 10px; font: 500 12px/1.45 var(--mono);
}
.build-month-list > div { padding: 7px 9px; border: 1px solid var(--line); background: var(--dark); }
.build-month-list dt { color: var(--muted); }
.build-month-list dd { margin: 2px 0 0; }

.build-history { margin-top: clamp(27px, 4vw, 52px); }
.build-history ol {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px;
  margin: 16px 0 0; padding: 0; list-style: none;
}
.build-history li { border-top: 1px solid var(--line); }
.build-history a { display: block; padding: 8px 4px 8px 0; min-height: 62px; }
.build-history a:hover strong { color: var(--accent); }
.build-history span { color: var(--accent); }
.build-history strong, .build-history small { display: block; line-height: 1.35; }
.build-history small { color: var(--muted); margin-top: 3px; font-size: 13px; }

@media (max-width: 760px) {
  .build-history ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .build-milestones { grid-template-columns: 1fr; margin: 14px 0 15px 4px; }
  .build-milestones li {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 0; border-left: 1px solid var(--line); padding: 4px 6px 4px 16px;
  }
  .build-milestones li::before { top: 50%; left: -4px; transform: translateY(-50%); }
  .build-milestones strong { margin-top: 0; font-size: 34px; font-variant-numeric: tabular-nums; }
}

/* Work */
.project-section { background: var(--paper); }
.work-intro {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: clamp(16px, 3vw, 35px);
}
.work-art { width: clamp(160px, 19vw, 270px); aspect-ratio: 2.8; border: 1px solid var(--line); object-position: 50% 62%; }
.project-card {
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center; gap: clamp(22px, 3.6vw, 54px); padding: clamp(20px, 3vw, 43px);
  border: 1px solid var(--line);
}
.project-card + .project-card { margin-top: 13px; }
.project-lead {
  border-top-color: var(--accent);
  background: radial-gradient(ellipse at left center, #34271f, transparent 62%), #221e1b;
}
.project-lead h3 { font-size: clamp(33px, 4.25vw, 61px); }
.project-card .feature-body { padding: 0; }
.project-card .tag { color: var(--accent); margin-bottom: 6px; }
.project-card .desc { line-height: 1.5; }
.project-note {
  margin: clamp(18px, 2.2vw, 31px) 0; padding-left: 13px;
  border-left: 2px solid var(--heat); max-width: 37ch;
}
.project-note p { margin: 4px 0 0; color: var(--body); font-size: 14px; line-height: 1.5; }
.estimate { color: var(--accent); }
.product-shot { min-width: 0; margin: 0; }
.product-shot a { display: block; background: var(--dark); border: 1px solid var(--line); }
.product-shot a:hover { border-color: var(--accent); }
.product-shot img { width: 100%; height: auto; }
img.token-meter-shot { filter: hue-rotate(180deg) saturate(0.65) sepia(0.18); }
.product-shot figcaption { margin-top: 7px; color: var(--muted); }
.evidence-list { margin: 0; padding: 6px 16px; border: 1px solid var(--line); background: var(--dark); }
.evidence-list > div {
  display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px;
  align-items: baseline; padding: 9px 0;
}
.evidence-list > div + div { border-top: 1px solid var(--line); }
.evidence-list dt { color: var(--accent); font: 500 12px/1.5 var(--mono); }
.evidence-list dd { margin: 0; color: var(--body); font-size: 14px; }

/* Research */
.benchmark-section, .talks-section {
  color: var(--ink); background: #211d19;
}
.benchmark-banner {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(25px, 5vw, 72px); align-items: center;
}
.benchmark-copy > p:last-child {
  margin: 17px 0 0; max-width: 45ch; color: var(--body);
  font-size: clamp(16px, 1.5vw, 21px); line-height: 1.5;
}
.benchmark-copy strong { color: var(--accent); font-weight: 650; }
.benchmark-art { justify-self: end; width: min(100%, 460px); aspect-ratio: 2; border: 1px solid var(--line); }
.benchmark-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3.8vw, 55px); margin-top: clamp(32px, 5vw, 66px);
}
.benchmark-grid .feature-body {
  display: flex; flex-direction: column; height: 100%;
  padding: clamp(18px, 2.35vw, 32px); border: 1px solid var(--line); background: var(--paper);
}
.benchmark-grid .feature-body > .desc { margin-bottom: 15px; }
.benchmark-evidence {
  min-width: 0; margin: auto 0 0; min-height: 132px; padding: 15px;
  border: 1px solid var(--line); background: var(--dark);
}
.benchmark-evidence figcaption { color: var(--accent); }
.benchmark-evidence p { margin: 9px 0 0; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.45; }
.context-bands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 10px 0 0; }
.context-bands dt { color: var(--muted); font-size: 13px; }
.context-bands dd { margin: 0; font: 700 clamp(16px, 2.1vw, 27px)/1.3 var(--display); }
.collection-heading { margin-bottom: clamp(17px, 2.8vw, 35px); }

.models-section { background: #201c19; }
.model-board {
  display: grid; grid-template-columns: minmax(0, 0.64fr) minmax(0, 1.36fr);
  border: 1px solid #594c43; background: #28231f;
}
.models-art { height: 100%; min-height: 0; }
.model-copy { min-width: 0; padding: clamp(20px, 3.2vw, 44px); align-self: center; }
.score-figure {
  --score-columns: minmax(155px, 0.92fr) minmax(0, 1.08fr) 44px;
  margin: 18px 0 0; padding: 13px 0 7px; border-top: 1px solid var(--line);
}
.score-figure figcaption { margin-bottom: 5px; color: var(--muted); }
.score-axis, .scores li { display: grid; grid-template-columns: var(--score-columns); gap: 10px; }
.score-axis { margin-bottom: 6px; }
.score-axis > div { grid-column: 2; display: flex; justify-content: space-between; color: var(--muted); font: 400 11px/1.4 var(--mono); }
.scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.scores li { align-items: center; }
.scores .m { font-size: 14px; font-weight: 600; line-height: 1.35; }
.scores .m small { display: block; margin-top: 3px; font: 400 11px/1.4 var(--mono); color: var(--muted); }
.bar {
  height: 8px; background: repeating-linear-gradient(90deg, #544840 0 1px, #3c342f 1px 50%);
  overflow: hidden;
}
.bar i { display: block; width: var(--w); height: 100%; background: var(--accent); transform-origin: left; }
.scores .s { color: var(--accent); font: 600 13px/1 var(--mono); text-align: right; }
.score-reference .bar i { background: #c9bcac; }
.score-reference .s { color: var(--ink); }

/* Books */
.books-section { background: #211d19; }
.books-layout {
  display: grid; grid-template-columns: minmax(0, 0.87fr) minmax(0, 1.13fr);
  align-items: start; gap: clamp(22px, 5.6vw, 79px);
}
.books-cover h2 { max-width: 10ch; margin-bottom: 17px; }
.books-art { width: min(100%, 390px); aspect-ratio: 1.85; border: 1px solid #5f5046; }
.book {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--accent);
}
.book .feature-body { padding: clamp(15px, 2.3vw, 30px); }
.book-chapters { padding: clamp(15px, 2.3vw, 30px); align-self: stretch; border-left: 1px solid var(--line); background: var(--dark); }
.book-chapters .tag { color: var(--accent); margin-bottom: 7px; }
.book-chapters ul { list-style: none; margin: 0; padding: 0; }
.book-chapters a { display: flex; align-items: center; min-height: 44px; padding-block: 5px; border-bottom: 1px solid var(--line); font-size: 14px; }
.book-chapters a:hover { color: var(--accent); }
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin-top: 12px; }
.shelf a { position: relative; padding: 13px 20px 13px 0; border-bottom: 1px solid var(--line); }
.shelf a::after { content: "↗" / ""; position: absolute; right: 0; top: 13px; color: var(--accent); }
.shelf strong { display: block; font-weight: 650; line-height: 1.3; }
.shelf span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.shelf a:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* Writing and talks */
.writing-section { background: var(--paper); }
.journal-banner {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center; gap: 25px; background: #28221d;
  border-block: 1px solid var(--line);
}
.journal-banner > div { padding: clamp(18px, 3.4vw, 49px); }
.journal-banner h2 { font-size: clamp(55px, 8.7vw, 125px); line-height: 0.84; }
.writing-art { justify-self: end; width: min(100%, 470px); height: 100%; max-height: 235px; }
.journal-layout {
  display: grid; grid-template-columns: minmax(0, 0.83fr) minmax(0, 1.67fr);
  gap: clamp(21px, 4.4vw, 61px); margin-top: 28px;
}
.story-feature {
  display: block; padding: clamp(17px, 2.6vw, 32px);
  border: 1px solid var(--line); border-top: 2px solid var(--accent);
  background: radial-gradient(ellipse at top left, #37291f, transparent 80%), var(--dark);
}
.story-feature .feature-body { padding: 0; }
.story-feature h3 { font-size: clamp(27px, 3vw, 43px); max-width: 18ch; }
.story-feature:hover h3, .talk-feature:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.story-feature .meta { margin: 0 0 7px; color: var(--accent); }
.story-action { display: inline-block; margin-top: 17px; color: var(--accent); font-size: 14px; font-weight: 650; }
.talk-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(11px, 1.65vw, 24px); margin-top: 23px; }
.journal-groups { margin-top: 0; }
.talk-group .tag { margin: 0; padding: 9px 0 0; border-top: 1px solid var(--line); }
.talk-list { list-style: none; margin: 2px 0 0; padding: 0; }
.talk-list a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); }
.talk-list strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.37; }
.talk-list .mono { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.talk-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.talk-archive { margin-top: 9px; }
.talk-archive summary { width: fit-content; min-height: 44px; padding-block: 10px; color: var(--accent); cursor: pointer; font-size: 14px; }
.talk-archive ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }

.talks-section { background: #201c19; }
.talks-layout {
  display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: start; gap: clamp(23px, 5vw, 71px);
}
.talks-intro h2 { margin-bottom: 17px; }
.talks-resources { display: flex; align-items: center; gap: clamp(12px, 2vw, 20px); }
.talks-resources .links { display: grid; margin: 0; }
.talks-art { width: min(48%, 226px); min-width: 0; aspect-ratio: 1.78; border: 1px solid var(--line); }
.talk-feature {
  display: grid; grid-template-columns: minmax(0, 0.97fr) minmax(0, 1.03fr);
  background: var(--paper); border: 1px solid var(--line);
}
.talk-feature .feature-body { align-self: center; padding: clamp(14px, 2.1vw, 28px); }
.talk-feature .meta { margin: 0 0 7px; color: var(--accent); }
.talk-feature .feature-media { position: relative; aspect-ratio: auto; min-height: 150px; }
.talk-feature .feature-media img { position: absolute; inset: 0; }
.play {
  position: absolute; inset: 50% auto auto 50%; width: 48px; height: 48px;
  translate: -50% -50%; display: grid; place-items: center;
  background: var(--heat); color: #211b18; border-radius: 50%;
}
.play::after { content: ""; margin-left: 4px; border-block: 8px solid transparent; border-left: 13px solid currentColor; }

/* Career and contact */
.experience-section { background: #211d19; }
.experience-banner {
  display: grid; grid-template-columns: minmax(0, 0.83fr) minmax(0, 1.17fr);
  align-items: center; gap: clamp(22px, 5.3vw, 74px);
}
.experience-banner .bio { max-width: 41ch; }
.experience-art { justify-self: end; width: min(100%, 465px); aspect-ratio: 2.15; border: 1px solid var(--line); }
.timeline {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 17px;
  list-style: none; margin: clamp(23px, 4vw, 58px) 0 0; padding: 0;
}
.timeline li { position: relative; padding: 16px 8px 9px 0; border-top: 1px solid var(--accent); }
.timeline li::before {
  content: ""; position: absolute; top: -4px; left: 0;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.timeline .mono { display: block; margin-bottom: 6px; color: var(--accent); }
.timeline strong { font: 700 21px/1.12 var(--display); letter-spacing: -0.025em; }
.timeline p { margin: 5px 0 0; color: var(--body); font-size: 15px; line-height: 1.45; }
.timeline p a { text-decoration: underline; text-underline-offset: 3px; }
.timeline p a:hover { color: var(--accent); }
.creds {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: clamp(22px, 3.2vw, 45px) 0 0; padding: 0; list-style: none;
  border-block: 1px solid var(--line);
}
.creds li { display: flex; align-items: center; padding: 11px 14px; color: var(--muted); font-size: 13px; line-height: 1.42; }
.creds li + li { border-left: 1px solid var(--line); }
.creds a { display: flex; flex-direction: column; justify-content: center; min-height: 44px; }
.creds b { display: block; color: var(--ink); font-size: 15px; font-weight: 650; }
.creds a:hover b { text-decoration: underline; text-underline-offset: 3px; }

.section.contact { padding-block: clamp(25px, 4.7vw, 64px); background: var(--bg); }
.contact-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: clamp(16px, 4vw, 48px); padding: clamp(18px, 3.3vw, 46px);
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 0 50%, #35281e, transparent 65%), var(--paper);
}
.contact-identity { display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); }
.contact-identity h2 { font-size: clamp(31px, 4.6vw, 63px); }
.contact-portrait {
  width: clamp(56px, 6.8vw, 94px); aspect-ratio: 1; flex: none;
  border: 1px solid var(--line); overflow: hidden;
}
.contact-portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  transform: scale(2.2); transform-origin: 60% 3%; filter: saturate(0.42) sepia(0.13);
}
.contact .actions { gap: 8px; }
body > footer { background: var(--dark); color: var(--muted); }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 17px; padding-block: 14px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.foot a:hover { color: var(--heat); }
.foot :focus-visible { outline-color: var(--heat); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .scores.is-visible .bar i { animation: fill-in 580ms ease-out backwards; }
  @keyframes fill-in { from { transform: scaleX(0); } }
}
@media (max-width: 1050px) {
  .creds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .creds li:nth-child(4) { border-left: 0; }
  .creds li:nth-child(n+4) { border-top: 1px solid var(--line); }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .books-layout, .journal-layout, .talks-layout { grid-template-columns: 1fr; gap: 23px; }
  .books-art { width: min(100%, 285px); aspect-ratio: 2; }
  .books-cover h2 { max-width: none; }
}
@media (max-width: 620px) {
  .benchmark-banner, .benchmark-grid, .model-board, .journal-banner, .experience-banner, .contact-panel { grid-template-columns: 1fr; gap: 18px; }
  .model-board, .journal-banner { gap: 0; }
  .benchmark-art, .experience-art { justify-self: start; width: min(100%, 305px); aspect-ratio: 2.25; }
  .work-art { display: none; }
  .project-card { grid-template-columns: 1fr; gap: 17px; }
  .benchmark-grid { margin-top: 25px; }
  .models-art { aspect-ratio: 2.8; height: auto; max-height: 156px; }
  .score-figure { --score-columns: minmax(0, 1fr) auto; }
  .score-axis > div { grid-column: 1 / -1; }
  .scores li { gap: 5px; }
  .scores .bar { grid-area: 2 / 1 / 3 / -1; }
  .book { grid-template-columns: 1fr; }
  .book-chapters { border-left: 0; border-top: 1px solid var(--line); }
  .writing-art { width: 100%; aspect-ratio: 2.6; height: auto; }
  .talk-groups { grid-template-columns: 1fr; gap: 17px; }
  .talk-feature { grid-template-columns: 1fr; }
  .talk-feature .feature-media { aspect-ratio: 16 / 9; min-height: 0; }
  .timeline { grid-template-columns: 1fr; gap: 0; margin-left: 4px; }
  .timeline li { padding: 0 0 21px 14px; border-top: 0; border-left: 1px solid var(--accent); }
  .timeline li::before { top: 4px; left: -4px; }
  .creds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creds li:nth-child(n) { border-left: 1px solid var(--line); }
  .creds li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .creds li:nth-child(odd) { border-left: 0; }
}
@media (max-width: 380px) {
  .hero-socials { column-gap: 0; }
  .hero-socials a span { display: none; }
  .shelf { grid-template-columns: 1fr; }
}
