/* ==========================================================================
   ioannoue.github.io — graphite, haze & violet
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin + latin-ext; OFL) ---------- */
@font-face { font-family: 'DM Serif Display'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/site/dm-serif-display-400-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Serif Display'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/site/dm-serif-display-400-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/site/dm-serif-display-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/site/dm-serif-display-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/site/ibm-plex-mono-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/site/ibm-plex-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/site/ibm-plex-mono-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/site/ibm-plex-mono-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/site/inter-var-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/site/inter-var-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --font-display: "DM Serif Display", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1120px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --spring: cubic-bezier(.34, 1.3, .5, 1);
  --glide: cubic-bezier(.65, 0, .35, 1);

  /* dark (default) */
  --bg: #060607;
  --bg-2: #0d0d10;
  --surface: rgba(19, 19, 23, .66);
  --surface-hi: rgba(29, 28, 35, .76);
  --border: rgba(255, 255, 255, .075);
  --border-hi: rgba(186, 166, 255, .24);
  --text: #f1f0f5;
  --text-2: #cdcbd6;
  --text-3: #8b8997;
  --accent: #a68cff;
  --accent-2: #7c5cff;
  --accent-soft: rgba(166, 140, 255, .11);
  --orb-a: #2b2350;
  --orb-b: #17171b;
  --orb-c: #352a63;
  --orb-opacity: .2;
  --grain-opacity: .045;
  --nav-bg: rgba(26, 25, 33, .34);
  --nav-border: rgba(196, 178, 255, .26);
  --nav-glow: rgba(166, 140, 255, .32);
  --nav-text: rgba(244, 243, 248, .9);
  --nav-active: rgba(166, 140, 255, .2);
  --nav-hover: rgba(255, 255, 255, .07);
  --nav-hover-ring: rgba(196, 178, 255, .18);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 60px -30px rgba(0, 0, 0, .8);
  --thumb-tint: rgba(64, 40, 160, .16);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ededef;
  --bg-2: #e3e2e7;
  --surface: rgba(255, 255, 255, .62);
  --surface-hi: rgba(255, 255, 255, .82);
  --border: rgba(24, 18, 48, .09);
  --border-hi: rgba(109, 74, 255, .28);
  --text: #0f0e13;
  --text-2: #33313d;
  --text-3: #6a6774;
  --accent: #6a46f5;
  --accent-2: #5733e0;
  --accent-soft: rgba(106, 70, 245, .08);
  --orb-a: #d8d3ea;
  --orb-b: #d6d5da;
  --orb-c: #cbc3e6;
  --orb-opacity: .2;
  --grain-opacity: .03;
  --nav-bg: rgba(255, 255, 255, .4);
  --nav-border: rgba(106, 70, 245, .22);
  --nav-glow: rgba(106, 70, 245, .2);
  --nav-text: rgba(15, 14, 19, .86);
  --nav-active: rgba(106, 70, 245, .12);
  --nav-hover: rgba(106, 70, 245, .07);
  --nav-hover-ring: rgba(106, 70, 245, .16);
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 20px 50px -30px rgba(40, 20, 90, .35);
  --thumb-tint: rgba(150, 120, 255, .12);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}

img, video { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
  transition: color .25s, text-decoration-color .25s;
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: #fff; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 16px; }

/* ---------- Atmosphere: drifting orbs + grain ---------- */
.atmosphere {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: var(--orb-opacity);
  will-change: transform;
  transition: background-color 1s var(--ease), opacity 1s var(--ease);
}
.orb--a { width: 46vmax; height: 46vmax; background: var(--orb-a); top: -18vmax; right: -12vmax; animation: drift-a 38s ease-in-out infinite alternate; }
.orb--b { width: 40vmax; height: 40vmax; background: var(--orb-b); bottom: -16vmax; left: -14vmax; animation: drift-b 46s ease-in-out infinite alternate; opacity: calc(var(--orb-opacity) + .1); }
.orb--c { width: 22vmax; height: 22vmax; background: var(--orb-c); top: 46%; left: 38%; animation: drift-c 30s ease-in-out infinite alternate; opacity: calc(var(--orb-opacity) * .6); }

@keyframes drift-a { to { transform: translate(-14vw, 22vh) scale(1.12); } }
@keyframes drift-b { to { transform: translate(18vw, -14vh) scale(.92); } }
@keyframes drift-c { to { transform: translate(-26vw, -30vh) scale(1.3); } }

.atmosphere::after {
  content: "";
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(1%, 3%); }
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: clamp(72px, 11vw, 132px) 0 0; }

