/* =========================================================
   Marcelo Guzmán · GIS Portfolio
   Futuristic Organic Gradient Modernist
   ========================================================= */

:root {
  /* base — dark mode default */
  --ink: oklch(0.94 0.006 50);
  --ink-dim: oklch(0.76 0.008 50 / 0.78);
  --ink-faint: oklch(0.62 0.006 50 / 0.55);
  --rule: oklch(1 0 0 / 0.10);
  --rule-soft: oklch(1 0 0 / 0.055);

  /* near-black warm base */
  --bg-0: oklch(0.08 0.008 45);
  --bg-1: oklch(0.11 0.009 45);
  --bg-card: oklch(0.15 0.008 45 / 0.55);

  /* aura hues — warm spectrum */
  --spec-azure:  oklch(0.42 0.06 55);
  --spec-magenta:oklch(0.38 0.06 20);
  --spec-amber:  oklch(0.60 0.10 62);

  /* accents — warm amber gold */
  --accent-warm: oklch(0.74 0.12 65);
  --accent-glow: oklch(0.62 0.08 55);

  /* glass */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-stroke: rgba(255, 255, 255, 0.10);
  --glass-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.55);
  --glass-blur: 18px;

  --maxw: 1240px;
  --radius: 28px;
  --radius-sm: 16px;

  --t-fast: 220ms cubic-bezier(.2,.7,.2,1);
  --t-base: 520ms cubic-bezier(.2,.7,.2,1);
  --t-slow: 900ms cubic-bezier(.2,.7,.2,1);
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body { --font-display: 'Syne', system-ui, sans-serif; }

body {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

/* =========================================================
   ATMOSPHERIC SUBSTRATE
   ========================================================= */

/* fixed full-viewport substrate — warm dark */
.substrate {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 100% 55% at 50% -8%, oklch(0.14 0.015 50 / 0.50) 0%, transparent 60%),
    oklch(0.08 0.008 45);
}

.substrate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 75% at 50% 50%, transparent 40%, oklch(0 0 0 / 0.30) 100%);
  pointer-events: none;
}

.substrate::after {
  display: none;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(-2%, 1%, 0) rotate(8deg) scale(1.04); }
  100% { transform: translate3d(2%, -1%, 0) rotate(-4deg) scale(1.02); }
}
@keyframes pan {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-84px, -84px, 0); }
}

/* fine grain noise */
.grain {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.35;
  mix-blend-mode: overlay;
}

/* ambient drifting orbs per section -- echo of spectrum bands */
.aura {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.aura > span {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;  /* warm dark: slightly visible amber/orange glow */
  mix-blend-mode: screen;
  animation: float 22s ease-in-out infinite alternate;
}
@keyframes float {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(40px, -28px, 0) scale(1.08); }
}

/* =========================================================
   LIQUID GLASS UTILITIES
   ========================================================= */
.liquid-glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px) saturate(1.4);
  -webkit-backdrop-filter: blur(4px) saturate(1.4);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.10);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0)    40%,
    rgba(255,255,255,0)    60%,
    rgba(255,255,255,0.15) 80%,
    rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.liquid-glass-strong {
  background: rgba(255, 255, 255, 0.02);
  background-blend-mode: luminosity;
  backdrop-filter: blur(36px) saturate(1.5);
  -webkit-backdrop-filter: blur(36px) saturate(1.5);
  border: none;
  box-shadow:
    4px 4px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}
.liquid-glass-strong::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.55) 0%,
    rgba(255,255,255,0.22) 20%,
    rgba(255,255,255,0)    40%,
    rgba(255,255,255,0)    60%,
    rgba(255,255,255,0.22) 80%,
    rgba(255,255,255,0.55) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

.section {
  position: relative;
  padding: 140px 0;
}

@media (max-width: 760px) {
  .section { padding: 90px 0; }
  .container { padding: 0 22px; }
}

/* section instrument label - float in the gutter */
.instrument-label {
  position: absolute;
  top: 60px;
  /* the container's content edge, so the label reads as the section's kicker */
  left: max(32px, calc(50% - var(--maxw) / 2 + 32px));
  font-family: 'Barlow', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 12px;
}
.instrument-label::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--ink-faint);
}
.instrument-label .num {
  color: var(--accent-warm);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .instrument-label { left: 22px; }
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.font-heading,
h1, h2, h3, h4 {
  font-family: 'Syne', system-ui, sans-serif;
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

h1 { font-size: clamp(62px, 9vw, 148px); margin: 0; }
h2 { font-size: clamp(40px, 5vw, 72px); margin: 0 0 36px; font-weight: 700; text-wrap: balance; }
/* below 380px a 40px "environmental" is wider than the screen */
@media (max-width: 380px) { h2 { font-size: 10.4vw; } }
h3 { font-size: clamp(22px, 2.2vw, 30px); margin: 0 0 12px; font-weight: 600; }
h4 { font-size: 19px; margin: 0 0 8px; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink-dim); max-width: 68ch; }

a { color: var(--ink); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-warm); }

strong, b { color: var(--ink); font-weight: 500; }
em, i { font-style: italic; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Barlow', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 28px;
  max-width: none;
}
.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-warm), transparent);
}

.section-intro {
  font-size: clamp(17px, 1.4vw, 21px);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-dim);
  max-width: 62ch;
  margin: -16px 0 56px;
}

/* =========================================================
   NAV PILL — wobbling liquid glass
   ========================================================= */

.top-nav-wrap {
  position: fixed;
  top: 22px;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: transform var(--t-base);
}
.top-nav-wrap.is-hidden { transform: translateY(-200%); } /* clears the toggle too */

.top-nav {
  pointer-events: auto;
  position: relative;
  border-radius: 9999px;
  padding: 8px;
  transition: background var(--t-base);
}
.top-nav:hover { background: rgba(255,255,255,0.03); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 9999px;
}

.nav-inner a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 9999px;
  font-family: 'Barlow', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-inner a:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.07);
}
.nav-inner a.is-active {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3),
              inset 0 -1px 0 rgba(0,0,0,0.2);
}

.theme-toggle {
  pointer-events: auto;
  position: fixed;
  top: 26px;
  right: 28px;
  z-index: 81;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border: none;
  border-radius: 9999px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(18px) saturate(1.4);
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  transition: background var(--t-fast), transform var(--t-fast);
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}
.toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-warm), oklch(0.45 0.16 30) 70%);
  box-shadow: 0 0 12px var(--accent-warm);
}

/* vertically centred on the nav pill beside it */
.top-nav-wrap .theme-toggle { top: 34px; }

@media (max-width: 1100px) {
  .top-nav { max-width: calc(100vw - 110px); overflow: auto; }
}
@media (max-width: 1100px) {
  .top-nav-wrap { justify-content: flex-start; padding-left: 16px; }
  .top-nav { max-width: calc(100vw - 132px); }
  .theme-toggle { right: 16px; }
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  padding: 180px 0 120px;
  overflow: hidden;
}

