/* =====================================================================
   Lee Li Xiong — personal CV site
   Plain CSS, mobile-first, no build step.
   Sections: 1 tokens · 2 base · 3 layout · 4 nav · 5 hero · 6 cards
             7 timeline · 8 skills · 9 projects/edu · 10 travel
             11 contact/footer · 12 reveal + motion · 13 breakpoints
   ===================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  /* fluid type scale */
  --fs-xs:   clamp(0.72rem, 0.70rem + 0.10vw, 0.80rem);
  --fs-sm:   clamp(0.82rem, 0.79rem + 0.15vw, 0.92rem);
  --fs-base: clamp(0.95rem, 0.91rem + 0.20vw, 1.06rem);
  --fs-md:   clamp(1.05rem, 0.99rem + 0.30vw, 1.22rem);
  --fs-lg:   clamp(1.25rem, 1.12rem + 0.60vw, 1.65rem);
  --fs-xl:   clamp(1.6rem, 1.30rem + 1.40vw, 2.6rem);
  --fs-hero: clamp(2.2rem, 1.45rem + 3.35vw, 4.4rem);

  --space-1: 0.35rem;
  --space-2: 0.6rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.25rem;
  --space-6: 3.25rem;
  --space-7: clamp(3.5rem, 2rem + 6vw, 7rem);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --container: 1180px;
  --nav-h: 64px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.18s;
  --t: 0.32s;
}

/* dark is the default theme */
:root,
[data-theme="dark"] {
  --bg: #080c18;
  --bg-2: #0c1224;
  --bg-alt: #0a1020;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-solid: #111a30;
  --surface-hover: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #e9edf8;
  --text-strong: #ffffff;
  --muted: #98a4c0;

  --accent: #6ba4ff;
  --accent-2: #3ad6c0;
  --accent-soft: rgba(107, 164, 255, 0.14);
  --accent-contrast: #04122b;

  --gold: #ffce6a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.75), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.9), 0 8px 24px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(107, 164, 255, 0.25), 0 18px 60px -18px rgba(107, 164, 255, 0.55);

  --grid-line: rgba(255, 255, 255, 0.055);
  --nav-bg: rgba(8, 12, 24, 0.72);
}

[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-2: #ffffff;
  --bg-alt: #eef2f9;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-solid: #ffffff;
  --surface-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.18);

  --text: #17203a;
  --text-strong: #0a1024;
  --muted: #5a6688;

  --accent: #2563eb;
  --accent-2: #0d9488;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --accent-contrast: #ffffff;

  --gold: #b8860b;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 12px 30px -16px rgba(15, 23, 42, 0.30), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 34px 70px -34px rgba(15, 23, 42, 0.38), 0 10px 24px -14px rgba(15, 23, 42, 0.18);
  --glow: 0 0 0 1px rgba(37, 99, 235, 0.16), 0 20px 50px -22px rgba(37, 99, 235, 0.40);

  --grid-line: rgba(15, 23, 42, 0.05);
  --nav-bg: rgba(255, 255, 255, 0.78);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;               /* clip (not hidden) keeps position:sticky working */
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 78% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(900px 560px at 5% 8%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 65%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}

/* Fallback for engines without color-mix() */
@supports not (background: color-mix(in srgb, red 10%, blue)) {
  body { background-image: none; }
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

p { margin: 0 0 var(--space-3); }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
a:hover { color: var(--accent-2); }

button { font: inherit; color: inherit; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--surface-solid);
  color: var(--text-strong);
  padding: 0.75rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  box-shadow: var(--shadow);
}
.skip-link:focus { left: 0; }

/* generic inline icon */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 3. Layout primitives ---------- */
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--space-7);
}
.section--alt { background: color-mix(in srgb, var(--bg-alt) 82%, transparent); }
.section--alt::before,
.section--alt::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.section--alt::before { top: 0; }
.section--alt::after { bottom: 0; }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }

.section__head { max-width: 62ch; margin-bottom: var(--space-5); }
.section__kicker {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-1);
}
.section__title {
  font-size: var(--fs-xl);
  font-weight: 700;
}
.section__sub {
  color: var(--muted);
  font-size: var(--fs-md);
  margin: 0;
}

.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--btn-bg);
  color: var(--text-strong);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--accent-contrast);
  box-shadow: var(--glow);
}
.btn--primary:hover { box-shadow: var(--glow), var(--shadow-lg); color: var(--accent-contrast); }

