/* ──────────────────────────────────────────────────────────────
   Zhe Monica Zhong — personal site
   Palette comes from the lab's own images: the blue-black of a
   darkened microscope room, GFP green, magenta counter-stain,
   and an amber for antibodies.
   ────────────────────────────────────────────────────────────── */

:root {
  --ink: #060a17;
  --ink-2: #0b1124;
  --ink-3: #141b33;
  --paper: #f3f5f2;
  --paper-2: #e8ece7;
  --white: #ffffff;
  --text: #0c1322;
  --muted: #56616f;
  --rule: rgba(12, 19, 34, 0.14);
  --rule-dark: rgba(255, 255, 255, 0.14);
  --on-dark: #eef2f6;
  --on-dark-muted: #9aa5b8;

  --gfp: #45e6a0;
  --gfp-deep: #0a7453;
  --mag: #e77df0;
  --mag-deep: #93309a;
  --amber: #ffc861;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--gfp);
  color: var(--ink);
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--gfp);
  color: var(--ink);
  font-weight: 600;
  border-radius: 6px;
}

.skip:focus {
  top: 12px;
}

/* ───────────── Type primitives ───────────── */

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.9em;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gfp-deep);
}

.eyebrow span + span::before {
  content: "/";
  margin-right: 0.9em;
  opacity: 0.45;
}

[data-tone="dark"] .eyebrow {
  color: var(--gfp);
}

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}

.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--gfp-deep);
}

[data-tone="dark"] .display em {
  color: var(--gfp);
}

.section-head {
  display: grid;
  gap: 1.1rem;
  max-width: 46rem;
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}

.section-head-row {
  max-width: none;
  grid-template-columns: 1fr auto;
  align-items: end;
}

.section-head-row > div {
  display: grid;
  gap: 1.1rem;
}

.section-lead {
  max-width: 34rem;
  font-size: 1.125rem;
  color: var(--muted);
}

[data-tone="dark"] .section-lead {
  color: var(--on-dark-muted);
}

/* ───────────── Buttons ───────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.82em 1.35em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    transform 0.35s var(--ease),
    background-color 0.25s,
    border-color 0.25s,
    color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-solid {
  background: var(--gfp);
  color: var(--ink);
}

.btn-solid:hover {
  background: #6ff0b6;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--on-dark);
}

.btn-ghost:hover {
  border-color: var(--on-dark);
}

.btn-line {
  border-color: var(--rule);
  color: var(--text);
}

.btn-line:hover {
  border-color: var(--text);
}

/* ───────────── Progress + nav ───────────── */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--gfp);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
  padding-inline: var(--gutter);
  color: var(--on-dark);
  transition:
    color 0.35s,
    background-color 0.35s,
    border-color 0.35s,
    transform 0.45s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(6, 10, 23, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--rule-dark);
}

.nav[data-tone="light"] {
  color: var(--text);
}

.nav[data-tone="light"].is-scrolled {
  background: rgba(243, 245, 242, 0.78);
  border-bottom-color: var(--rule);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-brand svg {
  width: 26px;
  height: 26px;
  color: var(--amber);
}

.nav-brand svg .lc {
  stroke: var(--gfp);
}

.nav[data-tone="light"] .nav-brand svg {
  color: var(--text);
}

.nav[data-tone="light"] .nav-brand svg .lc {
  stroke: var(--gfp-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  padding: 0.4rem 0;
  opacity: 0.78;
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a.is-current {
  opacity: 1;
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.is-current::after {
  transform: scaleX(1);
}

.nav-links .nav-cta {
  padding: 0.5rem 1rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 1;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  width: 22px;
  height: 12px;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}

.nav-toggle-icon::before {
  top: 0;
}

.nav-toggle-icon::after {
  bottom: 0;
}

.menu-open .nav-toggle-icon::before {
  transform: translateY(5px) rotate(45deg);
}

.menu-open .nav-toggle-icon::after {
  transform: translateY(-5px) rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-end;
  padding: 96px var(--gutter) max(40px, env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--on-dark);
  opacity: 0;
  transition: opacity 0.3s;
}

.menu[hidden] {
  display: none;
}

.menu-open .menu {
  opacity: 1;
}

.menu nav {
  display: grid;
  width: 100%;
}

.menu a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule-dark);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 9vw, 2.6rem);
  letter-spacing: -0.02em;
}

.menu a span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--gfp);
}