.hero .container {
  width: 100%;
  position: relative;
  z-index: 1;
}
/* Hero scrim: softly washes the satellite backdrop behind the hero copy so the text reads
   cleanly. Sits above the fixed background (z-index:-1) and below the hero content (z-index:1).
   Bottom is inset by the hero's bottom padding (120px) so the scrim ends right below the skill
   ticker bar. Colour is the exact --bg-0 page base per theme, so it melts into the surface. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 120px 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(130% 100% at 30% 48%,
    oklch(0.08 0.008 45) 0%,
    oklch(0.08 0.008 45 / 0.76) 40%,
    oklch(0.08 0.008 45 / 0) 72%);
}
html[data-theme="light"] .hero::before {
  background: radial-gradient(130% 100% at 30% 48%,
    oklch(0.982 0 0) 0%,
    oklch(0.982 0 0 / 0.80) 40%,
    oklch(0.982 0 0 / 0) 72%);
}

.hero-grid {
  display: grid;
  /* the portrait column yields first, so the name never pushes it off-screen */
  grid-template-columns: minmax(0, 1fr) clamp(280px, 28vw, 380px);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 40px;
  }
  .hero-grid > div { order: 2; } /* text second */
  .hero-grid .hero-figure { order: 1; max-width: 260px; margin: 0 auto; } /* photo first, centered */
}

/* the text column is a size container, so the name can be measured against it */
.hero-grid > div { container-type: inline-size; }
.hero h1 {
  font-size: clamp(64px, 11vw, 168px);
  /* never wider than its column: "Guzmán" runs ~4.66em, and glyphs past the
     box would lose the gradient that background-clip paints them with */
  font-size: min(168px, max(64px, 11vw), 21cqi);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.hero h1 .name-soft {
  color: var(--ink);
  display: block;
}
.hero h1 .name-accent {
  /* warm gold — visible on dark bg */
  background: linear-gradient(120deg,
    oklch(0.96 0.006 60) 0%,
    oklch(0.80 0.14 68) 45%,
    oklch(0.68 0.10 52) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  width: fit-content; /* the gradient box always spans the whole word */
  font-style: normal;
}

.hero-subtitle {
  margin: 28px 0 8px;
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 300;
  line-height: 1.5;
  max-width: 56ch;
}
.hero-welcome {
  font-size: 14px;
  color: var(--ink-faint);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 38px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin-bottom: 36px;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta .glyph {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-warm);
  box-shadow: 0 0 10px var(--accent-warm);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* hero figure — FLOATING headshot card */
.hero-figure {
  position: relative;
  margin: 0; /* drop the UA figure inset, which pushed the card 40px past its column */
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  transform: translateY(-40px) rotate(1.2deg);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.20),
    0 10px 28px rgba(0,0,0,0.26),
    0 28px 60px rgba(0,0,0,0.32),
    0 56px 100px -20px rgba(0,0,0,0.40),
    0 0 0 1px rgba(255,255,255,0.09);
  animation: heroFloat 6s ease-in-out infinite alternate;
}
@keyframes heroFloat {
  0%   { transform: translateY(-40px) rotate(1.2deg); }
  100% { transform: translateY(-60px) rotate(0.5deg); }
}
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: contrast(1.04) saturate(0.88);
  transition: transform 1.8s cubic-bezier(.2,.7,.2,1);
}
.hero-figure:hover img { transform: scale(1.04); }
.hero-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(155deg,
    rgba(255,255,255,0.14) 0%,
    rgba(255,255,255,0.04) 30%,
    transparent 55%);
  z-index: 2;
  pointer-events: none;
}
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    transparent 50%,
    oklch(0.07 0.004 255 / 0.72) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-figure .caption {
  position: absolute;
  bottom: 16px;
  left: 20px;
  right: 20px;
  font-family: 'Barlow', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  display: flex;
  justify-content: space-between;
  z-index: 3;
}
/* light mode */
html[data-theme="light"] .hero-figure {
  box-shadow:
    0 2px 6px rgba(0,0,0,0.07),
    0 10px 28px rgba(0,0,0,0.10),
    0 28px 60px rgba(0,0,0,0.11),
    0 56px 80px -20px rgba(0,0,0,0.09),
    0 0 0 1px rgba(0,0,0,0.06);
}
html[data-theme="light"] .hero-figure img {
  filter: contrast(1.02) saturate(0.95);
}
html[data-theme="light"] .hero-figure::after {
  background: linear-gradient(180deg,
    transparent 60%,
    oklch(0.10 0.004 255 / 0.42) 100%);
}
html[data-theme="light"] .hero-figure .caption { color: rgba(255,255,255,0.78); }

/* hero ticker */
.hero-skill-alternatives {
  margin-top: 76px;
  display: block;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  background:
    linear-gradient(90deg, var(--bg-0) 0%, transparent 16%, transparent 84%, var(--bg-0) 100%),
    oklch(0.08 0.01 45 / 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}


.hero-ticker {
  min-width: 0;
  padding: 18px 0;
  display: flex;
  gap: 60px;
  overflow: hidden;
  font-family: 'Barlow', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.hero-ticker .track {
  display: flex;
  gap: 60px;
  animation: ticker 50s linear infinite;
  flex-shrink: 0;
}
.hero-ticker .track span::before {
  content: "◇";
  margin-right: 18px;
  color: var(--accent-warm);
}


@media (max-width: 1100px) {
  .hero-skill-alternatives {
    margin-top: 56px;
  }

  .hero-ticker {
    padding: 14px 0 18px;
  }
}

@media (max-width: 960px) {
  .hero-skill-alternatives {
    display: none;
  }
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 9999px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  color: var(--ink);
  transition: transform var(--t-fast), color var(--t-fast);
  isolation: isolate;
}
.btn:hover { transform: translateY(-2px); color: var(--ink); }
.btn::after {
  content: "→";
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  transition: transform var(--t-fast);
}
.btn:hover::after { transform: translateX(4px); }

.btn.primary {
  background: linear-gradient(180deg,
    oklch(0.78 0.13 75 / 0.92),
    oklch(0.62 0.18 30 / 0.92));
  color: oklch(0.16 0.04 250);
  box-shadow: 0 8px 32px -10px oklch(0.78 0.13 75 / 0.5),
              inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn.primary::after { color: oklch(0.16 0.04 250); }
.btn.primary:hover {
  box-shadow: 0 12px 40px -8px oklch(0.78 0.13 75 / 0.7),
              inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn.ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
}
.btn.ghost:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.28);
}

/* =========================================================
   SECTION HEADER (shared)
   ========================================================= */
.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 60px;
  align-items: end;
  align-items: last baseline; /* intro's last line on the heading's last line */
  margin-bottom: 80px;
}
@media (max-width: 860px) {
  .section-header { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; }
}
.section-header h2 { margin: 0; }
/* sit on the heading's last line rather than floating above it */
.section-header .section-intro { margin: 0; }

