/* =========================================================
   MARCO CHING PORTFOLIO · Hong Kong edition
   Layout: one bright, clear-water page. A 3D tower stands in the
   middle of the opening story with frosted cards either side; below
   it, light sections in a faint aqua wash. Palette from celestial blue, May green, yellow-green,
   pearl aqua and Cal Poly Pomona green. Interactive demos sit in
   deep-green panels (the .deep scope below re-points the tokens).
   Bilingual labels, an MTR-style route for experience.
   ========================================================= */

:root {
  color-scheme: light;

  /* Palette */
  --celestial: #4b97c0;
  --pomona: #144425;
  --may: #46953d;
  --yellow-green: #b5d984;
  --pearl-aqua: #82d1c5;

  /* Surfaces. The "-d" set is whatever surface you are on: light here, deep green inside .deep */
  --night: #f2faf8;         /* page: clear water */
  --night-2: #ffffff;       /* raised surfaces */
  --night-3: #e1f2ee;       /* wells, tracks */
  --line-d: #cfe5df;
  --text-d: var(--pomona);
  --muted-d: #41625a;
  --paper: #f2faf8;
  --paper-2: #e3f4f0;
  --ink: var(--pomona);
  --muted-p: #41625a;
  --line-p: #cfe5df;

  /* Signature + meaning */
  --neon: #2b77a1;          /* celestial blue, deepened to read as text on the page */
  --neon-rgb: 43, 119, 161;
  --on-neon: #ffffff;       /* text on a --neon fill */
  --neon-ink: #2b77a1;
  --green-ink: #2f7d2b;     /* May green, deepened for text */
  --name: #f5f0e6;          /* the name in the hero: warm off-white */
  --cyan: var(--celestial);
  --amber: #e0703a;         /* heat */

  /* Charts on light cards (dark / blue / orange separate for colour-blind readers too) */
  --c-overall: var(--pomona);
  --c-cool: #2b86c0;
  --c-heat: #e0703a;

  /* MTR line colours for the route map */
  --line-uw: #8a93a3;
  --line-airport: #00888a;  /* Airport Express */
  --line-ttc: #f8c300;      /* Toronto subway Line 1 */
  --line-tw: #e2231a;       /* Tsuen Wan line, Kwai Chung */

  /* Frosted glass */
  --glass: rgba(238, 249, 246, 0.46);   /* frosted, close to the scene's own tone so cards sit quietly in it */
  --glass-edge: rgba(255, 255, 255, 0.5);
  --glass-shade: rgba(20, 68, 37, 0.16);

  --b-lamp: #fff1c9;        /* luminaire glow in the 3D room, read by building.js */

  /* Type */
  --font-display: "Readex Pro", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --font-body: "Funnel Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-zh: "Noto Serif TC", "PMingLiU", "MingLiU", "Songti TC", serif;

  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 26px;
}

/* Deep water: demo panels, the toolbox and the closing sections (what's next, contact) are dark */
.deep, .demo, .toolbox {
  color-scheme: dark;
  --night: #144425;
  --night-2: #1b5230;
  --night-3: #22603a;
  --line-d: #2f7046;
  --text-d: #f1f8ef;
  --muted-d: #b6d0bf;
  --neon: var(--yellow-green);
  --neon-rgb: 181, 217, 132;
  --on-neon: var(--pomona);
  --cyan: #7cc3ea;
  --amber: #f29a62;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-edge: rgba(255, 255, 255, 0.16);
  color: var(--text-d);
}
.direction.deep { background: var(--night); }
.contact.deep, .footer.deep {          /* a step darker than What's next above */
  --night: #0b2615; --night-2: #12341f; --night-3: #194128; --line-d: #24502f;
  background: var(--night);
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text-d);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main, .footer { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
p { text-wrap: pretty; }   /* ragged right everywhere, no hyphen breaks; pretty avoids one-word last lines */
ul, ol { padding: 0; }
em { font-style: normal; color: var(--neon); }
::selection { background: var(--neon); color: var(--on-neon); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.zh { font-family: var(--font-zh); font-weight: 900; letter-spacing: 0.04em; white-space: nowrap; }

.label, .kicker {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-d);
}
.label .zh, .kicker .zh { font-size: 1rem; color: var(--neon); letter-spacing: 0.1em; }

/* Liquid glass */
.glass {
  background: linear-gradient(160deg, var(--glass-edge) 0%, transparent 40%) border-box, var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 20px 50px -20px var(--glass-shade);
}

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--gutter) 0;
  pointer-events: none;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin-inline: auto;
  min-height: 52px;
  padding: 6px 8px 6px 18px;
  border-radius: 999px;
  pointer-events: auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--celestial), var(--may)); }
