/* Layout: full-bleed night photo as the landing page; a fixed bar with wordmark + menu button on every page; inner pages open with a skyline banner cut from the same photo, then a column of flip cards and lists.
   Single deliberate night theme (sodium-light accent taken from the photo's barrier wall). */
:root {
  --bg: #0b0b10;
  --surface: #15151c;
  --surface-2: #1c1c25;
  --fg: #ecebe6;
  --muted: #9b9aa6;
  --line: #2a2a34;
  --sodium: #e9c15a;
  --wide: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Newsreader", "Iowan Old Style", Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 var(--wide); font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased; }
a { color: var(--fg); text-decoration-color: var(--sodium); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--sodium); }
:focus-visible { outline: 2px solid var(--sodium); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.kicker { font: 500 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- top bar ---------- */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 16px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.wordmark { font: 700 14px var(--wide); font-variation-settings: "wdth" 125; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--fg); }
.wordmark:hover { color: var(--sodium); }
.burger { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(236,235,230,.28); background: rgba(11,11,16,.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; cursor: pointer; padding: 0; }
.burger:hover { border-color: var(--sodium); }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--fg); position: relative; transition: background .2s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--fg); transition: transform .25s; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- menu overlay ---------- */
.menu { position: fixed; inset: 0; z-index: 20; background: rgba(8,8,12,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: grid; align-content: center; padding: 96px 24px calc(env(safe-area-inset-bottom, 0px) + 32px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.menu.open { opacity: 1; visibility: visible; }
.menu nav { display: grid; gap: 4px; max-width: 900px; width: 100%; margin: 0 auto; }
.menu nav a { font: 800 clamp(34px, 7vw, 76px)/1.04 var(--wide); font-variation-settings: "wdth" 125; text-transform: uppercase; letter-spacing: -.01em;
  text-decoration: none; color: var(--fg); display: flex; align-items: baseline; gap: 18px; transform: translateY(14px); opacity: 0; transition: transform .45s, opacity .45s, color .2s; }
.menu nav a small { font: 500 13px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.menu nav a:hover { color: var(--sodium); }
.menu nav a[aria-current="page"] { color: var(--sodium); }
.menu.open nav a { transform: none; opacity: 1; }
.menu.open nav a:nth-child(2) { transition-delay: .05s; } .menu.open nav a:nth-child(3) { transition-delay: .1s; } .menu.open nav a:nth-child(4) { transition-delay: .15s; }
.menu .menu-foot { max-width: 900px; width: 100%; margin: 48px auto 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font: 13px var(--mono); color: var(--muted); }
.menu .menu-foot a { color: var(--muted); text-decoration: none; }
.menu .menu-foot a:hover { color: var(--sodium); }
body.locked { overflow: hidden; }

/* ---------- landing ---------- */
.landing { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.landing img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; display: block; }
.landing::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,16,.55) 0%, rgba(11,11,16,0) 22%, rgba(11,11,16,0) 70%, rgba(11,11,16,.6) 100%); pointer-events: none; }
.landing .title { position: absolute; left: 20px; right: 20px; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); z-index: 2; display: grid; gap: 10px; max-width: 900px; }
.landing .title p { font: 600 clamp(26px, 4.4vw, 56px)/1.08 var(--wide); font-variation-settings: "wdth" 104; letter-spacing: -.01em; color: var(--fg); max-width: 20ch; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.landing .title p::before { content: ""; display: block; width: 36px; height: 2px; background: var(--sodium); margin-bottom: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .landing .title { animation: rise 1.2s .3s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}

/* ---------- resume ---------- */
.jobs { display: grid; }
.job { display: grid; grid-template-columns: 210px 1fr; gap: 8px 36px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.job:first-child { padding-top: 8px; }
.job > * { min-width: 0; }
.job .when { display: grid; gap: 2px; align-content: start; font: 13px/1.6 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.job .when b { color: var(--fg); font-weight: 500; }
.job h3 { font: 700 clamp(22px, 2.4vw, 28px)/1.15 var(--wide); font-variation-settings: "wdth" 110; }
.job .title-line { color: var(--sodium); font: 500 14px var(--mono); letter-spacing: .02em; margin-top: 4px; }
.job .summary { margin-top: 12px; color: #d6d5cf; max-width: 64ch; }
.job ul { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 6px; max-width: 64ch; color: #cfcec8; }
.job ul li::marker { color: var(--sodium); }
.job .links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font: 13px var(--mono); }
.job .roles { display: grid; gap: 14px; margin-top: 12px; }
.job .roles div { display: grid; gap: 2px; }
.job .roles span { font: 13px var(--mono); color: var(--muted); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }

/* per-page accents */
body.p-research { --sodium: #9aa6ff; }
body.p-venture { --sodium: #7fd3a0; }

/* page lead + highlights */
.lead { display: grid; gap: 14px; max-width: 46ch; }
.lead-big { font: 600 clamp(26px, 3.6vw, 42px)/1.12 var(--wide); font-variation-settings: "wdth" 104; letter-spacing: -.01em; text-wrap: balance; }
.lead-big::before { content: ""; display: block; width: 36px; height: 2px; background: var(--sodium); margin-bottom: 18px; }
.lead-sub { color: #cfcec8; font-size: 17px; max-width: 62ch; }
.highlights { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin-top: -24px; }
.highlights > div { display: grid; gap: 4px; padding: 18px 16px; min-width: 0; }
.highlights > div + div { border-left: 1px solid var(--line); }
.highlights .k { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.highlights b { font: 700 18px/1.25 var(--wide); font-variation-settings: "wdth" 108; color: var(--fg); }
@media (max-width: 760px) {
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .highlights > div:nth-child(3) { border-left: 0; }
  .highlights > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* career stack */
.cat-industry { --cat: #e9c15a; }
.cat-research { --cat: #9aa6ff; }
.cat-venture  { --cat: #7fd3a0; }
.cstack { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.cstack > * { min-width: 0; }
.cs-layers { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.cs-layer { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: calc(var(--t) * 12px + 14px);
  padding: 0 14px; border: 0; cursor: pointer; text-align: left; font: 500 13px var(--mono); color: #121218;
  background: color-mix(in srgb, var(--cat) 55%, #15151c); transition: background .2s, padding .2s; }
.cs-layer span:last-child { opacity: .75; white-space: nowrap; }
.cs-layer + .cs-layer { border-top: 1px solid rgba(0,0,0,.25); }
.cs-layer:hover, .cs-layer[aria-pressed="true"] { background: var(--cat); padding-left: 22px; }
.cs-layer:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; }
.cs-sub { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--cat) 40%, #15151c) 0 6px, color-mix(in srgb, var(--cat) 30%, #15151c) 6px 12px); }
.cs-detail { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--cat, var(--sodium)); border-radius: 10px; padding: 22px; display: grid; gap: 8px; position: sticky; top: 90px; }
.cs-detail h3 { font: 700 24px/1.15 var(--wide); font-variation-settings: "wdth" 110; }
.cs-cat { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cat, var(--sodium)); }
.cs-role { font: 13px var(--mono); color: var(--muted); }
.cs-detail p:not(.cs-cat):not(.cs-role) { color: #d6d5cf; }
.cs-detail a { font: 13px var(--mono); margin-top: 6px; }
.cs-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 12px var(--mono); color: var(--muted); }
.cs-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cs-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--cat); }
@media (max-width: 760px) { .cstack { grid-template-columns: 1fr; } .cs-detail { position: static; } }

/* notes */
.notes-list { list-style: none; margin: 0; padding: 0; display: grid; }
.notes-list li { border-bottom: 1px solid var(--line); }
.notes-list a { display: grid; grid-template-columns: 110px 1fr; gap: 6px 20px; padding-block: 22px; text-decoration: none; }
.notes-list .d { font: 13px/1.9 var(--mono); color: var(--muted); }
.notes-list .nt { font: 600 clamp(20px, 2.4vw, 26px)/1.25 var(--wide); font-variation-settings: "wdth" 104; }
.notes-list .ns { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; }
.notes-list a:hover .nt { color: var(--sodium); }
.article { max-width: 680px; display: grid; gap: 18px; font-size: 17.5px; line-height: 1.75; color: #dddcd6; }
.article h2 { font: 700 22px/1.3 var(--wide); color: var(--fg); margin-top: 18px; }
.article .meta { font: 13px var(--mono); color: var(--muted); }
@media (max-width: 600px) { .notes-list a { grid-template-columns: 1fr; } }
body.p-notes { --sodium: #f0a04b; }

/* area colors */
.area-energy  { --area: #f0a04b; }
.area-chips   { --area: #8f9bff; }
.area-bio     { --area: #ee8fbf; }
.area-chem    { --area: #5ccbc4; }
.area-patents { --area: #e9c15a; }
.area-talks   { --area: #b9b8c2; }
.area .sec-title { border-bottom-color: color-mix(in srgb, var(--area) 45%, var(--line)); }
.area .sec-title h2 { display: flex; align-items: center; gap: 12px; }
.area .sec-title h2::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--area); flex: none; }
.area .kicker { color: var(--area); }
.area .refs .y { color: var(--area); }
.area-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.area-filter button { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.area-filter button i { width: 9px; height: 9px; border-radius: 50%; background: var(--area); }
.area-filter button:hover { color: var(--fg); border-color: var(--area, var(--fg)); }
.area-filter button[aria-pressed="true"] { color: #121218; background: var(--area, var(--fg)); border-color: var(--area, var(--fg)); }
.area-filter button[aria-pressed="true"] i { background: #121218; }
.filter-count { margin-top: -8px; }
.area[hidden] { display: none; }
.chip { display: inline-block; font: 500 10.5px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #121218; background: var(--area); padding: 0 7px; border-radius: 4px; margin-right: 10px; vertical-align: 1px; }
.area .paper { position: relative; }
.area .paper::before { content: ""; position: absolute; left: -14px; top: 22px; bottom: 22px; width: 3px; border-radius: 2px; background: var(--area); opacity: .35; transition: opacity .2s; }
.area .paper[open]::before, .area .paper:hover::before { opacity: 1; }
.area .paper .pv { color: var(--muted); }
.area .paper summary:hover .pt { color: var(--area); }
.area .paper[open] .chev { border-color: var(--area); }
.area .paper .hl { color: var(--area); }
.area .paper .lk a { color: var(--fg); text-decoration-color: var(--area); }
@media (max-width: 600px) { .area .paper::before { left: -10px; } }

/* expandable papers */
.papers { display: grid; }
.paper { border-bottom: 1px solid var(--line); }
.paper summary { list-style: none; display: grid; grid-template-columns: 64px 1fr 28px; gap: 4px 20px; padding-block: 22px; cursor: pointer; align-items: start; }
.paper summary::-webkit-details-marker { display: none; }
.paper summary > * { min-width: 0; }
.paper .py { font: 13px/2 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.paper .ph { display: grid; gap: 6px; }
.paper .pt { font: 600 clamp(18px, 2vw, 22px)/1.3 var(--wide); font-variation-settings: "wdth" 100; transition: color .2s; }
.paper .pv { font: 13px var(--mono); color: var(--sodium); }
.paper summary:hover .pt { color: var(--sodium); }
.paper .chev { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); position: relative; margin-top: 2px; transition: transform .3s, border-color .2s; }
.paper .chev::before { content: ""; position: absolute; left: 9px; top: 8px; width: 8px; height: 8px; border-right: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg); transform: rotate(45deg); }
.paper[open] .chev { transform: rotate(180deg); border-color: var(--sodium); }
.paper .pb { display: grid; gap: 10px; padding: 0 48px 26px 84px; max-width: 900px; }
.paper .au { color: var(--muted); font-size: 14.5px; }
.paper .au b { color: var(--fg); font-weight: 600; }
.paper .why-k { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.paper .pb > p:not(.au):not(.why-k):not(.hl) { color: #d6d5cf; max-width: 66ch; }
.paper .hl { font: 500 14px/1.5 var(--mono); color: var(--sodium); }
.paper .lk { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 13px var(--mono); margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .paper[open] .pb { animation: open .35s ease-out; }
  @keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 600px) {
  .paper summary { grid-template-columns: 1fr 28px; }
  .paper .py { grid-column: 1 / -1; line-height: 1.2; }
  .paper .pb { padding: 0 0 22px; }
}
@media (max-width: 700px) { .job { grid-template-columns: 1fr; gap: 6px; } .job .when { grid-auto-flow: column; justify-content: start; gap: 12px; } }
@media (prefers-reduced-motion: no-preference) {
  .landing img { animation: drift 24s ease-out both; }
  @keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
}

/* ---------- inner pages ---------- */
.banner { position: relative; height: clamp(240px, 42vh, 420px); overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; display: block; filter: saturate(.9); }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,16,.5) 0%, rgba(11,11,16,.15) 40%, var(--bg) 100%); }
.banner h1 { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; max-width: 1080px; margin: 0 auto; padding-inline: 20px;
  font: 800 clamp(48px, 11vw, 128px)/.9 var(--wide); font-variation-settings: "wdth" 125; text-transform: uppercase; letter-spacing: -.02em; }
.page { max-width: 1080px; margin: 0 auto; padding-inline: 20px; padding-block: 28px 96px; display: grid; gap: 64px; }
.page > section { display: grid; gap: 20px; min-width: 0; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.sec-title h2 { font: 700 22px var(--wide); font-variation-settings: "wdth" 112; text-transform: uppercase; letter-spacing: .02em; }

/* about */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
.about > * { min-width: 0; }
.about .lede { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; font-variation-settings: "wdth" 96; }
.about .lede em { font-style: normal; color: var(--sodium); }
.about .prose { display: grid; gap: 16px; color: #cfcec8; max-width: 60ch; margin-top: 24px; }
.facts { display: grid; align-content: start; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt, .facts .k { font: 500 12px/1.9 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dated { list-style: none; margin: 0; padding: 0; display: grid; }
.dated li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.dated .d { font: 13px/1.9 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.dated li > span:last-child { min-width: 0; }
.contact-box { display: grid; gap: 14px; }
.contact-box .big { font: 800 clamp(26px, 5vw, 52px)/1 var(--wide); font-variation-settings: "wdth" 115; overflow-wrap: anywhere; user-select: all; }
.btn { font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--sodium); color: var(--sodium); }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--sodium); border-color: var(--sodium); color: #15120a; }

/* ---------- flip cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.flip { perspective: 1400px; min-width: 0; }
.flip-inner { display: grid; transition: transform .7s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; height: 100%; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; min-height: 300px; padding: 22px; display: grid; min-width: 0; }
.front { background: var(--surface); border: 1px solid var(--line); grid-template-rows: auto 1fr auto; gap: 16px; cursor: pointer; text-align: left; color: var(--fg); font: inherit; width: 100%; position: relative; overflow: hidden; }
.front:hover { border-color: rgba(233,193,90,.6); }
.front .tag { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sodium); }
.front h3 { font: 700 clamp(22px, 2.2vw, 27px)/1.12 var(--wide); font-variation-settings: "wdth" 108; align-self: end; }
.front .meta { display: flex; justify-content: space-between; gap: 12px; font: 12.5px var(--mono); color: var(--muted); align-items: center; }
.front .meta .hint { color: var(--fg); opacity: .7; }
.front .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; display: flex; flex-direction: column; }
.front .stripe i { flex: 1; }
.back { transform: rotateY(180deg); background: var(--surface-2); border: 1px solid var(--sodium); align-content: start; gap: 12px; overflow: auto; }
.back p { font-size: 15px; color: #d6d5cf; }
.back .result { font: 500 13px/1.5 var(--mono); color: var(--sodium); }
.back .links { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 13px var(--mono); margin-top: auto; }
.back .flip-back { justify-self: start; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: none; border: 0; color: var(--muted); padding: 0; cursor: pointer; }
.back .flip-back:hover { color: var(--sodium); }
.back .head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.back .head span { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.flip[hidden] { display: none; }

/* lists for papers */
.refs { list-style: none; margin: 0; padding: 0; display: grid; }
.refs li { display: grid; grid-template-columns: 70px 1fr auto; gap: 4px 18px; padding-block: 16px; border-bottom: 1px solid var(--line); align-items: baseline; }
.refs .y { font: 13px var(--mono); color: var(--muted); }
.refs .t { font-weight: 600; }
.refs .t a { text-decoration: none; }
.refs .t a:hover { text-decoration: underline; }
.refs .v { display: block; color: var(--muted); font-size: 14px; }
.refs .v b { color: var(--fg); font-weight: 600; }
.refs .c { font: 13px var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.refs li > span { min-width: 0; }

.foot { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font: 13px var(--mono); color: var(--muted); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--sodium); }

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cards, .cards.two { grid-template-columns: 1fr; }
  .face { min-height: 260px; }
  .dated li, .facts div { grid-template-columns: 1fr; gap: 2px; }
  .refs li { grid-template-columns: 1fr auto; }
  .refs .y { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-inner { transition: none; }
  .menu, .menu nav a { transition: none; }
}
.menu.open nav a:nth-child(5) { transition-delay: .2s; } .menu.open nav a:nth-child(6) { transition-delay: .25s; }
.menu.open nav a:nth-child(7) { transition-delay: .3s; }
.job .impact { margin-top: 12px; font: 400 clamp(18px, 1.8vw, 21px)/1.45 var(--wide); font-variation-settings: "wdth" 96; color: var(--fg); max-width: 52ch; text-wrap: pretty; }

/* ---------- deposition canvas ---------- */
canvas.dep { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; mix-blend-mode: screen; }

/* ---------- cleanroom mode ---------- */
.bar-right { display: flex; gap: 10px; align-items: center; pointer-events: auto; }
.cr-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(236,235,230,.28); background: rgba(11,11,16,.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; cursor: pointer; padding: 0; }
.cr-btn span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #ffb300; box-shadow: 0 0 0 0 rgba(255,179,0,0); transition: background .2s, box-shadow .2s; }
.cr-btn:hover { border-color: #ffb300; }
.cr-btn[aria-pressed="true"] span { background: #ffb300; box-shadow: 0 0 12px 3px rgba(255,179,0,.6); }
.cr-veil { position: fixed; inset: 0; z-index: 90; pointer-events: none; background: #ffae00; mix-blend-mode: multiply; opacity: 0; transition: opacity .6s; }
html.cleanroom .cr-veil { opacity: 1; }
.cr-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); z-index: 95; transform: translate(-50%, 12px);
  font: 500 12.5px var(--mono); letter-spacing: .04em; color: #15120a; background: #ffb300; padding: 10px 16px; border-radius: 999px; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.cr-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .cr-veil, .cr-toast { transition: none; } }

/* ---------- page-transition loader ---------- */
.loader { position: fixed; inset: 0; z-index: 80; background: var(--bg); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s; }
.loader.show { opacity: 1; visibility: visible; transition: opacity .18s ease, visibility 0s; }
.loader.instant { transition: none; }
.loader canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader-label { position: absolute; left: 0; right: 0; top: calc(62% + 36px); display: flex; justify-content: center; gap: 10px; font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.loader-label b { color: var(--fg); font-weight: 500; }
.loader-kind { position: absolute; left: 0; right: 0; top: calc(62% + 60px); text-align: center; font: 400 12px var(--mono); letter-spacing: .06em; color: rgba(200,185,255,.7); }
.loader-kind span { color: var(--muted); margin: 0 4px; }
.sky-tag { position: absolute; right: 20px; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); z-index: 2; font: 400 11.5px var(--mono); letter-spacing: .08em; color: rgba(236,235,230,.55); text-align: right; max-width: 40vw; }
@media (max-width: 600px) { .sky-tag { top: calc(env(safe-area-inset-top, 0px) + 78px); bottom: auto; right: 20px; } }
.drives { display: grid; gap: 14px; align-content: start; border-left: 2px solid var(--sodium); padding-left: 22px; }
.drives p:not(.kicker) { color: #d6d5cf; font-size: 16.5px; line-height: 1.7; }
.job .impact a { color: var(--fg); text-decoration-color: var(--sodium); }
@media (max-width: 900px) { .drives { border-left: 0; border-top: 2px solid var(--sodium); padding: 20px 0 0; } }
.loader .loader-label, .loader .loader-kind { transition: opacity .3s; }
.loader.dark .loader-kind { opacity: 0; }
.loader.dark .loader-label { opacity: .6; }
.loader.dark .loader-label b { display: none; }

/* utility serif (replaces mono labels) */
.kicker, .label, .when, .title-line, .links, .pv, .py, .meta, .d, .y, .cs-role, .menu nav a small, .menu .menu-foot, .foot, .filter-count, .loader-label, .loader-kind, .sky-tag, .btn, .area-filter button, .chip, .cr-toast, .notes-list .d, .job .when, .back .links, .row-links, .lk { font-size-adjust: 0.5; }
.kicker, .menu nav a small, .loader-label, .highlights .k, .why-k { letter-spacing: .12em; }
.job .title-line { font-style: italic; font-size: 15.5px; letter-spacing: 0; }
.job .when, .paper .py, .refs .y, .notes-list .d { font-style: italic; }

/* sky interactions */
.landing.sky-hot, .banner.sky-hot { cursor: crosshair; }
.sky-probe { position: absolute; z-index: 3; pointer-events: none; display: grid; gap: 2px; padding: 7px 10px; border-radius: 6px;
  background: rgba(11,11,16,.72); border: 1px solid rgba(200,180,255,.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 400 12px/1.35 var(--mono); color: var(--muted); opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; white-space: nowrap; }
.sky-probe b { color: var(--fg); font-weight: 500; }
.sky-probe.show { opacity: 1; transform: none; }
.sky-tag i { display: block; font-style: italic; opacity: .7; margin-top: 2px; }

/* page-transition toggle */
.tr-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(236,235,230,.28); background: rgba(11,11,16,.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; cursor: pointer; padding: 0; }
.tr-btn:hover { border-color: #b98cff; }
.tr-btn span { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, rgba(200,160,255,.95) 0 30%, rgba(140,80,240,.0) 70%); box-shadow: 0 0 10px 2px rgba(170,120,255,.55); transition: opacity .2s, box-shadow .2s; }
.tr-btn[aria-pressed="false"] span { opacity: .3; box-shadow: none; }
.tr-btn[aria-pressed="false"] { position: relative; }
.tr-btn[aria-pressed="false"]::after { content: ""; position: absolute; width: 20px; height: 1.5px; background: rgba(236,235,230,.6); transform: rotate(-45deg); }
@media (max-width: 420px) { .bar-right { gap: 6px; } .tr-btn, .cr-btn, .burger { width: 42px; height: 42px; } .wordmark { font-size: 12px; } }

/* about: statement + portrait */
.lead-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 56px; align-items: center; }
.lead-row .lead { max-width: 46ch; }
.portrait { margin: 0; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 5; max-width: 100%; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.92); }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(110,70,220,.10), rgba(11,11,16,.18)); pointer-events: none; }
@media (max-width: 760px) { .lead-row { grid-template-columns: 1fr; gap: 28px; } .portrait { max-width: 340px; } }

/* landing quote */
.landing .title p.quote { font-family: var(--mono); font-style: italic; font-weight: 400; font-size: clamp(30px, 4.8vw, 62px); line-height: 1.08; letter-spacing: -.005em; max-width: 18ch; font-variation-settings: normal; font-size-adjust: none; }
.landing .title .cite { font: 500 12px var(--wide); letter-spacing: .16em; text-transform: uppercase; color: rgba(236,235,230,.7); }
.landing .title .cite::before { content: "— "; }

/* chalkboard quote (Feynman's blackboard) */
.landing .title p.quote.chalk { font-family: "Caveat", "Bradley Hand", "Segoe Print", cursive; font-style: normal; font-weight: 600;
  font-size: clamp(40px, 6.4vw, 84px); line-height: 1.02; letter-spacing: .005em; max-width: none; color: rgba(244,242,236,.94);
  filter: url(#chalk); text-shadow: 0 0 1px rgba(255,255,255,.35); display: grid; justify-items: start; }
.landing .title p.quote.chalk span { display: block; }
.landing .title p.quote.chalk::before { content: none; }
.landing .title .cite.chalk { font: 600 clamp(20px, 2vw, 26px) "Caveat", cursive; letter-spacing: .02em; text-transform: none; color: rgba(236,235,230,.75); filter: url(#chalk); margin-left: clamp(40px, 12vw, 200px); }
@media (prefers-reduced-motion: no-preference) {
  .landing .title p.quote.chalk span, .landing .title .cite.chalk { clip-path: inset(0 100% 0 0); animation: chalkwrite 1.5s cubic-bezier(.45,.05,.4,1) forwards; }
  .landing .title p.quote.chalk span:nth-child(1) { animation-delay: .5s; }
  .landing .title p.quote.chalk span:nth-child(2) { animation-delay: 1.9s; }
  .landing .title .cite.chalk { animation-duration: .8s; animation-delay: 3.3s; }
  .landing .title { animation: none; }
  @keyframes chalkwrite { to { clip-path: inset(0 -2% 0 0); } }
}
.landing .title .cite.chalk::before { content: none; }

/* wider headlines on big screens */
.page > .lead, .page > section.lead { max-width: none; }
.page > .lead .lead-big { font-size: clamp(30px, 4.4vw, 66px); line-height: 1.06; max-width: 24ch; }
.page > .lead .lead-sub { font-size: clamp(17px, 1.5vw, 21px); max-width: 64ch; }
.job .impact { max-width: 68ch; font-size: clamp(18px, 1.6vw, 23px); }
.sec-head, .panel-intro { max-width: none; }
.lead-row .lead-big { font-size: clamp(30px, 3.6vw, 52px); }

/* ---------- contact: full night sky ---------- */
.contact-sky { position: fixed; inset: 0; overflow: hidden;
  background: radial-gradient(120% 90% at 50% -15%, #2a1f48 0%, #15111f 45%, #0b0b10 100%); }
.contact-sky canvas.dep { mix-blend-mode: normal; }
.contact-center { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 22px;
  text-align: center; padding: 96px 20px calc(env(safe-area-inset-bottom, 0px) + 64px); pointer-events: none; }
.contact-center > * { pointer-events: auto; }
.contact-email { font: 700 clamp(28px, 6vw, 84px)/1.05 var(--wide); font-variation-settings: "wdth" 112; letter-spacing: -.01em;
  color: var(--fg); text-decoration: none; overflow-wrap: anywhere; text-shadow: 0 2px 30px rgba(120,80,240,.35); }
.contact-email:hover { color: #d9c8ff; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; font: 400 clamp(16px, 1.6vw, 20px) var(--mono); }
.contact-links a { color: var(--fg); text-decoration-color: rgba(185,150,255,.7); }
.contact-links a:hover { color: #d9c8ff; }
.contact-sky .sky-tag { position: absolute; right: 20px; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
.contact-sky.sky-hot { cursor: crosshair; }

/* ---------- wider type everywhere ---------- */
.landing .title { max-width: min(1400px, calc(100% - 40px)); }
.landing .title p.quote.chalk { font-size: clamp(44px, 8vw, 132px); }
.landing .title .cite.chalk { font-size: clamp(22px, 2.4vw, 34px); }
.about .lede { font-size: clamp(22px, 2.6vw, 38px); max-width: 30ch; }
.about .prose { max-width: 68ch; font-size: clamp(16px, 1.25vw, 18.5px); }
.drives p:not(.kicker) { font-size: clamp(16px, 1.25vw, 18.5px); }
.paper .pt { font-size: clamp(18px, 1.8vw, 25px); }
.paper .pb > p:not(.au):not(.why-k):not(.hl) { max-width: 76ch; }
.sec-title h2 { font-size: clamp(22px, 2vw, 30px); }
.refs .t { font-size: clamp(16px, 1.3vw, 19px); }
.dated li > span:last-child { font-size: clamp(16px, 1.25vw, 18.5px); }

/* full-width headlines (v2) */
.page { max-width: min(1440px, 100%); padding-inline: clamp(20px, 4vw, 64px); }
.banner h1 { max-width: min(1440px, 100%); padding-inline: clamp(20px, 4vw, 64px); }
.page > .lead { max-width: none; }
.page > .lead .lead-big { max-width: none; font-size: clamp(32px, 5.4vw, 104px); line-height: 1.02; text-wrap: pretty; letter-spacing: -.015em; }
.page > .lead .lead-sub { max-width: none; font-size: clamp(17px, 1.6vw, 26px); }
.lead-row { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); }
.lead-row .lead { max-width: none; }
.lead-row .lead-big { font-size: clamp(30px, 4vw, 72px); text-wrap: pretty; max-width: none; }
.about .lede { max-width: none; }
.job { grid-template-columns: clamp(150px, 16vw, 240px) 1fr; }
.job .impact { max-width: none; }
.paper .pb { max-width: none; }
.paper .pb > p:not(.au):not(.why-k):not(.hl) { max-width: 90ch; }
.landing .title p.quote.chalk span:nth-child(2) { margin-left: clamp(28px, 5.5vw, 110px); margin-top: -.16em; }
.landing .title .cite.chalk { margin-top: -.2em; }

/* landing framing: wider photo; on wide screens favour the sky */
.landing img { object-position: 50% 62%; }
@media (min-aspect-ratio: 3/2) { .landing img { object-position: 50% 48%; } }
@media (min-aspect-ratio: 2/1) { .landing img { object-position: 50% 40%; } }
@media (max-aspect-ratio: 4/5) { .landing img { object-position: 58% 60%; } }
@media (min-aspect-ratio: 3/2) { .landing img { object-position: 50% 54%; } }
@media (min-aspect-ratio: 2/1) { .landing img { object-position: 50% 50%; } }
/* wide screens: a bit less sky, keep the car hood in frame */
@media (min-aspect-ratio: 3/2) { .landing img { object-position: 50% 70%; } }
@media (min-aspect-ratio: 2/1) { .landing img { object-position: 50% 66%; } }
@media (min-aspect-ratio: 3/2) { .landing img { object-position: 50% 86%; } }
@media (min-aspect-ratio: 2/1) { .landing img { object-position: 50% 82%; } }

.landing .title p.quote.chalk { font-size: clamp(36px, 6.4vw, 104px); }
/* ---- phone fixes (v3) ---- */
@media (max-width: 760px) {
  .lead-row { grid-template-columns: 1fr; gap: 28px; }
  .lead-row .lead-big { font-size: clamp(26px, 7.4vw, 40px); }
  .portrait { max-width: 340px; width: 100%; }
  .banner { height: clamp(260px, 38vh, 340px); }
  .banner h1 { font-size: clamp(42px, 13vw, 68px); bottom: 14px; }
  /* dark fade behind the fixed top bar so the name never collides with headings while scrolling */
  body:is(.p-about,.p-industry,.p-research,.p-venture,.p-papers,.p-notes) .bar { background-color: rgba(11,11,16,.97); box-shadow: 0 12px 20px rgba(11,11,16,.95); }
  .contact-email { font-size: clamp(22px, 7.2vw, 34px); font-variation-settings: "wdth" 88; }
  .landing .title p.quote.chalk { font-size: clamp(30px, 8.6vw, 44px); }

}


.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- landing: scroll down to About ---- */
.scroll-cue { position: absolute; z-index: 3; right: 20px; bottom: calc(env(safe-area-inset-bottom, 0px) + 30px); display: grid; justify-items: center; gap: 8px;
  font: 500 11px var(--wide); letter-spacing: .2em; text-transform: uppercase; color: rgba(236,235,230,.72); text-decoration: none; opacity: 0; animation: cue-in 1s ease 3.6s forwards; }
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(180deg, rgba(236,235,230,.7), rgba(236,235,230,0)); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; left: -2px; top: 0; width: 5px; height: 5px; border-radius: 50%; background: #c9b6ff; box-shadow: 0 0 8px #a98bff; animation: cue-drop 1.8s ease-in-out infinite; }
.scroll-cue:hover { color: var(--sodium); }
@keyframes cue-in { to { opacity: 1; } }
@keyframes cue-drop { 0% { transform: translateY(-6px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(34px); opacity: 0; } }
@media (min-width: 900px) { .scroll-cue { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue { animation: none; opacity: 1; } .scroll-cue span::after { animation: none; } }
@media (max-width: 899px) {
  .scroll-cue { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); gap: 6px; }
  .scroll-cue span { height: 22px; }
  .landing .title { bottom: calc(env(safe-area-inset-bottom, 0px) + 66px); }
}
.landing { transition: transform .42s cubic-bezier(.5,0,.75,0), opacity .42s ease; }
body.to-about .landing { transform: translateY(-28%); opacity: 0; }
body.to-about .bar { opacity: 0; transition: opacity .3s; }
body.p-about { transition: transform .42s cubic-bezier(.5,0,.75,0), opacity .42s ease; }
body.p-about.to-home { transform: translateY(18%); opacity: 0; }
/* glide-in on arrival */
html.glide-down body.p-about { transform: translateY(14%); opacity: 0; transition: none; }
html.glide-up .landing { transform: translateY(-18%); opacity: 0; transition: none; }
html.glide-go body.p-about, html.glide-go .landing { transform: none; opacity: 1; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .5s ease; }
@media (prefers-reduced-motion: reduce) { body.p-about, .landing { transition: none !important; transform: none !important; } }