.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(28px, 4vw, 44px); flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0;
}
.section-head h2 em { font-style: italic; color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- Glass ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center; padding: 0 12px;
  pointer-events: none;
}
.nav__inner {
  pointer-events: auto;
  position: relative;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  max-width: 100%;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .03) inset,
    0 0 22px -6px var(--nav-glow),
    0 12px 32px -18px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  transform-origin: 50% 0;
  transition: transform .6s var(--spring), opacity .4s var(--ease), background-color .6s, border-color .6s;
  animation: nav-in .9s var(--ease) backwards .1s;
}
/* soft breathing halo around the outline */
.nav__inner::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 18px 0 var(--nav-glow), 0 0 0 1px var(--nav-border);
  opacity: .35;
  animation: halo 6s ease-in-out infinite alternate;
}
@keyframes halo { to { opacity: .85; } }
@keyframes dock-in { from { opacity: 0; transform: translateY(18px) scale(.94); filter: blur(8px); } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-14px) scale(.96); filter: blur(8px); } }

.nav__mark {
  font-family: var(--font-mono); font-size: .92rem; font-weight: 500; letter-spacing: -.01em;
  color: var(--nav-text); text-decoration: none; margin-right: 8px; white-space: nowrap;
  transition: color .3s, text-shadow .3s;
}
.nav__mark span { color: var(--accent); }
.nav__mark:hover { color: var(--text); text-shadow: 0 0 14px var(--nav-glow); }

.nav__links {
  position: relative;
  display: flex; gap: 2px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav__links::-webkit-scrollbar { display: none; }
.nav__links li:not(.nav__indicator) { position: relative; z-index: 1; }
.nav__links a {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 7px 13px; border-radius: 999px;
  font-size: .86rem; font-weight: 500; letter-spacing: .005em;
  color: var(--nav-text); text-decoration: none; white-space: nowrap;
  transition: color .3s, opacity .3s, transform .35s var(--spring);
}
.nav__links a { isolation: isolate; }
.nav__links a.is-active { color: var(--text); }
.nav__links svg {
  display: none; width: 20px; height: 20px; flex: none;
  transition: transform .5s var(--spring), color .3s, filter .4s var(--ease);
}

/* hover bloom: a frosted pill that drifts into focus behind the item */
.nav__links a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--nav-hover);
  box-shadow: 0 0 0 1px var(--nav-hover-ring) inset, 0 0 14px -6px var(--nav-glow);
  opacity: 0; transform: scale(.8); filter: blur(6px);
  transition: opacity .35s var(--ease), transform .5s var(--spring), filter .4s var(--ease);
}
@media (hover: hover) {
  .nav__links a:hover { color: var(--text); text-shadow: 0 0 14px var(--nav-glow); }
  .nav__links a:hover::before { opacity: 1; transform: none; filter: none; }
  .nav__links a.is-active:hover::before { opacity: .5; }
}
/* press feedback (touch + mouse) */
.nav__links a:active { transform: scale(.93); }
.nav__links a:active::before { opacity: 1; transform: scale(.94); filter: none; transition-duration: .12s; }
.nav__links a:focus-visible::before { opacity: 1; transform: none; filter: none; }

/* sliding active indicator */
.nav__indicator {
  position: absolute; z-index: 0; top: 0; left: 0; height: 100%;
  width: var(--w, 0px);
  transform: translateX(var(--x, 0px));
  border-radius: 999px;
  background: var(--nav-active);
  box-shadow: 0 0 0 1px var(--nav-border) inset, 0 0 16px -4px var(--nav-glow);
  opacity: 0;
  pointer-events: none;
  transition: transform .65s var(--spring), width .65s var(--spring), opacity .45s var(--ease);
}
.nav__indicator.is-on { opacity: 1; }

.theme-toggle {
  flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--nav-border); background: transparent; color: var(--nav-text);
  cursor: pointer; margin-left: 4px;
  transition: background-color .25s, border-color .25s, color .25s, transform .5s var(--spring);
}
.theme-toggle:hover { background: var(--nav-hover); color: var(--text); box-shadow: 0 0 14px -4px var(--nav-glow); }
@media (hover: hover) {
  .theme-toggle:hover .i-moon { transform: rotate(-18deg); }
  :root[data-theme="light"] .theme-toggle:hover .i-sun { transform: rotate(45deg); }
}
.theme-toggle:active { transform: scale(.9); }
.theme-toggle svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: transform .6s var(--spring), opacity .35s; }
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="light"] .theme-toggle .i-sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(.5); }