.nav-links { display: flex; align-items: center; gap: clamp(10px, 2vw, 24px); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { font-size: 0.9375rem; color: var(--muted-d); text-decoration: none; white-space: nowrap; padding-block: 6px; }
.nav-links a:hover { color: var(--text-d); }
.nav-links { position: relative; }
.nav-links a:not(.nav-cta) { transition: color 300ms; }
.nav-links a[aria-current="true"] { color: var(--text-d); }
.nav-ink {                            /* underline that glides to the section you're in */
  position: absolute; left: 0; bottom: 2px; width: 0; height: 2px; border-radius: 2px; opacity: 0; pointer-events: none;
  background: var(--neon);
  transition: transform 600ms cubic-bezier(0.65, 0, 0.35, 1), width 600ms cubic-bezier(0.65, 0, 0.35, 1), opacity 300ms;
}
.nav-links .nav-cta { padding: 8px 16px; border-radius: 999px; background: var(--neon); color: var(--on-neon); font-weight: 600; }
.nav-links .nav-cta:hover { color: var(--on-neon); filter: brightness(1.1); }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 0.975rem; text-decoration: none; cursor: pointer;
  transition: box-shadow 160ms, filter 160ms;
}
.btn-neon { background: var(--neon); color: var(--on-neon); box-shadow: 0 0 0 0 var(--neon); }
.btn-neon:hover { box-shadow: 0 10px 24px -10px var(--neon); }
.btn-glass { background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--glass-edge); color: var(--text-d); }
.btn-glass:hover { box-shadow: inset 0 0 0 1.5px var(--neon); }

/* ---------- Scroll story ---------- */

.story { position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  --sky-a: #9fd3ea; --sky-b: #e8f6f3; --day: 0; --sx: 80%; --sy: 10%;
  background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 78%);
}
.sun-glare {                          /* warm glare and rays around the sun, faded in by daylight */
  position: absolute; inset: 0; pointer-events: none; opacity: var(--day);
  background:
    radial-gradient(circle at var(--sx) var(--sy), rgba(255, 236, 170, 0.75) 0, rgba(255, 200, 90, 0.35) 4%, rgba(255, 170, 60, 0.1) 16%, transparent 36%),
    repeating-conic-gradient(from 0deg at var(--sx) var(--sy), rgba(255, 210, 120, 0.055) 0deg 3deg, transparent 3deg 11deg);
  -webkit-mask-image: radial-gradient(circle at var(--sx) var(--sy), #000 0, #000 22%, transparent 70%);
  mask-image: radial-gradient(circle at var(--sx) var(--sy), #000 0, #000 22%, transparent 70%);
  mix-blend-mode: screen;
}
#building-canvas, #backdrop-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#backdrop-canvas { filter: blur(var(--focus-blur, 3px)); }   /* skyline and light show sit out of focus behind the tower */
.stage::after {                       /* at the end of the story the sunset fades into the next section */
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--paper-2) 70%, var(--paper));
  opacity: var(--end, 0);
}
.steps { position: relative; margin-top: -100vh; margin-top: -100svh; padding-bottom: 70vh; pointer-events: none; }
.step {
  display: flex; align-items: center; min-height: 100vh; min-height: 100svh;
  padding: 96px var(--gutter) 48px; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto;
}
.step-left, .step-right, .step-split { max-width: none; }
.step-right { justify-content: flex-end; }
.pair { display: flex; justify-content: space-between; align-items: stretch; gap: 24px; width: 100%; pointer-events: none; }
.pair > .step-card { pointer-events: auto; align-content: center; }
.pair.is-tall { align-items: center; }   /* "all 17 runs" grows the chart card; its partner keeps its own height */
.step-card.glass { border-radius: 32px; }   /* the bubbles */
.step-card { display: grid; gap: 14px; width: min(100%, clamp(300px, calc(50vw - var(--tower-half, 24vh) - var(--gutter) - 36px), 540px)); padding: clamp(20px, 2.6vw, 30px); border-radius: var(--radius); pointer-events: auto; }
.step-card h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.02; letter-spacing: -0.03em; }
.step-card > p:not(.kicker) { color: var(--muted-d); }
/* Background: full-screen text over the veil, a translucent white layer in the stage that covers the
   whole screen and simply fades in from the intro and out into Project 2.1 (story.js sets --veil),
   so there is no edge or gradient band. The words settle in gently as the panel arrives. */