.btn--ghost:hover { background: var(--surface-hover); border-color: var(--accent); color: var(--text-strong); }
.btn--sm { padding: 0.6rem 1.05rem; font-size: var(--fs-xs); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.btn-row--center { justify-content: center; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.3;
  backdrop-filter: blur(8px);
  transition: transform var(--t) var(--ease-out), border-color var(--t) var(--ease),
              background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-strong);
}
.chip--sm { padding: 0.26rem 0.62rem; font-size: var(--fs-xs); color: var(--muted); }
.chip__num { font-family: var(--font-display); font-weight: 700; color: var(--accent); }
.chips--tech { margin-top: var(--space-2); }

/* ---------- 4. Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.nav__inner {
  width: min(100% - 1.5rem, var(--container));
  margin-inline: auto;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-weight: 700;
  margin-right: auto;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-sm);
}
.brand__text { font-size: var(--fs-sm); letter-spacing: -0.01em; }

.nav__links { display: flex; align-items: center; gap: 0.15rem; }
.nav__links a {
  position: relative;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0.7rem; right: 0.7rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease-out);
}
.nav__links a:hover { color: var(--text-strong); background: var(--surface); }
.nav__links a:hover::after,
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--text-strong); }

.nav__actions { display: flex; align-items: center; gap: 0.4rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--t) var(--ease-out), background-color var(--t) var(--ease),
              border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.icon-btn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--text-strong); background: var(--accent-soft); }
.icon-btn .icon { width: 19px; height: 19px; }

/* theme icon swap */
.icon--sun { display: none; }
.icon--moon { display: block; }
[data-theme="light"] .icon--sun { display: block; }
[data-theme="light"] .icon--moon { display: none; }

.hamburger { display: none; flex-direction: column; gap: 4px; }
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav.is-open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .hamburger span:nth-child(2) { opacity: 0; }
.nav.is-open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 0 2px 2px 0;
}

.nav__scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 16, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.nav__scrim.is-visible { opacity: 1; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - var(--nav-h));
  padding-block: clamp(1.5rem, 1rem + 3vw, 3rem) clamp(3.5rem, 2rem + 5vw, 5rem);
  overflow: clip;
}

.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.blob--1 {
  width: 46vw; height: 46vw;
  min-width: 280px; min-height: 280px;
  top: -14vw; right: -10vw;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 62%);
  animation: float1 18s var(--ease) infinite alternate;
}
.blob--2 {
  width: 40vw; height: 40vw;
  min-width: 240px; min-height: 240px;
  bottom: -16vw; left: -12vw;
  background: radial-gradient(circle at 60% 40%, var(--accent-2), transparent 62%);
  animation: float2 22s var(--ease) infinite alternate;
}
@keyframes float1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-4%, 5%, 0) scale(1.08); } }
@keyframes float2 { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(5%, -4%, 0) scale(1); } }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 78%);
}

.hero__inner {
  display: grid;
  gap: clamp(1.2rem, 1rem + 2vw, 3.5rem);
  align-items: center;
  justify-items: center;
  text-align: center;
}

/* --- portrait --- */
.hero__portrait { display: grid; justify-items: center; gap: 0.8rem; }

.portrait {
  position: relative;
  width: clamp(160px, 42vw, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: portraitIn 1s var(--ease-out) both;
}
@keyframes portraitIn {
  from { opacity: 0; transform: scale(0.86) translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.portrait__glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 62%);
  filter: blur(26px);
  opacity: 0.85;
  z-index: 0;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { transform: scale(1); opacity: 0.75; } 50% { transform: scale(1.07); opacity: 1; } }

.portrait__ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: spin 14s linear infinite;
  z-index: 1;
}
@keyframes spin { to { transform: rotate(1turn); } }

/* browsers without mask support still get a visible ring */
@supports not ((-webkit-mask: radial-gradient(#000, #000)) or (mask: radial-gradient(#000, #000))) {
  .portrait__ring { background: none; border: 4px solid var(--accent); }
}

.portrait img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  background: var(--surface-solid);
  border: 3px solid var(--bg);
  box-shadow:
    0 0 0 1px var(--border-strong),
    0 18px 45px -18px rgba(0, 0, 0, 0.75),
    0 40px 90px -50px var(--accent);
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease);
}
.portrait:hover img { transform: scale(1.03) rotate(-0.6deg); }

