/* ==========================================================================
   WAFER — split screen: dark instrument panel with a 3D wafer, light reading column
   ========================================================================== */
:root {
  --panel: #0b0c0f;
  --panel-2: #14161b;
  --panel-text: #e9ebf0;
  --panel-muted: #7d8391;
  --panel-line: rgba(255, 255, 255, 0.09);
  --lime: #d4ff3a;

  --bg: #f1f0ec;
  --card: #fbfaf8;
  --ink: #101114;
  --ink-2: #464851;
  --muted: #8a8c94;
  --line: #dddbd4;
  --accent: #5b3df5;
  --accent-soft: #ebe7ff;

  --panel-w: clamp(360px, 34vw, 480px);
  --sans: "Archivo", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.62; font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; font-variation-settings: "wdth" 112; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: fixed; left: 12px; top: -50px; z-index: 100; background: var(--lime); color: #000; padding: 8px 14px; transition: top .2s; }
.skip:focus { top: 12px; }
svg { width: 1em; height: 1em; flex: none; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
a.inline { color: var(--accent); border-bottom: 1px solid rgba(91,61,245,.35); }
a.inline:hover { border-color: var(--accent); }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: var(--panel-w) minmax(0, 1fr); min-height: 100vh; }

/* ---------- Panel ---------- */
.panel {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--panel); color: var(--panel-text);
  overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--panel-line) 1px, transparent 1px), linear-gradient(90deg, var(--panel-line) 1px, transparent 1px);
  background-size: 32px 32px; opacity: .35;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 50%, #000, transparent);
          mask-image: radial-gradient(80% 60% at 50% 50%, #000, transparent);
}
.panel-top { position: relative; padding: 36px 36px 0; }
.pname { display: block; font-size: 36px; font-weight: 800; line-height: .95; letter-spacing: -0.03em; text-transform: uppercase; font-variation-settings: "wdth" 125; }
.prole { margin-top: 14px; font-size: 13px; color: var(--panel-muted); line-height: 1.5; }

.stage { position: relative; flex: 1; min-height: 220px; cursor: crosshair; }
#wafer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wafer-fallback { display: none; position: absolute; left: 50%; top: 50%; width: min(70%, 300px); aspect-ratio: 1; transform: translate(-50%, -50%) rotateX(50deg); border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 1px, transparent 1px 14px),
    conic-gradient(from 200deg, #9ae6ff, #c9a7ff, #ffd59a, #a7ffd9, #9ae6ff);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
}
.stage.no-gl .wafer-fallback { display: block; }
.stage.no-gl #wafer { display: none; }
.hud { position: absolute; left: 36px; right: 36px; bottom: 10px; display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--panel-muted); pointer-events: none; }
.hud-die { color: var(--lime); }

.panel-bottom { position: relative; padding: 0 36px 28px; }
.pnav { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--panel-line); }
.pnav a { display: flex; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--panel-line); font-size: 15px; font-weight: 500; color: var(--panel-muted); transition: color .2s, padding .35s var(--ease); }
.pnav a span { font-family: var(--mono); font-size: 11px; }
.pnav a:hover { color: var(--panel-text); padding-left: 6px; }
.pnav a[aria-current="page"] { color: var(--panel-text); }
.pnav a[aria-current="page"] span { color: var(--lime); }
.pnav a[aria-current="page"]::after { content: ""; margin-left: auto; width: 8px; height: 8px; align-self: center; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.pfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.picons { display: flex; gap: 6px; }
.picons a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--panel-line); color: var(--panel-muted); transition: color .2s, border-color .2s; }
.picons a:hover { color: var(--lime); border-color: var(--lime); }
.picons svg { width: 16px; height: 16px; }
.pcv { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; background: var(--lime); color: #000; font-family: var(--mono); font-size: 12.5px; transition: transform .3s var(--ease); }
.pcv:hover { transform: translateY(-2px); }

@media (max-height: 760px) {
  .pnav a { padding: 6px 0; font-size: 14px; }
  .pname { font-size: 30px; }
}

/* ---------- Content column ---------- */
.content { position: relative; min-width: 0; }
#diefield { position: fixed; top: 0; bottom: 0; left: var(--panel-w); width: calc(100% - var(--panel-w)); height: 100vh; z-index: 0; pointer-events: none; }
.content::before { content: ""; position: fixed; top: 0; bottom: 0; left: var(--panel-w); right: 0; z-index: 0; pointer-events: none; background: radial-gradient(80% 70% at 35% 30%, rgba(241,240,236,.75), rgba(241,240,236,0) 70%); }
.content-in, .footer { position: relative; z-index: 1; }
.content-in { max-width: 1180px; padding: 72px clamp(24px, 5vw, 72px) 0; }
.mbar, .mpanel { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 20px; font-size: 14.5px; font-weight: 600; white-space: nowrap; transition: transform .3s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .3s; }
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--lime); }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--lime); }
.btn-secondary { border: 1px solid var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.socials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.socials a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); font-size: 14px; transition: border-color .2s; }
.socials a:hover { border-color: var(--ink); }
.socials svg { width: 16px; height: 16px; }