.step.step-fill { display: block; padding: 0; max-width: none; }
.panel-full { display: flex; min-height: 100vh; min-height: 100svh; pointer-events: auto; }
.focus {                              /* Project 2.2: everything but the lit room goes soft (building.js sets the vars) */
  position: absolute; inset: 0; pointer-events: none; opacity: var(--focus, 0);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  -webkit-mask-image: radial-gradient(circle var(--fr, 300px) at var(--fx, 50%) var(--fy, 50%), transparent 72%, #000 100%);
  mask-image: radial-gradient(circle var(--fr, 300px) at var(--fx, 50%) var(--fy, 50%), transparent 72%, #000 100%);
}
.veil {
  position: absolute; inset: 0; pointer-events: none; opacity: var(--veil, 0);
  background: rgba(242, 250, 248, 0.48); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .panel-inner { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}
@keyframes settle { from { opacity: 0; transform: translateY(3vh); } }
.panel-inner {
  display: flex; flex-direction: column; gap: 24px; width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding: 104px var(--gutter) max(48px, 9vh);
}
.panel-inner .kicker { font-size: 0.875rem; }
.panel-body { display: grid; gap: clamp(20px, 3.5vh, 36px); margin-block: auto; }
.panel-title {
  max-width: 18ch;
  font-family: var(--font-display); font-weight: 800; color: var(--text-d);
  font-size: clamp(2.6rem, min(7vw, 11vh), 6.6rem); line-height: 0.95; letter-spacing: -0.045em;
}
.statement-text.panel-title { max-width: 21ch; font-weight: 700; font-size: clamp(2.2rem, min(5.4vw, 8.5vh), 5rem); line-height: 1.02; }
.panel-foot { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: end; }
.panel-lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--muted-d); max-width: 52ch; }
.panel-full .about-facts dd { font-size: clamp(1.15rem, 1.8vw, 1.6rem); }
.panel-full .marquee span { font-size: clamp(1.4rem, 2.6vw, 2.2rem); color: var(--muted-d); }
.step-card .proj-meta { color: var(--muted-d); margin-top: 6px; }
.step-card .proj-meta span { color: var(--neon); }
.step-title { font-family: var(--font-display); font-weight: 750; font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.05; letter-spacing: -0.03em; }
.step-card .proj-link { color: var(--neon); }
.proj-badge {                          /* where a new project starts: a big number and its name */
  display: flex; align-items: center; gap: 14px; padding-block: 4px 2px;
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.35; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-d);
}
.proj-badge-num {
  display: grid; place-items: center; min-width: 2.6em; height: 2.6em; padding-inline: 0.3em; border-radius: 16px;
  background: var(--neon); color: var(--on-neon);
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; text-transform: none;
}
.kicker-num { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; letter-spacing: 0; color: var(--neon); }
/* Project 2.2 carries a layout switch and two meters: keep the whole card on one screen, short laptop windows included. */
.step-card[data-demo="lighting"] { gap: 10px; width: min(100%, clamp(440px, calc(50vw - var(--tower-half, 24vh) - var(--gutter) - 36px), 540px)); }
.step-card[data-demo="lighting"] .meter > span { white-space: nowrap; }   /* value on line one, its limit on line two */
.step-card[data-demo="lighting"] h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.step-card[data-demo="lighting"] .seg { justify-self: start; }
@media (min-width: 721px) and (max-height: 820px) {
  .step[data-step="9"] { padding-block: 76px 12px; }
  .step-card[data-demo="lighting"] { gap: 8px; padding: 18px 22px; }
  .step-card[data-demo="lighting"] .proj-badge-num { font-size: 1.25rem; border-radius: 13px; }
  .step-card[data-demo="lighting"] > p:not(.proj-badge) { font-size: 0.95rem; line-height: 1.4; }
}
.about-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.about-facts div { padding-top: 10px; border-top: 2px solid rgba(20, 68, 37, 0.16); }
.about-facts dt { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-d); }
.about-facts dd { font-family: var(--font-display); font-weight: 750; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--text-d); font-variant-numeric: tabular-nums; }
.step-intro { align-items: stretch; padding-top: 84px; padding-bottom: 28px; }
/* Spare height is split evenly above and below the name. */
.intro { display: grid; grid-template-rows: auto minmax(18px, 1fr) auto minmax(18px, 1fr) auto; gap: 6px; width: 100%; pointer-events: auto; }
.intro > .kicker { grid-row: 1; justify-self: start; padding: 6px 12px; border-radius: 999px; color: var(--text-d); text-transform: none;
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }   /* readable over the 3D scene; keeps "BASc" as written */
.intro > .intro-foot { grid-row: 5; }
.giant-name {
  grid-row: 3;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3.4rem, min(15vw, 23vh), 12rem); line-height: 0.92; letter-spacing: -0.06em;
  color: var(--name); text-shadow: 0 3px 14px rgba(20, 68, 37, 0.35);   /* a soft drop shadow lifts the white off the sky */
}