/* =========================================================
   ABOUT
   ========================================================= */
.about-prose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
@media (max-width: 860px) {
  .about-prose { grid-template-columns: 1fr; gap: 32px; }
}
.about-prose p {
  font-size: 19px;
  font-weight: 300;
  line-height: 1.55;
}
.about-prose .lead {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.25;
  color: var(--ink);
  max-width: 100%;
}

/* image belt 3D */
.image-belt {
  margin-top: 80px;
}
.belt-viewport {
  position: relative;
  height: 360px;
  perspective: 1400px;
  overflow: hidden;
  border-radius: var(--radius);
}
.belt-viewport.is-dragging { cursor: grabbing; }

.belt-track {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.belt-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 280px;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  transition: transform var(--t-base), opacity var(--t-base);
  cursor: pointer;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
}
.belt-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.9) contrast(1.05);
}
.belt-item.is-active {
  box-shadow: 0 32px 70px -16px oklch(0.55 0.20 240 / 0.55),
              0 0 0 1px rgba(255, 255, 255, 0.18);
}
.belt-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.belt-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  padding: 10px 20px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.belt-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

/* portfolio map */
.about-map-subsection {
  margin-top: 100px;
  padding-top: 60px;
  border-top: 1px solid var(--rule-soft);
}
.about-map-header { margin-bottom: 24px; }
.about-map-header h3 {
  font-size: clamp(28px, 3vw, 40px);
  margin-bottom: 10px;
}
.map-legend {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  font-size: 12px;
  font-family: 'Barlow', monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.legend-pin {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.legend-pin.legend-featured { background: var(--accent-warm); box-shadow: 0 0 10px var(--accent-warm); }
.legend-pin.legend-standard { background: var(--accent-glow); box-shadow: 0 0 8px var(--accent-glow); }

.portfolio-map {
  height: 520px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  filter: hue-rotate(-8deg) saturate(0.85);
}
/* leaflet popup theme */
.leaflet-container { background: oklch(0.18 0.05 248); font-family: 'Barlow', sans-serif; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: oklch(0.075 0.008 45);
  color: oklch(0.94 0.006 50);
  border: 1px solid oklch(1 0 0 / 0.10);
  border-radius: 18px;
  box-shadow: 0 18px 48px -10px rgba(0,0,0,0.78);
}
.leaflet-popup-content { margin: 0; min-width: 240px; }
/* Tile credit: a quiet glass pill inset from the rounded corner instead of
   Leaflet's white strip. Chained selector outranks leaflet.css, which loads later. */
.portfolio-map.leaflet-container .leaflet-control-attribution {
  margin: 0 22px 14px 0;
  padding: 3px 11px;
  border-radius: 9999px;
  background: oklch(0.08 0.008 45 / 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--rule-soft);
  font-family: 'Barlow', sans-serif;
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.portfolio-map.leaflet-container .leaflet-control-attribution a {
  color: inherit;
  text-decoration: none;
}
.portfolio-map.leaflet-container .leaflet-control-attribution a:hover,
.portfolio-map.leaflet-container .leaflet-control-attribution a:focus-visible {
  color: var(--accent-warm);
  text-decoration: underline;
}
.portfolio-map-popup .leaflet-popup-close-button { color: oklch(0.94 0.006 50); }
.map-pin-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-glow);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18), 0 0 16px var(--accent-glow);
  position: relative;
  top: 4px;
  left: 4px;
  animation: pin-pulse 2.6s ease-in-out infinite;
}
.map-pin-dot.is-featured {
  background: var(--accent-warm);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.24), 0 0 18px var(--accent-warm);
}
@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,0.18), 0 0 16px currentColor; }
  50% { box-shadow: 0 0 0 6px rgba(255,255,255,0.04), 0 0 22px currentColor; }
}

.map-popup-carousel {
  padding: 14px;
  background: linear-gradient(145deg, oklch(0.09 0.009 45), oklch(0.055 0.006 45));
  border-radius: 18px;
}
.map-popup-header {
  display: flex;
  justify-content: space-between;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(0.72 0.006 50 / 0.68);
  margin-bottom: 10px;
}
.map-project-card { display: none; }
.map-project-card.is-active { display: block; }
.map-project-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}
.map-project-card h4 {
  color: oklch(0.96 0.006 50);
  font-size: 17px;
  font-style: normal;
  margin: 4px 0 6px;
}
.map-project-card p {
  color: oklch(0.78 0.008 50 / 0.82);
  font-size: 13px;
  line-height: 1.45;
}
.map-project-card .btn { padding: 9px 16px; font-size: 11px; }
.map-popup-carousel-nav {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.map-nav-btn {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ink);
  padding: 8px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.map-featured-pill {
  display: inline-block;
  font-family: 'Barlow', monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-warm);
  border: 1px solid var(--accent-warm);
  padding: 3px 8px;
  border-radius: 9999px;
  margin-bottom: 6px;
}

/* =========================================================
   VIDEO
   ========================================================= */
.video-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* =========================================================
   SKILLS
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 960px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-card {
  position: relative;
  border-radius: var(--radius);
  padding: 36px 32px 32px;
  min-height: 320px;
}
.skill-card .skill-num {
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 30px;
  display: block;
}
.skill-card h3 {
  font-size: clamp(26px, 2vw, 32px);
  margin-bottom: 24px;
}
.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list li {
  display: inline-flex;
  font-family: 'Barlow', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 7px 13px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-dim);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.tag-list li:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  transform: translateY(-1px);
}

/* =========================================================
   FEATURED CAROUSEL
   ========================================================= */
.featured-carousel-wrapper {
  position: relative;
}
.slideshow-container { position: relative; }
.mySlides { display: none; animation: fade 1s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.featured-slide-container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  border-radius: var(--radius);
  padding: 48px;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}
@media (max-width: 960px) {
  .featured-slide-container { grid-template-columns: 1fr; padding: 28px; }
}

.numbertext {
  position: absolute;
  top: 24px;
  right: 32px;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
}

.featured-slide-title {
  font-size: clamp(28px, 3vw, 42px);
  margin-bottom: 16px;
  font-style: normal;
  line-height: 1.1;
}
.featured-slide-subtitle {
  font-family: 'Barlow', sans-serif;
  font-style: normal;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 0 0 28px;
  text-transform: none;
}
.featured-slide-subtitle i { font-style: italic; color: var(--accent-warm); }
.featured-slide-maintext {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin-bottom: 18px;
  font-weight: 300;
}
.featured-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}
.featured-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-dim);
}
.featured-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 1px;
  background: var(--accent-warm);
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.featured-actions .btn {
  padding: 12px 18px;
  font-size: 11px;
}

