/* ============================================================
   FONTS — wired to the real files in /portfolio/fonts
   ============================================================ */
/* MongoDB Value Serif — display / headlines */
@font-face {
  font-family: "MongoDB Value Serif";
  src: url("fonts/value-serif/MongoDBValueSerif-Regular.woff2") format("woff2"),
       url("fonts/value-serif/MongoDBValueSerif-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: block;
}
@font-face {
  font-family: "MongoDB Value Serif";
  src: url("fonts/value-serif/MongoDBValueSerif-Medium.woff2") format("woff2"),
       url("fonts/value-serif/MongoDBValueSerif-Medium.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: block;
}
@font-face {
  font-family: "MongoDB Value Serif";
  src: url("fonts/value-serif/MongoDBValueSerif-Bold.woff2") format("woff2"),
       url("fonts/value-serif/MongoDBValueSerif-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: block;
}

/* Euclid Circular A — body / labels */
@font-face {
  font-family: "Euclid Circular A";
  src: url("fonts/euclid-circular-a/EuclidCircularA-Regular-WebXL.woff2") format("woff2"),
       url("fonts/euclid-circular-a/EuclidCircularA-Regular-WebXL.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: block;
}
@font-face {
  font-family: "Euclid Circular A";
  src: url("fonts/euclid-circular-a/EuclidCircularA-RegularItalic-WebXL.woff2") format("woff2"),
       url("fonts/euclid-circular-a/EuclidCircularA-RegularItalic-WebXL.woff") format("woff");
  font-weight: 400; font-style: italic; font-display: block;
}
@font-face {
  font-family: "Euclid Circular A";
  src: url("fonts/euclid-circular-a/EuclidCircularA-Medium-WebXL.woff2") format("woff2"),
       url("fonts/euclid-circular-a/EuclidCircularA-Medium-WebXL.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: block;
}
@font-face {
  font-family: "Euclid Circular A";
  src: url("fonts/euclid-circular-a/EuclidCircularA-Semibold-WebXL.woff2") format("woff2"),
       url("fonts/euclid-circular-a/EuclidCircularA-Semibold-WebXL.woff") format("woff");
  font-weight: 600; font-style: normal; font-display: block;
}
@font-face {
  font-family: "Euclid Circular A";
  src: url("fonts/euclid-circular-a/EuclidCircularA-Bold-WebXL.woff2") format("woff2"),
       url("fonts/euclid-circular-a/EuclidCircularA-Bold-WebXL.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: block;
}

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --serif: "MongoDB Value Serif", Georgia, "Times New Roman", serif;
  --sans: "Euclid Circular A", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --light-bg: #f4f3f0;
  --light-fg: #0c0c0c;
  --light-mut: #6b6a66;
  --light-line: rgba(12, 12, 12, 0.14);

  --dark-bg: #0a0a0a;
  --dark-fg: #f4f3f0;
  --dark-mut: #8c8b87;
  --dark-line: rgba(244, 243, 240, 0.18);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --pad: clamp(22px, 6vw, 92px);

  /* TYPE SCALE — only 5 sizes site-wide.
     xl: hero + section titles · lg: sub/split titles · md: lede + serif numerals
     base: body copy · sm: all labels, captions, meta, nav, hints */
  --t-xl: clamp(40px, 7vw, 80px);
  --t-lg: clamp(32px, 4vw, 46px);
  --t-md: clamp(20px, 1.4vw, 24px);
  --t-base: 16px;
  --t-sm: 12px;
}

/* mode-driven theme on <body> */
body[data-mode="light"] { --bg: var(--light-bg); --fg: var(--light-fg); --mut: var(--light-mut); --line: var(--light-line); }
body[data-mode="dark"]  { --bg: var(--dark-bg);  --fg: var(--dark-fg);  --mut: var(--dark-mut);  --line: var(--dark-line); }

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  /* background is static — no morph animation between modes */
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
/* TWO TEXT COLORS ONLY:  primary = var(--fg) · secondary = var(--mut)
   No opacity-based tints, no third color, in either bg mode. */
.display { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.eyebrow {
  font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--mut);
}
.eyebrow--num { color: var(--mut); } /* secondary — same as all labels */
.lede { font-size: var(--t-md); line-height: 1.5; color: var(--fg); max-width: 46ch; }
.note { font-size: var(--t-sm); color: var(--mut); font-style: italic; max-width: 50ch; }
p { line-height: 1.55; font-size: var(--t-base); }

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center;
  background: var(--light-bg);
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
.loader__name {
  font-family: var(--serif); font-weight: 700; font-size: var(--t-xl);
  color: var(--light-fg);
  opacity: 0; transform: translateY(14px); filter: blur(8px);
  animation: loadName 1.1s var(--ease) forwards;
}
@keyframes loadName { to { opacity: 1; transform: none; filter: none; } }
body.loaded .loader { opacity: 0; visibility: hidden; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 3vw, 30px) var(--pad);
  mix-blend-mode: difference; /* stays legible over light/dark */
  color: #fff;
}
.nav__brand { font-family: var(--serif); font-weight: 700; font-size: var(--t-md); letter-spacing: -0.01em; }
.nav__sections { display: flex; gap: clamp(14px, 2.4vw, 34px); }
/* 2 states only: secondary (inactive) → primary (active/hover) */
.nav__link {
  font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.04em; opacity: 0.5;
  display: inline-flex; align-items: baseline; gap: 7px;
  transition: opacity 0.35s var(--ease);
  position: relative; padding-bottom: 4px;
  text-transform: uppercase;
}
.nav__link:hover,
.nav__link.is-active { opacity: 1; }
.nav__idx { font-size: var(--t-sm); letter-spacing: 0.1em; }
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: currentColor; transition: width 0.4s var(--ease);
}
.nav__link.is-active::after { width: 100%; }

@media (max-width: 720px) {
  .nav__link {
    font-size: 14px;
    padding: 8px 0;
  }
  .nav__link .nav__idx { display: none; }
  .nav__sections { 
    gap: 14px;
    justify-content: space-evenly;
    width: 100%;
  }
  .nav__link span:not(.nav__idx) { font-size: var(--t-sm); }
}

/* ============================================================
   STAGE + PANELS (the fluid transitions)
   ============================================================ */
.stage { position: fixed; inset: 0; }
.panel {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 1; visibility: hidden;
  transform: none;
  filter: none;
  pointer-events: none;
  transition: none;
}
.panel.is-active {
  opacity: 1; visibility: visible;
  transform: none; filter: none;
  pointer-events: auto;
  transition: none;
}
/* section shells switch instantly; child content handles any motion */
.panel.is-exit-up { transform: none; }

.panel__inner {
  min-height: 100%;
  display: flex; flex-direction: column;
  /* bands own all spacing now — no outer padding, no gap */
}

/* hide scrollbars but keep scroll */
.panel { scrollbar-width: none; }
.panel::-webkit-scrollbar { width: 0; height: 0; }

/* ============================================================
   COLOR BANDS — every direct child of .panel__inner is a
   full-bleed band. Pick its color by hand with one of the three
   band--* classes below. White + default alternate on content
   blocks; dark is reserved for heroes.
   ============================================================ */
.panel__inner > * {
  min-height: 100vh;
  padding-block: clamp(60px, 9vh, 120px);
  padding-inline: var(--pad);
}
.panel__inner > *:first-child { padding-top: clamp(96px, 14vh, 168px); } /* clear fixed nav */
.panel__inner > *:last-child  { flex: 1 0 auto; } /* fill leftover height — no base-bg strip */

/* the 3 background classes — apply one per band manually */
.band--white   { --bg: #fff;            background: #fff; }
.band--default { --bg: var(--light-bg); background: var(--light-bg); }
.band--dark {
  --bg: var(--dark-bg); --fg: var(--dark-fg); --mut: var(--dark-mut); --line: var(--dark-line);
  background: var(--dark-bg); color: var(--dark-fg);
}

/* Hero is ALWAYS a dark, true full-bleed band (it manages its own inner
   padding via hero__lead / hero__media), so it needs no band class. */
.panel__inner > .hero {
  min-height: 100vh;
  padding: 0;
  --bg: var(--dark-bg); --fg: var(--dark-fg); --mut: var(--dark-mut); --line: var(--dark-line);
  background: var(--dark-bg); color: var(--dark-fg);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 4vw, 44px); min-height: 100%; }
.about__statement { font-size: var(--t-xl); max-width: 16ch; } /* primary */
.about__meta { font-size: var(--t-sm); color: var(--mut); letter-spacing: 0.02em; }
.about__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.button-link:hover {
  border-color: var(--fg);
  background: rgba(12, 12, 12, 0.03);
}
body.resume-open {
  overscroll-behavior: none;
}
body.resume-open .panel.is-active {
  overflow: hidden;
}

/* ============================================================
   RESUME OVERLAY
   ============================================================ */
.resume-overlay {
  --resume-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  justify-items: end;
  pointer-events: none;
  contain: layout paint;
}
.resume-overlay.is-open {
  pointer-events: auto;
}
.resume-overlay[hidden] { display: none; }
.resume-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.5);
  opacity: 0;
}
.resume-overlay.is-open .resume-overlay__backdrop {
  opacity: 1;
}
.resume-panel {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  color: var(--light-fg);
  padding: clamp(28px, 5vw, 64px);
  transform: translate3d(100%, 0, 0);
  transition: transform 300ms var(--resume-ease);
  will-change: transform;
  contain: layout style paint;
}
.resume-overlay.is-open .resume-panel {
  transform: translate3d(0, 0, 0);
}
.resume-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(16px, 8vh, 24px);
}
.resume-panel__close {
  font-size: 40px;
  line-height: 1;
  color: var(--light-mut);
}
.resume-panel__close:hover { color: var(--light-fg); }
.resume-panel__content {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vh, 40px);
}
.resume-panel__header {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.resume-panel__header p,
.resume-tabpanel p {
  color: var(--light-mut);
}
.resume-panel__title {
  font-size: var(--t-lg);
}
.resume-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.4vw, 36px);
  border-bottom: 1px solid var(--light-line);
}
.resume-tab {
  position: relative;
  padding-bottom: 12px;
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--light-fg);
  opacity: 0.5;
  transition: opacity 0.25s var(--resume-ease);
}
.resume-tab:hover,
.resume-tab.is-active {
  opacity: 1;
}
.resume-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width 0.28s var(--resume-ease);
}
.resume-tab.is-active::after {
  width: 100%;
}
.resume-tabpanel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.resume-tabpanel[hidden] {
  display: none;
}
.resume-list {
  display: grid;
  gap: 28px;
}
.resume-list article {
  display: grid;
  gap: 8px;
}
.resume-list h3,
.resume-company__name,
.resume-role h4 {
  font-size: var(--t-base);
  font-weight: 500;
}
.resume-timeline {
  display: grid;
  gap: clamp(34px, 4vh, 52px);
}
.resume-company {
  display: grid;
  gap: 24px;
  padding-bottom: clamp(28px, 4vh, 42px);
  border-bottom: 1px solid var(--light-line);
}
.resume-company:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.resume-company__name {
  font-family: var(--serif);
  font-size: var(--t-md);
  font-weight: 500;
}
.resume-company__roles {
  display: grid;
  gap: 24px;
}
.resume-role {
  display: grid;
  grid-template-columns: minmax(118px, 0.42fr) 1fr;
  gap: clamp(18px, 3vw, 34px);
}
.resume-role__body {
  display: grid;
  gap: 8px;
}
.resume-role__details {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-left: 1em;
  color: var(--light-mut);
}
.resume-role__details li {
  line-height: 1.55;
  font-size: var(--t-base);
}
.resume-timeline__date {
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--light-mut);
}
.resume-panel__pdf {
  align-self: flex-start;
  margin-top: 8px;
}