@media (min-width: 721px) and (max-height: 640px) { .giant-name { font-size: 19vh; } }   /* short windows: the intro still fits one screen */
.intro-foot { display: grid; gap: 14px; max-width: 520px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--glass-edge); }
.lede { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.3; color: var(--text-d) !important; }
.step-card .intro-title { font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1; }   /* the projects' opening card: one big centred title */
.card-rule { width: 100%; height: 1px; margin: 6px 0 0; border: 0; background: rgba(20, 68, 37, 0.18); }
.card-hint { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-d); }

/* Charts (hero cards) */
.chart { display: grid; gap: 6px; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line-d); stroke-width: 1; }
.chart .axis-zero { stroke: var(--muted-d); stroke-width: 1; }
.chart .tick { font-family: var(--font-mono); font-size: 9px; fill: var(--muted-d); font-variant-numeric: tabular-nums; }
.chart .end-label { font-family: var(--font-body); font-size: 10px; fill: var(--text-d); font-variant-numeric: tabular-nums; }
.chart .cursor { stroke: var(--muted-d); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--night-2); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.tone-overall { --tone: var(--c-overall); }
.tone-cool { --tone: var(--c-cool); }
.tone-heat { --tone: var(--c-heat); }
.chart .line { stroke: var(--tone); }
.chart .dot { fill: var(--tone); }
.chart .bar-label { font-size: 10.5px; fill: var(--text-d); }
.chart .bar-value { font-family: var(--font-mono); font-size: 10px; fill: var(--text-d); }
.chart .bar-model { fill: var(--neon); }
.chart .bar-bench { fill: var(--muted-d); opacity: 0.45; }
.chart .bar-empty { fill: none; stroke: var(--muted-d); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .bar-empty-text { font-family: var(--font-mono); font-size: 9.5px; fill: var(--muted-d); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; font-size: 0.8125rem; color: var(--muted-d); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 3px; border-radius: 2px; background: var(--tone); }
.chart-readout { font-size: 0.8125rem; color: var(--muted-d); font-variant-numeric: tabular-nums; min-height: 2.6em; }

/* ---------- What's next (a story card) ---------- */

.statement-text {
  font-family: var(--font-display); font-weight: 600; color: var(--text-d);
  font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.06; letter-spacing: -0.035em;
}
.statement-text .w { opacity: 0.32; transition: opacity 300ms, color 300ms, text-shadow 300ms; }
.statement-text .w.on { opacity: 1; }
.statement-text b { font-weight: 600; }
.statement-text b .w.on { color: var(--neon); text-shadow: none; }
.marquee { overflow: hidden; border-block: 1px solid var(--glass-edge); padding-block: 12px; margin-top: 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 32px; width: max-content; animation: slide 38s linear infinite; }
.marquee span {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; white-space: nowrap;
  color: var(--muted-d);
}
.marquee span:nth-child(3n + 1) { color: var(--neon); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- What's next: the statement lights up word by word as it scrolls through ---------- */

.direction { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(96px, 13vw, 168px); }
.direction .wrap { position: relative; display: grid; gap: clamp(20px, 3.5vh, 36px); }
/* Looking out of a window at night: the city beyond is out of focus (soft discs of light) and the
   glass catches a faint reflection. */
.window {                              /* fades in from the top, so Skills' dark green runs straight into it */
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
}
.window-city {
  position: absolute; inset: -10%;
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 214, 140, 0.55) 0 2.2%, transparent 2.6%),
    radial-gradient(circle at 22% 62%, rgba(255, 196, 110, 0.45) 0 3%, transparent 3.4%),
    radial-gradient(circle at 31% 41%, rgba(130, 209, 197, 0.4) 0 1.8%, transparent 2.2%),
    radial-gradient(circle at 39% 74%, rgba(255, 230, 170, 0.4) 0 2.6%, transparent 3%),
    radial-gradient(circle at 47% 24%, rgba(124, 195, 234, 0.45) 0 2.4%, transparent 2.8%),
    radial-gradient(circle at 55% 58%, rgba(255, 214, 140, 0.5) 0 3.4%, transparent 3.8%),
    radial-gradient(circle at 63% 35%, rgba(181, 217, 132, 0.4) 0 2%, transparent 2.4%),
    radial-gradient(circle at 70% 70%, rgba(255, 120, 150, 0.35) 0 2.4%, transparent 2.8%),
    radial-gradient(circle at 78% 46%, rgba(255, 220, 160, 0.5) 0 2.8%, transparent 3.2%),
    radial-gradient(circle at 86% 22%, rgba(124, 195, 234, 0.4) 0 2%, transparent 2.4%),
    radial-gradient(circle at 92% 64%, rgba(255, 200, 120, 0.45) 0 3%, transparent 3.4%),
    radial-gradient(circle at 6% 80%, rgba(130, 209, 197, 0.35) 0 2.6%, transparent 3%),
    linear-gradient(180deg, #0c2a1a 0%, #13402a 55%, #1c4a33 100%);
  filter: blur(14px);
  transform: translateY(calc(var(--drift, 0) * 1px));            /* the view shifts a little as you scroll past (sections.js) */
}
.window-frame {
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.06) 38%, transparent 46%, transparent 62%, rgba(255, 255, 255, 0.04) 68%, transparent 74%);
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.45);   /* darker towards the edges, like a room around the glass */
}
.direction .statement-text, .direction .panel-lede { text-shadow: 0 2px 20px rgba(5, 20, 12, 0.85); }

