/* Palette follows design/Main.dc.html. Light is the default theme; dark is :root without data-theme. */
:root {
  --bg: #0B0F13;
  --bg-deep: #080B0E;
  --panel: #0C1115;
  --panel-2: #11181E;
  --line: #1A232B;
  --line-2: #26313A;
  --line-3: #3A4A56;
  --grid: #141C22;
  --fg: #D8DFE4;
  --fg-hi: #E8EDF0;
  --fg-2: #AAB6BF;
  --dim: #8E9BA5;
  --dim-2: #4A5A66;
  --accent: #F2643D;
  --steel: #BCD0DD;
  --header-bg: rgba(11,15,19,.86);
  --glass: rgba(11,15,19,.8);
  --bar-bg: rgba(14,20,25,.92);
  --col-line: rgba(120,150,170,.05);
  --accent-line: rgba(242,100,61,.55);
  --accent-wash: rgba(242,100,61,.05);
  --accent-tint: rgba(242,100,61,.28);
  --backdrop: rgba(5,7,9,.92);
  --stage-a: #121A20;
  --stage-b: #080B0E;
  --c0: #F2643D; --c1: #6FC0EE; --c2: #E8D9A8;
  --c0-fill: rgba(242,100,61,.12); --c1-fill: rgba(111,192,238,.10); --c2-fill: rgba(232,217,168,.08);
  /* hero canvas (read by app.js) */
  --flow-bg: 11,15,19;
  --flow-streak: rgba(170,195,210,.62);
  --flow-outline: rgba(242,100,61,.8);
  --sans: 'Geist', 'Helvetica Neue', Helvetica, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --serif: 'STIX Two Text', 'Times New Roman', serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F4F5F3;
  --bg-deep: #ECEEEB;
  --panel: #FFFFFF;
  --panel-2: #EEF1F2;
  --line: #DCE1E4;
  --line-2: #C8D0D5;
  --line-3: #A9B4BB;
  --grid: #E7EBED;
  --fg: #151B20;
  --fg-hi: #0B0F13;
  --fg-2: #3E4B54;
  --dim: #56626B;
  --dim-2: #8D989F;
  --accent: #C2410C;
  --steel: #5F7787;
  --header-bg: rgba(244,245,243,.9);
  --glass: rgba(255,255,255,.88);
  --bar-bg: rgba(255,255,255,.96);
  --col-line: rgba(30,50,60,.06);
  --accent-line: rgba(194,65,12,.5);
  --accent-wash: rgba(194,65,12,.05);
  --accent-tint: rgba(194,65,12,.16);
  --backdrop: rgba(240,242,240,.95);
  --stage-a: #FFFFFF;
  --stage-b: #E4E8EA;
  --c0: #C2410C; --c1: #1D74A8; --c2: #9A7A12;
  --c0-fill: rgba(194,65,12,.12); --c1-fill: rgba(29,116,168,.10); --c2-fill: rgba(154,122,18,.12);
  --flow-bg: 244,245,243;
  --flow-streak: rgba(55,75,90,.45);
  --flow-outline: rgba(194,65,12,.85);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); overflow-x: hidden; }
a { color: var(--fg); }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }
img { max-width: 100%; display: block; }
button { font: inherit; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--accent); color: var(--bg); padding: 10px 14px; font-size: 14px; }
.skip:focus { left: 16px; }

.math { font-family: var(--serif); font-style: italic; font-size: 1.1em; color: var(--fg-hi); }
.math .up { font-style: normal; }
.eyebrow { margin: 0; font-size: 14px; line-height: 1.45; color: var(--dim); }
.eyebrow.pad { padding-top: 12px; }
.small { font-size: 13px; color: var(--dim); }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px; }
.sec { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); column-gap: 32px; row-gap: 20px; }
.h2 { margin: 0; font-weight: 300; font-size: clamp(36px, 4.6vw, 64px); line-height: 1; letter-spacing: -.035em; }
.rule { height: 1px; background: var(--line); }
.prose { font-size: 16px; line-height: 1.7; color: var(--fg-2); }
.prose p { margin: 0; }
.prose strong { color: var(--fg); font-weight: 500; }