/* mobile-only floating name chip */
.brand {
  display: none;
  position: fixed; z-index: 50;
  top: calc(12px + env(safe-area-inset-top)); left: 14px;
  padding: 7px 13px; border-radius: 999px;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
  color: var(--nav-text); text-decoration: none;
  background: var(--nav-bg); border: 1px solid var(--nav-border);
  box-shadow: 0 0 18px -6px var(--nav-glow);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  transition: transform .55s var(--spring), opacity .4s var(--ease);
}
.brand span { color: var(--accent); }

/* theme switch: a dream veil (driven by site.js) */
.theme-veil {
  --tint: 6, 6, 7; --glow: 166, 140, 255;
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  overflow: hidden;
  background: rgba(var(--tint), .36);
  -webkit-backdrop-filter: blur(13px) saturate(130%);
  backdrop-filter: blur(13px) saturate(130%);
  opacity: 0; visibility: hidden;
  transition: opacity .46s cubic-bezier(.33, 0, .2, 1), visibility 0s .46s;
}
.theme-veil[data-to="light"] { --tint: 237, 237, 239; --glow: 106, 70, 245; }
/* a soft bloom that opens out from the toggle */
.theme-veil::before {
  content: ""; position: absolute;
  left: var(--x, 50%); top: var(--y, 0);
  width: 260vmax; height: 260vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--glow), .24) 0%, rgba(var(--glow), .08) 22%, transparent 48%);
  transform: translate(-50%, -50%) scale(.08);
  transition: transform .7s cubic-bezier(.2, .7, .1, 1);
}
.theme-veil.is-in { opacity: 1; visibility: visible; transition: opacity .24s cubic-bezier(.4, 0, .2, 1); }
.theme-veil.is-in::before, .theme-veil.is-out::before { transform: translate(-50%, -50%) scale(1); }
.theme-veil.is-out { visibility: visible; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .theme-veil { background: rgba(var(--tint), .8); }
}
/* while the veil covers the page, colours switch in one step */
.theme-instant, .theme-instant *:not(.theme-veil), .theme-instant *:not(.theme-veil)::before, .theme-instant *::after { transition: none !important; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(110px, 13vw, 150px); }
.hero__body { max-width: 44em; margin: 0 auto; text-align: center; }
.hero__id { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 30px; }
.portrait {
  position: relative; flex: none; display: block;
  width: clamp(104px, 11vw, 132px); aspect-ratio: 1;
  margin-bottom: 16px; border-radius: 50%;
  transition: transform .6s var(--ease), box-shadow .5s var(--ease);
}
.portrait::after { /* hairline ring over the canvas */
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 1px solid var(--border); transition: border-color .4s;
}
.portrait:hover { transform: scale(1.04); box-shadow: 0 0 0 6px var(--accent-soft), 0 0 40px -8px var(--nav-glow); }
.portrait:hover::after { border-color: var(--border-hi); }
.avatar {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; object-position: 50% 30%;
  background: var(--bg-2);
}
:root[data-theme="light"] .avatar { filter: invert(1); background: #0e0e11; }
.portrait__fx {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 50%; pointer-events: none;
  opacity: 0; transition: opacity .8s var(--ease);
}
.portrait.is-fx .portrait__fx { opacity: 1; }
.portrait.is-fx .avatar { opacity: 0; } /* stays in place for clicks, focus and screen readers */
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -.005em;
  margin: 0 0 6px;
}
.hero h1 em { font-style: italic; }
.hero__lede { font-size: clamp(1.04rem, 1.6vw, 1.12rem); color: var(--text-2); max-width: 40em; margin: 0 auto 14px; text-align: left; text-wrap: pretty; }
@media (min-width: 721px) and (max-width: 1099px) { .hero__lede { text-align: justify; hyphens: auto; -webkit-hyphens: auto; } }
/* wide screens: an editorial left column that faces the research map */
@media (min-width: 1100px) {
  .hero__body { margin-left: 0; text-align: left; }
  .hero__id {
    display: grid; grid-template-columns: auto 1fr; align-items: center; justify-items: start;
    column-gap: 24px; row-gap: 6px; margin-bottom: 34px;
  }
  .hero__id .portrait { grid-row: span 2; margin: 0; }
  .hero__id h1 { align-self: end; margin: 0; font-size: clamp(2rem, 2.8vw, 2.5rem); }
  .hero__id .status { align-self: start; }
  .hero__lede { margin-left: 0; max-width: 38em; text-wrap: pretty; }
  .hero .hero__body .links { justify-content: flex-start; }
}
.hero__lede strong { color: var(--text); font-weight: 500; }

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em;
  color: var(--text-2);
}
.status__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.6s ease-out infinite;
}
.hero .status { display: block; text-wrap: balance; }
.hero .status__dot { display: inline-block; vertical-align: 1px; margin-right: 8px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); }
  80%, 100% { box-shadow: 0 0 0 10px transparent; }
}