/* ---------- Home ---------- */
.intro-h { margin-top: 20px; font-size: clamp(40px, 5.6vw, 76px); font-weight: 800; line-height: .98; letter-spacing: -0.04em; font-variation-settings: "wdth" 118; text-transform: uppercase; }
.mark { background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%); padding: 0 .06em; }
.intro-lead { margin-top: 28px; font-size: 18px; line-height: 1.65; color: var(--ink-2); max-width: 680px; }
.intro .cta-actions { margin-top: 32px; }

.profile { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; margin-top: 72px; padding: 24px; background: var(--card); border: 1px solid var(--line); }
.profile-photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--line); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(.25) contrast(1.05); transition: filter .6s, transform 1s var(--ease); }
.profile:hover .profile-photo img { filter: none; transform: scale(1.03); }
.facts { margin: 0; display: grid; align-content: center; }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; font-size: 15px; }
.home-stats { margin-top: 20px; }
.more { margin-top: 18px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--card); }
.stat { padding: 22px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-v { font-size: clamp(26px, 2.5vw, 40px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variation-settings: "wdth" 118; font-variant-numeric: tabular-nums; }
.stat-k { margin-top: 12px; font-size: 14px; font-weight: 600; }
.stat-s { margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.5; }

.focus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.focus-item { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); transition: background-color .3s, color .3s; }
.focus-num { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.focus-item h3 { font-size: 19px; }
.focus-item p { font-size: 14.5px; color: var(--ink-2); }
.focus-go { position: absolute; top: 22px; right: 22px; transition: transform .35s var(--ease); }
.focus-item:hover { background: var(--ink); color: #fff; }
.focus-item:hover p, .focus-item:hover .focus-num { color: rgba(255,255,255,.7); }
.focus-item:hover .focus-go { color: var(--lime); transform: translateX(4px); }

/* ---------- Generic pages ---------- */
.phead { padding-bottom: 32px; border-bottom: 2px solid var(--ink); }
.ptitle { margin-top: 16px; font-size: clamp(40px, 5.8vw, 80px); font-weight: 800; line-height: .96; letter-spacing: -0.04em; font-variation-settings: "wdth" 120; text-transform: uppercase; }
.plead { margin-top: 22px; max-width: 640px; font-size: 18px; color: var(--ink-2); }

.block { margin-top: 80px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--ink); }
.block-head .eyebrow { order: 2; }
.btitle { font-size: clamp(24px, 2.8vw, 32px); font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; font-variation-settings: "wdth" 115; }
.block-lead { font-size: 17px; color: var(--ink-2); margin-bottom: 22px; }

.entries { border-top: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 8px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.entry-when { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 4px; }
.entry-title { font-size: 19px; line-height: 1.3; letter-spacing: -0.015em; font-variation-settings: "wdth" 104; }
.entry-org { margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.entry-note { margin-top: 10px; font-size: 15.5px; color: var(--ink-2); }
.entry-note em { font-style: normal; font-weight: 600; color: var(--ink); }
.entry-points { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.entry-points li { position: relative; padding-left: 20px; font-size: 15.5px; color: var(--ink-2); }
.entry-points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; background: var(--lime); outline: 1px solid var(--ink); }
.entry-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-aside { text-align: right; }
.entry-aside b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variation-settings: "wdth" 118; }
.entry-aside span { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.tags { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: 11.5px; padding: 3px 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.lnk { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--ink); font-size: 13px; font-weight: 600; transition: all .2s; }
.lnk svg { width: 14px; height: 14px; }
.lnk:hover, .lnk[aria-expanded="true"] { background: var(--ink); color: #fff; }

.areas { border-top: 1px solid var(--line); }
.area { padding: 30px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; display: grid; grid-template-columns: 70px minmax(0, 1fr); column-gap: 16px; }
.area > * { grid-column: 2; }
.area-num { grid-column: 1; grid-row: 1 / span 6; font-size: 34px; font-weight: 800; line-height: 1; color: var(--accent); font-variation-settings: "wdth" 120; }
.area h3 { font-size: 24px; text-transform: uppercase; font-variation-settings: "wdth" 112; }
.area > p { margin-top: 10px; color: var(--ink-2); }

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.project { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.project-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; }
.project h3 { font-size: 18px; font-variation-settings: "wdth" 104; }
.project p { font-size: 14.5px; color: var(--ink-2); }
.project .tags { margin-top: auto; padding-top: 4px; }
.project-venue { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 7px; text-transform: uppercase; color: var(--muted); }
.status i { width: 8px; height: 8px; background: currentColor; }
.status.live { color: var(--ink); }
.status.live i { background: var(--lime); outline: 1px solid var(--ink); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .2; } }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pillar { padding-top: 16px; border-top: 3px solid var(--ink); }
.pillar-num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.pillar h3 { margin-top: 10px; font-size: 18px; font-variation-settings: "wdth" 106; }
.pillar p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }

.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.skill { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.skill h3 { font-size: 17px; }
.skill p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }

.news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news li { display: grid; grid-template-columns: 100px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.news time { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.news p { color: var(--ink-2); }
.news b { color: var(--ink); font-weight: 600; }
.news a { color: var(--ink); background: linear-gradient(transparent 70%, var(--lime) 70%); }

/* Publications */
.pubtools { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 0; margin-bottom: 26px; background: var(--bg); border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { height: 34px; padding: 0 12px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: all .2s; }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter .count { font-family: var(--mono); font-size: 11px; opacity: .65; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line); background: var(--card); min-width: 210px; color: var(--muted); }
.search:focus-within { border-color: var(--ink); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); width: 100%; }
.pubgroup + .pubgroup { margin-top: 44px; }
.pubgroup-title { font-family: var(--mono); font-size: 12px; font-weight: 400; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pubs { border-top: 1px solid var(--line); }
.pub { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.pub-year { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variation-settings: "wdth" 118; color: var(--accent); }
.pub-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pill { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border: 1px solid var(--line); color: var(--ink-2); text-transform: uppercase; }
.pill-soft { background: var(--card); }
.pill-accent { background: var(--lime); border-color: var(--ink); color: var(--ink); }
.pub-title { font-size: 20px; line-height: 1.3; font-variation-settings: "wdth" 104; }
.pub-title a { background: linear-gradient(var(--lime), var(--lime)) 0 100% / 0 40% no-repeat; transition: background-size .4s var(--ease); }
.pub-title a:hover { background-size: 100% 40%; }
.pub-authors { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.pub-authors .me { color: var(--ink); font-weight: 700; }
.pub-venue { margin-top: 3px; font-size: 14px; color: var(--muted); }
.pub-tldr { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 14.5px; color: var(--ink-2); }
.pub-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.pub-bib { margin-top: 12px; position: relative; }
.pub-bib pre { margin: 0; padding: 16px; padding-right: 76px; background: var(--panel); color: #d7dae2; font-family: var(--mono); font-size: 12px; line-height: 1.6; overflow-x: auto; }
.pub-bib button { position: absolute; top: 10px; right: 10px; padding: 4px 10px; background: var(--lime); color: #000; font-family: var(--mono); font-size: 11.5px; }
.pub-empty { padding: 40px 0; color: var(--muted); }

/* Contact */
.mailbox { margin-top: 40px; padding: clamp(24px, 4vw, 40px); background: var(--panel); color: var(--panel-text); }
.mailbox .eyebrow { color: var(--panel-muted); }
.mail-big { display: inline-block; margin-top: 12px; font-size: clamp(22px, 3.2vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere; font-variation-settings: "wdth" 110; color: var(--lime); }
.mail-addr { margin: 14px 0 24px; color: var(--panel-muted); font-size: 14.5px; }
.mailbox .btn-primary { background: var(--lime); color: #000; box-shadow: 4px 4px 0 #fff; }
.mailbox .btn-secondary { border-color: rgba(255,255,255,.4); color: #fff; }
.mailbox .btn-secondary:hover { background: #fff; color: #000; }
.page-contact .block:first-of-type { margin-top: 0; }
.linklist { border-top: 1px solid var(--line); }
.linkrow { display: grid; grid-template-columns: 40px 1fr auto 22px; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding .35s var(--ease); }
.linkrow:hover { padding-left: 10px; }
.linkrow-k svg { width: 22px; height: 22px; }
.linkrow-t { font-size: 20px; font-weight: 700; font-variation-settings: "wdth" 110; text-transform: uppercase; }
.linkrow-u { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.linkrow:hover .linkrow-go { color: var(--accent); }

/* CTA */
.cta { margin-top: 96px; padding: clamp(28px, 4vw, 48px); background: var(--lime); border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.cta h2 { font-size: clamp(28px, 3.8vw, 48px); font-weight: 800; text-transform: uppercase; letter-spacing: -0.035em; max-width: 14ch; font-variation-settings: "wdth" 118; }
.cta p { margin-top: 10px; max-width: 460px; color: #26281f; }
.cta .btn-primary { box-shadow: 4px 4px 0 #fff; }
.cta .btn-secondary:hover { background: var(--ink); color: var(--lime); }

/* Footer */
.footer { margin-top: 96px; border-top: 1px solid var(--line); }
.footer-in { max-width: 1180px; padding: 22px clamp(24px, 5vw, 72px) 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.footer-in a:hover { color: var(--accent); }

.nf { padding-top: 10vh; }
.nf .cta-actions { margin-top: 28px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 99; padding: 10px 16px; background: var(--lime); color: #000; border: 1px solid #000; font-family: var(--mono); font-size: 13px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .3s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 50ms); }
.reveal.in, .no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Research flip cards ---------- */
.flips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; perspective: 1800px; }
.flip { position: relative; z-index: 1; display: block; height: 100%; cursor: pointer; outline: none; scroll-margin-top: 24px; transition: transform .7s var(--ease), z-index 0s .7s; }
.flip-inner { display: grid; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.face { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; min-height: 360px; padding: 28px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.front { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.front::after { content: ""; position: absolute; right: -20px; top: -20px; width: 220px; height: 220px; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 22px 22px; -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 20%, transparent 70%); mask-image: radial-gradient(circle at 70% 30%, #000 20%, transparent 70%); }
.die-art { position: relative; z-index: 1; margin: auto 0 8px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; max-width: 320px; }
.die-art i { aspect-ratio: 1; border: 1px solid var(--line); background: var(--bg); transition: background-color .4s, border-color .4s; transition-delay: calc(var(--k) * 8ms); }
.die-art i.on { background: var(--lime); border-color: var(--ink); }
.die-art i.probe { background: var(--accent); border-color: var(--accent); animation: dieblink 1.8s steps(1) infinite; }
@keyframes dieblink { 50% { background: var(--bg); border-color: var(--line); } }
.flip:hover .die-art i { background: var(--ink); border-color: var(--ink); }
.front h3 { margin-top: 0; font-size: clamp(22px, 2.2vw, 28px); text-transform: uppercase; font-variation-settings: "wdth" 114; position: relative; }
.front p { color: var(--ink-2); font-size: 15.5px; position: relative; }
.front .tags { position: relative; }
.front-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; position: relative; }
.flip-num { font-size: 44px; font-weight: 800; line-height: 1; color: var(--accent); font-variation-settings: "wdth" 120; letter-spacing: -0.03em; }
.flip-hint { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; }
.h-tap { display: none; }
@media (hover: none) { .h-hover { display: none; } .h-tap { display: inline; } }
.back { transform: rotateY(180deg); background: var(--panel); color: var(--panel-text); border: 2px solid var(--ink); }
.back .flip-num { color: var(--lime); font-size: 30px; }
.back-kicker { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--panel-muted); }
.back h3 { font-size: 21px; text-transform: uppercase; font-variation-settings: "wdth" 112; }
.back-text { font-size: 14.5px; color: #c4c8d2; }
.back .entry-points { margin-top: 2px; gap: 6px; }
.back .entry-points li { font-size: 14px; color: #c4c8d2; }
.back .entry-points li::before { outline-color: var(--lime); }
.back-label { margin-top: auto; padding-top: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--lime); }
.back-related { font-size: 14px; color: var(--panel-text); }
.back .entry-links { margin-top: 0; }
.back .lnk { border-color: rgba(255,255,255,.35); color: var(--panel-text); }
.back .lnk:hover { background: var(--lime); border-color: var(--lime); color: #000; }
@media (hover: hover) {
  .flip:hover { z-index: 5; transform: scale(1.07); transition: transform .7s var(--ease), z-index 0s; }
  .flip:hover .flip-inner { transform: rotateY(180deg); }
  .flip:hover .back { box-shadow: 10px 10px 0 var(--lime); }
}
.flip.is-flipped .flip-inner, .flip:focus-visible .flip-inner, .flip:has(:focus-visible) .flip-inner { transform: rotateY(180deg); }
.flip.is-flipped { z-index: 5; }
.flip:focus-visible .back { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .flip:hover { transform: none; }
}
@media (min-width: 1500px) { .flips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .flips { grid-template-columns: 1fr; } .face { min-height: 0; } }

/* ---------- Home layout ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.home-grid .profile { grid-template-columns: 1fr; gap: 18px; margin-top: 8px; padding: 18px; box-shadow: 8px 8px 0 var(--ink); border: 2px solid var(--ink); }
.home-grid .profile-photo { aspect-ratio: 1 / 1; }
.home-grid .facts div { grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; }
.home-grid .facts dd { font-size: 14px; min-width: 0; overflow-wrap: break-word; }
.home-grid .profile { min-width: 0; }
.home-grid .intro-h { font-size: clamp(36px, 4.1vw, 66px); }

/* ---------- Let's talk strip ---------- */
.talk { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; max-width: calc(1180px - 2 * clamp(24px, 5vw, 72px)); margin: 0 clamp(24px, 5vw, 72px) 28px; padding: 20px 24px; background: var(--panel); color: var(--panel-text); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.talk:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--lime); }
.talk-k { font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; font-variation-settings: "wdth" 120; color: var(--lime); }
.talk-t { color: var(--panel-muted); font-size: 15px; }
.talk-go { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; }
.talk-go svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.talk:hover .talk-go svg { transform: translateX(4px); color: var(--lime); }
.footer { border-top: 0; padding-top: 0; }
.footer-in { border-top: 1px solid var(--line); margin: 0 clamp(24px, 5vw, 72px); padding-inline: 0; max-width: calc(1180px - 2 * clamp(24px, 5vw, 72px)); }

/* ---------- Publications highlights ---------- */
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--card); }
.mini-stats div { padding: 18px 20px; }
.mini-stats div + div { border-left: 1px solid var(--line); }
.mini-stats b { display: block; font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variation-settings: "wdth" 118; }
.mini-stats span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; }
.feature { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 16px; padding: clamp(22px, 3vw, 34px); background: var(--panel); color: var(--panel-text); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.feature:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--lime); }
.feature > div { max-width: 720px; }
.feature .eyebrow { color: var(--lime); }
.feature h3 { margin-top: 10px; font-size: clamp(20px, 2.4vw, 28px); font-variation-settings: "wdth" 108; }
.feature p:not(.eyebrow) { margin-top: 10px; color: var(--panel-muted); font-size: 15px; }
.feature-go { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--lime); }

/* ---------- Achievements ---------- */
.ach-stats { margin-top: 40px; }

/* ---------- News timeline ---------- */
.nyear { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; margin-top: 44px; }
.nyear-h { position: sticky; top: 72px; align-self: start; font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variation-settings: "wdth" 120; color: var(--ink); }
.nlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.nitem { display: grid; grid-template-columns: 64px 96px minmax(0, 1fr); align-items: baseline; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.nitem time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.nitem p { color: var(--ink-2); }
.nitem b { color: var(--ink); font-weight: 600; }
.nitem a { color: var(--ink); background: linear-gradient(transparent 70%, var(--lime) 70%); }
.ncat { justify-self: start; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--line); background: var(--card); }
.ncat-paper { border-color: var(--accent); color: var(--accent); }
.ncat-award { background: var(--lime); border-color: var(--ink); color: var(--ink); }
.ncat-service { background: var(--ink); border-color: var(--ink); color: #fff; }
.ncat-review { color: var(--ink-2); }
.ncat-milestone { border-color: var(--ink); color: var(--ink); }

@media (min-width: 1360px) {
  .focus, .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-grid .profile { grid-template-columns: 220px minmax(0, 1fr); max-width: 760px; }
  .home-grid .profile-photo { aspect-ratio: 4 / 5; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .panel { position: relative; z-index: 2; height: auto; min-height: 0; }
  .panel-top { padding: 80px 20px 0; }
  .stage { height: min(46vh, 400px); flex: none; }
  .panel-bottom { display: none; }
  .hud { left: 20px; right: 20px; }
  .hud-hint { display: none; }
  .mbar { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 60; align-items: center; justify-content: space-between; padding: 12px 20px; background: rgba(11,12,15,.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; }
  .mname { font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 120; letter-spacing: -0.02em; }
  .mbtn { height: 34px; padding: 0 14px; background: var(--lime); color: #000; font-family: var(--mono); font-size: 12.5px; }
  .mpanel { display: block; position: fixed; inset: 58px 0 0 0; z-index: 59; padding: 20px; background: var(--panel); color: var(--panel-text); overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .mpanel.open { opacity: 1; visibility: visible; }
  .mpanel .pnav a { font-size: 26px; padding: 12px 0; }
  .mpanel .socials { margin-top: 24px; }
  .mpanel .socials a { border-color: var(--panel-line); color: var(--panel-text); }
  .menu-open body { overflow: hidden; }
  .content-in { padding: 48px 20px 0; }
  #diefield, .content::before { left: 0; width: 100%; }
  .talk, .footer-in { margin-inline: 20px; }
}
@media (max-width: 680px) {
  .profile { grid-template-columns: 1fr; }
  .profile-photo { max-width: 240px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .focus, .projects, .skills, .pillars { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .entry-aside { text-align: left; }
  .area { grid-template-columns: 1fr; }
  .area > *, .area-num { grid-column: 1; grid-row: auto; }
  .pub { grid-template-columns: 1fr; gap: 4px; }
  .pubtools { position: static; }
  .search { margin-left: 0; width: 100%; }
  .news li { grid-template-columns: 1fr; gap: 2px; }
  .linkrow { grid-template-columns: 32px 1fr 22px; }
  .linkrow-u { display: none; }
  .home-grid .profile { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .mini-stats div:nth-child(3) { border-left: 0; }
  .mini-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .talk { grid-template-columns: 1fr; gap: 6px; }
  .nyear { grid-template-columns: 1fr; gap: 12px; }
  .nyear-h { position: static; font-size: 40px; }
  .nitem { grid-template-columns: 56px 1fr; }
  .nitem p { grid-column: 1 / -1; }
}
