/* ============================================================
   Field Notes — expedition portfolio
   Aged-paper cartographic theme. Light. Print-journal editorial.
   ============================================================ */

:root {
  color-scheme: light;

  /* paper + ink */
  --paper: #ece3d1;
  --paper-2: #e3d7c0;
  --panel: #f6f1e5;
  --panel-2: #fbf7ee;
  --ink: #1f2a32;
  --ink-2: #45535e;
  --muted: #55626a;
  --line: #cdc0a7;
  --hair: rgba(31, 42, 50, 0.16);

  /* continents (harmonised with the globe route colours) */
  --na: #1a6b91;   /* North America — teal/blue */
  --eu: #c9552f;   /* Europe — terracotta */
  --sa: #2c7a49;   /* South America — fern */
  --gold: #d99a24; /* stamp / sun */
  --gold-ink: #8a6410; /* readable gold text on paper */

  /* semantic */
  --accent: var(--na);
  --map-blue: var(--na);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 26px 60px -30px rgba(31, 42, 50, 0.55);
  --shadow-card: 0 18px 40px -26px rgba(31, 42, 50, 0.5);

  /* theme-swappable surfaces (reassigned wholesale in the dark blocks) */
  --body-grad:
    radial-gradient(120% 90% at 12% -10%, rgba(26, 107, 145, 0.10), transparent 55%),
    radial-gradient(120% 90% at 100% 0%, rgba(201, 85, 47, 0.09), transparent 50%),
    radial-gradient(120% 120% at 50% 120%, rgba(44, 122, 73, 0.10), transparent 55%),
    linear-gradient(180deg, #f0e8d8 0%, #e9dfca 60%, #ece3d1 100%);
  --paper-scrim: rgba(236, 227, 209, 0.72);
  --grain-blend: multiply;
  --grain-opacity: 0.55;
  --surface-ghost: rgba(251, 247, 238, 0.7);
  --glass: rgba(251, 247, 238, 0.82); /* frosted card over the globe */
  --topbar-bg: rgba(246, 241, 229, 0.72);

  --font-display: "IBM Plex Serif", "Georgia", "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  font-family: var(--font-body);
}

/* ---------- dark theme ----------
   Same token overrides for both triggers: the manual toggle ([data-theme])
   and, for no-JS visitors, the OS preference. The pre-paint script always
   sets an explicit data-theme when JS runs, so the media block only catches
   no-JS system-dark and is excluded once a light choice is saved. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #12181d;
  --paper-2: #0d1216;
  --panel: #1a232b;
  --panel-2: #212d36;
  --ink: #e9dec9;
  --ink-2: #b7c0c6;
  --muted: #8a969d;
  --line: #3a4650;
  --hair: rgba(233, 222, 201, 0.14);
  --na: #4aa8cf;
  --eu: #e57a54;
  --sa: #4fa871;
  --gold: #e8b24a;
  --gold-ink: #e8b24a;
  --shadow: 0 26px 60px -30px rgba(0, 0, 0, 0.72);
  --shadow-card: 0 18px 40px -26px rgba(0, 0, 0, 0.62);
  --body-grad:
    radial-gradient(120% 90% at 12% -10%, rgba(74, 168, 207, 0.10), transparent 55%),
    radial-gradient(120% 90% at 100% 0%, rgba(229, 122, 84, 0.09), transparent 50%),
    radial-gradient(120% 120% at 50% 120%, rgba(79, 168, 113, 0.08), transparent 55%),
    linear-gradient(180deg, #10161b 0%, #131b21 60%, #12181d 100%);
  --paper-scrim: rgba(18, 24, 29, 0.72);
  --grain-blend: screen;
  --grain-opacity: 0.28;
  --surface-ghost: rgba(233, 222, 201, 0.07);
  --glass: rgba(26, 35, 43, 0.78);
  --topbar-bg: rgba(18, 24, 29, 0.82);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--body-grad);
  background-attachment: fixed;
}

/* fine paper grain + faint cartographic grid, fixed behind everything */
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(31, 42, 50, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 42, 50, 0.035) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 46px 46px, 46px 46px, 140px 140px;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
}

a { color: inherit; text-decoration: none; }
button, a { font: inherit; }
button { cursor: pointer; }

.app-shell { width: 100%; margin: 0; padding: 0; }
main { width: 100%; overflow: hidden; }

/* ---------- shared type ---------- */
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .pp-place { text-wrap: balance; }
p, .hero-lead, .story-summary { text-wrap: pretty; }