/* soft vignette so the photo's white studio background blends into the page
   instead of reading as a bright disc (matters most in dark mode) */
.portrait::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  box-shadow:
    inset 0 -26px 50px -26px rgba(4, 10, 24, 0.55),
    inset 0 0 34px -12px color-mix(in srgb, var(--accent) 45%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.portrait__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-xs);
  color: var(--muted);
  backdrop-filter: blur(8px);
}
.portrait__status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 70%, transparent);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 65%, transparent); }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* --- hero copy --- */
.hero__content { max-width: 62ch; }

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  margin-bottom: var(--space-2);
}

.hero__name {
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 0.35rem;
}
.hero__aka {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 0.35rem;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: var(--space-2);
}

.hero__lede {
  font-size: var(--fs-md);
  color: var(--muted);
  margin-bottom: var(--space-3);
}

.chips--hero { justify-content: center; margin-bottom: var(--space-4); }
.chips--hero .chip { box-shadow: var(--shadow-sm); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(0.8rem, 2vh, 1.6rem);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-display);
  animation: bob 2.6s var(--ease) infinite;
}
.scroll-cue:hover { color: var(--accent); }
.scroll-cue__mouse {
  width: 22px; height: 34px;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
  display: grid;
  justify-items: center;
  padding-top: 5px;
  opacity: 0.8;
}
.scroll-cue__mouse span {
  width: 3px; height: 7px;
  border-radius: 2px;
  background: currentColor;
  animation: wheel 1.8s var(--ease) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ---------- 6. Cards ---------- */
.cards {
  display: grid;
  gap: clamp(0.9rem, 0.6rem + 1vw, 1.4rem);
  grid-template-columns: 1fr;
}

.card {
  position: relative;
  padding: clamp(1.15rem, 0.9rem + 1vw, 1.8rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--t) var(--ease-out), border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 55%, transparent), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.card:hover::before { opacity: 1; }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: var(--space-3);
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  transition: transform var(--t) var(--ease-out), background-color var(--t) var(--ease);
}
.card__icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card__icon { transform: translateY(-2px) scale(1.06); }

.card__title { font-size: var(--fs-md); margin-bottom: var(--space-2); }
.card p { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 0; }
.card p + .chips, .card p + p { margin-top: var(--space-2); }

.card__tagline {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-1);
}
.card__credit { font-size: var(--fs-xs); }

.link-out {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}
.link-out .icon { transition: transform var(--t) var(--ease-out); }
.link-out:hover .icon { transform: translate(2px, -2px); }

.center-note { margin-top: var(--space-5); text-align: center; }

/* ---------- 7. Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 2.9rem;
}
.timeline__line {
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 11px;
  width: 2px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.timeline__fill {
  display: block;
  width: 100%;
  height: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: height 0.15s linear;
}

.tl-item {
  position: relative;
  margin-bottom: clamp(1.4rem, 1rem + 2vw, 2.6rem);
}
.tl-item:last-child { margin-bottom: 0; }

.tl-node {
  position: absolute;
  left: -2.9rem;
  top: 0.15rem;
  width: 24px; height: 24px;
  margin-left: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  z-index: 2;
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease);
}
.tl-node svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tl-node--trophy, .tl-node--medal { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 14%, transparent); }
.tl-node--game { border-color: var(--accent-2); color: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 14%, transparent); }
.tl-item:hover .tl-node { transform: scale(1.12); }

.tl-node__pulse {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: nodePulse 2.4s var(--ease) infinite;
}
@keyframes nodePulse {
  0%   { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

.tl-stamp {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.tl-item--now .tl-stamp { color: var(--accent); }

.tl-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--t) var(--ease-out), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.tl-item:hover .tl-card { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.tl-item--now .tl-card { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

.tl-card__head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: clamp(1rem, 0.85rem + 0.6vw, 1.4rem);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t) var(--ease);
}
.tl-card__head:hover { background: var(--surface-hover); }
.tl-card__heading { display: grid; gap: 0.15rem; }

.tl-company {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-strong);
}
.tl-role { font-size: var(--fs-sm); color: var(--text); }
.tl-role em { color: var(--muted); font-style: normal; }
.tl-dates { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.03em; }

.tl-chevron {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  position: relative;
  transition: transform var(--t) var(--ease-out), border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.tl-chevron::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.tl-card.is-open .tl-chevron { transform: rotate(180deg); background: var(--accent-soft); border-color: var(--accent); }
.tl-card__head:hover .tl-chevron { border-color: var(--accent); }

.tl-card__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s var(--ease-out);
}
.tl-card.is-open .tl-card__panel { grid-template-rows: 1fr; }
html:not(.js) .tl-card__panel { grid-template-rows: 1fr; }
.tl-card__panel > .tl-card__body { overflow: hidden; }

.tl-card__body { padding-inline: clamp(1rem, 0.85rem + 0.6vw, 1.4rem); }
/* spacer instead of padding-bottom: padding would survive the 0fr collapse and
   leave a sliver under a closed panel */