.feature-media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  min-height: 380px;
}

.feature-media-embed {
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-height: 560px;
  background: rgba(255,255,255,0.04);
}

.featured-linkedin-embed {
  width: min(100%, 504px);
  height: min(72vh, 760px);
  min-height: 560px;
  border: 0;
  background: #fff;
}
.featured-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease;
}
.featured-slide-image.is-active { opacity: 1; }

/* Landhawk slide: a three-step flow in place of a screenshot */
.feature-media-flow {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: clamp(24px, 4vw, 44px);
  background:
    radial-gradient(120% 90% at 0% 0%, oklch(0.74 0.12 65 / 0.10), transparent 60%),
    rgba(255,255,255,0.03);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.flow-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px var(--rule);
}
/* connector through the gap to the next step */
.flow-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 37px;
  bottom: -15px;
  width: 1px;
  height: 16px;
  background: var(--accent-warm);
}
.flow-index {
  grid-row: span 2;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent-warm);
  padding-top: 4px;
}
.flow-steps strong {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 600;
}
.flow-steps li > span:last-child {
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-dim);
}
.flow-stat {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  max-width: none;
  padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
}
.flow-stat-num {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 4vw, 52px);
  line-height: 1;
  color: var(--accent-warm);
}
.flow-approx {
  /* Syne draws "~" as a dot-like mark; the body face reads as a tilde */
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  margin-right: 0.04em;
}
.flow-stat > span:last-child {
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.feature-media-nav {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  border-radius: 9999px;
  padding: 6px 8px;
  z-index: 5;
}
.media-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.media-btn:hover { background: rgba(255,255,255,0.22); }
.media-dots { display: flex; gap: 6px; }
.media-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  transition: background var(--t-fast);
}
.media-dot.is-active { background: var(--accent-warm); }

/* featured carousel controls: a toolbar above the card, the one edge that
   stays put when projects of different heights swap in */
.featured-carousel-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 0 0 20px;
}
.featured-arrows {
  display: flex;
  gap: 10px;
}
.featured-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
  backdrop-filter: blur(12px);
}
.featured-nav-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.05);
}
.featured-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: all var(--t-fast);
}
.dot.active {
  background: var(--accent-warm);
  width: 32px;
  border-radius: 9999px;
}

/* =========================================================
   REFERENCES
   ========================================================= */
.letters-list {
  list-style: none;
  margin: 0;
  padding: 8px 32px;
  border-radius: var(--radius);
}
.letter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 20px 0;
}
.letter-row + .letter-row { border-top: 1px solid var(--rule-soft); }
.letter-info { flex: 1; min-width: 0; }
.letter-row h3 {
  margin: 0 0 6px;
  font-size: 22px;
}
.letter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  max-width: none;
  margin: 0;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-warm);
}
.letter-meta span { color: var(--ink-faint); }
.letter-row .btn {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 12px;
}
.btn[download]::after { content: "↓"; }
.btn[download]:hover::after { transform: translateY(3px); }
@media (max-width: 640px) {
  .letters-list { padding: 4px 20px; }
  .letter-row { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 0;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 18px;
  width: 1px;
  background: linear-gradient(180deg,
    transparent,
    var(--accent-warm) 10%,
    var(--accent-glow) 60%,
    transparent);
}
@media (max-width: 720px) {
  .timeline::before { left: 10px; }
}
.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 48px;
}
@media (max-width: 720px) { .timeline-item { padding-left: 36px; margin-bottom: 36px; } }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 2px solid var(--accent-warm);
  box-shadow: 0 0 12px var(--accent-warm);
}
@media (max-width: 720px) { .timeline-item::before { left: 4px; } }
.timeline-date {
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 8px;
}
.timeline-content { max-width: 70ch; }
.timeline-content h3 { font-size: 22px; margin-bottom: 10px; }
.timeline-content p { font-size: 15px; font-weight: 300; max-width: none; }
.timeline-content ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.timeline-content ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-dim);
}
.timeline-content ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px;
  height: 1px;
  background: var(--accent-glow);
}

/* =========================================================
   EDUCATION
   ========================================================= */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 960px) { .edu-grid { grid-template-columns: 1fr; } }
.edu-card {
  border-radius: var(--radius);
  padding: 32px;
  min-height: 280px;
}
.edu-card h3 { margin-bottom: 8px; }
.edu-card p { font-size: 15px; font-weight: 300; line-height: 1.6; }
.edu-card .edu-meta {
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 16px;
}
.edu-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.edu-card ul li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.edu-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 1px;
  background: var(--accent-glow);
}

/* =========================================================
   AWARDS — restructured
   ========================================================= */