/* ---------- Water bands: experience and contact sit in a faint aqua wash ---------- */

.experience { background: linear-gradient(180deg, transparent, rgba(130, 209, 197, 0.18) 18%); }   /* the wash runs on into Skills */

/* ---------- Projects (light, with deep-green demos) ---------- */

.projects { color: var(--ink); padding-block: clamp(24px, 4vw, 48px) clamp(72px, 10vw, 128px); }
.proj.proj-first { border-top: 0; }
.sec-head-more { margin-top: clamp(56px, 8vw, 96px); }
.projects .label { color: var(--muted-p); }
.projects .label .zh { color: var(--neon-ink); }
.projects em { color: var(--neon-ink); }
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 6vw, 72px); }
.sec-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 0.92; letter-spacing: -0.045em; }
.sec-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; }

.proj {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
  padding-block: clamp(28px, 4vw, 48px); border-top: 1px solid var(--line-p);
}
.proj-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.proj .demo-svg { max-height: 44vh; }   /* each demo fits on one screen beside its words */
.proj-flip .proj-info { order: 2; }
.proj-info { display: grid; gap: 14px; align-content: start; min-width: 0; }
.proj-meta { display: flex; align-items: baseline; gap: 12px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-p); }
.proj-meta span { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--neon-ink); }
.proj h3 { font-family: var(--font-display); font-weight: 750; font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1; letter-spacing: -0.03em; }
.proj-info > p:not(.proj-meta) { color: var(--muted-p); }
.proj-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.proj-stats div { padding-top: 10px; border-top: 2px solid var(--ink); }
.proj-stats dt { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-p); }
.proj-stats dd { font-family: var(--font-display); font-weight: 750; font-size: 1.4rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.proj-link { justify-self: start; font-weight: 600; color: var(--neon-ink); text-decoration: none; border-bottom: 1.5px solid currentColor; }

.demo {
  display: grid; gap: 12px; min-width: 0;
  padding: clamp(16px, 2.2vw, 24px); border-radius: var(--radius);
  background: var(--night); color: var(--text-d);
  box-shadow: 0 30px 60px -30px rgba(20, 68, 37, 0.45);
}
.demo:focus-visible { outline-offset: 4px; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.demo-title { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-d); }
.demo-svg { width: 100%; height: auto; display: block; }
.demo-note, .demo-readout { font-size: 0.8125rem; color: var(--muted-d); font-variant-numeric: tabular-nums; }
.demo-readout strong { color: var(--text-d); font-weight: 600; }
.seg { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 999px; background: var(--night-3); }
.seg-pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: 0; border-radius: 999px; background: var(--neon);
  box-shadow: 0 0 18px -4px var(--neon);
  transition: left 420ms cubic-bezier(0.22, 1, 0.36, 1), width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.seg button { position: relative; z-index: 1; transition: color 250ms; }
.seg.has-pill button[aria-pressed="true"] { background: transparent; }
.seg button, .demo-btn { border: 0; background: transparent; color: var(--muted-d); padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--neon); color: var(--on-neon); }
.demo-btn { background: var(--neon); color: var(--on-neon); }
.demo-btn:hover { filter: brightness(1.1); }
.sliders { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: center; font-size: 0.8125rem; color: var(--muted-d); }
.sliders output { color: var(--text-d); font-family: var(--font-mono); margin-left: 6px; }
input[type="range"] { width: 100%; accent-color: var(--neon); }
.keys { font-size: 0.75rem; color: var(--muted-d); }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 5px; margin-inline: 1px; border-radius: 5px; background: var(--night-3); border: 1px solid var(--line-d); font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-d); text-align: center; }
.pad { display: flex; flex-wrap: wrap; gap: 6px; }
.pad button { min-width: 44px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line-d); background: var(--night-3); font-weight: 600; cursor: pointer; }
.pad button:active { background: var(--neon); }
.traces { width: 100%; height: auto; display: block; border-radius: 12px; background: var(--night-2); }
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.meter { display: grid; gap: 6px; font-size: 0.8125rem; color: var(--muted-d); }
.meter-bar { position: relative; height: 10px; border-radius: 999px; background: var(--night-3); }
.meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--neon); transition: width 300ms; }
.meter-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text-d); }
.meter b { color: var(--text-d); font-family: var(--font-mono); font-weight: 500; }