.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero .links { justify-content: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  font-size: .88rem; text-decoration: none; color: var(--text);
  border: 1px solid var(--border); background: var(--surface);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: border-color .3s, background-color .3s, transform .3s var(--ease), color .3s;
}
.pill:hover { border-color: var(--border-hi); background: var(--accent-soft); transform: translateY(-2px); color: var(--text); }
.pill svg { width: 16px; height: 16px; flex: none; }

/* Interests marquee */
.interests {
  margin-top: clamp(48px, 7vw, 80px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.interests__track {
  display: flex; gap: 34px; width: max-content;
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: var(--text-3);
  animation: marquee 60s linear infinite;
}
.interests__track span { white-space: nowrap; display: inline-flex; align-items: center; gap: 34px; }
.interests__track span::after { content: "✦"; font-style: normal; font-size: .6em; color: var(--accent); opacity: .7; }
.interests:hover .interests__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Research map (hero point cloud) ---------- */
.hero { position: relative; isolation: isolate; }
.rmap {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0; transition: opacity 1.6s var(--ease);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 110px, #000 calc(100% - 60px), transparent);
  mask-image: linear-gradient(180deg, transparent 0, #000 110px, #000 calc(100% - 60px), transparent);
}
.rmap.is-ready { opacity: 1; }
.hero.rmap-pointing { cursor: pointer; }

.rmap-tip {
  position: absolute; left: 0; top: 0; z-index: 3;
  display: flex; flex-direction: column; gap: 4px;
  width: max-content; max-width: 260px;
  padding: 11px 14px 12px;
  border-radius: 14px;
  background: var(--surface-hi);
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 35%, transparent);
  box-shadow: 0 0 28px -10px var(--c, var(--accent)), 0 18px 40px -24px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  pointer-events: none;
  opacity: 0; filter: blur(4px);
  transition: opacity .25s var(--ease), filter .25s var(--ease);
}
.rmap-tip.is-on { opacity: 1; filter: none; }
.rmap-tip__kind {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3);
}
.rmap-tip__kind::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--c); box-shadow: 0 0 8px var(--c);
}
.rmap-tip__title { font-size: .86rem; font-weight: 500; line-height: 1.35; color: var(--text); text-wrap: balance; }
.rmap-tip__meta { font-size: .74rem; color: var(--text-2); font-style: italic; }
.rmap-tip__near { font-size: .72rem; line-height: 1.45; color: var(--text-3); margin-top: 2px; }
.rmap-tip__go { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .06em; color: var(--c); margin-top: 2px; }

/* hero legend: one fixed row of controls, caption on its own line so nothing shifts */
.rmap-legend {
  position: absolute; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  animation: rmap-in 1.4s var(--ease) 1.4s backwards;
}
.rmap-legend[hidden] { display: none; }
@keyframes rmap-in { from { opacity: 0; filter: blur(6px); translate: 0 6px; } }
.rmap-legend__row { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.rmap-legend__title {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-2);
}
.rmap-legend__hint {
  margin: 0; max-width: 100%; height: 1.4em;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: right;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .04em;
  color: var(--text-3); transition: color .3s;
}
.rmap-legend__hint.is-flash { color: var(--accent); }
.rmap-legend ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.rmap-dot {
  display: grid; place-items: center;
  width: 18px; height: 18px; padding: 0; border-radius: 50%;
  background: none; border: 1px solid transparent; cursor: pointer;
  transition: border-color .25s, transform .35s var(--spring);
}
.rmap-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 8px var(--c);
}
:root[data-theme="light"] .rmap-dot, :root[data-theme="light"] .rmap-chip { --c: var(--c-light); }
.rmap-dot:hover, .rmap-dot:focus-visible { transform: scale(1.25); }
.rmap-dot[aria-pressed="true"] { border-color: color-mix(in srgb, var(--c) 60%, transparent); }

.rmap-tools { display: flex; gap: 2px; }
.rmap-tool, .rmap-zoom button {
  display: grid; place-items: center;
  width: 24px; height: 24px; padding: 0; border-radius: 50%;
  font: 500 .9rem/1 var(--font-mono); color: var(--text-2);
  background: none; border: 1px solid var(--border); cursor: pointer;
  transition: color .25s, border-color .25s, background-color .25s, transform .35s var(--spring);
}
.rmap-tool[hidden] { display: none; }
.rmap-tool svg, .rmap-zoom svg { width: 12px; height: 12px; }
.rmap-tool:hover, .rmap-zoom button:hover { color: var(--text); border-color: var(--border-hi); background: var(--accent-soft); }
.rmap-tool:active, .rmap-zoom button:active { transform: scale(.9); }