.awards-shell {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.awards-shell .awards-summary {
  container: awards-summary / inline-size;
  grid-column: span 5;
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 120px;
  align-self: start;
}
.awards-shell .awards-stack { grid-column: span 7; display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 960px) {
  .awards-shell .awards-summary,
  .awards-shell .awards-stack { grid-column: 1/-1; position: static; }
}

.awards-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 24px;
}
.awards-stat .num {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 64px;
  line-height: 1;
  background: linear-gradient(110deg, var(--accent-warm), var(--accent-glow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.awards-stat .label {
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 6px;
}

.awards-stat-link {
  grid-column: 1 / -1;
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
  border-radius: 16px;
  outline-offset: 8px;
  padding-right: 34px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.awards-stat-link::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 2px;
  width: 26px;
  height: 26px;
  background: var(--accent-glow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='26' height='26' viewBox='0 0 26 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 7.25H18.75V18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18.35 7.65L6.75 19.25' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg width='26' height='26' viewBox='0 0 26 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 7.25H18.75V18' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18.35 7.65L6.75 19.25' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--t-fast), background var(--t-fast);
}
.awards-stat-link .label {
  max-width: 44ch;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink-dim);
}
.awards-stat-link:hover,
.awards-stat-link:focus-visible {
  opacity: 0.82;
  transform: translateY(-2px);
}
.awards-stat-link:hover::after,
.awards-stat-link:focus-visible::after {
  transform: translate(3px, -3px);
}

.award-row {
  border-radius: 22px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: start;
  transition: transform var(--t-fast), background var(--t-fast);
}
.award-row:hover { transform: translateX(4px); }
.award-year-pill {
  font-family: 'Barlow', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent-warm);
  border: 1px solid var(--accent-warm);
  border-radius: 9999px;
  padding: 4px 10px;
  text-align: center;
  /* equal widths, so the pills form a clean column */
  width: 100%;
}
.award-row h3 {
  font-size: 19px;
  margin: 0 0 4px;
  line-height: 1.2;
}
.award-row p {
  font-size: 14px;
  font-weight: 300;
  margin: 0;
  color: var(--ink-dim);
}
.award-row .award-link { margin-top: 10px; }
.award-link a {
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-warm);
}
.award-link a:hover { text-decoration: underline; }
/* a narrow summary card (small laptops, phones) can't fit three columns of
   64px counts and tracked caps: one count per line instead */
@container awards-summary (max-width: 390px) {
  .awards-stat-row { grid-template-columns: 1fr; gap: 14px; }
  .awards-stat:not(.awards-stat-link) { display: flex; align-items: baseline; gap: 16px; }
  .awards-stat:not(.awards-stat-link) .num { flex: 0 0 80px; }
  .awards-stat:not(.awards-stat-link) .label { margin-top: 0; }
  .awards-stat .num { font-size: 48px; }
}
@media (max-width: 640px) {
  .award-row { grid-template-columns: 1fr; gap: 12px; padding: 22px; }
  .award-year-pill { width: fit-content; }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}
.contact-shell > :first-child {
  min-width: 0;
}
.contact-headline {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: clamp(44px, 5.2vw, 88px);
  line-height: 1;
  margin: 0 0 24px;
  max-width: 15ch;
  text-wrap: balance;
}
.contact-card {
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 760px;
  justify-self: start;
}
.contact-card p {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.45;
}
.contact-card strong {
  display: block;
  margin-bottom: 4px;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
.contact-actions {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 680px) {
  .contact-card {
    max-width: none;
    padding: 28px;
  }
}
/* =========================================================
   FULL PORTFOLIO GRID
   ========================================================= */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.filter-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ink-dim);
  padding: 9px 18px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: all var(--t-fast);
}
.filter-btn:hover { background: rgba(255,255,255,0.08); color: var(--ink); }
.filter-btn.is-active {
  background: var(--accent-warm);
  color: oklch(0.16 0.04 250);
  border-color: var(--accent-warm);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 960px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .portfolio-grid { grid-template-columns: 1fr; } }

.portfolio-card {
  position: relative;
  display: block;
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
  transition: transform var(--t-base);
}
.portfolio-card.is-hidden { display: none; }
.portfolio-card:hover { transform: translateY(-4px); }
.portfolio-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 1s cubic-bezier(.2,.7,.2,1);
}
.portfolio-card:hover .portfolio-card-bg { transform: scale(1.08); }
.portfolio-card-overlay {
  position: absolute;
  inset: 0;
  /* a frosted caption plate: the art stays sharp above, and under the title it is
     blurred and tinted, so busy figures and logos never fight the text */
  background: linear-gradient(180deg,
    oklch(0.08 0.008 45 / 0.35) 40%,
    oklch(0.08 0.008 45 / 0.82) 100%);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  -webkit-mask-image: linear-gradient(180deg, transparent 34%, #000 62%);
          mask-image: linear-gradient(180deg, transparent 34%, #000 62%);
}
/* phones skip the blur (as with the other blurred layers) and lean on the tint */
@media (max-width: 760px) {
  .portfolio-card-overlay {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(180deg,
      oklch(0.08 0.008 45 / 0.6) 40%,
      oklch(0.08 0.008 45 / 0.94) 100%);
  }
}
.portfolio-card-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  z-index: 1;
}
.portfolio-card-content h3 {
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--ink);
}
.portfolio-card-meta {
  margin: 0 0 10px;
  max-width: none;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.view-project-link {
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-warm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--t-fast);
}
.portfolio-card:hover .view-project-link { gap: 12px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--rule-soft);
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.footer-inner p { margin: 0; max-width: none; color: inherit; }

/* =========================================================
   FULLSCREEN MODAL
   ========================================================= */
.fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.fullscreen-modal.is-open { display: block; }
.fullscreen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
}
.fullscreen-content {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.fullscreen-media-wrapper {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
}
.fullscreen-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.fullscreen-close,
.fullscreen-nav {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background var(--t-fast);
}
.fullscreen-close:hover,
.fullscreen-nav:hover { background: rgba(255,255,255,0.15); }
.fullscreen-close { top: 24px; right: 24px; }
.fullscreen-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.fullscreen-next { right: 24px; top: 50%; transform: translateY(-50%); }
.fullscreen-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

/* =========================================================
   ANIMATE-ON-SCROLL
   ========================================================= */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1),
              transform 1s cubic-bezier(.2,.7,.2,1);
}
.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* svg defs for filters - put offscreen */
.filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* selection */
::selection {
  background: var(--accent-warm);
  color: oklch(0.08 0.006 255);
}

/* =========================================================
   LIGHT MODE — achromatic + cool blue
   ========================================================= */
html[data-theme="light"] {
  --ink: oklch(0.10 0 0);
  --ink-dim: oklch(0.30 0 0 / 0.75);
  --ink-faint: oklch(0.50 0 0 / 0.55);
  --rule: oklch(0 0 0 / 0.09);
  --rule-soft: oklch(0 0 0 / 0.05);

  --bg-0: oklch(0.982 0 0);
  --bg-1: oklch(0.970 0 0);
  --bg-card: oklch(1 0 0 / 0.90);

  /* cool blue accents only */
  --accent-warm: oklch(0.48 0.16 242);
  --accent-glow: oklch(0.60 0.14 238);

  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-stroke: rgba(0, 0, 0, 0.07);
  --glass-shadow: 0 6px 30px -8px rgba(0, 0, 0, 0.08);
  --glass-blur: 22px;
}

html[data-theme="light"] body {
  background: var(--bg-0);
  color: var(--ink);
}

/* Substrate — pure white */
html[data-theme="light"] .substrate {
  background: oklch(0.982 0 0);
}
html[data-theme="light"] .substrate::before { opacity: 0; }
html[data-theme="light"] .substrate::after  { display: none; }
html[data-theme="light"] .grain {
  opacity: 0.05;
  mix-blend-mode: multiply;
}
html[data-theme="light"] .aura > span { opacity: 0 !important; }

/* Glass cards */
html[data-theme="light"] .liquid-glass {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
  box-shadow: 0 3px 24px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255,255,255,0.95) inset;
}
html[data-theme="light"] .liquid-glass::before {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.55) 30%,
    rgba(0,0,0,0.02) 60%,
    rgba(0,0,0,0.05) 100%);
}

/* Nav — frosted white pill */
html[data-theme="light"] .top-nav {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  box-shadow:
    0 4px 24px rgba(0,0,0,0.09),
    0 0 0 1px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,1);
}
html[data-theme="light"] .top-nav:hover { background: rgba(255,255,255,0.78); }
html[data-theme="light"] .nav-inner a { color: var(--ink-dim); }
html[data-theme="light"] .nav-inner a:hover {
  color: var(--ink);
  background: rgba(0,0,0,0.04);
}
html[data-theme="light"] .nav-inner a.is-active {
  color: oklch(0.48 0.16 242);
  background: oklch(0.48 0.16 242 / 0.08);
  box-shadow: none;
}