/* SVG demo vocabulary */
.d-grid { stroke: var(--line-d); stroke-width: 1; }
.d-axis { stroke: var(--muted-d); stroke-width: 1; }
.d-text { font-family: var(--font-mono); font-size: 10px; fill: var(--muted-d); }
.d-label { font-family: var(--font-body); font-size: 12px; fill: var(--text-d); }
.d-value { font-family: var(--font-mono); font-size: 11px; fill: var(--text-d); }
.d-neon { fill: var(--neon); }
.d-cyan { fill: var(--cyan); }
.d-steel { fill: #8e98a8; }
.d-steel-s { stroke: #8e98a8; fill: none; }
.d-dim { stroke: var(--muted-d); stroke-dasharray: 3 3; fill: none; }
.d-land { fill: #1b5230; stroke: #2f7046; stroke-width: 0.8; stroke-linejoin: round; }
.d-place { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; fill: #8fb39c; }

/* Runs table (dark) */
.runs summary { cursor: pointer; font-weight: 600; font-size: 0.875rem; color: var(--neon); }
.table-scroll { overflow-x: auto; margin-top: 10px; }
.runs table { width: 100%; border-collapse: collapse; font-size: 0.75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.runs th, .runs td { padding: 6px 8px; text-align: right; border-top: 1px solid var(--line-d); }
.runs th[scope="row"], .runs thead th:first-child { text-align: left; font-weight: 500; }
.runs thead th { color: var(--muted-d); font-weight: 500; border-top: 0; }
.runs tr.is-control { background: rgba(var(--neon-rgb), 0.12); }

/* ---------- Experience: MTR route ---------- */

.experience { padding-block: clamp(72px, 10vw, 128px); }
.experience .sec-head h2 { color: var(--text-d); }
.route-grid { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.route { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); }
.route-box {                           /* one card: the stop's details, with the up/down buttons down its right side */
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; min-width: 0; padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius); background: var(--night-2); border: 1px solid var(--line-d);
}
.route-box .stop-panels, .route-box .stop-panel { padding: 0; border: 0; border-radius: 0; background: none; }   /* square, so the clip can't nick the corner text */
.route-box .route-nav { flex-direction: column; justify-content: center; padding-left: 18px; border-left: 1px solid var(--line-d); }
.stop { position: relative; }
.stop::after {                        /* line segment arriving at this stop from the one before it (below) */
  content: ""; position: absolute; left: 29px; top: 50%; bottom: -50%; width: 10px;
  background: var(--line);
}
.stop:last-of-type::after { display: none; }
.stop-next::after { background: repeating-linear-gradient(180deg, var(--line) 0 14px, transparent 14px 22px); }
.stop-btn {
  position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 14px; row-gap: 2px; width: 100%;
  padding: 12px 16px; border: 0; background: none; cursor: pointer; color: var(--muted-d); text-align: left;
}
.stop-dot { grid-row: span 2; }
.stop-en { grid-column: 2; }
.stop-year { grid-column: 3; grid-row: 1 / span 2; }
.stop-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--night); border: 6px solid var(--line); transition: transform 200ms, background 200ms; }
.stop-btn:hover .stop-dot { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(43, 119, 161, 0.12); }
.stop-btn:hover .stop-en { color: var(--neon); }
.stop-btn .stop-en { transition: color 200ms; }
.stop-btn[aria-pressed="false"] .stop-dot { animation: beckon 2.6s ease-out infinite; }
@keyframes beckon { 0% { box-shadow: 0 0 0 0 rgba(43, 119, 161, 0.35); } 70%, 100% { box-shadow: 0 0 0 12px rgba(43, 119, 161, 0); } }

.route-hint { display: flex; align-items: center; gap: 10px; margin: -12px 0 22px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-d); }
.route-hint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); animation: beckon 2s ease-out infinite; }
.route-nav { display: flex; justify-content: space-between; gap: 12px; }
.route-step {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-d); background: var(--night-2); color: var(--text-d); font-weight: 600; font-size: 0.9rem;
  transition: border-color 200ms, background 200ms, transform 200ms;
}
.route-step:hover:not(:disabled) { border-color: var(--neon); transform: translateY(-1px); }
.route-step:disabled { opacity: 0.35; cursor: default; }
.stop-btn[aria-pressed="true"] .stop-dot { background: var(--line); box-shadow: 0 0 0 4px var(--night), 0 0 0 6px var(--line); }
.stop-zh { font-family: var(--font-zh); font-weight: 900; font-size: 1.15rem; color: var(--text-d); }
.stop-en { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--text-d); }
.stop-year { font-family: var(--font-mono); font-size: 0.75rem; }
.stop-btn[aria-pressed="true"] .stop-year { color: var(--neon); }