.menu-open .nav,
.menu-open .nav[data-tone="light"].is-scrolled {
  color: var(--on-dark);
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.menu-open .nav .nav-brand svg {
  color: var(--amber);
}

/* ───────────── Hero ───────────── */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px 0 clamp(56px, 9vh, 104px);
  color: var(--on-dark);
  background:
    radial-gradient(60% 55% at 78% 30%, rgba(69, 230, 160, 0.09), transparent 70%),
    radial-gradient(45% 45% at 92% 82%, rgba(231, 125, 240, 0.08), transparent 70%), var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.hero-canvas,
.contact-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 10, 23, 0.86) 0%, rgba(6, 10, 23, 0.5) 38%, rgba(6, 10, 23, 0) 66%),
    linear-gradient(0deg, var(--ink) 0%, rgba(6, 10, 23, 0) 26%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  gap: clamp(1.1rem, 2.4vh, 1.8rem);
  justify-items: start;
  will-change: transform, opacity;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.5rem, 12.2vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
}

.hero-name .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.hero-name .line > span {
  display: block;
}

.hero-name em {
  font-style: italic;
  font-size: 0.34em;
  letter-spacing: -0.01em;
  color: var(--gfp);
  margin-left: 0.15em;
}

.hero-lead {
  max-width: 35rem;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.5;
  color: #cfd6e2;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.hero-legend {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(56px, 9vh, 104px);
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.hero-legend .k {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 1em;
}

.k-ab {
  background: var(--amber);
}

.k-ag {
  background: var(--mag);
}

.js .hero-name .line > span {
  transform: translateY(105%);
  animation: rise 1.15s var(--ease) forwards;
}

.js .hero-name .line:nth-child(2) > span {
  animation-delay: 0.12s;
}

.js .hero-eyebrow,
.js .hero-lead,
.js .hero-actions,
.js .hero-legend {
  opacity: 0;
  animation: fade-up 0.9s var(--ease) forwards;
}

.js .hero-eyebrow {
  animation-delay: 0.05s;
}

.js .hero-lead {
  animation-delay: 0.5s;
}

.js .hero-actions {
  animation-delay: 0.65s;
}

.js .hero-legend {
  animation-delay: 1s;
}

@keyframes rise {
  to {
    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ───────────── Scroll story ───────────── */

.story {
  position: relative;
  background: var(--ink);
  color: var(--on-dark);
}

.story-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.story-stage canvas {
  width: 100%;
  height: 100%;
}

.story-rail {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 1.1rem;
  font-size: 0;
  color: var(--on-dark-muted);
}

.story-rail li {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 2px;
  opacity: 0.4;
  transition:
    opacity 0.4s,
    color 0.4s;
}

.story-rail li::after {
  content: "";
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}

.story-rail li.is-active {
  opacity: 1;
  color: var(--gfp);
}

.story-rail li.is-active::after {
  width: 40px;
}

.story-steps {
  position: relative;
  margin-top: -100vh;
  margin-top: -100svh;
  pointer-events: none;
}

.step {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
}

.step-card {
  display: grid;
  gap: 1rem;
  max-width: 26.5rem;
  pointer-events: auto;
  opacity: 0.16;
  transform: translateY(14px);
  transition:
    opacity 0.6s,
    transform 0.8s var(--ease);
}

.step.is-active .step-card {
  opacity: 1;
  transform: none;
}

.story-steps::after {
  content: "";
  display: block;
  height: 45vh;
}

.step-card h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}

.step-card p:not(.eyebrow) {
  color: #c5cddb;
  font-size: 1.1rem;
  text-wrap: pretty;
}

.step-card p.step-note:not(.eyebrow) {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--on-dark-muted);
}

/* ───────────── About ───────────── */

.about,
.research,
.pubs,
.recognition {
  background: var(--paper);
  color: var(--text);
}

.about {
  padding: clamp(5rem, 12vw, 10rem) 0 clamp(4rem, 8vw, 7rem);
  border-radius: 28px 28px 0 0;
  margin-top: -28px;
  position: relative;
  z-index: 2;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.portrait-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper-2);
}

.portrait-frame img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center 20%;
  will-change: transform;
}