.button-links-resume {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.button-links-resume img {
  width: 24px;
  height: 24px;
}

.resume-contact-links {
  display: flex;
  gap: 8px;
}

.resume-github,
.resume-linkedin {
  padding: 0;
  width: 40px;
  height: 40px;
  border: none;
}

/* ============================================================
   SECTION HEADERS — only 2 title sizes: xl (section) and lg (sub)
   ============================================================ */
.section-head { display: flex; flex-direction: column; gap: 18px; max-width: 60ch; }
.section-head__title { font-size: var(--t-xl); }
.section-head--sub .section-head__title { font-size: var(--t-lg); }
.section-head--sub { padding-top: clamp(20px, 4vw, 50px); border-top: 1px solid var(--line); }
.section-head .eyebrow { margin-bottom: 4px; }

.meta-row { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; font-size: var(--t-sm); color: var(--mut); }
.link { font-weight: 500; color: var(--fg); border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: border-color 0.3s var(--ease); }
.link:hover { border-color: var(--fg); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: var(--t-sm); letter-spacing: 0.04em; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 100px; color: var(--mut);
}

/* ============================================================
   SPLIT (image + text, alternating)
   ============================================================ */
.split {
  display: grid; grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(28px, 6vw, 80px); align-items: center;
}
.split:has(.split__media:first-child) { grid-template-columns: 1.3r 0.7fr; }
.split:has(.split__text:first-child) { grid-template-columns: 0.7fr 1.3fr; }
.split--reverse .split__text { order: 2; }
.split--reverse .split__media { order: 1; }
.split--reverse { grid-template-columns: 1.3fr 0.7fr; }
.split__text { display: flex; flex-direction: column; gap: 24px; }
.split__title { font-size: var(--t-lg); } /* primary, same level as sub-titles */
.split__text p { color: var(--mut); }

.split__media--stack { display: grid; gap: 18px; }

/* ============================================================
   SHOTS — flat screenshots: no radius, no shadow, no bg fill
   (images carry their own background)
   ============================================================ */
.shot { position: relative; border-radius: 0; overflow: visible; }
.shot img {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
  display: block;
}
.shot--phone { max-width: 360px; margin-inline: auto; }
.cap, figure .cap { margin-top: 14px; font-size: var(--t-sm); color: var(--mut); }

/* STRIP — process row */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.6vw, 36px); }
.strip__item img { border-radius: 0; }
.strip__item figcaption { margin-top: 14px; font-size: var(--t-sm); color: var(--mut); line-height: 1.5; }
.strip__item .step { display: block; font-family: var(--serif); font-weight: 700; font-size: var(--t-md); color: var(--fg); margin-bottom: 4px; }