.rmap-expand {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  font: 500 .72rem var(--font-mono); letter-spacing: .04em; color: var(--text);
  background: var(--accent-soft); border: 1px solid var(--border-hi); cursor: pointer;
  box-shadow: 0 0 18px -8px var(--nav-glow);
  transition: background-color .3s, box-shadow .3s, transform .35s var(--spring);
}
.rmap-expand svg { width: 13px; height: 13px; transition: transform .45s var(--spring); }
.rmap-expand:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: 0 0 26px -6px var(--nav-glow); transform: translateY(-1px); }
.rmap-expand:hover svg { transform: scale(1.18); }

.hero.rmap-grab { cursor: grab; }
.hero.rmap-dragging, .hero.rmap-dragging * { cursor: grabbing !important; user-select: none; }

/* map triggers in the intro: portrait + (narrow screens) a pill */
.avatar.is-map-trigger { cursor: zoom-in; }
.pill--map { font: inherit; font-size: .88rem; cursor: pointer; }
.pill--map[hidden] { display: none; }
.hero[data-rmap="bg"] .pill--map { display: inline-flex; } /* only once the map script is running */

/* ---------- Research map: full-screen explorer ---------- */
.rmap-lock { overflow: hidden; }
.rmap-full { position: fixed; inset: 0; z-index: 90; overscroll-behavior: contain; }
.rmap-full[hidden] { display: none; }
.rmap-full.is-fading { opacity: 0; transition: opacity .3s var(--ease); }
.rmap-full__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 65%),
    color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  opacity: 0; transition: opacity .7s var(--ease);
}
.rmap-full.is-open .rmap-full__veil { opacity: 1; }
.rmap-full__canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.rmap-full__canvas.is-pointing { cursor: pointer; }
.rmap-full__canvas.is-dragging { cursor: grabbing; }

.rmap-full__bar, .rmap-full__foot {
  position: absolute; left: 0; right: 0;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 22px clamp(16px, 3vw, 32px);
  pointer-events: none;
}
.rmap-full__bar { top: 0; align-items: flex-start; padding-top: calc(22px + env(safe-area-inset-top)); }
.rmap-full__foot { bottom: 0; align-items: flex-end; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.rmap-full__bar > *, .rmap-full__foot > * { pointer-events: auto; }
.rmap-full__head h2 {
  margin: 4px 0 2px;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.05;
}
.rmap-full__head h2 em { color: var(--accent); }
.rmap-full__method { margin: 0; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .04em; color: var(--text-3); }
.rmap-full__close {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  color: var(--text); background: var(--nav-bg); border: 1px solid var(--nav-border);
  box-shadow: 0 0 22px -6px var(--nav-glow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  cursor: pointer; transition: transform .45s var(--spring), background-color .3s;
}
.rmap-full__close svg { width: 18px; height: 18px; }
.rmap-full__close:hover { transform: rotate(90deg); background: var(--nav-active); }

.rmap-chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 760px; }
.rmap-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  font: 500 .7rem var(--font-mono); letter-spacing: .03em; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: color .25s, border-color .25s, background-color .25s, transform .35s var(--spring);
}
.rmap-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.rmap-chip span { color: var(--text-3); }
.rmap-chip:hover, .rmap-chip:focus-visible { color: var(--text); border-color: color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-1px); }
.rmap-chip[aria-pressed="true"] { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }

.rmap-full__side { display: flex; align-items: center; gap: 14px; }
.rmap-full__help { margin: 0; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .04em; color: var(--text-3); white-space: nowrap; }
.rmap-zoom {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--nav-bg); border: 1px solid var(--nav-border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.rmap-zoom button { width: 34px; height: 34px; border-color: transparent; font-size: 1.05rem; }
.rmap-zoom svg { width: 14px; height: 14px; }

/* chrome drifts in after the map has started to grow */
.rmap-full__bar, .rmap-full__foot { opacity: 0; filter: blur(6px); translate: 0 8px; transition: opacity .5s var(--ease), filter .5s var(--ease), translate .6s var(--ease); }
.rmap-full__bar { translate: 0 -8px; }
.rmap-full.is-open .rmap-full__bar, .rmap-full.is-open .rmap-full__foot { opacity: 1; filter: none; translate: 0 0; transition-delay: .35s; }

.rmap-full__tip { z-index: 2; }
.rmap-tip.is-touch { pointer-events: auto; }
.rmap-tip__open {
  align-self: flex-start; padding: 0; margin-top: 4px;
  font: inherit; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em;
  color: var(--c); background: none; border: 0; cursor: pointer;
}
.rmap-tip.is-touch .rmap-tip__open {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.rmap-tip.is-dock {
  position: fixed; left: 12px; right: 12px; top: auto;
  bottom: calc(118px + env(safe-area-inset-bottom));
  width: auto; max-width: none; transform: none !important;
}

@media (max-width: 720px) {
  .rmap-full__bar { padding-top: calc(16px + env(safe-area-inset-top)); }
  .rmap-full__method, .rmap-full__help { display: none; }
  .rmap-full__foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .rmap-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
  .rmap-chips::-webkit-scrollbar { display: none; }
  .rmap-chip { flex: none; }
  .rmap-full__side { justify-content: flex-end; }
}

.rmap-word { cursor: crosshair; transition: color .3s, text-shadow .3s; }
.hero__lede strong.rmap-word:hover { color: var(--accent); }
.interests__track span.rmap-word:hover { color: var(--text-2); }

/* card glow when the map jumps to it */
.is-flash { animation: rmap-flash 2.2s var(--ease); }
@keyframes rmap-flash {
  0%, 35% { border-color: var(--border-hi); box-shadow: 0 0 0 1px var(--accent), 0 0 48px -10px var(--nav-glow); }
}

/* hero entrance: pure CSS so the intro paints on the very first frame
   (it drifts into focus rather than fading in from nothing) */
.hero__body > * { animation: hero-in 1.1s var(--ease) backwards; }
.hero__body > :nth-child(2) { animation-delay: .08s; }
.hero__body > :nth-child(3) { animation-delay: .16s; }
.hero__body > :nth-child(4) { animation-delay: .24s; }
@keyframes hero-in { from { filter: blur(10px); translate: 0 14px; } }

/* ---------- Now (current work) ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card {
  padding: 26px 24px 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .4s, transform .5s var(--ease), background-color .4s;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-4px); background: var(--surface-hi); }
.card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; line-height: 1.15; margin: 0; }
.card p, .card li { color: var(--text-2); font-size: .94rem; }
.card p { margin: 0; }
.card ul { margin: 0; padding-left: 1.1em; }
.card li { margin-bottom: 4px; }
.card li::marker { color: var(--accent); }
.card__where { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.card__where a { text-decoration: none; }
.card__glyph {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 4px;
}
.card__glyph svg { width: 22px; height: 22px; }

/* ---------- Publications ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font: 500 .8rem var(--font-body);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text-2);
  transition: all .25s;
}
.chip:hover { color: var(--text); border-color: var(--border-hi); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .n { font-family: var(--font-mono); font-size: .72rem; opacity: .7; margin-left: 4px; }

.year {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px;
  padding-top: 12px;
}
.year + .year { margin-top: 18px; }
.year__label {
  font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--text-3);
  position: sticky; top: 92px; align-self: start; padding-top: 22px;
}
.year__list { display: grid; gap: 14px; }
.year.is-empty { display: none; }

.pub {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px;
  padding: 16px; align-items: start;
  transition: border-color .4s, background-color .4s, transform .5s var(--ease), opacity .4s, filter .4s;
}
.pub:hover { border-color: var(--border-hi); background: var(--surface-hi); }
.pub[hidden] { display: none; }

.thumb {
  position: relative; overflow: hidden; border-radius: var(--radius-s);
  aspect-ratio: 16 / 10; background: var(--bg-2);
  isolation: isolate;
}
.thumb img, .thumb video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.75) contrast(.95) brightness(.92);
  transform: scale(1.04);
  transition: filter .7s var(--ease), transform 1.2s var(--ease), opacity .5s;
}
.thumb::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(160deg, var(--thumb-tint), transparent 70%);
  mix-blend-mode: screen; transition: opacity .6s;
}
.thumb video { opacity: 0; z-index: 1; }
.pub:hover .thumb img, .pub:hover .thumb video,
.pub:focus-within .thumb img, .pub:focus-within .thumb video { filter: none; transform: scale(1); }
.pub:hover .thumb::after, .pub:focus-within .thumb::after { opacity: 0; }
.pub.is-playing .thumb video { opacity: 1; }
.thumb__play {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: rgba(10, 10, 14, .6); color: #e9e6f5;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity .3s;
}
.pub.is-playing .thumb__play { opacity: 0; }

/* generated placeholder thumbnails */
.thumb--gen {
  display: grid; place-items: center;
  background:
    radial-gradient(60% 80% at 20% 30%, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 70%),
    radial-gradient(50% 60% at 85% 80%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
    var(--bg-2);
}
.thumb--gen::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .03) 3px 4px);
}
.thumb--gen span {
  position: relative; z-index: 3;
  font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: #f2efff;
  text-shadow: 0 0 24px rgba(166, 140, 255, .8);
  filter: blur(.3px);
}