/* Theme toggle — blue dot */
html[data-theme="light"] .theme-toggle {
  background: rgba(255,255,255,0.90);
  color: var(--ink);
  box-shadow: 0 2px 14px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,1);
}
html[data-theme="light"] .toggle-dot {
  background: radial-gradient(circle at 30% 30%, oklch(0.65 0.18 242), oklch(0.40 0.16 250) 70%);
  box-shadow: 0 0 8px oklch(0.60 0.14 238 / 0.45);
}

/* Buttons */
html[data-theme="light"] .btn.primary {
  background: linear-gradient(180deg, oklch(0.18 0 0), oklch(0.10 0 0));
  color: oklch(0.982 0 0);
  box-shadow: 0 6px 24px -6px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.12);
}
html[data-theme="light"] .btn.primary::after { color: oklch(0.982 0 0); }
html[data-theme="light"] .btn.ghost {
  border-color: rgba(0,0,0,0.16);
  color: var(--ink);
  background: rgba(0,0,0,0.03);
}
html[data-theme="light"] .btn.ghost:hover {
  background: rgba(0,0,0,0.07);
  border-color: rgba(0,0,0,0.22);
}

/* Hero name — dark charcoal → cool blue, visible on white */
html[data-theme="light"] .hero h1 .name-soft { color: oklch(0.10 0 0); }
html[data-theme="light"] .hero h1 .name-accent {
  background: linear-gradient(120deg,
    oklch(0.12 0 0) 0%,
    oklch(0.42 0.16 242) 55%,
    oklch(0.34 0.14 248) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Eyebrow accent line — blue */
html[data-theme="light"] .eyebrow::before {
  background: linear-gradient(90deg, oklch(0.48 0.16 242), transparent);
}

/* Tags */
html[data-theme="light"] .tag-list li {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.09);
  color: var(--ink);
}
html[data-theme="light"] .tag-list li:hover {
  background: oklch(0.48 0.16 242 / 0.08);
  border-color: oklch(0.48 0.16 242 / 0.25);
  color: oklch(0.38 0.14 242);
  transform: translateY(-1px);
}

/* Instrument labels */
html[data-theme="light"] .instrument-label .num { color: oklch(0.48 0.16 242); }
html[data-theme="light"] .instrument-label::before { background: oklch(0.48 0.16 242 / 0.40); }

/* Controls */
html[data-theme="light"] .belt-btn,
html[data-theme="light"] .featured-nav-btn {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.11);
  color: var(--ink);
}
html[data-theme="light"] .belt-btn:hover,
html[data-theme="light"] .featured-nav-btn:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.18);
}
html[data-theme="light"] .media-btn,
html[data-theme="light"] .map-nav-btn {
  background: rgba(0,0,0,0.07);
  color: var(--ink);
}
html[data-theme="light"] .filter-btn {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
  color: var(--ink-dim);
}
html[data-theme="light"] .filter-btn.is-active {
  background: oklch(0.48 0.16 242);
  color: white;
  border-color: oklch(0.48 0.16 242);
}

/* Landhawk flow */
html[data-theme="light"] .feature-media-flow {
  background:
    radial-gradient(120% 90% at 0% 0%, oklch(0.48 0.16 242 / 0.07), transparent 60%),
    rgba(0,0,0,0.02);
}
html[data-theme="light"] .flow-steps li { background: rgba(255,255,255,0.75); }

/* Dots */
html[data-theme="light"] .dot { background: rgba(0,0,0,0.16); }
html[data-theme="light"] .dot.active { background: oklch(0.48 0.16 242); width: 32px; border-radius: 9999px; }
html[data-theme="light"] .media-dot { background: rgba(0,0,0,0.16); }
html[data-theme="light"] .media-dot.is-active { background: oklch(0.48 0.16 242); }

/* Portfolio card overlay */
html[data-theme="light"] .portfolio-card-overlay {
  background: linear-gradient(180deg,
    oklch(0.982 0 0 / 0.55) 40%,
    oklch(0.982 0 0 / 0.88) 100%);
}
@media (max-width: 760px) {
  html[data-theme="light"] .portfolio-card-overlay {
    background: linear-gradient(180deg,
      oklch(0.982 0 0 / 0.78) 40%,
      oklch(0.982 0 0 / 0.97) 100%);
  }
}

/* Ticker */
html[data-theme="light"] .hero-skill-alternatives {
  border-color: rgba(0,0,0,0.07);
  background:
    linear-gradient(90deg, var(--bg-0) 0%, transparent 16%, transparent 84%, var(--bg-0) 100%),
    rgba(255,255,255,0.58);
}
html[data-theme="light"] .hero-ticker .track span::before { color: oklch(0.48 0.16 242); }

/* Map */
html[data-theme="light"] .leaflet-container { background: oklch(0.970 0 0); }
html[data-theme="light"] .portfolio-map.leaflet-container .leaflet-control-attribution {
  background: oklch(0.982 0 0 / 0.62);
}
html[data-theme="light"] .leaflet-popup-content-wrapper,
html[data-theme="light"] .leaflet-popup-tip {
  background: oklch(0.075 0.008 45);
  color: oklch(0.94 0.006 50);
  border-color: oklch(1 0 0 / 0.10);
}
html[data-theme="light"] .map-nav-btn {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color: oklch(0.94 0.006 50);
}
html[data-theme="light"] .portfolio-map {
  filter: saturate(0.7) brightness(1.05);
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .map-pin-dot {
  background: oklch(0.48 0.16 242);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08), 0 0 14px oklch(0.48 0.16 242 / 0.45);
}
html[data-theme="light"] .map-pin-dot.is-featured {
  background: oklch(0.30 0.14 242);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08), 0 0 16px oklch(0.30 0.14 242 / 0.45);
}

/* Timeline — blue */
html[data-theme="light"] .timeline::before {
  background: linear-gradient(180deg, transparent, oklch(0.48 0.16 242) 15%, oklch(0.60 0.14 238) 70%, transparent);
}
html[data-theme="light"] .timeline-item::before {
  background: var(--bg-0);
  border-color: oklch(0.48 0.16 242);
  box-shadow: 0 0 10px oklch(0.48 0.16 242 / 0.28);
}
html[data-theme="light"] .timeline-date { color: oklch(0.42 0.16 242); }

/* Awards */
html[data-theme="light"] .award-year-pill {
  color: oklch(0.42 0.16 242);
  border-color: oklch(0.42 0.16 242);
}

/* Reference letters */
html[data-theme="light"] .letter-meta { color: oklch(0.42 0.16 242); }

