/* ============================================================
   Abdelaziz Awad · v4 · computational
   black field, dot-matrix type, hairline grid, magenta signal
   ============================================================ */
:root {
  --bg: #000; --bg-2: #0b0b0c; --bg-3: #141416;
  --ink: #f4f4f6; --ink-2: #b4b4ba; --ink-3: #7c7c84; --ink-4: #4a4a50;
  --line: rgba(255,255,255,.12); --line-2: rgba(255,255,255,.07);
  --acc: #ff4fb0; --acc-2: #a77bff; --acc-3: #5aa2ff;
  --sans: "Outfit", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  --nav: 64px; --pad: clamp(18px, 3vw, 44px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: rgba(255, 79, 176, .35); }
.mono { font-family: var(--mono); font-weight: 400; text-transform: uppercase; letter-spacing: .22em; font-size: 11px; }
.acc { color: var(--acc); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad); transition: background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(0,0,0,.92); border-bottom-color: var(--line-2); }
.brand { display: flex; align-items: center; gap: 14px; font-family: var(--sans); font-weight: 400; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }
.brand canvas { width: 26px; height: 26px; }
.nav ul { display: flex; gap: clamp(16px, 2.6vw, 40px); align-items: center; }
.nav a.l { font-family: var(--sans); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); transition: color .25s; }
.nav a.l:hover, .nav a.l.on { color: var(--ink); }
.nav a.navcv { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; border: 1px solid var(--line); padding: 7px 14px 6px; color: var(--ink); transition: border-color .25s, color .25s; }
.nav a.navcv:hover { border-color: var(--acc); color: var(--acc); }
@media (max-width: 760px) { .nav .hm { display: none; } .brand span { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.hero__foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 0 26px; text-align: center; pointer-events: none; }
.ticker { overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker div { display: inline-block; animation: tick 46s linear infinite; color: var(--ink-3); }
.ticker span { padding: 0 1.1em; }
.ticker i { font-style: normal; color: var(--ink-4); }
@keyframes tick { to { transform: translateX(-50%); } }
.hero__where { margin-top: 12px; color: var(--ink-2); letter-spacing: .26em; }
.hero__down { display: block; width: 14px; height: 14px; margin: 22px auto 0; border-right: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3); transform: rotate(45deg); animation: bob 2.4s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(6px) rotate(45deg); } }
.hero__state { position: absolute; left: var(--pad); top: calc(var(--nav) + 26px); color: var(--ink-3); pointer-events: none; line-height: 2; }
.hero__hud { position: absolute; left: var(--pad); top: calc(var(--nav) + 84px); color: var(--ink-4); pointer-events: none; font-size: 10px; letter-spacing: .14em; max-width: 46vw; line-height: 1.8; }
@media (max-width: 760px) { .hero__hud { max-width: none; right: var(--pad); } }
.hero__state b { color: var(--acc); font-weight: 400; }
.hero__hint { position: absolute; right: var(--pad); top: calc(var(--nav) + 26px); color: var(--ink-4); pointer-events: none; text-align: right; line-height: 2; }
@media (max-width: 760px) { .hero__hint { display: none; } }

/* ---------- section heads ---------- */
.sec { position: relative; padding: clamp(96px, 12vw, 160px) 0 0; }
.head { text-align: center; padding: 0 var(--pad); }
.head .mono { color: var(--ink-3); }
.head .mono::after { content: ""; display: block; width: 36px; height: 1px; margin: 22px auto 30px; background: var(--ink-4); }
.head h2 { font-weight: 300; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.08; letter-spacing: -.01em; }
.head p { max-width: 640px; margin: 22px auto 0; color: var(--ink-2); font-size: 16.5px; }