.pub h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.04rem; line-height: 1.35; margin: 2px 0 6px; letter-spacing: -.005em; }
.pub h3 a { text-decoration: none; }
.pub h3 a:hover { text-decoration: underline; }
.pub__authors { font-size: .86rem; color: var(--text-2); margin: 0 0 6px; }
.pub__authors b { color: var(--text); font-weight: 600; }
.pub__venue { margin: 0 0 8px; font-size: .86rem; }
.pub__venue .badge { margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.pub__venue i { font-style: italic; color: var(--text); }
.pub__blurb { font-size: .88rem; color: var(--text-2); margin: 0 0 10px; }
.badge {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-hi); color: var(--accent);
}
.badge--award { border-color: transparent; background: var(--accent-soft); }
.pub__links { display: flex; flex-wrap: wrap; gap: 6px; }
.pub__links a {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--border); color: var(--text-2);
  transition: all .25s;
}
.pub__links a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- Timeline ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.sub { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin: 0 0 18px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--accent), var(--border) 40%, transparent);
}
.timeline li { position: relative; padding: 0 0 26px 30px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--text-3);
  transition: border-color .3s, background-color .3s, box-shadow .3s;
}
.timeline li:first-child::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px var(--accent); }
.timeline li:hover::before { border-color: var(--accent); }
.timeline__when { font-family: var(--font-mono); font-size: .72rem; color: var(--text-3); letter-spacing: .04em; }
.timeline h3 { margin: 2px 0 0; font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
.timeline p { margin: 2px 0 0; font-size: .9rem; color: var(--text-2); }

.edu { padding: 24px; display: grid; gap: 22px; }
.edu h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; margin: 2px 0 2px; line-height: 1.2; }
.edu p { margin: 0; font-size: .9rem; color: var(--text-2); }
.edu hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* ---------- Teaching / projects list ---------- */
.rows { display: grid; gap: 14px; }
.row { padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; transition: border-color .4s, background-color .4s; }
.row:hover { border-color: var(--border-hi); background: var(--surface-hi); }
.row h3 { margin: 0; font-size: 1.04rem; font-weight: 600; }
.row .when { font-family: var(--font-mono); font-size: .74rem; color: var(--text-3); white-space: nowrap; }
.row p { grid-column: 1 / -1; margin: 0; font-size: .92rem; color: var(--text-2); }
.row .where { grid-column: 1 / -1; font-size: .86rem; color: var(--accent); margin-top: -2px; }

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: border-color .4s, transform .5s var(--ease); }
.project:hover { border-color: var(--border-hi); transform: translateY(-4px); }
.project .thumb { border-radius: 0; aspect-ratio: 16 / 8; }
.project:hover .thumb img { filter: none; transform: scale(1); }
.project:hover .thumb::after { opacity: 0; }
.project__body { padding: 20px 22px 22px; }
.project h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; line-height: 1.2; margin: 4px 0 8px; }
.project p { margin: 0; font-size: .9rem; color: var(--text-2); }

/* ---------- Art & writing ---------- */
.art { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
.art__feature { padding: 28px; position: relative; overflow: hidden; }
.art__feature::before {
  content: ""; position: absolute; width: 320px; height: 320px; right: -110px; top: -110px; border-radius: 50%;
  background: var(--accent-2); filter: blur(90px); opacity: .14; pointer-events: none;
}
.art__logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 14px; filter: drop-shadow(0 0 18px rgba(166, 140, 255, .5)); }
:root[data-theme="light"] .art__logo { filter: invert(1) drop-shadow(0 0 14px rgba(106, 70, 245, .35)); }
.art h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; margin: 0 0 6px; line-height: 1.1; }
.art__feature > p { color: var(--text-2); margin: 0 0 20px; }
.art__item { border-top: 1px solid var(--border); padding: 16px 0 0; margin-top: 16px; }
.art__item h4 { margin: 0 0 4px; font-size: 1rem; font-weight: 600; }
.art__item h4 em { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; }
.art__item p { margin: 0; font-size: .9rem; color: var(--text-2); }
.art__side { display: grid; gap: 18px; align-content: start; }
.art__side .card { gap: 8px; }
.art__figure { margin: 0; }
.art__figure:hover .thumb img { filter: none; transform: scale(1); }
.art__figure:hover .thumb::after { opacity: 0; }
.art__figure figcaption { padding: 14px 18px 16px; font-size: .86rem; color: var(--text-2); }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.skills dl { margin: 0; }
.skills div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.skills dt { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding-top: 3px; }
.skills dd { margin: 0; font-size: .92rem; color: var(--text-2); }