.tl-card__panel .tl-card__body::after {
  content: "";
  display: block;
  height: clamp(1rem, 0.85rem + 0.6vw, 1.4rem);
}
.tl-card--static .tl-card__body { padding-block: clamp(1rem, 0.85rem + 0.6vw, 1.4rem); }

.bullets { display: grid; gap: 0.5rem; }
.bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* awards */
.award__rank {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  padding: 0.2rem 0.62rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}
.award__rank--ship { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.award__title { font-size: var(--fs-md); margin-bottom: 0.3rem; }
.award__desc { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* ---------- 8. Skills ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: var(--space-4);
}
.filter {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), transform var(--t) var(--ease-out);
}
.filter:hover { color: var(--text-strong); border-color: var(--accent); transform: translateY(-1px); }
.filter.is-active {
  color: var(--accent-contrast);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.skill-grid {
  display: grid;
  gap: clamp(0.9rem, 0.6rem + 1vw, 1.3rem);
  grid-template-columns: 1fr;
}
.skill-group {
  padding: clamp(1rem, 0.85rem + 0.6vw, 1.4rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease-out),
              border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.skill-group:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.skill-group.is-dimmed { opacity: 0.28; filter: saturate(0.4); }
.skill-group.is-hidden { display: none; }
.skill-group__title {
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

/* ---------- 9. Education ---------- */
.edu-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: clamp(1.1rem, 0.9rem + 0.8vw, 1.7rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.edu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.edu-card__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px; height: 46px;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}
.edu-card__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.edu-card__title { font-size: var(--fs-md); margin-bottom: 0.2rem; }
.edu-card__meta { margin-bottom: 0.2rem; font-size: var(--fs-sm); }
.edu-card__desc { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* ---------- 10. Travel diagram ---------- */
.map-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), transparent 70%), var(--bg-2);
  box-shadow: var(--shadow);
  padding: clamp(0.5rem, 0.3rem + 1vw, 1.1rem);
  overflow: hidden;
}
.map {
  display: block;
  width: 100%;
  height: auto;
  color: var(--muted);           /* drives the dotted pattern colour */
  overflow: visible;
}
.map__dots { pointer-events: none; }

/* Paths are drawn solid by default; JS "arms" them for the draw-in animation,
   so the diagram still looks right with JS disabled. */
.map__path { opacity: 0.9; }
.map__path.is-armed {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
}
.map.is-drawn .map__path.is-armed {
  animation: draw 1.7s var(--ease-out) forwards;
}
.map.is-drawn .map__path:nth-child(2) { animation-delay: 0.15s; }
.map.is-drawn .map__path:nth-child(3) { animation-delay: 0.3s; }
.map.is-drawn .map__path:nth-child(4) { animation-delay: 0.45s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.pin { cursor: pointer; }
.pin__hit { fill: transparent; }
.pin__dot {
  fill: var(--bg-2);
  stroke: var(--accent);
  stroke-width: 1.8;
  transition: transform 0.25s var(--ease-out), stroke 0.25s var(--ease);
  transform-box: fill-box;
  transform-origin: center;
}
.pin:hover .pin__dot,
.pin:focus-visible .pin__dot,
.pin.is-active .pin__dot { transform: scale(1.35); stroke: var(--accent-2); }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin__dot { stroke-width: 3; }

.pin--home .pin__dot { fill: var(--accent); stroke: var(--accent-2); }
.pin__pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.7;
  transform-box: fill-box;
  transform-origin: center;
  animation: pinPulse 2.6s var(--ease) infinite;
}
@keyframes pinPulse {
  0%   { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.map__tooltip {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -140%);
  padding: 0.38rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text-strong);
  font-size: var(--fs-xs);
  white-space: nowrap;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.map__tooltip[hidden] { display: none; }

.places {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-3);
}
.place {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: transform var(--t) var(--ease-out), border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.place em { color: var(--muted); font-style: normal; font-size: var(--fs-xs); }
.place:hover, .place.is-active { transform: translateY(-2px); border-color: var(--accent); background: var(--accent-soft); }
.place__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.place__dot--home { background: var(--accent); }

/* ---------- 11. Contact + footer ---------- */
.section--contact { padding-block: var(--space-7); }
.contact-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(1.8rem, 1.2rem + 3vw, 3.6rem) clamp(1.2rem, 0.8rem + 2vw, 3rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(700px 300px at 50% -10%, var(--accent-soft), transparent 70%),
    var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}
.contact-card__title { font-size: var(--fs-xl); }
.contact-card__sub { color: var(--muted); max-width: 52ch; margin-inline: auto; margin-bottom: var(--space-4); }

.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-4);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
}
.footer p { margin: 0; }
.footer__links { display: flex; gap: var(--space-3); }
.footer__links a { text-decoration: none; }