/* DUO — two side by side, with subtle center-out reveal */
.duo {
  --duo-gap: clamp(20px, 3vw, 48px);
  --media-ease: cubic-bezier(0.16, 1, 0.3, 1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--duo-gap);
  align-items: start;
}
.duo .shot {
  transition: transform 650ms var(--media-ease);
  will-change: transform;
}
.duo .shot:first-child { transform: translateX(calc(50% + (var(--duo-gap) / 2))) scale(0.96); }
.duo .shot:last-child { transform: translateX(calc(-50% - (var(--duo-gap) / 2))) scale(0.96); }
.reveal.in .duo .shot { transform: none; }

/* QUAD — typography boxes (default 2×2; --3 for a single row of three) */
.quad {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 1.4vw, 124px);
  align-items: stretch;
  width: 70%;
  margin-inline: auto;
}
.quad--3 {
  grid-template-columns: repeat(3, 1fr);
}
.quad__box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 1.8vw, 24px);
  box-shadow: 6px 6px 0 var(--line);
}
.quad__title {
  font-size: var(--t-base);
  font-weight: 500;
  line-height: 1.35;
  color: var(--fg);
}
.quad__text {
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--mut);
}

/* ============================================================
   HEIGHT VARIANTS — add to any .split or .section-head
   (default = none = natural content height)
     .h-stage  → 100vh beat, content centered, media fits within (contain)
     .h-focal  → ~52vh editorial band, media cover-cropped from the top
   Note: avoid .h-focal on .annotated shots (cover-crop shifts callouts).
   ============================================================ */