/* Edu meta */
html[data-theme="light"] .edu-meta { color: oklch(0.42 0.16 242); }

/* Featured slide subtitle */
html[data-theme="light"] .featured-slide-subtitle i { color: oklch(0.42 0.14 242); }

/* Selection */
html[data-theme="light"] ::selection {
  background: oklch(0.48 0.16 242 / 0.20);
  color: oklch(0.10 0 0);
}

/* =========================================================
   PROJECT PAGE SYSTEM
   ========================================================= */
body.project-page {
  background:
    radial-gradient(120% 80% at 12% -10%, oklch(0.22 0.05 58 / 0.22) 0%, transparent 58%),
    radial-gradient(110% 70% at 88% 0%, oklch(0.20 0.04 24 / 0.20) 0%, transparent 62%),
    linear-gradient(180deg, oklch(0.095 0.009 46) 0%, oklch(0.082 0.008 45) 100%);
}

.project-hero {
  padding: 84px 0 56px;
  border-bottom: 1px solid var(--rule-soft);
  background: linear-gradient(180deg, oklch(0.16 0.02 52 / 0.14) 0%, transparent 72%);
}

.project-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 44px;
  align-items: start;
}

.project-hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.project-back-link:hover {
  color: var(--ink);
  border-color: oklch(0.72 0.08 63 / 0.42);
  background: oklch(1 0 0 / 0.05);
}

.project-page h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

/* below 380px a single long word ("Photogrammetry") is wider than the screen */
@media (max-width: 380px) { .project-page h1 { font-size: 1.7rem; } }

.project-lead {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--ink-dim);
  font-size: clamp(1.05rem, 1.8vw, 1.18rem);
}

.project-meta-list,
.project-reference-list,
.project-highlights {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

/* key/value rows — thin rule dividers, no boxes */
.project-meta-list li,
.project-reference-list li {
  padding: 12px 2px;
  border-top: 1px solid var(--rule-soft);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-dim);
}
.project-meta-list li strong,
.project-reference-list li strong {
  color: var(--ink);
  font-weight: 500;
}

/* key contributions — accent-dash bullets, matching the main page lists */
.project-highlights { gap: 14px; }
.project-highlights li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-dim);
}
.project-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 1px;
  background: var(--accent-warm);
}
.project-reference-list a {
  color: var(--accent-warm);
}

.project-hero-media img {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--rule);
  box-shadow: var(--glass-shadow);
}

.project-main {
  padding: 20px 0 90px;
}

.project-section {
  padding: 46px 0;
}
.project-section + .project-section {
  border-top: 1px solid var(--rule-soft);
}
.project-section.section-alt {
  background: linear-gradient(180deg, oklch(1 0 0 / 0.025), transparent 76%);
}

.project-section h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-size: clamp(1.32rem, 2.3vw, 2rem);
}
.project-section p {
  margin: 0;
  color: var(--ink-dim);
  max-width: 78ch;
}

.project-media-embed {
  width: min(100%, 920px);
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: oklch(0.12 0.009 45);
}
.project-media-embed iframe,
.project-media-embed video,
.project-media-embed img,
.project-media-embed object {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.project-media-embed--document {
  aspect-ratio: auto;
  min-height: 560px;
}

.project-media-embed--storymap {
  width: 100%;
  height: 500px;
  aspect-ratio: auto;
}

@media (max-width: 980px) {
  .project-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .project-main {
    padding-bottom: 64px;
  }
}

@media (max-width: 640px) {
  .project-hero {
    padding-top: 60px;
    padding-bottom: 36px;
  }
  .project-hero-actions {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .project-section {
    padding: 34px 0;
  }
}

/* hero eyebrow sits tighter above the title */
.project-hero .eyebrow {
  margin: 0 0 18px;
}

/* sub-headings within sections */
.project-section h3 {
  margin: 28px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* figures with captions */
.project-figure {
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}
.project-figure img {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: oklch(0.12 0.009 45);
  box-shadow: var(--glass-shadow);
}
.project-figure figcaption {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-faint);
  max-width: 80ch;
}
.project-figure figcaption strong {
  color: var(--ink-dim);
  font-weight: 500;
}

/* data tables */
.table-wrapper {
  margin: 28px 0 0;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
}
.project-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-dim);
}
.project-table caption {
  caption-side: top;
  text-align: left;
  padding: 14px 16px 10px;
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.project-table th,
.project-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--rule-soft);
}
.project-table thead th {
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-top: none;
}
.project-table tbody tr:hover { background: oklch(1 0 0 / 0.025); }
.project-table ul { margin: 0; padding-left: 18px; }
.project-table ul li { margin-bottom: 4px; }

/* species list grid (appendix) */
.species-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.species-grid h3 { margin: 18px 0 4px; }
.species-grid > div > h3:first-child { margin-top: 0; }
.species-grid p { margin: 0; font-size: 14px; }
@media (max-width: 680px) { .species-grid { grid-template-columns: 1fr; gap: 16px; } }

/* numbered bibliography */
.project-reference-ol {
  margin: 8px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}
.project-reference-ol li {
  padding-left: 6px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-dim);
}
.project-reference-ol li::marker {
  color: var(--accent-warm);
  font-family: 'Barlow', monospace;
  font-size: 12px;
}

/* media stacks (video + document embeds) */
.project-media-stack {
  display: grid;
  gap: 20px;
}
.project-media-description {
  margin: 0;
  max-width: 80ch;
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-dim);
}
.project-media-download { margin: 0; }
.project-media-download a {
  font-family: 'Barlow', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-warm);
}


html[data-theme="light"] body.project-page {
  background:
    radial-gradient(120% 80% at 12% -10%, oklch(0.92 0.02 248 / 0.70) 0%, transparent 58%),
    radial-gradient(110% 70% at 88% 0%, oklch(0.95 0.01 240 / 0.65) 0%, transparent 62%),
    linear-gradient(180deg, oklch(0.985 0 0) 0%, oklch(0.972 0 0) 100%);
}

html[data-theme="light"] .project-hero {
  border-bottom-color: rgba(0,0,0,0.08);
  background: linear-gradient(180deg, oklch(0.92 0.02 248 / 0.45) 0%, transparent 76%);
}

html[data-theme="light"] .project-back-link {
  color: var(--ink-dim);
  border-color: rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.7);
}
html[data-theme="light"] .project-back-link:hover {
  color: var(--ink);
  border-color: oklch(0.48 0.16 242 / 0.45);
  background: rgba(255,255,255,0.96);
}

html[data-theme="light"] .project-hero-media img,
html[data-theme="light"] .project-media-embed {
  border-color: rgba(0,0,0,0.12);
  background: oklch(0.985 0 0);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.22);
}

html[data-theme="light"] .project-section + .project-section {
  border-top-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .project-section.section-alt {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.03), transparent 78%);
}