/* ---------- 12. Reveal + motion ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* achievements: a staggered entrance instead of the generic reveal.
   Delays come from --award-delay, set per item index in main.js. */
html.js .award-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.62s var(--ease-out), transform 0.62s var(--ease-out);
  transition-delay: var(--award-delay, 0ms);
}
html.js .award-item.is-in { opacity: 1; transform: none; }

/* medal / trophy / gamepad node springs in just after its card */
html.js .award-item .tl-node { overflow: hidden; }
html.js .award-item:not(.is-in) .tl-node { opacity: 0; transform: scale(0.35); }
html.js .award-item.is-in .tl-node {
  /* `backwards`, not `both`: once it lands the node drops back to its own
     styles so the hover scale still works */
  animation: awardNodeIn 0.66s var(--ease-out) calc(var(--award-delay, 0ms) + 140ms) backwards;
}
@keyframes awardNodeIn {
  0%   { opacity: 0; transform: scale(0.35); }
  62%  { opacity: 1; transform: scale(1.13); }
  100% { opacity: 1; transform: scale(1); }
}

/* one-time shine sweeping across the icon as it lands */
html.js .award-item .tl-node::after {
  content: "";
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 38%,
    color-mix(in srgb, currentColor 55%, transparent) 50%,
    transparent 62%);
}
html.js .award-item.is-in .tl-node::after {
  animation: awardShine 0.85s var(--ease) calc(var(--award-delay, 0ms) + 420ms) 1;
}
@keyframes awardShine {
  0%   { opacity: 0; transform: translateX(-110%); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(110%); }
}

/* rank pill pops in a beat after its card */
html.js .award-item .award__rank {
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  transition-delay: calc(var(--award-delay, 0ms) + 330ms);
}
html.js .award-item:not(.is-in) .award__rank { opacity: 0; transform: translateY(6px) scale(0.94); }

/* connector draws in with the section (clip-path, so the 900px translateX
   centering on .timeline__line is left untouched) */
html.js .timeline--awards .timeline__line {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s var(--ease-out);
}
html.js .timeline--awards.is-in .timeline__line { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .award-item,
  html.js .award-item:not(.is-in) .award__rank { opacity: 1; transform: none; }
  html.js .award-item:not(.is-in) .tl-node { opacity: 1; transform: none; }
  html.js .award-item.is-in .tl-node,
  html.js .award-item.is-in .tl-node::after { animation: none; }
  html.js .timeline--awards .timeline__line { clip-path: none; }
  .map__path { stroke-dashoffset: 0 !important; }
  .btn::after { display: none; }
}

/* ---------- 13. Breakpoints ---------- */
@media (min-width: 480px) {
  .portrait { width: clamp(180px, 38vw, 240px); }
  .chip { font-size: var(--fs-sm); }
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: minmax(220px, 300px) minmax(0, 64ch);
    justify-content: center;
    text-align: left;
    justify-items: start;
    align-items: center;
  }
  .hero__portrait { justify-self: center; }
  .portrait { width: clamp(200px, 22vw, 280px); }
  .chips--hero { justify-content: flex-start; }
  .hero__content { max-width: 60ch; }
}