h1 {
  margin: 6px 0 22px;
  font-family: var(--font-display);
  font-weight: 600;
  /* capped so "backend, database," stays on one line in IBM Plex Serif;
     the 720px .hero-copy column is what actually governs the wrap */
  font-size: clamp(44px, 6.4vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.14;
}

.eyebrow,
.panel-label,
.experience-grid span,
.leg-continent,
.dateline {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow { margin: 0 0 12px; }

.coordinate {
  margin: 0;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.stamp {
  display: inline-block;
  padding: 4px 9px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-3.5deg);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 40;
  width: min(1500px, calc(100% - clamp(28px, 4vw, 80px)));
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--topbar-bg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.brand, .topbar-actions, .nav-links,
.hero-actions, .story-header,
.contact-actions { display: flex; align-items: center; }

.brand { gap: 12px; min-width: 210px; }

.brand-mark {
  width: 42px;
  height: 42px;
  background: url("./favicon.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
}

.brand strong, .brand small { display: block; }
.brand strong { font-weight: 700; letter-spacing: -0.01em; }
.brand small,
.story-summary,
.focus-list span { color: var(--muted); }
.brand small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }

.nav-links { gap: 4px; color: var(--ink-2); }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}
.nav-links a:hover { background: rgba(26, 107, 145, 0.12); color: var(--na); }

.topbar-actions { justify-content: flex-end; gap: 10px; min-width: 210px; }

/* dark-mode toggle — ghost circle with a sun/moon glyph that swaps by theme */
.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface-ghost);
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}
.theme-toggle:hover { transform: translate(-1px, -1px); color: var(--na); }
.theme-toggle-icon { position: relative; width: 16px; height: 16px; display: block; }
/* sun (shown in light mode): filled disc + rays */
.theme-toggle-icon::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 -7px 0 -5px currentColor, 0 7px 0 -5px currentColor,
    -7px 0 0 -5px currentColor, 7px 0 0 -5px currentColor,
    5px 5px 0 -5px currentColor, -5px -5px 0 -5px currentColor,
    5px -5px 0 -5px currentColor, -5px 5px 0 -5px currentColor;
}
/* moon (shown in dark mode): crescent via an offset inset shadow */
:root[data-theme="dark"] .theme-toggle-icon::before {
  inset: 1px;
  background: transparent;
  box-shadow: inset -4px -2px 0 0 currentColor;
}

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.primary-button { background: var(--ink); color: var(--panel-2); box-shadow: 4px 4px 0 var(--gold); }
.secondary-button { background: var(--surface-ghost); color: var(--ink); }
.primary-button:hover, .secondary-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(26, 107, 145, 0.4);
}
.primary-button:active, .secondary-button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(26, 107, 145, 0.4);
}
.compact { min-height: 36px; padding: 8px 14px; font-size: 13.5px; }

/* ---------- passport (page-turning journey tracker) ---------- */
.passport {
  position: fixed;
  right: clamp(14px, 2vw, 30px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.passport-book {
  position: relative;
  width: 312px;
  height: 218px;
  perspective: 1700px;
}
/* burgundy cover — sits behind the pages so its edge + spine frame them */
.passport-cover {
  position: absolute;
  inset: 0;
  border-radius: 5px 12px 12px 5px;
  background:
    radial-gradient(130% 100% at 18% 6%, rgba(255, 255, 255, 0.10), transparent 46%),
    linear-gradient(135deg, #63202a 0%, #4d1720 58%, #3c1017 100%);
  box-shadow: var(--shadow);
}
.passport-cover::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(222, 178, 110, 0.5);
  border-radius: 3px 9px 9px 3px;
}
.passport-cover::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 11px;
  border-radius: 4px;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0 5px, rgba(255, 255, 255, 0.05) 5px 9px);
}
/* faint embossed emblem + wordmark on the cover (mostly seen at the spine edge) */
.pp-crest {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(222, 178, 110, 0.6);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 44%, rgba(222, 178, 110, 0.5) 46% 50%, transparent 52%),
    conic-gradient(from 0deg, transparent 0 80deg, rgba(222, 178, 110, 0.45) 88deg 92deg, transparent 100deg 170deg, rgba(222, 178, 110, 0.45) 178deg 182deg, transparent 190deg);
}
.pp-cover-title {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(230, 198, 140, 0.85);
}