/* ---------- work: gapless tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); }
.tile { position: relative; aspect-ratio: 4 / 3.3; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); isolation: isolate; }
.tile:nth-child(3n) { border-right: 0; }
.tile__m { position: absolute; inset: 0; }
.tile__m img, .tile__m video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease), transform 1.4s var(--ease), filter .6s; }
.tile__m img { filter: grayscale(1) brightness(.62) contrast(1.05); }
.tile__m video { opacity: 0; }
.tile.fit .tile__m img, .tile.fit .tile__m video { object-fit: contain; padding: 8% 10% 22%; }
.tile:hover .tile__m img, .tile.is-live .tile__m img { filter: grayscale(0) brightness(.9); transform: scale(1.03); }
.tile.is-play .tile__m video { opacity: 1; transform: scale(1.03); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.55) 0, transparent 34%, transparent 55%, rgba(0,0,0,.82)); pointer-events: none; }
.tile__gw { position: absolute; z-index: 2; left: 20px; top: 18px; padding: 9px 11px; background: rgba(0,0,0,.8); pointer-events: none; }
.tile__g { display: block; width: 210px; height: 74px; }
.tile__g[data-sim="g-agent"] { width: 270px; }
@media (max-width: 1100px) { .tile__g[data-sim="g-agent"] { width: 230px; } }
.tile__tag b { font-weight: 400; color: var(--acc); margin-right: 8px; }
.tile__tag { position: absolute; z-index: 2; right: 26px; bottom: 26px; color: var(--ink-3); font-size: 10px; }
.tile__c { position: absolute; z-index: 2; left: 26px; right: 26px; bottom: 24px; }
.tile__c h3 { font-weight: 400; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.15; letter-spacing: -.005em; }
.tile__c p { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .5s, margin .5s; }
.tile:hover .tile__c p, .tile:focus-visible .tile__c p { max-height: 90px; opacity: 1; margin-top: 8px; }
.tile__c .mono { display: block; margin-top: 12px; color: var(--acc); font-size: 10px; }
.tile__c .mono::after { content: " →"; letter-spacing: 0; transition: margin .3s; }
.tile:hover .tile__c .mono::after { margin-left: 6px; }
.tile:focus-visible { outline: 1px solid var(--acc); outline-offset: -1px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } .tile:nth-child(3n) { border-right: 1px solid var(--line); } .tile:nth-child(2n) { border-right: 0; } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } .tile { border-right: 0 !important; } .tile__c p { max-height: 90px; opacity: 1; margin-top: 8px; } }

/* ---------- methods: numbered rows with dot numerals ---------- */
.meth { max-width: 1240px; margin: clamp(56px, 7vw, 96px) auto 0; padding: 0 var(--pad); }
.meth__r { display: grid; grid-template-columns: 560px 1fr; gap: 40px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line-2); }
.meth__r:last-child { border-bottom: 1px solid var(--line-2); }
.meth__r:nth-child(even) { grid-template-columns: 1fr 560px; }
.meth__r:nth-child(even) .meth__n { order: 2; }
.meth__r:nth-child(even) .meth__t { text-align: right; }
.meth__r:nth-child(even) .meth__t p { margin-left: auto; }
.meth__n { position: relative; height: 330px; padding-top: 22px; }
.meth__n canvas { width: 100%; height: calc(100% - 30px); cursor: crosshair; }
.meth__i { position: absolute; top: 0; left: 0; color: var(--acc); }
.meth__c { margin-top: 10px; color: var(--ink-4); font-size: 9.5px; letter-spacing: .16em; }
.meth__t h3 { font-weight: 400; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.005em; }
.meth__t p { max-width: 560px; margin-top: 12px; color: var(--ink-2); }
.meth__t .links { margin-top: 18px; display: flex; gap: 22px; flex-wrap: wrap; }
.meth__r:nth-child(even) .links { justify-content: flex-end; }
.meth__t .links a { color: var(--acc); font-size: 10.5px; }
.meth__t .links a:hover { color: var(--ink); }
@media (max-width: 760px) { .meth__r, .meth__r:nth-child(even) { grid-template-columns: 1fr; gap: 14px; } .meth__r:nth-child(even) .meth__n { order: 0; } .meth__r:nth-child(even) .meth__t { text-align: left; } .meth__r:nth-child(even) .links { justify-content: flex-start; } .meth__n { height: 240px; width: 100%; } }