/* center text inside taller header beats */
.section-head.h-stage,
.section-head.h-focal { justify-content: center; }
.section-head.h-stage { min-height: 80vh; }
.section-head.h-focal { min-height: 52vh; }

/* split rows */
.split.h-stage { min-height: 100vh; }
.split.h-focal { min-height: 52vh; }

/* shared media framing for both variants: clip to the frame (flat, no shadow) */
.split.h-stage .shot:not(.shot--phone),
.split.h-focal .shot:not(.shot--phone) {
  overflow: hidden;
}
.split.h-stage .shot:not(.shot--phone) img,
.split.h-focal .shot:not(.shot--phone) img { box-shadow: none; height: 100%; width: 100%; }

/* STAGE — fit the whole shot within ~84vh */
.split.h-stage .split__media .shot:not(.shot--phone) { height: 84vh; }
.split.h-stage .shot:not(.shot--phone) img { object-fit: contain; }
.split.h-stage .split__media--stack { height: 84vh; display: grid; grid-auto-rows: 1fr; gap: 16px; }
.split.h-stage .split__media--stack .shot { height: 100%; }

/* FOCAL — fixed band, cover-crop from the top */
.split.h-focal .split__media .shot:not(.shot--phone) { height: 52vh; }
.split.h-focal .shot:not(.shot--phone) img { object-fit: cover; object-position: top center; }
.split.h-focal .split__media--stack { height: 52vh; display: grid; grid-auto-rows: 1fr; gap: 12px; }
.split.h-focal .split__media--stack .shot { height: 100%; }