@media (min-width: 900px) {
  /* alternating two-sided timeline */
  .timeline { padding-left: 0; }
  .timeline__line { left: 50%; transform: translateX(-50%); }

  .tl-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
    align-items: start;
    margin-bottom: clamp(1.6rem, 1rem + 2vw, 3rem);
  }
  .tl-node {
    position: relative;   /* stays the containing block for .tl-node__pulse */
    left: auto;
    top: auto;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    margin-top: 0.9rem;
  }
  .tl-item .tl-card { grid-column: 1; grid-row: 1; }
  .tl-item .tl-stamp { grid-column: 3; grid-row: 1; align-self: start; margin-top: 1.15rem; }

  /* nth-of-type, not nth-child: the .timeline__line div is also a child */
  .tl-item:nth-of-type(even) .tl-card { grid-column: 3; }
  .tl-item:nth-of-type(even) .tl-stamp { grid-column: 1; text-align: right; }
}

@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards--projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav__links { gap: 0.25rem; }
}

@media (min-width: 1400px) {
  :root { --container: 1240px; }
}

/* --- mobile nav (hamburger) --- */
@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav__links {
    position: fixed;
    z-index: 95;
    top: var(--nav-h);
    right: 0;
    width: min(78vw, 320px);
    height: calc(100dvh - var(--nav-h));
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: var(--space-4) var(--space-3);
    background: var(--bg-2);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    /* Closed state is wiped away with clip-path rather than translated off to
       the right: a fixed element sitting outside the viewport would widen the
       document's scrollable area and cause horizontal scroll on phones. */
    clip-path: inset(0 0 0 100%);
    opacity: 0;
    visibility: hidden;
    transition: clip-path 0.38s var(--ease-out), opacity 0.28s var(--ease),
                visibility 0.38s linear;
    overflow-y: auto;
  }
  .nav.is-open .nav__links {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    visibility: visible;
  }
  .nav__links a {
    padding: 0.85rem 0.9rem;
    font-size: var(--fs-md);
    border-radius: var(--radius-sm);
  }
  .nav__links a::after { display: none; }
  .nav__links a.is-active { background: var(--accent-soft); color: var(--accent); }
}

@media (max-width: 640px) {
  /* keep as much of the hero above the fold as possible on phones */
  .portrait { width: clamp(140px, 36vw, 200px); }
  .hero__portrait { gap: 0.55rem; }
  .hero__lede { margin-bottom: var(--space-2); }
  .chips--hero { margin-bottom: var(--space-3); gap: 0.4rem; }
  .hero__eyebrow { margin-bottom: var(--space-1); }
  .hero__tagline { margin-bottom: var(--space-1); }
  .btn-row { width: 100%; justify-content: center; }
  .btn-row .btn { flex: 1 1 auto; justify-content: center; }
  .btn-row .btn--sm { flex: 0 0 auto; }
  .chips--hero .chip { padding: 0.34rem 0.72rem; }
  .hero { padding-block: var(--space-2) var(--space-5); }
  .hero__lede { font-size: var(--fs-base); line-height: 1.55; }
  /* the hero fills the screen on a phone anyway — the cue would collide
     with the call-to-action buttons */
  .scroll-cue { display: none; }
}

/* pair the hero CTAs on one row where they still fit, so the buttons stay as
   close to the first screenful as possible on phones */
@media (min-width: 380px) and (max-width: 640px) {
  .hero .btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .hero .btn { padding: 0.72rem 0.55rem; font-size: var(--fs-xs); }
}

@media (max-width: 480px) {
  .brand__text { display: none; }
  .btn { justify-content: center; }
  .btn--sm { width: auto; }
  .places { flex-direction: column; align-items: stretch; }
  .place { justify-content: flex-start; }
  .map-wrap { padding: 0.35rem; }
}

/* very small screens: keep the diagram legible by leaning on the list */
@media (max-width: 380px) {
  .map { min-height: 150px; }
  .hero { min-height: auto; padding-block: var(--space-5) var(--space-6); }
}

@media print {
  .nav, .scroll-cue, .nav__scrim, .map-wrap, .filters { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .tl-card, .edu-card { box-shadow: none; border: 1px solid #ccc; }
  html.js .reveal { opacity: 1 !important; transform: none !important; }
  html.js .award-item,
  html.js .award-item .tl-node,
  html.js .award-item .award__rank { opacity: 1 !important; transform: none !important; animation: none !important; }
  html.js .award-item .tl-node::after { display: none !important; }
  html.js .timeline--awards .timeline__line { clip-path: none !important; }
  .tl-card__panel { grid-template-rows: 1fr !important; }
}