/* ---------- Contact / footer ---------- */
.contact { padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; text-align: center; }
.contact::before {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent);
  filter: blur(30px); pointer-events: none; z-index: -1;
}
.contact h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; margin: 10px 0 18px; }
.contact h2 em { color: var(--accent); }
.contact > p { color: var(--text-2); max-width: 34em; margin: 0 auto 26px; }

.addr { display: inline-grid; gap: 10px; text-align: left; margin: 0 auto; max-width: 100%; }
.addr code {
  display: block;
  font-family: var(--font-mono); font-size: clamp(.78rem, 2.4vw, .95rem);
  padding: 12px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--border);
  color: var(--text-2); overflow-x: auto; white-space: nowrap;
  user-select: all;
}
.addr .s { color: var(--accent); }
.addr .c { color: var(--text-3); }
.contact .links { justify-content: center; }

footer { padding: 48px 0 40px; font-size: .82rem; color: var(--text-3); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--text-3); }

/* ---------- Reveal on scroll (dream-focus) ---------- */
.js .reveal {
  opacity: 0;
  filter: blur(14px);
  translate: 0 18px;
}
.js .reveal.is-in {
  opacity: 1; filter: none; translate: none;
  transition:
    opacity 1s var(--ease) var(--d, 0s),
    filter 1.1s var(--ease) var(--d, 0s),
    translate 1s var(--ease) var(--d, 0s),
    transform .5s var(--ease), border-color .4s, background-color .4s;
}

/* publication filter: entries drift back into focus */
.pub.is-entering { animation: dream-in .7s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes dream-in { from { opacity: 0; filter: blur(10px); translate: 0 10px; } }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .cards { grid-template-columns: 1fr; }
  .split, .art, .skills { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 24px; }
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .hero { padding-top: 84px; }

  /* floating bottom dock */
  .nav { top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); padding: 0 10px; }
  .nav__inner { padding: 5px; gap: 0; transform-origin: 50% 100%; animation-name: dock-in; }
  .nav__mark { display: none; }
  .nav__links { overflow: visible; gap: 0; }
  .nav__links a { padding: 10px; }
  .nav__links svg { display: block; }
  .nav__links a.is-active svg { transform: translateY(-1px) scale(1.08); }
  .nav__links a { text-shadow: none !important; }
  .nav__links a:active svg { transform: scale(.88); }
  .nav__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  @media (hover: hover) {
    .nav__links a:hover svg {
      transform: translateY(-3px) scale(1.14);
      color: var(--accent);
      filter: drop-shadow(0 0 6px var(--nav-glow));
    }
    /* floating label above the hovered icon */
    .nav__label {
      left: 50%; bottom: calc(100% + 14px);
      width: auto; height: auto; overflow: visible; clip: auto;
      padding: 5px 10px; border-radius: 999px;
      font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em;
      color: var(--text);
      background: var(--nav-bg); border: 1px solid var(--nav-border);
      box-shadow: 0 0 16px -6px var(--nav-glow);
      -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
      opacity: 0; pointer-events: none;
      transform: translate(-50%, 6px) scale(.92); filter: blur(4px);
      transition: opacity .3s var(--ease), transform .45s var(--spring), filter .3s var(--ease);
    }
    .nav__links a:hover .nav__label { opacity: 1; transform: translate(-50%, 0); filter: none; }
  }
  .theme-toggle { width: 40px; height: 40px; margin-left: 2px; border-color: transparent; }

  .brand { display: block; animation: nav-in .9s var(--ease) backwards .1s; }

  /* scrolling down: dock shrinks, name chip floats away; scrolling up restores */
  .nav-compact .nav__inner { transform: translateY(4px) scale(.8); opacity: .94; }
  .nav-compact .brand { transform: translateY(calc(-100% - 20px)); opacity: 0; }
  .year { grid-template-columns: 1fr; gap: 6px; }
  .year__label { position: static; padding-top: 0; font-size: 1.6rem; }
  .pub { grid-template-columns: 1fr; gap: 14px; padding: 12px; }
  .skills div { grid-template-columns: 1fr; gap: 4px; }
  .row { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .nav__links a { padding: 9px 8px; }
  .theme-toggle { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; filter: none; translate: none; }
}