/* phones: never crop the device — always fit */
.split.h-stage .shot--phone, .split.h-focal .shot--phone { align-self: center; }

@media (max-width: 860px) {
  /* don't force tall beats on small screens — let content flow */
  .split.h-stage, .split.h-focal,
  .section-head.h-stage, .section-head.h-focal { min-height: 0; }
  .split.h-stage .shot:not(.shot--phone),
  .split.h-focal .shot:not(.shot--phone),
  .split.h-stage .split__media--stack,
  .split.h-focal .split__media--stack { height: auto; }
  .split.h-stage .shot:not(.shot--phone) img,
  .split.h-focal .shot:not(.shot--phone) img { height: auto; object-fit: contain; }
}

/* ============================================================
   ANNOTATIONS (line draws, then label fades in)
   ============================================================ */
.anno { position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; max-width: 230px; }
.anno__label {
  font-size: var(--t-sm); font-weight: 500; line-height: 1.35; color: var(--fg);
  background: var(--bg); padding: 2px 0;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.5s var(--ease) 0.5s, transform 0.5s var(--ease) 0.5s;
}
.anno__line {
  width: 1px; height: 0; margin-top: 6px; margin-left: 2px;
  background: var(--fg);
  transition: height 0.55s var(--ease);
}
.annotated.in .anno__line { height: var(--len, 70px); }
.annotated.in .anno__label { opacity: 1; transform: none; } /* primary, no tint */

/* ============================================================
   REVEAL (scroll-into-view)
   Animates content only. Bands/backgrounds do not fade or move.
   ============================================================ */
.reveal { opacity: 1; transform: none; }
.reveal > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
}
.reveal.in > * { opacity: 1; transform: none; }
/* stagger media a touch without moving the whole background band */
.split.reveal.in .split__media,
.hero.reveal.in .hero__media,
.wide-block.reveal.in .wide-block__media { transition-delay: 0.1s; }

/* Media-overlap owns its own internal motion, so don't move/fade the whole
   figure as one block. Otherwise the nested separation is hard to see. */
.reveal > .media-overlap,
.reveal > .trio,
.reveal > .duo {
  opacity: 1;
  transform: none;
}

/* ============================================================
   END
   ============================================================ */
.end { min-height: 46vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; }
.end__title { font-size: var(--t-xl); }
.end__meta { font-size: var(--t-sm); color: var(--mut); }

/* ============================================================
   PROGRESS
   ============================================================ */