.portrait figcaption,
.fig figcaption {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-copy {
  display: grid;
  gap: 1.6rem;
}

.about-body {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: #2a3444;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  margin-top: 0.4rem;
}

.links a {
  display: inline-flex;
  gap: 0.4em;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.links a:hover {
  color: var(--gfp-deep);
  border-color: var(--gfp-deep);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-top: clamp(4rem, 9vw, 7.5rem);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--text);
}

.metric dd {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
  font-variant-numeric: tabular-nums;
}

.metric dt {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ───────────── Research ───────────── */

.research {
  padding: clamp(4rem, 9vw, 8rem) 0;
}

.area {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.area + .area {
  margin-top: clamp(4rem, 10vw, 9rem);
}

.area .fig {
  grid-column: 1 / span 7;
}

.area .area-copy {
  grid-column: 8 / span 5;
}

.area-flip .fig {
  grid-column: 6 / span 7;
  grid-row: 1;
}

.area-flip .area-copy {
  grid-column: 1 / span 5;
  grid-row: 1;
}

.fig-frame {
  position: relative;
  aspect-ratio: var(--ratio, 3 / 2);
  overflow: hidden;
  border-radius: 6px;
  background: #02040b;
}

.fig-frame::after {
  --c: rgba(255, 255, 255, 0.75);
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 16px no-repeat;
}

.fig-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.fig-plate .fig-frame {
  display: grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--rule);
}

.fig-plate .fig-frame::after {
  --c: rgba(12, 19, 34, 0.4);
}

.fig-plate img {
  width: min(82%, var(--w, 100%));
  height: auto;
}

/* Research illustrations (inline SVG, generated; see figure markup) */

.fig-art .fig-frame {
  background:
    radial-gradient(70% 70% at 50% 45%, rgba(69, 230, 160, 0.08), transparent 70%),
    radial-gradient(50% 50% at 88% 90%, rgba(231, 125, 240, 0.08), transparent 70%), var(--ink);
}

.art {
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  fill: rgba(238, 242, 246, 0.82);
  stroke: none;
}

.art .step-n {
  fill: var(--gfp);
}

.art .lead {
  stroke: rgba(238, 242, 246, 0.45);
  stroke-width: 1;
}

.art .lbl-dot {
  fill: rgba(238, 242, 246, 0.9);
}

.art .halo-g {
  fill: rgba(69, 230, 160, 0.1);
}

.art .halo-a {
  fill: rgba(255, 200, 97, 0.3);
}

.art .cell {
  fill: rgba(69, 230, 160, 0.22);
  stroke: var(--gfp);
  stroke-width: 1.4;
}

.art .nuc {
  fill: rgba(69, 230, 160, 0.6);
}

.art .bcr {
  stroke: rgba(69, 230, 160, 0.85);
  stroke-width: 1.1;
}

.art .ab {
  stroke: var(--amber);
  filter: drop-shadow(0 0 5px rgba(255, 200, 97, 0.7));
}

.art .ab-l {
  stroke: #ffe2aa;
}

.art .ag {
  stroke: var(--mag);
  filter: drop-shadow(0 0 5px rgba(231, 125, 240, 0.8));
}

.art .ag-d {
  fill: #f6beff;
  stroke: none;
}

.art .ag-b {
  fill: var(--mag);
  stroke: none;
}

.art .gel {
  fill: rgba(190, 214, 236, 0.07);
}

.art .gel-edge {
  stroke: rgba(214, 228, 244, 0.6);
  stroke-width: 1.5;
}

.art .mesh {
  stroke: rgba(200, 220, 240, 0.13);
  stroke-width: 1;
}

.art .mesh-m {
  stroke: rgba(231, 125, 240, 0.4);
  stroke-width: 1;
}

.art .shine {
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 2;
}

.art .stroma {
  fill: rgba(255, 200, 97, 0.14);
  stroke: rgba(255, 200, 97, 0.75);
  stroke-width: 1.3;
}

.art .stroma-n {
  fill: rgba(255, 200, 97, 0.6);
}

.art .slab {
  fill: rgba(190, 214, 236, 0.05);
  stroke: rgba(214, 228, 244, 0.55);
  stroke-width: 1.5;
}

.art .slab-back {
  stroke: rgba(214, 228, 244, 0.18);
  stroke-width: 1.5;
}

.art .chan {
  stroke: var(--gfp);
  stroke-width: 3;
}

.art .chan-glow {
  stroke: rgba(69, 230, 160, 0.35);
  stroke-width: 9;
  filter: blur(5px);
}

.art .flow {
  stroke: #eafff5;
  stroke-width: 1.6;
  stroke-dasharray: 5 21;
  animation: art-flow 1.5s linear infinite;
}

.art .chamber {
  fill: rgba(69, 230, 160, 0.14);
  stroke: var(--gfp);
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(69, 230, 160, 0.55));
}

.art .port {
  fill: var(--ink);
  stroke: var(--gfp);
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(69, 230, 160, 0.7));
}