html[data-theme="light"] .project-figure img {
  border-color: rgba(0,0,0,0.12);
  background: oklch(0.985 0 0);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.22);
}
html[data-theme="light"] .table-wrapper {
  border-color: rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.86);
}
html[data-theme="light"] .project-table tbody tr:hover {
  background: rgba(0,0,0,0.025);
}

/* =========================================================
   ANIMATIONS — Marcelo Guzmán GIS Design System
   ========================================================= */

/* entrance reveals */
.fx-rise,
.fx-fade,
.fx-blur {
  animation-duration: 900ms;
  animation-timing-function: var(--ease, cubic-bezier(.2, .7, .2, 1));
  animation-fill-mode: both;
  animation-delay: var(--fx-delay, 0ms);
}
.fx-rise { animation-name: ds-rise; }
.fx-fade { animation-name: ds-fade; }
.fx-blur { animation-name: ds-blur-in; }

@keyframes ds-rise {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes ds-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ds-blur-in {
  from { opacity: 0; filter: blur(14px); transform: scale(1.02); }
  to   { opacity: 1; filter: blur(0); transform: scale(1); }
}

/* media reveal, Ken Burns drift, and hover sheen */
.media-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.media-frame > img,
.media-frame > .media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  transition: transform var(--t-slow, 900ms var(--ease)), filter var(--t-base, 520ms var(--ease));
  will-change: transform;
}
.media-frame.media-kenburns > img,
.media-frame.media-kenburns > .media-img {
  animation: ds-kenburns 24s var(--ease, cubic-bezier(.2, .7, .2, 1)) infinite alternate;
}
@keyframes ds-kenburns {
  0%   { transform: scale(1.04) translate3d(0, 0, 0); }
  100% { transform: scale(1.12) translate3d(-1.5%, -2%, 0); }
}
.media-frame:hover > img,
.media-frame:hover > .media-img {
  transform: scale(1.07);
  filter: saturate(1.05) contrast(1.04);
}
.media-frame::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-18deg);
  opacity: 0;
}
.media-frame:hover::after {
  animation: ds-sheen 900ms var(--ease, cubic-bezier(.2, .7, .2, 1));
}
@keyframes ds-sheen {
  0%   { left: -60%; opacity: 0; }
  18%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

/* soft spectral card halo */
.card-glow {
  position: relative;
  transition: transform var(--t-base, 520ms var(--ease));
}
.card-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(120% 120% at 50% 0%,
    oklch(0.74 0.12 65 / 0.45) 0%,
    oklch(0.58 0.12 30 / 0.18) 38%,
    transparent 70%);
  filter: blur(16px);
  transition: opacity var(--t-base, 520ms var(--ease));
}
.card-glow:hover { transform: translateY(-4px); }
.card-glow:hover::before { opacity: 1; }
html[data-theme="light"] .card-glow::before {
  background: radial-gradient(120% 120% at 50% 0%,
    oklch(0.48 0.16 242 / 0.30) 0%,
    oklch(0.60 0.14 238 / 0.12) 40%,
    transparent 70%);
}

/* button shine; .btn uses ::after for its arrow, so its sweep uses ::before */
.btn-shine,
.btn { position: relative; overflow: hidden; }
.btn-shine:not(.btn)::after,
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  opacity: 0;
}
.btn-shine:not(.btn):hover::after,
.btn:hover::before {
  animation: ds-btn-shine 780ms var(--ease, cubic-bezier(.2, .7, .2, 1));
}
@keyframes ds-btn-shine {
  0%   { left: -75%; opacity: 0; }
  20%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

/* glowing marker accent */
.fx-pulse {
  animation: ds-pulse 3.4s var(--ease, cubic-bezier(.2, .7, .2, 1)) infinite;
}
@keyframes ds-pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(0.74 0.12 65 / 0.45); }
  50%      { box-shadow: 0 0 14px 2px oklch(0.74 0.12 65 / 0.30); }
}

@media (prefers-reduced-motion: reduce) {
  .fx-rise, .fx-fade, .fx-blur,
  .media-frame.media-kenburns > img,
  .media-frame.media-kenburns > .media-img,
  .fx-pulse {
    animation: none !important;
  }
  .fx-rise, .fx-fade, .fx-blur {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .media-frame:hover::after,
  .btn-shine:hover::after,
  .btn:hover::before {
    animation: none;
  }
}

/* =========================================================
   EMS LIGHT RAYS + ELECTROMAGNETIC DUST  (image-free backdrop)
   Replaces the legacy spectrum*.png section backgrounds.
   ========================================================= */
.ems-bg{position:fixed;inset:0;z-index:-2;pointer-events:none;overflow:hidden}
/* Peripheral (edge) light rays removed; only the top "sunshine" source remains. */
.ems-aura{position:absolute;inset:-16%;pointer-events:none;opacity:.1;filter:blur(10px) hue-rotate(var(--ems-shift,0deg));transition:filter 1.1s ease;animation:emsADrift 30s ease-in-out infinite;
  background:
    radial-gradient(78% 52% at 34% -12%,rgba(255,250,246,.20), transparent 60%);}
#ems-dust{position:fixed;inset:0;width:100%;height:100%;display:block;pointer-events:none}
@keyframes emsADrift{0%{transform:translate(0,0) scale(1)}50%{transform:translate(2%,-1.4%) scale(1.05)}100%{transform:translate(0,0) scale(1)}}
.aura{display:none !important;}
/* light mode: rays become soft cool tints + grey mist; dust flips to dark specks (handled in JS) */
html[data-theme="light"] .ems-aura{opacity:1;filter:blur(12px) hue-rotate(var(--ems-shift,0deg));
  background:
    radial-gradient(72% 50% at 40% -12%, rgba(255,255,255,.55), transparent 60%);}
@media (prefers-reduced-motion:reduce){.ems-aura{animation:none}}

/* =========================================================
   SATELLITES OVER THE UNITED STATES — full-bleed real-time azimuthal disk
   Flat SVG; satellite.js + live Celestrak TLE (analytic fallback).
   ========================================================= */
.sky-bg{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;opacity:.5;transition:opacity .8s ease}
.sky-bg svg{position:absolute;inset:0;width:100%;height:100%;display:block}
html[data-theme="light"] .sky-bg{opacity:.6}
@media (prefers-reduced-motion:reduce){.sky-bg{opacity:.4}}
/* Mobile performance: hide every animated/blurred background layer. Paired with JS guards —
   the dust-canvas rAF loop and the satellite SGP4 loop both early-return at <=760px, and
   satellite.js is no longer downloaded there — leaving just the solid --bg-0 page base. */
@media (max-width:760px){
  .substrate,.ems-bg,#ems-dust,.sky-bg,.grain,.hero::before{display:none!important;}
}