.progress { position: fixed; left: 0; bottom: 0; height: 2px; width: 100%; z-index: 50; background: transparent; mix-blend-mode: difference; }
.progress span { display: block; height: 100%; width: 25%; background: #fff; transition: width 0.85s var(--ease); }

/* ============================================================
   SCROLL HINT
   ============================================================ */
.scroll-hint {
  position: absolute; left: 50%; bottom: 5vh; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: var(--t-sm); letter-spacing: 0.22em; text-transform: uppercase; color: var(--mut);
}
.scroll-hint i { width: 1px; height: 40px; background: var(--mut); animation: hintLine 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes hintLine { 0%,100% { transform: scaleY(0.3); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============================================================
   LOGO LOCKUP
   ============================================================ */
.logo { display: block; max-width: none; width: auto; }
.logo--mongodb { width: 300px; filter: brightness(0) invert(1); }
.logo--florish { width: 200px; }
.logo--compass { width: 300px; } /* asset is already white — no invert */

/* ============================================================
   HERO — full-bleed dark intro screen (MongoDB & Florish)
   Spans the full viewport (edge to edge); content vertically
   centered. Lead (logo + text) left on dark · media right.
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  min-height: min(100vh, 1000px);
  background: var(--dark-bg);
}
.hero__lead {
  /* dark color context regardless of the panel's light mode */
  --fg: var(--dark-fg);
  --mut: var(--dark-mut);
  --line: var(--dark-line);
  color: var(--dark-fg);
  padding: clamp(40px, 6vh, 96px) clamp(28px, 4vw, 64px) clamp(40px, 6vh, 96px) var(--pad);
  display: flex; flex-direction: column;
  gap: clamp(40px, 3vh, 34px);
}
.hero__divider { width: 120px; height: 1px; background: var(--light-bg); }
.hero__lead .lede { font-size: var(--t-md); color: var(--dark-fg); max-width: 26ch; }
.hero__lead .meta-row { color: var(--dark-mut); }
.hero__lead .link { color: var(--dark-fg); border-color: var(--dark-line); }
.hero__media {
  align-self: stretch;
  display: flex; align-items: center;
  padding: clamp(40px, 8vh, 120px) clamp(28px, 4vw, 64px) clamp(40px, 8vh, 120px) 0;
  overflow: hidden;
}
.hero__media img { width: 100%; display: block; }

/* ============================================================
   WIDE BLOCK — centered or left heading + full-width content
   ============================================================ */
.wide-block {
  display: flex; flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
}
.wide-block__head {
  display: flex; flex-direction: column; gap: 24px;
}
.wide-block__head--center {
  align-items: center; text-align: center;
  margin-inline: auto; max-width: 64ch;
}
.wide-block__title { font-size: var(--t-lg); }
.wide-block__lede { font-size: var(--t-base); color: var(--mut); max-width: 72ch; }
.wide-block__lede--center { text-align: center; margin-inline: auto; }
.wide-block__media img { width: 100%; display: block; border-radius: 0; box-shadow: none; }

/* ============================================================
   TRIO — 3 screenshots in a row (flat)
   ============================================================ */
.trio {
  --trio-gap: clamp(14px, 2vw, 24px);
  --media-ease: cubic-bezier(0.16, 1, 0.3, 1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--trio-gap);
}
.trio .shot {
  overflow: hidden;
  transition: transform 650ms var(--media-ease);
  will-change: transform;
}
.trio .shot { transform: scale(0.96); }
.trio .shot:first-child { transform: translateX(calc(100% + var(--trio-gap))) scale(0.96); }
.trio .shot:last-child { transform: translateX(calc(-100% - var(--trio-gap))) scale(0.96); }
.reveal.in .trio .shot { transform: none; }
.trio .shot img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  display: block;
}

/* ============================================================
   MEDIA OVERLAP — two images, second offset for depth.
   Flat (no shadow/radius); a hairline keeps the stacked
   screenshots distinct against the page.
   ============================================================ */
.media-overlap {
  --media-ease: cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
}
.media-overlap .shot {
  width: 86%;
  overflow: hidden;
  position: relative;
  transition: transform 1.15s var(--media-ease);
  will-change: transform;
}
.media-overlap .shot img { display: block; width: 100%; }
.media-overlap .shot:first-child {
  align-self: flex-start;
  z-index: 1;
  transform: translateX(7%) translateY(10px) scale(0.94);
}
.media-overlap .shot:last-child {
  align-self: flex-end;
  margin-top: -20%;
  z-index: 2;
  transform: translateX(-7%) translateY(-10px) scale(0.94);
}
.reveal.in .media-overlap .shot { transform: none; }

/* ============================================================
   PROCESS LABEL — centered animated line + caption
   Sits above each process image as a section marker.
   ============================================================ */
/* groups a process label + its image into a single band */
.process-step { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }

.process-label {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; text-align: center;
}
.process-label__line {
  width: 0; 
  height: 1px;
  background: var(--fg); border: none;
  transition: width 0.85s var(--ease);
}
.process-label__text {
  color: var(--mut);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.5s var(--ease) 0.65s, transform 0.5s var(--ease) 0.65s;
  max-width: 30ch; line-height: 1.55;
}
.process-label.in .process-label__line { width: 220px; }
.process-label.in .process-label__text { opacity: 1; transform: none; }

.process-label--hero {
  align-items: flex-start;
  text-align: left;
  gap: 32px;
  margin-top: 24px;
}

.process-label--hero .process-label__text {
  font-size: var(--t-md);
  color: var(--dark-fg);
  max-width: 40ch;
}
.process-label--hero.in .process-label__line { width: 96px; }

.process-label__line--vertical {
  width: 1px;
  height: 0;
  transition: height 0.85s var(--ease);
}
.process-label.in .process-label__line--vertical {
  height: 160px;
  width: 1px;
}
.process-label--tagline {
  gap: 40px;
}

.process-label--tagline .process-label__line--vertical {
  transition: height 0.85s var(--ease) 0.5s;
}
.process-label--tagline .process-label__text {
  max-width: 28ch;
  transition: opacity 0.5s var(--ease) 1.15s, transform 0.5s var(--ease) 1.15s;
}

/* Problem context slide — reuses wide-block; centered stack only */
.wide-block--problem {
  justify-content: center;
  gap: clamp(36px, 6vh, 72px);
}
.wide-block__title--xl {
  font-size: var(--t-xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.wide-block__lede strong {
  font-weight: 600;
  color: var(--fg);
}

/* ============================================================
   NEXT STEPS — closing beat (Florish)
   ============================================================ */
.next-steps {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: clamp(32px, 5vw, 60px);
}
.next-steps .lede { 
  text-align: center; 
  margin-inline: auto; 
  color: var(--mut);}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .logo { width: 40%; }
  .split, .duo, .strip, .quad { 
    display: grid; 
    grid-template-columns: 1fr !important; }
  .split--reverse .split__text { order: 1; }
  .split--reverse .split__media { order: 2; }
  .split__text { max-width: none; }
  .wide-block,
  .process-step {
    display: grid;
    grid-template-columns: 1fr;
  }
  .anno { display: none; } /* avoid misaligned callouts on small screens */
  .nav { padding-inline: 22px; }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: stretch;
  }
  .hero__lead { padding: clamp(110px, 18vh, 160px) var(--pad) clamp(28px, 5vh, 48px); }
  .hero__media { padding: 0; }
  .trio { grid-template-columns: 1fr; }
  .media-overlap .shot { width: 100%; }
  .media-overlap {
    gap: 16px;
  }
  .media-overlap .shot { margin-top: 0; }
  .media-overlap .shot:last-child {
    margin-top: 0;
  }
  .resume-panel {
    width: 100%;
  }
  .resume-role {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ============================================================
   PIN GATE
   ============================================================ */
.pin-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pin-gate[hidden] { display: none; }

.pin-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.5);
  opacity: 0;
}
.pin-gate.is-open .pin-gate__backdrop { opacity: 1; }

.pin-gate__card {
  position: relative;
  background: var(--light-bg);
  color: var(--light-fg);
  border-radius: 16px;
  padding: 40px 44px 44px;
  width: min(420px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 280ms var(--ease), transform 280ms var(--ease);
}
.pin-gate.is-open .pin-gate__card {
  opacity: 1;
  transform: none;
}

.pin-gate__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pin-gate__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
  color: var(--light-mut);
  padding: 4px;
  margin: -32px -24px 0;
  transition: color 150ms;
}
.pin-gate__close:hover { color: var(--light-fg); }

.pin-gate__heading {
  margin: 0;
  font-size: var(--t-md);
  line-height: 1.1;
}

.pin-inputs {
  display: flex;
  gap: 12px;
}

.pin-input {
  flex: 1;
  min-width: 0;
  height: 68px;
  border: 1.5px solid var(--light-line);
  border-radius: 10px;
  background: #fff;
  color: var(--light-fg);
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.pin-input:focus {
  border-color: var(--light-fg);
  box-shadow: 0 0 0 3px rgba(12, 12, 12, 0.1);
}
.pin-gate.is-error .pin-input {
  border-color: #c0392b;
  animation: pin-shake 300ms var(--ease);
}

.pin-gate__error {
  font-family: var(--sans);
  font-size: var(--t-sm);
  color: #c0392b;
  margin: -8px 0 0;
}
.pin-gate__error[hidden] { display: none; }

@keyframes pin-shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .panel { filter: none; }
  .reveal { opacity: 1; transform: none; }
}