.art .port-in {
  fill: var(--gfp);
}

.art .mask {
  fill: rgba(214, 228, 244, 0.72);
}

.art .ray {
  stroke: rgba(231, 125, 240, 0.75);
  stroke-width: 1.3;
}

.art .beam {
  animation: art-beam 3.4s ease-in-out infinite;
}

.art .zone {
  stroke: rgba(231, 125, 240, 0.75);
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
}

.art .person {
  stroke-width: 2.2;
  stroke: rgba(214, 228, 244, 0.5);
}

.art .p-gfp {
  stroke: var(--gfp);
  fill: rgba(69, 230, 160, 0.12);
  filter: drop-shadow(0 0 6px rgba(69, 230, 160, 0.5));
}

.art .p-mag {
  stroke: var(--mag);
  fill: rgba(231, 125, 240, 0.1);
}

.art .p-dim {
  fill: rgba(214, 228, 244, 0.06);
}

.art .glass,
.art .plate,
.art .well {
  stroke: rgba(214, 228, 244, 0.55);
  stroke-width: 1.5;
}

.art .plate {
  fill: rgba(190, 214, 236, 0.05);
}

.art .well {
  stroke: rgba(214, 228, 244, 0.28);
  stroke-width: 1;
}

.art .liquid {
  fill: rgba(69, 230, 160, 0.16);
}

.art .dome {
  fill: rgba(190, 214, 236, 0.1);
  stroke: rgba(214, 228, 244, 0.6);
  stroke-width: 1;
}

.art .axis {
  stroke: rgba(214, 228, 244, 0.5);
  stroke-width: 1.2;
}

.art .bar-bg {
  fill: rgba(238, 242, 246, 0.1);
}

.art .bar {
  fill: var(--amber);
  filter: drop-shadow(0 0 5px rgba(255, 200, 97, 0.6));
  transform-box: fill-box;
  transform-origin: 0 50%;
  transition: transform 1.1s var(--ease);
}

.js .fig-art:not(.is-in) .bar {
  transform: scaleX(0);
}

.art .arrow {
  stroke: rgba(238, 242, 246, 0.7);
  stroke-width: 1.4;
  stroke-dasharray: 4 6;
  animation: art-arrow 1.2s linear infinite;
}

.art .arrow-h {
  stroke: rgba(238, 242, 246, 0.8);
  stroke-width: 1.4;
}

.art .pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: art-pulse 4.2s ease-in-out infinite;
}

.fig-art:not(.is-in) .art * {
  animation-play-state: paused;
}

@keyframes art-flow {
  to {
    stroke-dashoffset: -26;
  }
}

@keyframes art-arrow {
  to {
    stroke-dashoffset: -10;
  }
}

@keyframes art-beam {
  50% {
    opacity: 0.45;
  }
}

@keyframes art-pulse {
  50% {
    transform: scale(1.09);
  }
}

@media (max-width: 820px) {
  .art .lbl {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art * {
    animation: none !important;
    transition: none !important;
  }
}

.fig figcaption span {
  margin-right: 1em;
  color: var(--gfp-deep);
}

.area-copy {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.area-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--gfp-deep);
}

.area-copy h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}

.area-copy > p:not(.area-num) {
  font-size: 1.125rem;
  color: #2a3444;
  max-width: 28rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tags li,
.tag {
  padding: 0.3em 0.8em;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ───────────── Publications ───────────── */

.pubs {
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(5rem, 11vw, 10rem);
}

.pub-list {
  border-bottom: 1px solid var(--rule);
}

.pub {
  position: relative;
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) 2.5rem;
  gap: 1.5rem;
  align-items: start;
  padding: 1.7rem 0;
  border-top: 1px solid var(--rule);
}

.pub::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -0.5);
  background: var(--white);
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.99);
  transition:
    opacity 0.3s,
    transform 0.4s var(--ease);
  z-index: 0;
}

