/* November 2026 restructure: home order, /work/, project pages, /speaking/, /press/, 404.
   Loaded last, so it adjusts the older sheets without editing them. */

/* images carry width and height attributes; let CSS widths keep their shape */
img{height:auto}

/* keyboard */
:where(a,button,[tabindex]):focus-visible{outline:2px solid var(--amber);outline-offset:3px;border-radius:8px}
.car:focus-visible{outline-offset:-3px;border-radius:0}
.dot:focus-visible{outline-offset:-6px;border-radius:12px}
.skip{position:fixed;z-index:100;left:12px;top:-80px;padding:12px 18px;border-radius:999px;background:var(--amber);color:#1A120C;font-weight:800}
.skip:focus{top:calc(var(--st) + 10px)}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.pill.solid{background:var(--amber);color:#1A120C;border-color:var(--amber)}
.pill.solid:hover{background:#F7CD8D;color:#1A120C}
main{display:block}

/* labels that must stay on the picture */
.concept{display:inline-flex;align-items:center;font-size:12.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;line-height:1.2;color:#1A120C;background:var(--amber);border-radius:999px;padding:6px 12px;box-shadow:0 4px 18px rgba(0,0,0,.4)}
.car .concept{position:absolute;z-index:4;left:14px;top:14px;pointer-events:none}

/* status line, the same on project pages and /work/ */
.status{display:inline-flex;align-self:flex-start;align-items:center;gap:8px;font-size:14.5px;font-weight:800;color:var(--ink);line-height:1.3;padding:6px 14px 6px 12px;border-radius:999px;border:1px solid rgba(242,184,102,.4);background:rgba(242,184,102,.08)}
.status::before{content:"";flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--amber)}

/* ---------------- header ---------------- */
@media (max-width:820px){
  .top nav{-webkit-mask-image:none;mask-image:none}
  .top nav a{padding:0 9px}
  .top nav a[data-k="contact"]{position:sticky;right:0;margin-left:auto;background:rgba(17,13,10,.98);box-shadow:-16px 0 14px -4px rgba(17,13,10,.98)}
}
@media (max-width:420px){.top nav a{padding:0 7px;font-size:13.5px}.me .mono{width:34px;height:34px}}

/* ---------------- home: hero ---------------- */
.hero{justify-content:center;padding-bottom:4vh}
.hero .hero-copy{max-width:min(55vw,880px);gap:18px}
.hero h1{font-size:clamp(40px,4.3vw,74px);max-width:16ch}
.hero .lead{max-width:60ch;font-size:clamp(17px,1.22vw,20px);line-height:1.55;color:var(--soft)}
.hero .aside{font-size:15px;color:var(--dim);max-width:60ch}
.hero .punch{max-width:34ch;font-weight:800;font-size:clamp(19px,1.5vw,25px);line-height:1.35;color:#F2B866;margin:0}
.hero-go{margin-top:4px}
@media (max-width:820px){
  .hero{padding-top:var(--top);gap:0;justify-content:flex-start;flex-direction:column;align-items:stretch}
  /* the photo takes whatever height the words leave, and the picture is cropped to the head so the whole face
     (hairline to chin) always fits above the name; only the edges fade */
  .hero-photo{position:relative;flex:1 1 0;width:100%;height:auto;min-height:118px;max-height:400px;margin:0 0 10px}
  .hero-photo img{position:absolute;top:0;bottom:0;left:0;right:0;margin:0 auto;height:100%;width:auto;max-width:none;aspect-ratio:1.06/1;object-fit:cover;object-position:50% 40%;
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 18%,#000 82%,transparent 100%),linear-gradient(180deg,transparent 0,#000 7%,#000 86%,transparent 100%);-webkit-mask-composite:source-in;
    mask-image:linear-gradient(90deg,transparent 0,#000 18%,#000 82%,transparent 100%),linear-gradient(180deg,transparent 0,#000 7%,#000 86%,transparent 100%);mask-composite:intersect}
  .hero .hero-copy{max-width:none;gap:12px}
  .hero h1{font-size:clamp(31px,8.8vw,46px);max-width:none}
  .hero .lead{font-size:16.5px;line-height:1.5}
  .hero .punch{font-size:18.5px;max-width:none}
}
@media (max-width:360px){.hero-go{gap:8px}.hero-go .pill{padding:0 15px;font-size:15px}}
@media (max-width:820px) and (max-height:700px){.hero h1{font-size:clamp(27px,7.4vw,36px)}.hero .hero-copy{gap:10px}.hero .lead{font-size:15.5px;line-height:1.45}.hero .punch{font-size:17px;line-height:1.3}}
@media (max-height:720px) and (min-aspect-ratio:3/5){.jump,.hero-go{display:flex}}

/* ---------------- home: Nuku ---------------- */
.nuku .ntext{position:relative;z-index:6;display:flex;flex-direction:column;gap:14px}
.nbadges{list-style:none;display:flex;flex-wrap:wrap;gap:8px}
.nbadges li{font-size:13.5px;font-weight:800;line-height:1.2;color:var(--ink);border:1px solid rgba(243,234,220,.28);border-radius:999px;padding:6px 12px;background:rgba(17,13,10,.65)}
.nnote{font-size:14.5px;line-height:1.45;color:var(--soft);max-width:44ch}
.ntext .pill{align-self:flex-start}
.nuku .chip{padding:10px 14px}
.nposter{display:none}
.no-js .nposter{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.no-js .nuku .nseq{display:none}
.nuku .nlabel{position:absolute;z-index:7}
.nrun{height:0}
@media (min-width:821px){
  .scene.nuku{--cwid:min(340px,24vw)}
  .nuku .ntext{position:sticky;top:0;height:100vh;height:100svh;margin-bottom:-100vh;margin-bottom:-100svh;width:calc(var(--px) + var(--cwid));padding:calc(var(--top) + 2vh) 0 4vh var(--px);justify-content:center;pointer-events:none}
  .nuku .ntext>*{pointer-events:auto}
  .nuku .ntext .mega{font-size:clamp(60px,6.4vw,120px)}
  .nuku .ntext .lead{font-size:clamp(17px,1.3vw,21px)}
  .nuku .pin{--cwid:min(340px,24vw)}
  .nuku .nlabel{right:calc(var(--pxr) + 12px);top:calc(var(--ny) + 12px)}
  /* the copy and the pin both stick for the section's length minus one screen, so the copy leaves with
     its own section: each has a zero-height margin box, and the padding keeps both off the next section */
  .scene.nuku{padding-bottom:100vh;padding-bottom:100svh}
  .nuku .pin{margin-bottom:-100vh;margin-bottom:-100svh}
}
@media (min-width:821px) and (max-height:760px){.nuku .ntext{gap:10px}.nuku .ntext .mega{font-size:clamp(52px,5vw,84px)}.nuku .ntext .lead{font-size:16px}.nnote{font-size:13.5px}}
@media (max-width:820px){
  /* phones: the robot and its part label sit together in the pin (--ry is the film's top edge); the copy
     overlaps the empty top of the pin so the film starts right under the button, and the run is short */
  .scene.nuku{height:auto;--rh:76.1vw;--ry:calc(var(--top) + 34px + (100svh - var(--top) - 34px - var(--rh) * .92 - 64px) / 2)}
  .nuku .ntext{padding:calc(var(--top) + 3svh) var(--pxr) 0 var(--px);gap:12px;margin-bottom:calc(64px - var(--ry))}
  .nuku .ntext .mega{font-size:clamp(48px,14vw,64px)}
  .nuku .ntext .lead{font-size:17px;max-width:none}
  /* the empty band under the part label (--nb) is given back: the next section slides in right under the label */
  .scene.nuku{--nb:max(0px,calc(100svh - var(--ry) - var(--rh) * .92 - 84px))}
  .nuku .pin{margin-bottom:calc(-1 * var(--nb))}
  .nuku .prog{bottom:var(--nb)}
  .proof{position:relative;z-index:8}
  .nrun{height:calc(50svh + var(--nb))}
  .nuku .ncol{top:var(--ry);transform:translateX(-50%)}
  .nuku .nlabel{left:var(--px);top:calc(var(--ry) - 34px)}
  .nuku .chips{top:calc(var(--ry) + var(--rh) * .92);bottom:auto;height:60px}
  .nuku .chip{top:0;bottom:auto}
}

/* ---------------- home: proof, story, talks ---------------- */
.sec-h{display:flex;flex-direction:column;gap:10px;margin-bottom:clamp(20px,3vh,34px)}
.sec-h h2,.story h2{font-size:clamp(34px,3.6vw,60px);line-height:1.05;max-width:22ch}
.proof{padding:clamp(70px,12vh,130px) var(--pxr) clamp(40px,8vh,90px) var(--px)}
.pfs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(14px,1.8vw,26px)}
.pf{display:flex;flex-direction:column;border-radius:22px;overflow:hidden;background:rgba(26,19,15,.86);border:1px solid rgba(243,234,220,.09);color:var(--ink);transition:border-color .3s,transform .5s var(--ease)}
.pf:hover{border-color:rgba(242,184,102,.55);transform:translateY(-3px)}
.pf-img{aspect-ratio:4/3;overflow:hidden;background:#0B0806}
.pf-img img{width:100%;height:100%;object-fit:cover}
.pf-tx{display:flex;flex-direction:column;gap:8px;padding:18px 20px 22px}
.pf h3{font-size:clamp(22px,1.8vw,30px);line-height:1.12}
.pf p{color:var(--soft);font-size:16px;line-height:1.5}
.story{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1fr);gap:clamp(24px,4vw,72px);align-items:center;padding:clamp(50px,10vh,110px) var(--pxr) clamp(50px,10vh,110px) var(--px)}
.sto-img{border-radius:24px;overflow:hidden;aspect-ratio:4/5;max-height:80svh;background:#0B0806}
.sto-img img{width:100%;height:100%;object-fit:cover}
.sto-tx{display:flex;flex-direction:column;gap:16px}
.sto-tx p{color:var(--soft);font-size:clamp(17px,1.25vw,20px);line-height:1.6;max-width:60ch}
.sto-tx .golinks{margin-top:6px}
.tx-more{padding:clamp(22px,3vh,34px) var(--pxr) 0 var(--px)}
@media (max-width:820px){
  .pfs{grid-template-columns:1fr}
  .story{grid-template-columns:1fr}
  .sto-img{aspect-ratio:3/2}
  .proof{padding-top:56px;padding-bottom:28px}
  .story{padding-top:36px}
}
@media (min-width:821px) and (max-width:899px){.pfs{grid-template-columns:1fr 1fr}}

/* footer links */
.flinks{display:flex;flex-wrap:wrap;gap:4px 22px}
.flinks a{font-weight:800}

/* ---------------- /work/ ---------------- */
.allwork{padding-top:var(--top)}
.aw-head,.pg-head{display:flex;flex-direction:column;gap:14px;padding:clamp(36px,8vh,90px) var(--pxr) clamp(24px,4vh,40px) var(--px)}
.aw-head h1,.pg-head h1{font-size:clamp(38px,5vw,84px);line-height:1.02;max-width:20ch}
.aw-head .lead,.pg-head .lead{max-width:60ch}
.wlist{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 var(--pxr) clamp(50px,10vh,110px) var(--px)}
.wl{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:10px;height:100%;padding:20px 52px 22px 22px;border-radius:20px;background:rgba(26,19,15,.86);border:1px solid rgba(243,234,220,.09);color:var(--ink);transition:border-color .25s,background .25s}
.wl:hover{border-color:rgba(242,184,102,.55);background:rgba(30,22,17,.95)}
.wl::after{content:"\2192";position:absolute;right:20px;top:20px;font-weight:800;font-size:20px;color:var(--amber)}
.wl h2{font-size:clamp(24px,2vw,32px);line-height:1.1}
.wl .status{font-size:13.5px;padding:4px 12px 4px 10px}
.wl-l{color:var(--soft);font-size:16px;line-height:1.5}
.aw-strips{border-top:1px solid var(--line)}
@media (max-width:820px){.wlist{grid-template-columns:1fr}.wl{padding:18px 46px 20px 18px}}

/* ---------------- project pages ---------------- */
.xv.static{overflow:clip;grid-template-columns:minmax(0,58fr) minmax(0,42fr);grid-template-rows:auto 1fr;min-height:calc(100svh - var(--top))}
.xv.static .xv-media{grid-column:1;grid-row:1 / span 2;align-self:start}
.xv.static .xv-head,.xv.static .xv-body{grid-column:2;display:flex;flex-direction:column;gap:16px;padding-left:clamp(22px,3vw,48px);padding-right:clamp(22px,3vw,48px)}
.xv.static .xv-head{padding-top:clamp(24px,4vw,56px)}
.xv.static .xv-body{padding-bottom:56px}
.xv h1{font-size:clamp(38px,3.8vw,64px);line-height:1}
.xv .xv-body section{display:flex;flex-direction:column;gap:12px;padding-top:20px;margin-top:6px;border-top:1px solid var(--line)}
.xv .xv-body h2{font-size:22px;line-height:1.25;letter-spacing:0}
.xv .xv-body p,.xv .xv-body li{color:var(--soft);font-size:17px;max-width:58ch}
.evidence ul{list-style:none;display:flex;flex-direction:column;gap:2px}
.evidence li{position:relative;padding:8px 0 8px 18px;border-bottom:1px solid rgba(243,234,220,.06)}
.evidence li::before{content:"";position:absolute;left:0;top:19px;width:7px;height:7px;border-radius:50%;background:var(--amber)}
.evidence a{color:var(--ink);border-bottom:1px solid rgba(242,184,102,.5)}
.evidence a:hover{color:var(--amber)}
.golinks.cta{padding-top:14px}
/* the caption owns its row, the dots go on their own row and wrap */
.cbar{flex-wrap:wrap}
.ccap{flex:1 1 260px;min-width:0}
.dots{flex-wrap:wrap;justify-content:flex-end;max-width:100%}
@media (max-width:820px){
  .xv.static{display:flex;flex-direction:column;min-height:0}
  .xv.static .xv-head{padding:18px var(--pxr) 22px var(--px);gap:12px}
  .xv.static .xv-body{padding:4px var(--pxr) 40px var(--px)}
  .xv.static .xv-media{position:relative;top:auto;height:auto;background:transparent;align-self:stretch}
  .xv.static .car{position:relative;inset:auto;overflow:visible;padding-top:min(52svh,78vw)}
  .xv.static .cs{bottom:auto;height:min(52svh,78vw);overflow:hidden;background:#0B0806}
  .xv.static .cbar{position:relative;padding:10px var(--pxr) 0 var(--px);background:none;flex-direction:column;align-items:stretch;gap:2px;pointer-events:auto}
  .xv.static .ccap{flex:none;padding-bottom:2px;font-size:14.5px;min-height:1.5em}
  .xv.static .dots{justify-content:flex-start;margin-left:-8px}
  .xv.static .cs.screen,.xv.static .cs .art{padding:14px 12px}
  .xv.static .car .concept{left:var(--px);top:12px}
  .xv h1{font-size:clamp(34px,10vw,46px)}
  .pn{flex-direction:column}
  .pn a.r{text-align:left}
}

/* ---------------- /speaking/, /press/, 404 ---------------- */
.page{padding:var(--top) 0 0;max-width:1000px}
.page>section{display:flex;flex-direction:column;gap:14px;padding:clamp(26px,4vh,40px) var(--pxr) clamp(26px,4vh,40px) var(--px);border-top:1px solid var(--line)}
.page h2{font-size:clamp(28px,2.6vw,40px);line-height:1.1}
.page section p{color:var(--soft);font-size:18px;line-height:1.6;max-width:62ch}
.page .note{font-size:15.5px;color:var(--dim)}
.clip{position:relative;display:block;margin:0 var(--pxr) clamp(26px,4vh,40px) var(--px);border-radius:22px;overflow:hidden;max-width:760px;background:#0B0806;color:var(--ink)}
.clip img{width:100%;aspect-ratio:16/9;object-fit:cover;opacity:.88;transition:opacity .3s}
.clip:hover img{opacity:1}
.clip .play{top:42%}
.clip-t{position:absolute;left:0;right:0;bottom:0;padding:40px 20px 16px;font-weight:800;font-size:16px;line-height:1.4;background:linear-gradient(0deg,rgba(11,8,6,.92),rgba(11,8,6,0))}
.topics{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.topics li{padding:18px 20px;border-radius:18px;background:rgba(26,19,15,.86);border:1px solid rgba(243,234,220,.09);display:flex;flex-direction:column;gap:6px}
.topics h3{font-size:21px;line-height:1.2}
.topics p{font-size:16px!important}
.idea h2{font-size:clamp(30px,3vw,48px)}
.past{list-style:none;display:flex;flex-direction:column}
.past li{display:flex;flex-direction:column;gap:3px;padding:14px 0;border-bottom:1px solid rgba(243,234,220,.07)}
.past a{font-family:var(--serif);font-weight:700;font-size:19px;line-height:1.3;color:var(--ink);align-self:flex-start;border-bottom:1px solid rgba(242,184,102,.45)}
.past a:hover{color:var(--amber)}
.past .where{font-size:15px;color:var(--dim)}
.pr-photo{display:flex;gap:20px;align-items:flex-end}
.pr-photo img{width:min(240px,42vw);border-radius:16px}
.pr-photo figcaption{font-size:15.5px;color:var(--soft);line-height:1.5}
.pr-photo figcaption a{display:inline-flex;align-items:center;min-height:44px;font-weight:800}
.oneline{list-style:none;display:flex;flex-direction:column}
.oneline li{display:flex;flex-direction:column;gap:2px;padding:12px 0;border-bottom:1px solid rgba(243,234,220,.07)}
.oneline a{font-family:var(--serif);font-weight:700;font-size:19px;align-self:flex-start}
.oneline span{color:var(--soft);font-size:16px;line-height:1.5}
.links{list-style:none;display:flex;flex-wrap:wrap;gap:8px}
.links a{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid rgba(243,234,220,.18);color:var(--ink);font-weight:800;font-size:15.5px}
.links a:hover{border-color:var(--amber);color:var(--amber)}
.nf{min-height:70svh}
.nf .golinks{padding:0 var(--pxr) 60px var(--px)}
@media (max-width:820px){
  .topics{grid-template-columns:1fr}
  .pr-photo{flex-direction:column;align-items:flex-start}
  .clip-t{font-size:14.5px;padding:30px 14px 12px}
  .page section p{font-size:17px}
}

@media (prefers-reduced-motion:reduce){.pf,.wl,.clip img{transition:none}.pf:hover{transform:none}}
.me{min-width:44px}
.pe .pill,.stg .pill{min-height:44px}
.dot{width:32px}

.aff{display:flex;align-items:center;gap:24px;flex-wrap:wrap;margin:6px 0 4px}.aff img{display:block;width:auto;max-width:none;flex:none;filter:brightness(0) invert(1);opacity:.72}.aff img[alt="Stanford"]{height:20px}.aff img[alt="ETH Zurich"]{height:16px}