/* ---------- features: pinned horizontal scroll ---------- */
.hs { position: relative; }
.hs__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hs__bar { display: flex; justify-content: space-between; align-items: end; padding: calc(var(--nav) + 10px) var(--pad) 0; }
.hs__bar h2 { font-weight: 300; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; }
.hs__bar .mono { color: var(--ink-3); }
.hs__bar a.mono { color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.hs__bar a.mono:hover { color: var(--acc); border-color: var(--acc); }
.hs__track { display: flex; margin-top: 44px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); will-change: transform; }
.card { flex: 0 0 clamp(280px, 27vw, 400px); border-right: 1px solid var(--line); padding: 22px 22px 26px; display: flex; flex-direction: column; transition: background .35s; }
.card:hover { background: var(--bg-2); }
.card__m { aspect-ratio: 4 / 3; overflow: hidden; background: #e9e9ec; }
.card__m img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .5s, transform 1s var(--ease); }
.card:hover .card__m img { filter: none; transform: scale(1.04); }
.card .mono { margin-top: 18px; color: var(--acc); font-size: 10px; letter-spacing: .18em; line-height: 1.7; }
.card .mono i { font-style: normal; color: var(--ink-3); }
.card h3 { margin-top: 8px; font-weight: 400; font-size: 19px; line-height: 1.3; }
.card p { margin-top: 8px; color: var(--ink-3); font-size: 14px; line-height: 1.5; flex: 1; }
.card .go { margin-top: 16px; color: var(--ink-2); font-size: 10px; }
.card:hover .go { color: var(--acc); }
.hs__foot { display: flex; justify-content: space-between; padding: 22px var(--pad) 0; color: var(--ink-3); }
.hs__prog { flex: 1; margin: 0 24px; align-self: center; height: 1px; background: var(--line); position: relative; }
.hs__prog i { position: absolute; left: 0; top: 0; height: 1px; background: var(--acc); width: 100%; transform: scaleX(0); transform-origin: left; }
@media (max-width: 760px) {
  .hs { height: auto !important; } .hs__pin { position: static; height: auto; }
  .hs__track { overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; }
  .card { scroll-snap-align: start; flex-basis: 82vw; }
  .hs__bar { flex-direction: column; align-items: start; gap: 14px; padding-top: 0; }
}