.pub:hover::before {
  opacity: 1;
  transform: none;
}

.pub > * {
  position: relative;
  z-index: 1;
}

.pub-year {
  padding-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.pub-selected .pub-year {
  color: var(--gfp-deep);
}

.pub-selected .pub-year::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.6em;
  border-radius: 50%;
  background: var(--gfp-deep);
  vertical-align: 0.08em;
}

.pub-main {
  display: grid;
  gap: 0.5rem;
  max-width: 52rem;
}

.pub h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 40;
  text-wrap: pretty;
}

.pub h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.pub:hover h3 {
  color: var(--gfp-deep);
}

.pub-authors {
  font-size: 0.95rem;
  color: var(--muted);
}

.pub-authors b {
  color: var(--text);
  font-weight: 600;
}

.pub-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35em 0.5em;
  font-size: 0.95rem;
}

.pub-venue i {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.pub-venue .tag {
  margin-left: 0.4em;
  border-color: var(--gfp-deep);
  color: var(--gfp-deep);
}

.pub-arrow {
  justify-self: end;
  padding-top: 0.2rem;
  font-size: 1.2rem;
  color: var(--muted);
  transition:
    transform 0.35s var(--ease),
    color 0.2s;
}

.pub:hover .pub-arrow {
  transform: translate(3px, -3px);
  color: var(--gfp-deep);
}

/* ───────────── Journey (the chip) ───────────── */

.journey {
  position: relative;
  padding: clamp(5rem, 11vw, 10rem) 0 clamp(3rem, 7vw, 6rem);
  color: var(--on-dark);
  background:
    radial-gradient(50% 30% at 12% 18%, rgba(69, 230, 160, 0.08), transparent 70%),
    radial-gradient(50% 30% at 90% 80%, rgba(42, 74, 255, 0.1), transparent 70%), var(--ink);
  border-radius: 28px 28px 0 0;
  margin-top: -28px;
  z-index: 3;
}

.chip {
  --rail: 150px;
  position: relative;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
}

.chip-rail {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--rail);
  height: 100%;
  overflow: visible;
}

.chip-rail path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip-track {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 5;
}

.chip-fluid {
  stroke: var(--gfp);
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(69, 230, 160, 0.85));
}

.stops {
  grid-column: 2;
  display: grid;
}

.stop {
  position: relative;
  display: grid;
  gap: 0.55rem;
  max-width: 40rem;
  padding: 0 0 clamp(5rem, 11vw, 9rem) clamp(0.5rem, 3vw, 3rem);
  opacity: 0.38;
  transition: opacity 0.7s;
}

.stop:last-child {
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.stop.is-on {
  opacity: 1;
}

.stop-node {
  position: absolute;
  left: calc(var(--rail) / -2 - 9px);
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid rgba(255, 255, 255, 0.35);
  transition:
    background-color 0.5s,
    border-color 0.5s,
    box-shadow 0.5s;
}

.stop.is-on .stop-node {
  background: var(--gfp);
  border-color: var(--gfp);
  box-shadow:
    0 0 0 6px rgba(69, 230, 160, 0.16),
    0 0 22px rgba(69, 230, 160, 0.8);
}

.stop-when {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--gfp);
}

.stop h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}

.stop-role {
  font-weight: 600;
  color: var(--on-dark);
}

.stop-what {
  color: #c5cddb;
}

.stop-with {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--on-dark-muted);
}

/* ───────────── Recognition ───────────── */

.recognition {
  padding: clamp(5rem, 11vw, 10rem) 0;
  border-radius: 28px 28px 0 0;
  margin-top: -28px;
  position: relative;
  z-index: 4;
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(3rem, 6vw, 5rem) clamp(2rem, 6vw, 6rem);
}

.ledger h3 {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ledger li {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--rule);
}

.ledger .when {
  padding-top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--gfp-deep);
}

.ledger p {
  font-size: 0.95rem;
  color: var(--muted);
}

.ledger p b {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.008em;
  color: var(--text);
  font-variation-settings: "opsz" 30;
}

/* ───────────── Contact ───────────── */

.contact {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 92vh;
  min-height: 92svh;
  padding: clamp(6rem, 14vw, 11rem) 0 0;
  color: var(--on-dark);
  background:
    radial-gradient(55% 50% at 80% 30%, rgba(231, 125, 240, 0.09), transparent 70%),
    radial-gradient(45% 45% at 15% 80%, rgba(69, 230, 160, 0.08), transparent 70%), var(--ink);
  overflow: hidden;
  isolation: isolate;
  border-radius: 28px 28px 0 0;
  margin-top: -28px;
  z-index: 5;
}