.passport-page {
  /* the passport is a physical paper object — always light, in both themes.
     Pin its tokens so ink/muted/accents never flip to the dark palette. */
  --ink: #1f2a32;
  --ink-2: #45535e;
  --muted: #55626a;
  --na: #1a6b91;
  --eu: #c9552f;
  --sa: #2c7a49;
  --gold: #d99a24;
  position: absolute;
  inset: 9px 9px 9px 13px;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 14px;
  transform-origin: left center;
  backface-visibility: hidden;
  border-radius: 3px 8px 8px 3px;
  background: linear-gradient(180deg, #f6f2e8 0%, #eef1ea 55%, #f1ece0 100%);
  box-shadow: 0 10px 22px -14px rgba(31, 42, 50, 0.55), inset 0 0 0 1px rgba(31, 42, 50, 0.06);
  overflow: hidden;
  transition: transform 820ms cubic-bezier(0.66, 0, 0.24, 1);
}
/* guilloche security pattern */
.passport-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background:
    repeating-radial-gradient(circle at 22% 118%, transparent 0 6px, color-mix(in srgb, var(--accent) 22%, transparent) 6px 6.7px),
    repeating-radial-gradient(circle at 96% -14%, transparent 0 7px, rgba(31, 42, 50, 0.05) 7px 7.7px);
}
.passport-page > * { position: relative; z-index: 1; }
.passport-page.turned { transform: rotateY(-168deg); }

.pp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pp-region { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.pp-no { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); }
.pp-place { margin: 5px 0 9px; font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1; color: var(--ink); }
.pp-fields { display: grid; gap: 6px; }
.pp-field { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.2; color: var(--ink); }
.pp-field em { display: block; font-style: normal; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pp-stamp {
  position: absolute;
  top: 46px;
  right: 16px;
  z-index: 2;
  padding: 4px 11px;
  border: 1.5px solid var(--accent);
  border-radius: 5px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-7deg);
  opacity: 0.82;
}
.pp-mrz {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px solid rgba(31, 42, 50, 0.14);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: rgba(31, 42, 50, 0.6);
  white-space: nowrap;
  overflow: hidden;
}
.passport-page[data-leg="origin"] { --accent: var(--na); }
.passport-page[data-leg="production"] { --accent: var(--eu); }
.passport-page[data-leg="projects"] { --accent: var(--sa); }
.passport-page[data-leg="next"] { --accent: var(--gold); }
.passport-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); opacity: 0.7; }

/* ---------- hero (Departure) ---------- */
.hero {
  --accent: var(--na);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 56px);
  align-items: start;
  min-height: calc(100vh - 34px);
  margin-top: -84px;
  padding: 168px clamp(22px, 5vw, 96px) 48px;
  overflow: hidden;
}
/* left readability scrim so hero copy stays legible over the globe */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, var(--paper) 0%, var(--paper) 26%, var(--paper-scrim) 42%, transparent 66%);
}

.travel-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  /* Soft globe "poster" so the hero is never blank while three.js loads.
     The WebGL canvas is transparent and draws over this; the poster is
     soft-edged so any peek behind the loaded globe is harmless. */
  background:
    linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--paper) 90%, transparent) 100%),
    radial-gradient(circle at 60% 41%,
      rgba(116, 192, 236, 0.30) 0%,
      rgba(63, 131, 168, 0.42) 20%,
      rgba(39, 87, 116, 0.34) 42%,
      rgba(27, 62, 83, 0.20) 56%,
      transparent 66%),
    radial-gradient(70% 60% at 62% 42%, rgba(26, 107, 145, 0.10), transparent 60%);
}
.travel-scene[data-scene="unavailable"] {
  background:
    linear-gradient(90deg, rgba(26, 107, 145, 0.14) 1px, transparent 1px),
    linear-gradient(rgba(26, 107, 145, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--paper) 92%, transparent));
  background-size: 54px 54px, 54px 54px, auto;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--paper));
}

.hero-copy, .journey-chapters { position: relative; z-index: 2; }
.hero-copy { max-width: 720px; padding: 10px 0 0; }
.hero-coordinate { margin: 0 0 18px; }
.hero-lead {
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.72;
}
.hero-actions { flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }

/* plain "logbook" notes (replaces the boarding-pass card) */
.hero-notes {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  max-width: 58ch;
}
.hero-notes li {
  position: relative;
  padding: 16px 0 16px 20px;
  border-top: 1px solid var(--hair);
}
.hero-notes li:last-child { border-bottom: 1px solid var(--hair); }
.hero-notes li::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 0;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--na);
}
.hero-notes strong { display: block; margin-bottom: 4px; font-size: 15.5px; font-weight: 700; }
.hero-notes span { display: block; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

/* journey chapter cards (passport stamps) */
.journey-chapters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(24px, 3rem, 48px);
}
.journey-step {
  --accent: var(--na);
  min-height: 156px;
  padding: 16px 16px 18px;
  border: 1px solid var(--hair);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.journey-step[data-journey-card="origin"] { --accent: var(--na); }
.journey-step[data-journey-card="berlin"] { --accent: var(--eu); }
.journey-step[data-journey-card="production"] { --accent: var(--na); }
.journey-step[data-journey-card="projects"] { --accent: var(--sa); }
.leg-continent { display: block; color: var(--accent); font-size: 10.5px; }
.leg-index {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.journey-step strong { display: block; margin: 12px 0 7px; font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.14; }
.journey-step p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }

/* ---------- proof strip ---------- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 40px clamp(22px, 5vw, 96px) 40px;
}
.proof-strip article {
  position: relative;
  min-height: 128px;
  padding: 20px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.proof-strip article::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 82px;
  height: 20px;
  border-top: 1.5px solid var(--hair);
  transform: rotate(-12deg);
}
.proof-strip span, .proof-strip small { display: block; }
.proof-strip span {
  color: var(--na);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.proof-strip strong {
  display: block;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(42px, 4.4vw, 60px);
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.proof-strip small { color: var(--ink-2); font-size: 13px; }

/* ---------- flight-path dividers ---------- */
.section-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  margin: 0 clamp(22px, 5vw, 96px);
}
.section-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1.5px dashed var(--line);
}
.section-divider span {
  position: relative;
  padding: 4px 14px;
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.section-divider::after {
  content: "\2708"; /* plane */
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%) rotate(6deg);
  color: var(--accent);
  font-size: 18px;
  background: var(--paper);
  padding: 0 6px;
}

/* ---------- section scaffolding ---------- */
.section-heading { max-width: 46ch; margin-bottom: 26px; }
.section-heading p:not(.eyebrow) { color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.proof-strip, .project-section, .experience-band, .contact-section { scroll-margin-top: 100px; }

/* ---------- experience (long-haul) ---------- */
.experience-band {
  --accent: var(--eu);
  position: relative;
  padding: 78px clamp(22px, 5vw, 96px);
}

/* education credential — editorial band above the AWS feature, deliberately lighter */
.education-card {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 52px);
  margin-bottom: 22px;
  padding: 20px clamp(18px, 2.6vw, 30px);
  border: 1px solid var(--hair);
  border-left: 2px solid var(--na);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.edu-body { flex: 1 1 auto; min-width: 0; }
.edu-label {
  display: block;
  margin-bottom: 9px;
  color: var(--na);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.edu-body strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.16;
  letter-spacing: -0.01em;
}
.edu-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.edu-honors { flex: none; display: flex; align-items: center; gap: clamp(20px, 3vw, 38px); }
/* GPA as a big serif figure, echoing the proof-strip numbers */
.edu-gpa { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.edu-gpa em {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: clamp(34px, 4vw, 44px);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.edu-gpa span {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* scholarship as an award stamp, in the passport-stamp vocabulary */
.edu-award {
  flex: none;
  padding: 8px 12px;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  color: var(--gold-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-2.5deg);
}

.experience-feature {
  --accent: var(--eu);
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1.5fr);
  gap: clamp(20px, 3vw, 44px);
  padding: clamp(24px, 3vw, 40px);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--eu) 10%, var(--panel-2)), var(--panel));
  box-shadow: var(--shadow);
}
.feature-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  padding-right: 18px;
  border-right: 1.5px dashed var(--hair);
}
.feature-meta .dateline { font-size: 12px; }
.feature-meta .coordinate { color: var(--ink); }
.feature-body h3 {
  margin: 8px 0 12px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.06;
}
.feature-body p:not(.eyebrow) { max-width: 62ch; color: var(--ink-2); font-size: 16.5px; line-height: 1.7; }
.feature-body .stack-badges { margin-top: 18px; }

.row-label {
  margin: 34px 0 14px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
}
.row-label .coordinate { display: inline; margin-right: 8px; color: var(--na); }