.stop-panels { display: grid; overflow: hidden; border-radius: var(--radius); }
.stop-panel {                          /* all panels share one cell; the active one slides in like the next station */
  grid-area: 1 / 1; display: grid; align-content: start; gap: 10px; padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius); background: var(--night-2); border: 1px solid var(--line-d);
  opacity: 0; visibility: hidden; transform: translateX(var(--shift, 0));
}
/* Only the chosen station's panel is ever on screen: the old one drops out at once, the new one slides in. */
.stop-panel.is-active { opacity: 1; visibility: visible; transform: none; transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1), opacity 400ms ease; }
.panel-when { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--muted-d); }
.stop-panel h3 { font-family: var(--font-display); font-weight: 750; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; }
.panel-role { color: var(--neon); font-weight: 600; }
.stop-panel > p:not(.panel-when):not(.panel-role):not(.panel-stat) { color: var(--muted-d); max-width: 60ch; }
.panel-stat { display: flex; align-items: baseline; gap: 10px; color: var(--muted-d); }
.panel-stat strong { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: var(--text-d); letter-spacing: -0.03em; }

/* ---------- Skills: the toolbox (paper) ---------- */

.skills { color: var(--ink); padding-block: clamp(72px, 10vw, 128px);
  /* the bridge between Experience and What's next: starts in Experience's aqua wash, ends in What's next's green */
  background: linear-gradient(180deg, #def3ef 0%, #c4e2d8 30%, #86b4a2 58%, #3d7558 82%, #144425 100%); }
.skills .label { color: var(--muted-p); }
.skills .label .zh { color: var(--neon-ink); }
.skills em { color: var(--neon-ink); }
.g-energy { --g: var(--amber); }
.g-fluid { --g: var(--cyan); }
.g-design { --g: var(--neon); }
.g-code { --g: #b9c2cf; }
.g-fab { --g: var(--pearl-aqua); }

.toolbox { --red: #46953d; --red-dark: #2d6b28; position: relative; max-width: 1080px; margin: 60px auto 0; perspective: 1400px; }
.tb-handle {
  position: absolute; left: 50%; top: -52px; width: 220px; height: 44px; transform: translateX(-50%);
  border: 12px solid #1b5230; border-bottom: 0; border-radius: 26px 26px 0 0; z-index: 3;
}
.tb-lid {
  position: absolute; inset: -14px -10px auto -10px; height: 60px; z-index: 4;
  display: grid; place-items: center; border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, #62b257, var(--red) 55%, var(--red-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 10px 20px -10px rgba(0, 0, 0, 0.5);
  transform-origin: 50% 0; transform: rotateX(-105deg) translateY(-6px); opacity: 0.0;
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 500ms;
}
.tb-lid span { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.75); }
.toolbox.is-closed .tb-lid { transform: none; opacity: 1; }
.tb-body {
  position: relative; display: grid; gap: 14px; padding: 18px;
  border-radius: 10px 10px 18px 18px;
  background:
    radial-gradient(circle at 14px 14px, #d9efc0 0 2.5px, transparent 3px),
    radial-gradient(circle at calc(100% - 14px) 14px, #d9efc0 0 2.5px, transparent 3px),
    radial-gradient(circle at 14px calc(100% - 14px), #d9efc0 0 2.5px, transparent 3px),
    radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), #d9efc0 0 2.5px, transparent 3px),
    linear-gradient(180deg, var(--red), var(--red-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 40px 60px -30px rgba(12, 50, 30, 0.55);
}
.tb-tray {
  display: grid; gap: 10px; padding: 10px; border-radius: 10px;
  background: #0f3520; box-shadow: inset 0 6px 14px rgba(0, 0, 0, 0.45);
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 150ms;
}
.tb-top { grid-template-columns: 1.2fr 1fr 0.8fr; }
.tb-bottom { grid-template-columns: 1.3fr 1fr; }
.toolbox.is-closed .tb-top { transform: translateY(14px); }
.bin {
  display: grid; align-content: start; gap: 12px; padding: 14px; border-radius: 8px;
  background: linear-gradient(180deg, var(--night-2), var(--night)); border-top: 3px solid var(--g);
  transition: transform 200ms, box-shadow 200ms;
}
.bin:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -12px var(--g); }
.bin h3 { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text-d); }
.bin h3 svg { width: 20px; height: 20px; fill: none; stroke: var(--g); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bin h3 span { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted-d); }
.bin ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.bin li {                            /* label-maker tape */
  padding: 4px 9px 4px 11px; border-radius: 3px; background: #0c2a17; color: #f1f8ef;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: inset 3px 0 0 var(--g), 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- Contact ---------- */

.contact { padding-block: clamp(80px, 12vw, 150px) clamp(48px, 6vw, 72px); }

.contact h2 { max-width: 20ch; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 5.4vw, 4.4rem); line-height: 0.98; letter-spacing: -0.04em; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.contact-email { font-family: var(--font-mono); font-size: clamp(1.05rem, 3vw, 1.6rem); text-decoration: none; border-bottom: 2px solid var(--neon); overflow-wrap: anywhere; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; color: var(--muted-d); }
.contact-links a { text-decoration: none; }
.contact-links a:hover { color: var(--text-d); }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact-side { display: grid; gap: 22px; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.875rem; }
.mail-form {
  display: grid; gap: 14px; padding: clamp(18px, 3vw, 28px); border-radius: var(--radius);
  background: var(--night-2); border: 1px solid var(--line-d);
}
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-d); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-d);
  background: var(--night); color: var(--text-d); font: inherit; font-size: 1rem; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(var(--neon-rgb), 0.25); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--amber); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-status { font-size: 0.875rem; color: var(--muted-d); }
.form-status.is-ok { color: var(--green-ink); }
.form-status.is-error { color: var(--amber); }

/* ---------- Footer ---------- */

.footer { padding-block: 8px 28px; border-top: 1px solid var(--line-d); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 20px; font-size: 0.875rem; color: var(--muted-d); }
.footer-row .zh { color: var(--neon); margin-right: 6px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .route-grid { grid-template-columns: minmax(0, 1fr); }
  .proj, .proj-flip { grid-template-columns: minmax(0, 1fr); }
  .proj-flip .proj-info { order: 0; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .tb-top, .tb-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tb-top .bin:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .step { align-items: flex-end; padding-bottom: 28px; }
  .step-card { gap: 10px; padding: 18px; width: 100%; }
  .pair {                              /* phones: the two halves join into one card */
    display: grid; gap: 12px; padding: 18px; border-radius: 28px; pointer-events: auto;
    background: linear-gradient(160deg, var(--glass-edge) 0%, transparent 40%) border-box, var(--glass);
    -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-edge), 0 20px 50px -20px var(--glass-shade);
  }
  .pair > .step-card { width: 100%; }
  .pair > .step-card.glass { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .step-card h2 { font-size: 1.5rem; }
  .meters { grid-template-columns: minmax(0, 1fr); }
  .route-step { justify-content: center; min-width: 44px; padding: 0 14px; font-size: 0.85rem; }
  .route-step-label { display: none; }   /* phones: arrows only (each button keeps its aria-label) */
  .panel-foot { grid-template-columns: minmax(0, 1fr); }
  .panel-inner { padding: 92px var(--gutter) 32px; }
  .sliders { grid-template-columns: minmax(0, 1fr); }
  .brand { font-size: 0.95rem; }
  .tb-top, .tb-bottom, .field-row { grid-template-columns: minmax(0, 1fr); }
  .tb-handle { width: 150px; }
  .intro-foot { padding: 14px 16px; }
  .giant-name { font-size: clamp(3.4rem, 22vw, 7rem); }            /* phones keep the bigger name */
  .kicker-sep { display: block; height: 0; overflow: hidden; }   /* degree and university on their own lines */
  /* demo SVGs shrink on phones; enlarge their text in SVG units so it stays readable */
  .d-text { font-size: 14px; }
  .d-label { font-size: 16px; }
  .d-value { font-size: 15px; }
  .d-place { font-size: 12px; }
}


/* Content slides up into place as it scrolls into view (class added by sections.js) */
.slide-in { opacity: 0; transform: translateY(48px); transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1), transform 1100ms cubic-bezier(0.22, 1, 0.36, 1); }
.slide-in.is-in { opacity: 1; transform: none; }

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Demo transitions ---------- */
.demo-btn-ghost { justify-self: start; background: transparent; color: var(--neon); box-shadow: inset 0 0 0 1px var(--neon); }
.demo-btn-ghost[aria-pressed="true"] { background: var(--neon); color: var(--on-neon); }
.view { transition: opacity 450ms ease, transform 550ms cubic-bezier(0.22, 1, 0.36, 1); }
.view.is-off { opacity: 0; transform: translateY(14px); pointer-events: none; }
.fade-swap { transition: opacity 250ms; }