/* ---------- log: talks + papers ---------- */
.log { max-width: 1120px; margin: clamp(56px, 7vw, 90px) auto 0; padding: 0 var(--pad); }
.log li { display: grid; grid-template-columns: 110px 130px 1fr auto; gap: 24px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line-2); transition: background .3s; }
.log li:last-child { border-bottom: 1px solid var(--line-2); }
.log .d { font-size: 15px; color: var(--ink); }
.log .d small { margin-left: 8px; font-family: var(--mono); font-size: 10px; color: var(--ink-4); letter-spacing: .14em; }
.log .k { color: var(--acc); font-size: 10px; }
.log .t { font-size: 15.5px; line-height: 1.5; }
.log .t em { display: block; font-style: normal; color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.log .x { color: var(--ink-3); font-size: 10px; white-space: nowrap; }
.log a.x:hover { color: var(--acc); }
@media (max-width: 760px) { .log li { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- profile ---------- */
.prof { max-width: 1120px; margin: clamp(56px, 7vw, 90px) auto 0; padding: 0 var(--pad); display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: center; }
.prof__pic { aspect-ratio: 4 / 5; position: relative; }
.prof__pic canvas { width: 100%; height: 100%; cursor: crosshair; }
.prof__t .mono { color: var(--acc); }
.prof__t h3 { font-weight: 300; font-size: clamp(34px, 3.8vw, 52px); line-height: 1.1; margin: 10px 0 6px; }
.prof__t .role { color: var(--ink-3); letter-spacing: .18em; }
.prof__t p { margin-top: 22px; color: var(--ink-2); font-size: 17px; max-width: 580px; }
.prof__l { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px 26px; }
.prof__l a { color: var(--ink-2); font-size: 10.5px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.prof__l a:hover { color: var(--acc); border-color: var(--acc); }
@media (max-width: 860px) { .prof { grid-template-columns: 1fr; } .prof__pic { max-width: 340px; } }

.cv { max-width: 1120px; margin: 70px auto 0; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.cv > div { padding: 30px 28px 34px 0; }
.cv > div + div { padding-left: 28px; border-left: 1px solid var(--line-2); }
.cv h4 { color: var(--ink-3); margin-bottom: 18px; }
.cv li { padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; line-height: 1.45; }
.cv li:first-child { border-top: 0; padding-top: 0; }
.cv li b { font-weight: 400; color: var(--ink); }
.cv li span { display: block; color: var(--ink-3); font-size: 13px; }
.cv li .y { display: inline; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--acc); margin-right: 10px; }
.sk li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; }
.sk li i { display: flex; gap: 3px; }
.sk li s { width: 5px; height: 5px; background: var(--ink-4); text-decoration: none; }
.sk li s.on { background: var(--ink); }
.sk li:hover s.on { background: var(--acc); }
@media (max-width: 860px) { .cv { grid-template-columns: 1fr; } .cv > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-2); } }

/* ---------- contact ---------- */
.contact { height: 100svh; min-height: 520px; display: grid; place-items: center; text-align: center; position: relative; }
.contact { overflow: hidden; }
.contact__life { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact__in { position: relative; z-index: 1; pointer-events: none; }
@media (min-width: 901px) { .contact { place-items: center start; text-align: left; padding: 0 var(--pad); } .contact h2 { font-size: clamp(54px, 7.4vw, 124px); } }
@media (max-width: 900px) { .contact { align-content: start; padding-top: 16svh; } }
.contact__in a { pointer-events: auto; }
.contact h2 { margin-top: 26px; font-weight: 200; font-size: clamp(54px, 9vw, 140px); line-height: 1; letter-spacing: -.02em; }
.contact .mono { color: var(--ink-3); }
.contact__hint { margin-top: 30px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.contact__hint .hm { display: none; }
@media (max-width: 900px) { .contact__in { padding: 0 16px; } .contact__hint { margin-top: 22px; } .contact__hint .hd { display: none; } .contact__hint .hm { display: inline; } }
.contact__hint button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-2); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0 0 2px; cursor: pointer; pointer-events: auto; transition: color .3s, border-color .3s; }
.contact__hint button:hover { color: var(--acc); border-color: var(--acc); }
.gbox { position: absolute; z-index: 3; width: 340px; max-height: min(64svh, 560px); overflow: auto; overscroll-behavior: contain; text-align: left; background: var(--bg); border: 1px solid var(--line); padding: 20px 22px 8px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.gbox.is-in { animation: gboxIn .35s cubic-bezier(.2,.7,.2,1); }
@keyframes gboxIn { from { opacity: 0; transform: translateY(8px); } }
.gbox--fixed { right: var(--pad); bottom: 8svh; }
.gbox--sheet { left: 16px; right: 16px; bottom: 16px; width: auto; max-height: 56svh; }
.gbox__x { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; font-size: 20px; line-height: 1; color: var(--ink-3); background: none; border: 0; cursor: pointer; }
.gbox__x:hover { color: var(--ink); }
.gbox__k { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.gbox h3 { margin: 6px 0 4px; font-size: 22px; font-weight: 300; line-height: 1.2; padding-right: 26px; }
.gbox ul { list-style: none; margin: 0; padding: 0; }
.gbox li { padding: 13px 0; border-top: 1px solid var(--line-2); }
.gbox li:first-child { border-top: 0; }
.gbox li .mono { margin: 0; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.gbox li .mono b { font-weight: 400; color: var(--acc); }
.gbox h4 { margin: 4px 0 2px; font-size: 15px; font-weight: 400; line-height: 1.35; }
.gbox h4 a { color: var(--ink); } .gbox h4 a span { color: var(--acc); }
.gbox h4 a:hover { color: var(--acc); }
.gbox li > p:last-child { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.contact a.mail { display: inline-block; margin-top: 34px; font-size: clamp(20px, 2.4vw, 30px); font-weight: 300; border-bottom: 1px solid var(--line); padding-bottom: 6px; transition: color .3s, border-color .3s; }
.contact a.mail:hover { color: var(--acc); border-color: var(--acc); }
.foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px var(--pad); border-top: 1px solid var(--line-2); color: var(--ink-4); }
.foot a:hover { color: var(--ink); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } .ticker div, .hero__down { animation: none; } }
.sec.hs { padding-top: 0; margin-top: clamp(70px, 9vw, 130px); }

/* ---------- hero v3: reaction-diffusion field, crisp name ---------- */
.hero { background: #000; }
.hero.no-gl canvas { display: none; }
.hero__veil { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(80% 70% at 0% 100%, rgba(0,0,0,.95) 0, rgba(0,0,0,.75) 35%, transparent 70%), linear-gradient(180deg, rgba(0,0,0,.85), rgba(0,0,0,0) 20%), linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,0) 30%); }
.hero__title { position: absolute; left: var(--pad); bottom: clamp(56px, 9vh, 110px); pointer-events: none; }
.hero__title h1 { font-weight: 300; font-size: clamp(52px, 8.6vw, 150px); line-height: .92; letter-spacing: -.035em; }
.hero__title p { margin-top: 22px; color: var(--ink-2); letter-spacing: .24em; }
.hero__hud { top: auto; bottom: clamp(56px, 9vh, 110px); left: auto; right: var(--pad); text-align: right; color: var(--ink-3); }
.hero__down { position: absolute; left: 50%; bottom: 26px; margin: 0 0 0 -7px; }
.hero__state span { color: var(--ink-4); }
.prof__pic { overflow: hidden; background: #111; }
.prof__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: grayscale(1) contrast(1.06); }
.prof__pic canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: default; }
.prof__cap { position: absolute; left: 0; right: 0; bottom: -28px; color: var(--ink-4); font-size: 9.5px; letter-spacing: .16em; }
.prof { grid-template-columns: 440px 1fr; }
.prof__pic { aspect-ratio: 4 / 5; overflow: visible; }
@media (max-width: 760px) { .hero__hud { display: none; } }

.hero--life .hero__veil { background: linear-gradient(180deg, rgba(0,0,0,.8), rgba(0,0,0,0) 16%), linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0) 22%); }
.hero--life .hero__title p { color: var(--ink-2); }
.hero--life .hero__veil { background: linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,0) 14%); }