.experience-grid {
  --accent: var(--na);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.experience-grid article {
  position: relative;
  padding: 22px 20px;
  border: 1px solid var(--hair);
  border-left: 3px solid var(--na);
  border-radius: var(--radius-sm);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.experience-grid .exp-head {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--na);
}
.experience-grid .exp-dateline {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.experience-grid strong {
  display: block;
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
}
.experience-grid p { color: var(--ink-2); line-height: 1.62; font-size: 14.5px; }
/* headline metric as a measured "field reading" under a hairline — no pill */
.experience-grid .exp-metric {
  display: block;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--hair);
  color: var(--na);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
/* current role — gold accent only, same footprint as the others */
.experience-grid article.is-now {
  border-left-color: var(--gold);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 9%, var(--panel)), var(--panel));
}
.experience-grid .is-now .exp-metric {
  color: var(--gold-ink);
  border-top-color: color-mix(in srgb, var(--gold) 34%, var(--hair));
}
.experience-grid .is-now .exp-head { color: var(--gold-ink); }
/* small static "Current" stamp — no trendy pulse */
.experience-grid .now-tag {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
  border-radius: 3px;
  color: var(--gold-ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* ---------- field kit (skills manifest) ---------- */
.toolkit {
  margin: 44px clamp(22px, 5vw, 96px) 12px;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 26px);
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--panel);
  position: relative;
}
.toolkit::before,
.toolkit::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  border-top: 2px solid color-mix(in srgb, var(--ink) 45%, transparent);
}
.toolkit::before { left: 10px; border-left: 2px solid color-mix(in srgb, var(--ink) 45%, transparent); }
.toolkit::after { right: 10px; border-right: 2px solid color-mix(in srgb, var(--ink) 45%, transparent); }

.toolkit-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--hair);
}
.toolkit-head .eyebrow { margin: 0; }
.toolkit-ref {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.toolkit-stamp {
  margin-left: auto;
  padding: 5px 11px;
  border: 1.5px solid var(--sa);
  border-radius: 4px;
  color: var(--sa);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.toolkit-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}
.gauge-wide { grid-column: 1 / -1; }
/* each group is its own gauge cluster, keyed to a continent accent */
.gauge {
  padding: 14px 16px;
  border: 1px solid var(--hair);
  border-top: 2px solid var(--gauge);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--gauge) 4%, transparent);
}
.gauge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.toolkit-groups dt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gauge-ink, color-mix(in srgb, var(--gauge) 68%, var(--ink)));
}
.gauge-count {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.toolkit-groups dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px 18px;
}
/* every tool is its own token. No inline separators: they strand a dangling
   "·" at the end of a wrapped line — spacing carries the rhythm instead. */
.tool {
  position: relative;
  padding-bottom: 2px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.01em;
  /* dotted underline signals "there's something to hover here" */
  border-bottom: 1px dotted color-mix(in srgb, var(--ink) 32%, transparent);
  transition: color 140ms ease, border-color 140ms ease;
}
.course {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.01em;
}
.toolkit-hint {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* pointing at a tool names where it was used, in a bubble above it */
.tool { cursor: help; }
.tool:hover, .tool:focus-visible, .tool-active {
  color: var(--na);
  border-bottom-style: solid;
  border-bottom-color: var(--na);
  outline: none;
}

/* compact, single-line where it can be, so it covers as little as possible */
.tool-bubble {
  --arrow-x: 50%;
  position: absolute;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
  max-width: 340px;
  padding: 7px 11px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--panel-2);
  box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(0, 0, 0, 0.04);
  pointer-events: none;
  animation: bubbleIn 130ms ease-out;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
/* the arrow tracks the hovered token, even when the bubble is clamped */
.tool-bubble::after {
  content: "";
  position: absolute;
  left: var(--arrow-x);
  bottom: -4.5px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  transform: rotate(45deg);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--panel-2);
}
.tool-bubble.below::after {
  bottom: auto;
  top: -4.5px;
  border: 0;
  border-left: 1px solid var(--ink);
  border-top: 1px solid var(--ink);
}
.tb-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.tb-place {
  color: var(--na);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
/* thin separator between places, never trailing */
.tb-place + .tb-place::before {
  content: "·";
  margin-right: 7px;
  color: var(--muted);
  font-weight: 400;
}
@media (prefers-reduced-motion: reduce) {
  .tool-bubble { animation: none; }
}

/* work authorization in the border-control stamp vocabulary */
.eligibility { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin: 4px 0 22px; }
.work-stamp {
  flex: none;
  padding: 6px 11px;
  border: 1.5px solid var(--sa);
  border-radius: 4px;
  color: var(--sa);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transform: rotate(-2.5deg);
}
.work-detail {
  color: rgba(244, 239, 227, 0.92);
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
}

/* ---------- projects (solo expeditions) ---------- */
.project-section {
  --accent: var(--sa);
  position: relative;
  padding: 80px clamp(22px, 5vw, 96px);
}
/* ---- projects: toolbar ---- */
.projects-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--hair);
}
.projects-subhead { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.2vw, 27px); }
#service-count {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ---- projects: mission console ---- */
.console {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* tab rail */
.console-rail {
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--ink) 5%, var(--panel));
  border-right: 1.5px solid var(--hair);
}
.rail-tab {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  border-left: 3px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease;
}
.rail-tab:hover { background: color-mix(in srgb, var(--sa) 8%, transparent); }
.rail-tab.active { background: var(--panel-2); border-left-color: var(--sa); }
.rail-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rail-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.15; }
.rail-status {
  flex: none;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--sa) 68%, var(--ink));
}
.rail-line {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rail-period { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--muted); }