/* Background column grid */
.cols { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.cols .wrap { height: 100%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
.cols .wrap > div { border-left: 1px solid var(--col-line); }
.cols .wrap > div:last-child { border-right: 1px solid var(--col-line); }

/* Header: one row down to ~720px */
.top { position: sticky; top: 0; z-index: 10; background: var(--header-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; font-size: 14px; }
.top a { text-decoration: none; }
.top .brand { font-weight: 500; padding: 12px 0; white-space: nowrap; }
.top nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.top nav a { color: var(--dim); padding: 12px 0; white-space: nowrap; }
.top nav a:hover { color: var(--accent); }
.top .tools { display: flex; align-items: center; gap: 10px; }
.resume-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--accent); color: var(--accent); white-space: nowrap; transition: background .25s, color .25s; }
.resume-link:hover { background: var(--accent); color: var(--bg); }
.theme-toggle { all: unset; box-sizing: border-box; cursor: pointer; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-3); color: var(--fg); transition: color .25s, background .25s, border-color .25s; }
.theme-toggle:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.theme-toggle:focus-visible, .resume-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: block; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
html.theme-anim, html.theme-anim * { transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, stroke .35s ease !important; }

section, footer { position: relative; z-index: 1; }

/* Buttons: sans, sentence case */
.btn { all: unset; box-sizing: border-box; cursor: pointer; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); font-family: var(--sans); font-size: 14px; color: var(--fg); text-decoration: none; transition: background .25s, color .25s, border-color .25s; }
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.hot { border-color: var(--accent); color: var(--accent); }
.btn.hot:hover { background: var(--accent); color: var(--bg); }
.btn.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn:focus-visible, .bar:focus-visible, .row:focus-visible, .chip:focus-visible, a:focus-visible, .thumb:focus-visible, .figbtn:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); background: var(--glass); }
.seg .btn { border: 0; border-right: 1px solid var(--line-2); min-height: 40px; font-size: 13px; }
.seg .btn:last-child { border-right: 0; }