/* ---------- stadium cinematic (STF Agent) ---------- */
.stad { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; cursor: grab; }
.stad:active { cursor: grabbing; }
.stad__c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stad__v { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.75)), linear-gradient(0deg, rgba(0,0,0,.6), transparent 26%); }
.stad__log { position: absolute; left: 18px; top: 18px; margin: 0; padding: 10px 14px; list-style: none; font-size: 11px; line-height: 1; letter-spacing: 0 !important; text-transform: none !important; pointer-events: none; background: rgba(0,0,0,.74); }
.stad__log li { display: grid; grid-template-columns: 118px 230px 64px; gap: 10px; white-space: nowrap; padding: 6px 0; color: rgba(255,255,255,.22); transition: color .4s; }
.stad__log li b { font-weight: 400; }
.stad__log li.past { color: rgba(255,255,255,.55); }
.stad__log li.on { color: #f4f4f6; }
.stad__log li.on b { color: #ff4fb0; }
.stad__log li i { font-style: normal; color: inherit; opacity: .7; text-align: right; }
.stad__hud { position: absolute; left: 22px; right: 22px; bottom: 18px; margin: 0; display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); pointer-events: none; }
@media (max-width: 760px) { .stad__log li { grid-template-columns: 96px 1fr; } .stad__log li i { display: none; } }
.meth__r--wide { grid-template-columns: 1fr !important; gap: 22px; }
.meth__r--wide .meth__t { text-align: left !important; max-width: 760px; }
.meth__r--wide .meth__t p { margin-left: 0 !important; }
.meth__r--wide .links { justify-content: flex-start !important; }
.meth__n--wide { height: min(68vh, 640px) !important; padding-top: 0 !important; }
.meth__n--wide .meth__i { z-index: 2; left: auto; right: 22px; top: 22px; }


/* ---------- light theme ---------- */
.thm { width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 1px solid var(--line); color: var(--ink-2); cursor: pointer; padding: 0; }
.thm:hover { color: var(--acc); border-color: var(--acc); }
.thm svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.thm .moon { display: none; } :root[data-theme="light"] .thm .sun { display: none; } :root[data-theme="light"] .thm .moon { display: block; }
:root[data-theme="light"] {
  --bg: #ffffff; --bg-2: #f3f3f4; --bg-3: #e9e9ec;
  --ink: #111113; --ink-2: #3a3a40; --ink-3: #6e6e76; --ink-4: #a6a6ad;
  --line: rgba(0,0,0,.12); --line-2: rgba(0,0,0,.07); --acc: #d0107a;
}
:root[data-theme="light"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="light"] .nav.is-solid { background: rgba(255,255,255,.84); }
:root[data-theme="light"] .hero { background: #fff; }
:root[data-theme="light"] .hero--life .hero__veil { background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,0) 14%); }
:root[data-theme="light"] .tile__gw { background: rgba(255,255,255,.86); --ink: #111; }
:root[data-theme="light"] .prof__pic { background: #eee; }
:root[data-theme="light"] .stad { background: #fff; }
:root[data-theme="light"] .stad__log li { color: rgba(0,0,0,.28); } :root[data-theme="light"] .stad__log li.past { color: rgba(0,0,0,.6); } :root[data-theme="light"] .stad__log li.on { color: #111; }
:root[data-theme="light"] .stad__hud { color: rgba(0,0,0,.6); }
:root[data-theme="light"] .stad__v { background: radial-gradient(120% 90% at 50% 45%, transparent 60%, rgba(255,255,255,.6)); }
.tile { --ink: #f4f4f6; --ink-2: #c4c4ca; --ink-3: #8c8c94; color: #f4f4f6; }

/* VoxelMorph map (static three.js render) */
.vmx { position: absolute; inset: 0; background: var(--bg); overflow: hidden; cursor: grab; }
.vmx:active { cursor: grabbing; }
.vmx canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vmx__info { position: absolute; right: 12px; top: 12px; width: 210px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); font-size: 9.5px; letter-spacing: .04em; text-transform: none; color: var(--ink-2); display: grid; gap: 6px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.vmx__info.on { opacity: 1; }
.vmx__info b { font-weight: 400; color: #ff4fb0; }
.vmx__info span { position: relative; padding-bottom: 4px; }
.vmx__info i { position: absolute; left: 0; bottom: 0; height: 2px; }
.vmx__foot { position: absolute; left: 12px; bottom: 6px; margin: 0; font-size: 9.5px; letter-spacing: .06em; text-transform: none; color: var(--ink-3); pointer-events: none; }
.meth__vx { position: absolute; left: 0; right: 0; top: 22px; bottom: 30px; }
.meth__vx .vmx__foot { display: none; }

.vmx canvas.vmx__map { left: 0; right: 0; }
.vmx--left canvas.vmx__map { left: 26%; width: 74%; }
.vmx--left canvas.vmx__side { position: absolute; left: 0; top: 0; width: 26%; height: 100%; inset: auto; }
.vmx--panel canvas.vmx__map { width: 64%; }
.vmx--panel canvas.vmx__side { position: absolute; inset: auto; top: 14px; left: calc(64% + 22px); width: calc(36% - 36px); height: calc(100% - 28px); }
.vmx--panel::after { content: ""; position: absolute; left: calc(64% + 8px); top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.vmx--panel .vmx__info { display: none; }
.vmx--left .vmx__info { right: 8px; top: 4px; }

/* ---------- Work menu ---------- */
.has-menu { position: relative; }
.menu { position: absolute; top: calc(100% + 18px); left: 50%; width: 380px; transform: translate(-50%, 6px); padding: 8px; background: var(--bg); border: 1px solid var(--line); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility 0s .2s; z-index: 60; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.menu::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s, transform .2s; }
.menu a { display: grid; grid-template-columns: 24px 64px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px; color: var(--ink); text-decoration: none; }
.menu a + a { border-top: 1px solid var(--line-2); }
.menu a:hover { background: var(--bg-2); }
.menu a span { grid-row: 1 / 3; color: var(--acc); font-size: 10px; }
.menu a img { grid-row: 1 / 3; width: 64px; height: 42px; object-fit: cover; filter: grayscale(1); transition: filter .25s; }
.menu a:hover img { filter: none; }
.menu a b { font-weight: 400; font-size: 15px; letter-spacing: 0; text-transform: none; align-self: end; }
.menu a i { font-style: normal; font-size: 9.5px; letter-spacing: .1em; color: var(--ink-3); align-self: start; }
@media (max-width: 760px) { .menu { display: none; } }

/* interactive steps (home) */
.stad__log.is-i { pointer-events: auto; background: none; padding: 4px 6px; }
.stad__log.is-i li { position: relative; grid-template-columns: 118px 230px 20px; }
/* the active step's timer: a thin magenta line that runs across it while the steps play on their own */
.stad__log.is-i li.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: #ff4fb0; transform: scaleX(0); transform-origin: left; }
.stad__log.is-i.run li.on::after { animation: stadbar var(--d, 2.6s) linear forwards; }
.stad__log.is-i.hold li.on::after { animation-play-state: paused; }
@keyframes stadbar { to { transform: scaleX(1); } }
:root[data-theme="light"] .stad__log.is-i li.on::after { background: #d0107a; }
.stad__log.is-i li { cursor: pointer; }
.stad__log.is-i li:hover b, .stad__log.is-i li:focus b { color: #ff4fb0; }
.stad--i .stad__v { display: none; }
.stad__prompt { position: absolute; left: 50%; top: 50%; width: min(440px, 70%); transform: translate(-30%, -50%) scale(.98); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; padding: 18px 20px; background: var(--bg); border: 1px solid #ff4fb0; }
.stad__prompt.on { opacity: 1; transform: translate(-30%, -50%); }
.stad__prompt p { margin: 0 0 10px; color: #ff4fb0; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.stad__prompt div { font-size: 16px; line-height: 1.5; color: var(--ink); }
.stad__prompt i { display: inline-block; width: 8px; height: 16px; margin-left: 4px; vertical-align: -2px; background: #ff4fb0; animation: caret 1s steps(1) infinite; }
.stad__prompt span { display: block; margin-top: 12px; font-size: 9.5px; letter-spacing: .14em; color: var(--ink-3); }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- phones: home ---------- */
@media (max-width: 760px) {
  .nav { padding: 0 16px; }
  .nav ul { gap: 14px; }
  .nav .has-menu .menu { display: none; }
  .nav li:has(> a.l[href="#profile"]) { display: none; }
  .brand span { display: none; }
  .meth__n--wide { height: 78vh !important; }
  .stad__log { left: 10px; top: 10px; padding: 8px 10px; font-size: 10px; }
  .stad__log li { grid-template-columns: 1fr !important; padding: 4px 0; } .stad__log li span, .stad__log li i { display: none; }
  .stad__hud { left: 10px; right: 10px; bottom: 10px; font-size: 9px; flex-direction: column; gap: 6px; }
  .stad__prompt { left: 10px; right: 10px; width: auto; transform: translateY(-20%) !important; top: 40%; }
  .meth__n { height: 300px; }
  .prof__t .mono { white-space: normal; overflow-wrap: anywhere; }
  .tile__gw { transform: scale(.86); transform-origin: top left; }
}
@media (max-width: 860px) { .prof { grid-template-columns: 1fr !important; } .prof__pic { max-width: 100%; } }
@media (max-width: 760px) { .vmx--left canvas.vmx__side { width: 36%; } .vmx--left canvas.vmx__map { left: 36%; width: 64%; } }

/* CV: talks and papers, compressed */
.cv__talks li b { font-size: 14px; }
@media (min-width: 861px) and (max-width: 960px) { .cv { grid-template-columns: 1fr 1fr; } .cv > .sk { grid-column: 1 / -1; border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--line-2); } }