/* stage */
.console-stage {
  --accent: var(--sa);
  min-width: 0;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--panel-2);
}
.stage-inner { animation: stageIn 150ms ease-out; }
.stage-inner:focus-visible { outline: 2.5px solid var(--na); outline-offset: 4px; border-radius: 6px; }
@keyframes stageIn { from { opacity: 0; } to { opacity: 1; } }

/* media first */
.media-viewer { margin-bottom: 18px; }
.media-main {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--paper);
  overflow: hidden;
  cursor: zoom-in;
}
.media-main img { display: block; width: 100%; max-height: 430px; object-fit: contain; }
.media-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.media-thumb {
  width: 92px;
  height: 58px;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 5px;
  background: var(--paper);
  overflow: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.media-thumb.active { border-color: var(--sa); box-shadow: 0 0 0 1px var(--sa); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* instrument strip */
.instrument-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 30px;
  padding: 13px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.instrument-strip > div { display: grid; gap: 2px; }
.instrument-strip span {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.instrument-strip strong { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--ink); }
.instrument-strip .story-actions { margin-left: auto; }

/* the engineering decision that earns the interview — the loudest block on
   the stage. The label rides the top border like a fieldset legend. */
.hard-part {
  position: relative;
  margin: 26px 0 4px;
  padding: 21px 20px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--hair));
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.hp-label {
  position: absolute;
  top: -9px;
  left: 17px;
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hard-part p {
  margin: 0;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.62;
  text-wrap: pretty;
}

/* problem / approach / outcome, side by side */
.pao {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
  margin-top: 18px;
}
.pao section { border-top: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); padding-top: 11px; }
.pao h4 {
  margin: 0 0 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
}
.pao p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }

/* proof readings */
.proof-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--hair);
}
.proof-row > div { display: grid; gap: 3px; }
.proof-row span {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--sa) 68%, var(--ink));
}
.proof-row strong { color: var(--ink-2); font-size: 12.5px; font-weight: 400; line-height: 1.5; }

/* deep-link arrival flash */
.project-flash { animation: projectFlash 1.6s ease; }
@keyframes projectFlash {
  0%, 100% { box-shadow: var(--shadow-card); }
  25% { box-shadow: 0 0 0 2px var(--sa), var(--shadow-card); }
}