.contact-canvas {
  opacity: 0.8;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(6, 10, 23, 0.88) 0%, rgba(6, 10, 23, 0.55) 45%, rgba(6, 10, 23, 0) 78%);
  pointer-events: none;
}

.contact-inner {
  display: grid;
  gap: 1.6rem;
  justify-items: start;
}

.contact .display {
  font-size: clamp(2.6rem, 7.6vw, 6.8rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.contact-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  width: 100%;
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: 1.4rem 0 max(1.6rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule-dark);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.contact-foot a:hover {
  color: var(--gfp);
}

/* ───────────── Reveal on scroll ───────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease),
    transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js .fig.reveal {
  transform: none;
}

.js .fig.reveal .fig-frame {
  clip-path: inset(0 0 100% 0 round 6px);
  transition: clip-path 1.3s var(--ease);
}

.js .fig.reveal.is-in .fig-frame {
  clip-path: inset(0 0 0 0 round 6px);
}

.js .portrait.reveal {
  transform: none;
}

.js .portrait.reveal .portrait-frame {
  clip-path: inset(100% 0 0 0 round 6px);
  transition: clip-path 1.3s var(--ease);
}

.js .portrait.reveal.is-in .portrait-frame {
  clip-path: inset(0 0 0 0 round 6px);
}

/* ───────────── Tablet ───────────── */

@media (max-width: 999px) {
  .story-rail {
    display: none;
  }

  .story-stage::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 62%;
    background: linear-gradient(0deg, var(--ink) 0%, rgba(6, 10, 23, 0.94) 52%, rgba(6, 10, 23, 0) 100%);
    pointer-events: none;
  }

  .step {
    align-items: flex-end;
    padding-bottom: max(7vh, 40px);
  }

  .step-card {
    gap: 0.75rem;
    max-width: 30rem;
  }
}

/* ───────────── Phone ───────────── */

@media (max-width: 820px) {
  body {
    font-size: 1rem;
  }

  .nav {
    height: 56px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    padding-top: 96px;
  }

  .hero-name {
    font-size: clamp(3.6rem, 17.5vw, 6rem);
  }

  .hero-shade {
    background:
      linear-gradient(0deg, var(--ink) 0%, rgba(6, 10, 23, 0.8) 36%, rgba(6, 10, 23, 0.1) 62%, rgba(6, 10, 23, 0) 100%);
  }

  .hero-legend {
    position: static;
    padding-inline: var(--gutter);
    margin-top: 1.6rem;
  }

  .hero-legend .k:first-child {
    margin-left: 0;
  }

  .hero {
    align-content: end;
  }

  .step-card p:not(.eyebrow) {
    font-size: 1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .portrait {
    max-width: 22rem;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.5rem;
  }

  .section-head-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .area {
    row-gap: 1.6rem;
  }

  .area .fig,
  .area .area-copy,
  .area-flip .fig,
  .area-flip .area-copy {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .pub {
    grid-template-columns: minmax(0, 1fr) 1.5rem;
    gap: 0.5rem 1rem;
    padding: 1.4rem 0;
  }

  .pub-year {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .chip {
    --rail: 52px;
  }

  .chip-track {
    stroke-width: 4;
  }

  .stop {
    padding-left: 0.75rem;
  }

  .stop-node {
    width: 14px;
    height: 14px;
    left: calc(var(--rail) / -2 - 7px);
  }

  .ledger-grid {
    grid-template-columns: 1fr;
  }

  .ledger li {
    grid-template-columns: 4.2rem minmax(0, 1fr);
  }

  .about,
  .journey,
  .recognition,
  .contact {
    border-radius: 20px 20px 0 0;
    margin-top: -20px;
  }

  .contact-foot {
    flex-direction: column;
  }
}

/* ───────────── Reduced motion ───────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .fig.reveal .fig-frame,
  .js .portrait.reveal .portrait-frame,
  .step-card,
  .stop {
    transition: none;
  }

  .js .hero-name .line > span,
  .js .hero-eyebrow,
  .js .hero-lead,
  .js .hero-actions,
  .js .hero-legend {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}