/* Hero */
.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .wrap { position: relative; min-height: calc(100vh - 57px); min-height: calc(100svh - 57px); padding-top: 80px; padding-bottom: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 56px; pointer-events: none; }
.hero h1 { margin: 0; font-weight: 300; font-size: clamp(56px, 9.4vw, 152px); line-height: .92; letter-spacing: -.05em; }
.hero .abstract { margin: 32px 0 0; max-width: 600px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--fg-2); }
.hero .cta { pointer-events: auto; margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero .controls { pointer-events: auto; }
.hero .id { display: flex; flex-direction: column; gap: 18px; }
.portrait { margin: 0; width: 100%; max-width: 200px; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero .wrap > .sec.flow { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
.flow-intro { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--fg-2); max-width: 640px; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.hero-foot .caption { flex: 1 1 320px; margin: 0; min-height: 1.5em; font-size: 14px; line-height: 1.55; color: var(--fg-2); max-width: 640px; }
.knobs { display: flex; flex-wrap: wrap; gap: 16px; }
.slider { display: flex; flex-direction: column; gap: 6px; width: 220px; padding: 10px 14px; border: 1px solid var(--line-2); background: var(--glass); font-size: 13px; color: var(--fg-2); }
.slider[hidden] { display: none; }
.slider output { color: var(--accent); margin-left: 6px; font-family: var(--mono); font-size: 12px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line-3); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line-3); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; background: var(--accent); border: 0; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; background: var(--accent); border: 0; border-radius: 0; }
input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hero.drawing canvas { cursor: crosshair; touch-action: none; }
.hero.drawing .wrap > .sec:first-child { opacity: .25; transition: opacity .3s; }
/* Hero text sits on the flow: give it a halo of the background */
.hero .abstract, .hero .eyebrow, .hero .caption, .hero .flow-intro { text-shadow: 0 0 2px var(--bg), 0 0 6px var(--bg), 0 0 12px var(--bg); }
:root[data-theme="light"] .hero .abstract { color: var(--fg); }

/* Section shells */
.block { padding: 112px 0 32px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.intro { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-2); max-width: 380px; }

/* Work: rows with thumbnail, one-line result, expand in place */
.list { min-width: 0; }
.ihead, .row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px 20px; gap: 20px; }
.ihead { padding: 0 0 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--dim); }
.item { border-bottom: 1px solid var(--line); }
.row { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px 20px; gap: 20px; align-items: center; width: 100%; padding: 16px 0; }
.row::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.3,.7,.3,1); }
.row:hover::before, .row[aria-expanded="true"]::before { transform: scaleX(1); }
.row .th { width: 72px; height: 72px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.row .th img { width: 100%; height: 100%; object-fit: cover; }
.row .th svg { width: 40px; height: 40px; }
.row .tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row .t { font-size: 19px; font-weight: 400; letter-spacing: -.01em; color: var(--fg); transition: color .25s; }
.row .r { font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.row .r b { color: var(--accent); font-weight: 500; }
.row .m { font-size: 13px; color: var(--dim); }
.row .pm { font-family: var(--mono); font-size: 16px; color: var(--dim); text-align: right; transition: transform .35s, color .3s; }
.row:hover .t { color: var(--accent); }
.row[aria-expanded="true"] .pm { transform: rotate(45deg); color: var(--accent); }
.detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.3,.7,.3,1); }
.detail.open { grid-template-rows: 1fr; }
.detail > div { overflow: hidden; }
.detail .inner { padding: 0 0 32px 92px; display: flex; flex-direction: column; gap: 16px; }
.detail .venue { margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.detail .st { font-size: 13px; color: var(--accent); text-align: right; }
.detail .kvs { grid-column: 1 / -1; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.55; }
.kv .k { font-size: 13px; color: var(--dim); padding-top: 2px; }
.kv strong { color: var(--fg); font-weight: 600; }
.kv a { text-underline-offset: 3px; overflow-wrap: anywhere; }
.detail .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* Hardware */
.boards { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.viewer { flex: 999 1 560px; min-width: 0; border: 1px solid var(--line); background: var(--panel); padding: 20px; }
.meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--dim); margin-bottom: 12px; }
.stage { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 45%, var(--stage-a) 0%, var(--stage-b) 70%); border: 1px solid var(--line); touch-action: none; cursor: grab; }
.stage:active { cursor: grabbing; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewer .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.board-notes { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.board-notes h3 { margin: 0; font-weight: 400; font-size: 24px; letter-spacing: -.02em; color: var(--fg); }
.board-notes ul, .card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.board-notes li, .card li { display: flex; gap: 12px; font-size: 15px; line-height: 1.6; }
.board-notes li .dash, .card li .dash { color: var(--accent); padding-top: 1px; }
.mask { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.strip .thumb { aspect-ratio: 4 / 3; }

/* Photos open in place */
.thumb { all: unset; box-sizing: border-box; cursor: zoom-in; display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.3,.7,.3,1); }
.thumb:hover img { transform: scale(1.05); }
.figbtn { all: unset; box-sizing: border-box; cursor: zoom-in; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 10px; }
.figbtn img { width: 100%; height: auto; }
.figbtn span { font-size: 13px; color: #56626B; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; color: var(--fg); }
.lightbox::backdrop { background: var(--backdrop); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; padding: 64px 72px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: min(1100px, 100%); max-height: calc(100vh - 150px); object-fit: contain; border: 1px solid var(--line-2); background: #fff; }
.lightbox figcaption { display: flex; justify-content: space-between; gap: 24px; width: 100%; max-width: 1100px; font-size: 14px; color: var(--fg-2); }
.lightbox figcaption span:last-child { font-size: 13px; color: var(--dim); white-space: nowrap; }
.lb-close { position: fixed; top: 16px; right: 16px; background: var(--bg); }
.lb-prev, .lb-next { position: fixed; top: 50%; transform: translateY(-50%); background: var(--bg); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Research demo */
.bandit { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.bandit .prose { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.bandit .lead { font-size: 18px; color: var(--fg); }
.fig { flex: 999 1 540px; min-width: 0; border: 1px solid var(--line); background: var(--panel); padding: 20px; }
.fig svg { width: 100%; height: auto; display: block; }
.arms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.arm { border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.arm .name { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.arm .sw { width: 8px; height: 8px; flex: none; }
.arm .st { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.arm .track { height: 3px; background: var(--grid); }
.arm .fill { height: 100%; transition: width .25s ease; }
.hist { display: flex; gap: 2px; height: 16px; overflow: hidden; }
.hist span { flex: 0 0 auto; width: 5px; }
.fig .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.adv { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.adv summary { cursor: pointer; font-size: 14px; color: var(--dim); padding: 6px 0; }
.adv summary:hover { color: var(--accent); }
.rates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.rates label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.rates input { width: 76px; min-height: 40px; padding: 0 10px; background: var(--bg-deep); border: 1px solid var(--line-2); color: var(--fg); font-family: var(--mono); font-size: 13px; }
.rates input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Timeline: fits the width, filter chips, labels never clipped */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { all: unset; box-sizing: border-box; cursor: pointer; min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 18px; font-size: 14px; color: var(--fg-2); transition: background .25s, color .25s, border-color .25s; }
.chip:hover { border-color: var(--fg-2); color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip .n { font-size: 12px; opacity: .7; }
.tl { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.chart { flex: 999 1 640px; min-width: 0; border: 1px solid var(--line); background: var(--bg-deep); }
.chart-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--dim); border-bottom: 1px solid var(--line); }
.chart-grid { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
.years { position: relative; height: 32px; border-bottom: 1px solid var(--line-2); }
.years span { position: absolute; top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--dim); transform: translateX(-50%); }
.corner { height: 32px; border-bottom: 1px solid var(--line-2); }
.tracks { position: relative; overflow: hidden; }
.vline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.vline.now { background: var(--accent-line); }
.nowlbl { position: absolute; bottom: 6px; margin-left: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--accent); }
.lane { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 19px 10px 0 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.lane.on { color: var(--accent); }
.lane .n { color: var(--dim-2); }
.lrow { border-bottom: 1px solid var(--line); position: relative; transition: background .4s; }
.lrow.on { background: var(--accent-wash); }
.bar { all: unset; box-sizing: border-box; position: absolute; height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid var(--line-3); background: var(--bar-bg); cursor: pointer; white-space: nowrap; font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--fg); transition: border-color .3s, background .3s, color .3s, opacity .4s; }
.bar:hover { border-color: var(--fg-2); }
.bar .tick { width: 5px; height: 5px; background: var(--steel); flex: none; }
.bar.approx { border-style: dashed; }
.bar.dim { opacity: .3; }
.bar.sel { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.bar.sel .tick { background: var(--bg); }
/* Short bars keep their true dates; the label sits outside, right or left */
.bar.out { padding: 0; justify-content: center; }
.bar.out .lab { position: absolute; top: 50%; transform: translateY(-50%); left: calc(100% + 6px); padding: 2px 4px; background: var(--bg-deep); color: var(--fg); }
.bar.out.left .lab { left: auto; right: calc(100% + 6px); }
.bar.out.sel .lab { color: var(--accent); }
.bar.dot { border-radius: 50%; width: 12px; height: 12px; margin-left: -6px; margin-top: 8px; border-width: 1.5px; border-color: var(--steel); }
.bar.dot .tick { display: none; }
.bar.dot.sel { background: var(--accent); border-color: var(--accent); }
.card { flex: 1 1 320px; min-width: 0; border: 1px solid var(--line); padding: 24px; background: var(--panel); display: flex; flex-direction: column; }
.card > div { display: flex; flex-direction: column; }
.card .meta { margin: 0; }
.card .meta .hl { color: var(--accent); }
.card h3 { margin: 16px 0 0; font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.card .place { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.card .rule { margin: 18px 0 14px; }
.chiplets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chiplets span { font-size: 12px; padding: 3px 8px; border: 1px solid var(--line-2); color: var(--fg-2); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 16px; }
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; }
.card .foot .n { font-size: 13px; color: var(--dim); }
.card .foot .nav { display: flex; gap: 8px; }

/* Contact */
.contact { border-top: 1px solid var(--line); margin-top: 96px; }
.contact .wrap { padding-top: 88px; padding-bottom: 36px; }
.big { display: inline-block; text-decoration: none; color: var(--fg); font-weight: 300; font-size: clamp(40px, 7vw, 104px); line-height: .95; letter-spacing: -.05em; transition: color .3s; }
.big:hover { color: var(--accent); }
.big span { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; margin-top: 48px; font-size: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div span:first-child { color: var(--dim); white-space: nowrap; }
.facts div span:last-child { text-align: right; }
.endline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 28px; margin-top: 40px; font-size: 14px; color: var(--dim); }
.endline a, .endline span { padding: 12px 0; display: inline-block; }
.endline a { color: var(--fg-2); }
.endline a:hover { color: var(--accent); }
.endline .links2 { display: flex; flex-wrap: wrap; gap: 0 24px; }

@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fadein { animation: fade .4s ease both; }

@media (max-width: 1100px) {
  .tl .card { flex-basis: 100%; }
}
@media (max-width: 860px) {
  .sec { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 0 20px; }
  .cols { display: none; }
  .block { padding-top: 80px; }
  .eyebrow.pad { padding-top: 0; }
  .hero .id { flex-direction: row; align-items: center; gap: 16px; }
  .portrait { width: 88px; border-radius: 50%; }
  .chart-grid { grid-template-columns: 52px minmax(0, 1fr); }
  .lane { padding: 19px 4px 0 10px; }
  .lane .nm, .lane .n { display: none; }
}
@media (max-width: 720px) {
  .top .wrap { gap: 0 16px; }
  .top nav { order: 2; flex-basis: 100%; gap: 0 16px; overflow-x: auto; flex-wrap: nowrap; }
  .top nav { scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top .tools { order: 1; margin-left: auto; }
  .top nav a { padding: 6px 0 10px; }
}
@media (max-width: 640px) {
  .ihead, .row { grid-template-columns: 56px minmax(0, 1fr) 16px; gap: 12px; }
  .catnav { display: none; }
  .ihead .ty, .ihead .yr, .row .ty, .row .yr { display: none; }
  .row .th { width: 56px; height: 56px; }
  .row .t { font-size: 17px; }
  .detail .inner { padding-left: 0; }
  .detail .st { text-align: left; }
  .kv { grid-template-columns: 84px minmax(0, 1fr); }
  .arms { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 20px 16px; }
  .lightbox figure { padding: 64px 12px 72px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .facts div { flex-direction: column; gap: 4px; }
  .facts div span:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fadein, .row::before, .bar, .thumb img, .detail { animation: none !important; transition: none !important; }
}

/* Work categories */
.catnav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.catnav a { color: var(--dim); text-decoration: none; padding: 6px 0; }
.catnav a:hover { color: var(--accent); }
.cat { margin-bottom: 56px; scroll-margin-top: 80px; }
.cat-h { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); font-size: 15px; font-weight: 500; letter-spacing: .01em; color: var(--fg); display: flex; align-items: baseline; gap: 10px; }
.cat-h span { font-size: 13px; font-weight: 400; color: var(--dim); }
.item { scroll-margin-top: 80px; }
.pts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.pts li { display: flex; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--fg-2); }
.pts li .dash { color: var(--accent); }
.detail .thumbs { max-width: 520px; margin: 0; }
.detail .acts { margin-top: 0; }
/* The demo inside an entry keeps its own breathing room above the buttons */
.detail .fig .acts { margin-top: 20px; }
.slot { margin-top: 4px; }
.slot .embed { display: block; }
.slot .bandit .prose { font-size: 15px; }

/* Publications */
.pubs { margin: 0; padding: 0; list-style: none; }
.pubs li { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.pubs p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-2); max-width: 860px; }
.pubs strong { color: var(--fg); font-weight: 600; }
.pubs .pt { color: var(--fg); }
.pubs .acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* Path: the story under the timeline */
#path .chart { flex: none; }
.story { margin: 40px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line-2); }
.step { display: flex; gap: 14px; padding: 20px 20px 24px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.step .n { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.step .when { margin: 0; font-size: 13px; color: var(--dim); }
.step h3 { margin: 4px 0 8px; font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.step p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--fg-2); }
.step .more { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--accent); text-decoration: none; }
.step .more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Off the clock */
.offgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.offcard { border: 1px solid var(--line); background: var(--panel); padding: 22px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 90px; }
.offcard h3 { margin: 0; font-size: 22px; font-weight: 400; letter-spacing: -.02em; }
.offcard p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-2); }
.offcard .thumbs { margin: 0; }
.offcard .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* Brief highlight when the timeline or a link jumps to something */
@keyframes flash { from { box-shadow: 0 0 0 2px var(--accent); } to { box-shadow: 0 0 0 2px transparent; } }
.flash { animation: flash 1.6s ease-out; }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; outline: 2px solid var(--accent); } }

/* Sections below the hero use the full width: the small label sits above the heading,
   and content starts at the page margin instead of after a 200px label column. */
.block .sec, .contact .sec { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
.block .sec > div:empty, .contact .sec > div:empty { display: none; }
.block .eyebrow.pad, .contact .eyebrow.pad { padding-top: 0; }