.stack-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.badge {
  padding: 3px 9px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-blue { background: #d8ecf3; color: #12546f; }
.badge-green { background: #d9efdf; color: #1c633a; }
.badge-yellow { background: #f6e6bd; color: #7f5600; }
.badge-gray { background: #e4ddcd; color: #4a5560; }
:root[data-theme="dark"] .badge-blue { background: rgba(74, 168, 207, 0.18); color: #9fd6ec; }
:root[data-theme="dark"] .badge-green { background: rgba(79, 168, 113, 0.18); color: #96d6ab; }
:root[data-theme="dark"] .badge-yellow { background: rgba(232, 178, 74, 0.18); color: #ecc879; }
:root[data-theme="dark"] .badge-gray { background: rgba(233, 222, 201, 0.12); color: #c3ccd2; }

.story-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.inspector-block { padding: 20px 0; border-top: 1px solid var(--line); }
.inspector-block h4 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.inspector-block p { color: var(--ink-2); line-height: 1.66; }
.inspector-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.inspector-list li {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.inspector-list li:first-child { border-top: 0; }
.inspector-list span {
  color: var(--sa);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.inspector-list strong { line-height: 1.5; font-weight: 600; }

.language-chart-inline {
  width: 100%;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 8px 0;
}
.chart-label { fill: var(--ink-2); font-family: var(--font-mono); font-size: 12px; font-weight: 700; }

.project-shots { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.project-shot {
  padding: 0;
  margin: 0;
  height: 200px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  box-shadow: 4px 4px 0 var(--line);
  cursor: zoom-in;
  line-height: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.project-shot:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--sa); }
.project-shot img { display: block; width: auto; max-width: 100%; height: 100%; }

/* ---------- contact (next destination) ---------- */
.contact-section {
  /* This panel stays dark in both themes, so pin its tokens — otherwise
     light-mode ink lands as dark text on a dark background. */
  --ink: #e9dec9;
  --ink-2: #b7c0c6;
  --muted: #8a969d;
  --na: #4aa8cf;
  --eu: #e57a54;
  --sa: #5cc98a;
  --gold: #e8b24a;
  --gold-ink: #e8b24a;
  --accent: var(--gold);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
  margin: 0 clamp(22px, 5vw, 96px) 72px;
  padding: clamp(30px, 4vw, 56px);
  border: 1.5px solid #0c1319;
  border-radius: var(--radius);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(217, 154, 36, 0.22), transparent 55%),
    linear-gradient(90deg, rgba(217, 154, 36, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(217, 154, 36, 0.06) 1px, transparent 1px),
    #14202a;
  background-size: auto, 34px 34px, 34px 34px, auto;
  color: #f4efe3;
  box-shadow: var(--shadow);
}
.contact-section .eyebrow { color: var(--gold); }
.availability-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 6px;
  padding: 7px 15px;
  border: 1px solid rgba(217, 154, 36, 0.5);
  border-radius: 999px;
  background: rgba(217, 154, 36, 0.12);
  color: #f0d6a8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.availability-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 154, 36, 0.28);
  animation: chip-pulse 2.4s ease-in-out infinite;
}
@keyframes chip-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(217, 154, 36, 0.28); }
  50% { box-shadow: 0 0 0 6px rgba(217, 154, 36, 0.04); }
}
.contact-section h2 { color: #f7f2e6; max-width: 20ch; }
.contact-note { margin: 14px 0 0; color: rgba(244, 239, 227, 0.82); font-size: 16px; line-height: 1.62; max-width: 52ch; }
.contact-note a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(217, 154, 36, 0.7);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease, text-decoration-thickness 200ms ease;
}
.contact-note a:hover { text-decoration-color: var(--gold); text-decoration-thickness: 2.5px; }
.contact-side { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.contact-actions { flex-wrap: wrap; gap: 12px; justify-content: center; }
.contact-section .secondary-button { background: transparent; border-color: rgba(244, 239, 227, 0.6); color: #f4efe3; }
.contact-section .primary-button { background: var(--gold); color: #14202a; border-color: var(--gold); box-shadow: 4px 4px 0 rgba(244, 239, 227, 0.25); }

.compass {
  position: relative;
  width: 108px;
  height: 108px;
  border: 2px solid rgba(244, 239, 227, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 58%, rgba(244, 239, 227, 0.08) 60%),
    conic-gradient(from 0deg, transparent 0 86deg, rgba(244, 239, 227, 0.12) 88deg 92deg, transparent 94deg 176deg, rgba(244, 239, 227, 0.12) 178deg 182deg, transparent 184deg);
}
.compass-needle {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 42px solid var(--gold);
  transform-origin: 50% 100%;
  animation: compass-sway 6s ease-in-out infinite;
}
.compass-n {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
@keyframes compass-sway {
  0%, 100% { transform: translateX(-50%) rotate(-16deg); }
  50% { transform: translateX(-50%) rotate(18deg); }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(20, 27, 33, 0.86);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-image {
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  border: 2px solid var(--panel);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 26px;
  line-height: 1;
}
.lightbox-close:hover { transform: translate(-1px, -1px); }
body.lightbox-open { overflow: hidden; }

/* ---------- accessibility ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

a:focus-visible,
button:focus-visible,
.rail-tab:focus-visible,
.media-thumb:focus-visible,
.tool:focus-visible {
  outline: 2.5px solid var(--na);
  outline-offset: 3px;
  border-radius: 6px;
}
.contact-section a:focus-visible,
.contact-section button:focus-visible { outline-color: var(--gold); }

/* ---------- skeleton loading ---------- */
.skeleton {
  display: inline-block;
  min-width: 70px;
  height: 0.9em;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(31, 42, 50, 0.06) 25%, rgba(31, 42, 50, 0.13) 37%, rgba(31, 42, 50, 0.06) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  color: transparent;
  vertical-align: middle;
}
.skeleton-inline { min-width: 58px; height: 0.85em; }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ---------- section number stamp ---------- */
.section-stamp {
  position: absolute;
  top: clamp(26px, 3vw, 52px);
  right: clamp(22px, 5vw, 96px);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  transform: rotate(-9deg);
  opacity: 0.42;
  pointer-events: none;
}

/* ---------- motion / reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .section-heading, .experience-feature, .experience-grid article,
  .proof-strip article, .console, .contact-section {
    animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .compass-needle { animation: none; transform: translateX(-50%) rotate(0deg); }
  .passport-page { transition: none; }
  .skeleton { animation: none; }
  .availability-chip::before { animation: none; }
  .stage-inner { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .passport { display: none; }
}

@media (max-width: 1020px) {
  .hero, .contact-section { grid-template-columns: 1fr; }
  .console { grid-template-columns: 1fr; }
  .console-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1.5px solid var(--hair); }
  .rail-tab { flex: 0 0 200px; border-bottom: 0; border-left: 0; border-top: 3px solid transparent; }
  .rail-tab.active { border-top-color: var(--sa); }
  .rail-line { display: none; }
  .pao, .proof-row { grid-template-columns: 1fr; }
  .field-stations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { min-height: auto; margin-top: -112px; padding-top: 210px; }
  .travel-scene { height: 560px; }
  .journey-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolkit-groups { grid-template-columns: 1fr; }
  .experience-grid { grid-template-columns: 1fr; }
  .experience-feature { grid-template-columns: 1fr; }
  .feature-meta { flex-direction: row; flex-wrap: wrap; align-items: center; padding-right: 0; padding-bottom: 16px; border-right: 0; border-bottom: 1.5px dashed var(--hair); }
  .contact-side { align-items: flex-start; }
  .contact-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .topbar { top: 8px; width: calc(100% - 24px); margin-top: 14px; flex-wrap: wrap; align-items: flex-start; border-radius: 18px; }
  .brand, .topbar-actions { min-width: auto; }
  .nav-links { order: 3; width: 100%; flex-wrap: wrap; }
  .hero { margin-top: -168px; padding: 236px 16px 28px; }
  .travel-scene { height: 470px; }
  .hero-notes li { padding: 12px 0 12px 20px; }
  .hero-lead { font-size: 16.5px; }
  .journey-chapters { grid-template-columns: 1fr; }
  .field-stations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .education-card { flex-direction: column; align-items: flex-start; gap: 18px; }
  .edu-honors { justify-content: flex-start; gap: 24px; align-self: stretch; }
  .edu-gpa { align-items: flex-start; }
  .section-stamp { display: none; }
  .story-header { flex-direction: column; align-items: flex-start; }
  .story-actions { width: 100%; }
  .story-actions .compact { flex: 1; justify-content: center; }
  .primary-button, .secondary-button { width: 100%; }
  .compact { width: auto; }
  .section-divider::after { right: 2%; }
  /* the wrapped topbar is ~250px tall at this width */
  .proof-strip, .project-section, .experience-band, .contact-section { scroll-margin-top: 250px; }
}

@media (max-width: 480px) {
  .hero-copy, .console-stage, .contact-section { padding: 16px; }
  .contact-section { padding: 22px; }
  .inspector-list li { grid-template-columns: 1fr; gap: 4px; }
  .project-shot { height: 168px; }
  .topbar-actions { width: 100%; }
  .topbar-actions .compact { flex: 1; }
  /* Resume matters more to a recruiter than GitHub, and GitHub is reachable
     from every project's Open Repo button and the contact section. */
  .nav-github { display: none; }
}

/* ---------- print ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff !important; color: #000; }
  body::before,
  .travel-scene,
  .passport,
  .compass,
  .topbar-actions,
  .nav-links,
  .section-divider,
  .section-stamp,
  .journey-chapters { display: none !important; }
  .app-shell { max-width: none; }
  .hero { min-height: auto; margin: 0; padding: 0 0 20px; }
  .hero, .console, .pao, .proof-row, .contact-section,
  .experience-feature, .experience-grid, .toolkit-groups { display: block; }
  .experience-grid article, .proof-strip article { break-inside: avoid; }
  .primary-button, .secondary-button, .theme-toggle { display: none !important; }
  a { color: #000; text-decoration: underline; }
  .console { border: 1px solid #999; box-shadow: none; }
  .console-rail { display: none; }
}
