/* ─── Variables ──────────────────────────────────────────── */
:root {
  --line-glow: 0 0 14px 3px rgba(255, 255, 255, 0.65);
  --charcoal: #111;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /*
   * hero.png has ~40% dark empty space at the top of the 1080px canvas
   * before the person begins. Accounting for that:
   *
   *   figure top  = split - figure-height + figure-overhang
   *   line (split) hits the figure at:
   *       (100vh - figure-top) / figure-height = fraction from top of box
   *
   * With figure-overhang: 20vh →
   *   figure-top = 40vh
   *   line at (100-40)/80 = 75% of box from top
   *   person starts at ~42% of box (dark space above) → line at 56% of
   *   person from head = waist ✓
   *
   * Tune figure-overhang to nudge the line up (smaller) or down (larger).
   */
  --split: 70vh;           /* height of the mountain hero section */
  --figure-height: 92vh;
  --figure-overhang: 30vh; /* how far below the line the figure hangs */
  /* Match .hero-figure width — used to size side frosted panels */
  --hero-figure-w: clamp(520px, 66vw, 960px);
  /* Frosted callouts — split straddles line; stack uses flex (no overlap) */
  --hero-frost-split-nudge: 1.75vh;
  /* Est. half-height of split box — sets column top vs glowing line */
  --hero-frost-split-box-half: clamp(4rem, 9.5vh, 6.75rem);
  --hero-frost-stack-gap: clamp(0.55rem, 1.4vh, 0.9rem);
  --hero-frost-cards-top-gap: clamp(0.45rem, 1.15vh, 0.8rem);
  --hero-frost-split-min-h: clamp(4.9rem, 8.6vh, 6.2rem);
  --hero-frost-below-min-h: clamp(8.8rem, 16vh, 11.8rem);
  --hero-frost-stack-h: calc(
    var(--hero-frost-split-min-h) + var(--hero-frost-below-min-h) + var(--hero-frost-stack-gap)
  );
  /* Nudge entire side stacks down (split + below together) */
  --hero-frost-col-shift: clamp(2.15rem, 3.85vh, 3.25rem);
  /* Min space between the glowing split line and the top of the side cards (all zoom) */
  --hero-frost-line-clearance: max(1rem, min(2.5rem, 3.5vh));
  /* Below-only: grow toward center + extra vertical space */
  --hero-frost-below-inward: clamp(2.25rem, 5.5vw, 7rem);
  /* Soft cast shadow from figure onto the dark panel (hero-bottom::after) */
  --figure-cast-shadow-w: min(82vw, 860px);
  --figure-cast-shadow-h: clamp(18vh, 28vw, 32vh);
  --figure-cast-shadow-blur: 36px;
  /* Same figure shadow on mountain hero (hero-top::after) */
  --figure-cast-shadow-top-h: clamp(14vh, 24vw, 28vh);
  --figure-cast-shadow-top-blur: 34px;
  /* Hero name stack tokens */
  --hero-name-size: clamp(124px, 18.2vw, 500px);
  /* Caps sit above the em box bottom; use this so tagline centers to ink, not full em. */
  --hero-name-ink-below: 0.82;
  --hero-name-pad-top: clamp(4.75rem, 7vw, 6rem);
  --name-tagline-gap: clamp(0.6rem, 1.4vh, 0.95rem);
  --name-tagline-side-gap: calc(var(--name-tagline-gap) * 0.6);
  --tagline-carousel-gap: clamp(0.3rem, 0.7vh, 0.55rem);
  --carousel-mini-gap: clamp(0.8rem, 1.8vh, 1.25rem);
  --carousel-line-gap: clamp(0.5rem, 1.1vh, 0.8rem);
  --name-bottom: calc(
    var(--hero-name-pad-top) + var(--hero-name-size) * var(--hero-name-ink-below)
  );
  --hero-tagline-top: calc(var(--name-bottom) + var(--name-tagline-side-gap));
  --hero-tagline-bottom: calc(var(--hero-tagline-top) + var(--tagline-zone-h));
  --name-rule-top: calc(var(--hero-tagline-bottom) + var(--name-tagline-side-gap));
  --carousel-top-separator: calc(var(--name-rule-top) + var(--carousel-line-gap));
  --carousel-bottom-bound: calc(var(--split) - var(--carousel-line-gap));
  --carousel-available-h: max(0px, calc(var(--carousel-bottom-bound) - var(--carousel-top-separator)));
  --carousel-render-h: min(var(--carousel-zone-h), var(--carousel-available-h));
  --carousel-top-bound: calc(
    var(--carousel-top-separator)
    + ((var(--carousel-available-h) - var(--carousel-render-h)) / 2)
  );
  /* Skill marquee: 3 rows (bigger pills), above the glowing line */
  --skills-marquee-h: 36vh;
  --skills-marquee-gap: 1.25vh;
  /* Shift band down to sit more centered between name-rule and bottom line */
  --skills-marquee-nudge: 2.75vh;
  --tagline-zone-h: clamp(2.25rem, 4.5vh, 3.5rem);
  --carousel-zone-h: clamp(15rem, 31vh, 24rem);
  --skills-pill-font-size: clamp(0.7rem, 0.6rem + 0.58vh, 1rem);
  --skills-pill-pad-y: clamp(0.34rem, 0.2rem + 0.38vh, 0.56rem);
  --skills-pill-pad-x: clamp(0.8rem, 0.56rem + 0.56vw, 1.24rem);
  --skills-row-gap: clamp(1.2rem, 0.56rem + 1.12vh, 2rem);
  --skills-band-pad-block: clamp(0.24rem, 0.1rem + 0.42vh, 0.52rem);
  --skills-marquee-edge-w: clamp(2rem, 12vw, 7.5rem);
}

/* ─── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* 100vw lines stay flush; no horizontal scroll */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .skill-tag {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .anim-subtitle {
    animation: none !important;
    opacity: 1;
    transform: none !important;
  }
  .anim-name-rule {
    animation: none !important;
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
  .anim-frost-col {
    animation: none !important;
    opacity: 1;
    transform: none !important;
  }
  .anim-scroll-indicator:not(.is-hidden) {
    animation: none !important;
    opacity: 1;
    transform: none !important;
  }
}

/* Inline SVG defs for url(#…) filters — keep out of layout */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  /* body is dark so the panel below the hero just shows through */
  background: var(--charcoal);
}

a { color: inherit; text-decoration: none; }

/* ─── Fixed nav ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  background: transparent;
  transition: background 0.35s var(--ease-out),
              backdrop-filter 0.35s var(--ease-out);
  animation: navFade 0.8s var(--ease-out) 0.3s both;
}

.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-dot { opacity: 0.45; user-select: none; }

.nav-link {
  position: relative;
  padding: 0.25rem 0;
  color: #fff;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease-out);
}

.nav-link:hover::after,
.nav-link:focus-visible::after { width: 100%; }

.nav-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
}

/* ─── z-index map ────────────────────────────────────────────
   0   .hero-top__bg-clip   mountain bg (clipped)
   4   .hero-top::after      figure shadow on mountain
   5   .hero-name-layer     name text — behind the figure
   11  .dividing-line       glowing line
   15  .hero-bottom         dark panel bg + card (below figure)
   25  .skills-marquee      frosted skill rows — behind figure
   26  .hero-subtitle       tagline — above marquee, above figure
   28  .hero-frost-panes    frosted callouts — straddle split, flank figure
   30  .hero-figure         person — above BOTH sections so full
                            body is always visible
   200 .site-header         nav
   ─────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Hero section — full viewport ──────────────────────── */
.page-stage { position: relative; }

.hero-top {
  position: relative;
  width: 100vw;
  height: var(--split);
  /* overflow VISIBLE so the figure can hang below the bottom edge */
  overflow: visible;
}

/* Inner clip wrapper: keeps the blurred bg contained to the section */
.hero-top__bg-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;        /* clips blur/scale bleed */
  z-index: 0;
  pointer-events: none;
}

.hero-top__bg {
  position: absolute;
  inset: -10px;            /* extra bleed so scaled+blurred edges are hidden */
  background-image: url("../images/mountain-bg.png");
  background-size: cover;
  background-position: center center;
  filter: blur(4px);
  transform: scale(1.05);
  transform-origin: center;
}

.hero-top__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 75% at 50% 42%, transparent 30%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, transparent 40%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

/*
 * Figure cast shadow on the mountain — bottom of hero, under the cutout.
 * z-index 4: above bg (0), below name (5) & dividing line (11).
 */
.hero-top::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 14%);
  width: var(--figure-cast-shadow-w);
  height: var(--figure-cast-shadow-top-h);
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 40% 50% at 50% 72%,
      rgba(0, 0, 0, 0.48) 0%,
      rgba(0, 0, 0, 0.16) 44%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 92% 46% at 50% 100%,
      rgba(0, 0, 0, 0.34) 0%,
      rgba(0, 0, 0, 0.1) 48%,
      transparent 72%
    );
  filter: blur(var(--figure-cast-shadow-top-blur));
  opacity: 0.82;
}

/* ─── Name layer (behind figure, z-index 5) ──────────────── */
.hero-name-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  width: 100%;
  text-align: center;
  overflow: visible;
}

/*
 * Full-bleed box (inset:0) so background-size:cover matches .hero-top__bg.
 * background-clip:text + filter:invert(1) = visible inverted mountain texture
 * in the glyphs (unlike mix-blend-mode:difference on a dark scene, which
 * reads as flat white).
 */
.name-display {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  padding-top: var(--hero-name-pad-top);
  padding-inline: clamp(0.9rem, 2.8vw, 2.2rem);
  margin: 0;
  gap: 0.22em;
  white-space: nowrap;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: var(--hero-name-size);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-image: url("../images/mountain-bg.png");
  background-size: cover;
  background-position: center center;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /*
   * SVG filter #name-fill-blur: Gaussian blur then feComposite "in" with
   * SourceGraphic — soft fill like .hero-top__bg, crisp letter edges.
   * (Plain CSS blur() blurs the whole glyph.)
   */
  -webkit-filter:
    url(#name-fill-blur)
    invert(1)
    contrast(1.15)
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));
  filter:
    url(#name-fill-blur)
    invert(1)
    contrast(1.15)
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));
}

.name-display__first,
.name-display__last { display: inline; }

/* Safari-specific fallback: solid fill + thick glowing stroke. */
.is-safari .name-display {
  background-image: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: rgba(212, 212, 212, 0.97);
  -webkit-text-fill-color: rgba(212, 212, 212, 0.97);
  -webkit-filter: none;
  filter: none;
  -webkit-text-stroke: 1.35px rgba(255, 255, 255, 0.9);
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.78),
    0 0 5px rgba(255, 255, 255, 0.32),
    0 0 10px rgba(255, 255, 255, 0.16);
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.hero-subtitle {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--hero-tagline-top);
  height: var(--tagline-zone-h);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 clamp(1rem, 5vw, 3rem);
  font-size: clamp(0.85rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: none;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  /* above carousel and figure */
  z-index: 36;
}

/* Wide layouts: tagline should sit behind figure, like separator line */
@media (min-aspect-ratio: 16/9) {
  .hero-subtitle {
    z-index: 26;
  }
}

/* Separator under the name — width in em so it tracks type; ~full name width */
.name-rule {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: var(--name-rule-top);
  /* Same font metrics as the name so em ≈ text width (Bebas “MANEET KOHLI” + gap) */
  font-size: var(--hero-name-size);
  width: min(8.5em, 94vw);
  height: 1px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 8%,
    rgba(255, 255, 255, 0.95) 45%,
    rgba(255, 255, 255, 0.95) 55%,
    rgba(255, 255, 255, 0.15) 92%,
    transparent 100%
  );
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.45);
  pointer-events: none;
  z-index: 6;
  transform-origin: center;
}

/* ─── Frosted skill marquee (behind figure, between split zones) ─ */
.skills-marquee {
  position: absolute;
  left: 50%;
  right: auto;
  width: 100vw;
  margin-left: -50vw;
  top: var(--carousel-top-bound);
  height: max(0px, var(--carousel-render-h));
  z-index: 25;
  overflow: hidden;
  pointer-events: none;
}

.skills-marquee__band {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--skills-row-gap);
  height: 100%;
  padding-block: calc(var(--skills-band-pad-block) + 0.2rem);
}

.skills-marquee__row {
  overflow: hidden;
  width: 100%;
  padding-block: 2px;
  /* Fade moving pills at both row edges (not the whole section background) */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    black var(--skills-marquee-edge-w),
    black calc(100% - var(--skills-marquee-edge-w)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    black var(--skills-marquee-edge-w),
    black calc(100% - var(--skills-marquee-edge-w)),
    transparent 100%
  );
}

.skills-marquee__strip {
  display: flex;
  width: max-content;
  will-change: transform;
  animation:
    skills-row-in-from-right var(--skills-intro-duration, 78s) linear 0.25s both,
    skills-marqueeL var(--skills-loop-duration, 155s) linear calc(var(--skills-intro-duration, 78s) + 0.25s) infinite;
}

.skills-marquee__row--r .skills-marquee__strip {
  animation:
    skills-row-in-from-left var(--skills-intro-duration, 155s) linear 0.25s both,
    skills-marqueeR var(--skills-loop-duration, 155s) linear calc(var(--skills-intro-duration, 155s) + 0.25s) infinite;
}

.skills-marquee__row--l2 .skills-marquee__strip {
  animation:
    skills-row-in-from-right var(--skills-intro-duration, 78s) linear 0.25s both,
    skills-marqueeL var(--skills-loop-duration, 155s) linear calc(var(--skills-intro-duration, 78s) + 0.25s) infinite;
}

@keyframes skills-row-in-from-right {
  from {
    transform: translateX(100vw);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes skills-row-in-from-left {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes skills-marqueeL {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes skills-marqueeR {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.skills-marquee__group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
  padding-right: 0.85rem;
}

.skills-marquee__word {
  display: inline-flex;
  align-items: center;
  line-height: 1.15;
  padding: var(--skills-pill-pad-y) var(--skills-pill-pad-x);
  border-radius: 999px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--skills-pill-font-size);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(42px) saturate(1.75);
  -webkit-backdrop-filter: blur(42px) saturate(1.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 6px 36px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.skills-marquee__dot {
  color: rgba(255, 255, 255, 0.35);
  padding: 0 0.35rem;
  font-weight: 300;
  font-size: 0.9em;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .skills-marquee__strip {
    animation-duration: 360s !important;
    animation-iteration-count: infinite !important;
  }
}

/* ─── Glowing line — bottom edge of hero ─────────────────── */
.dividing-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  height: 2px;
  background: #fff;
  box-shadow: var(--line-glow);
  z-index: 11;
  transform-origin: center;
  transform: scaleX(0);
  animation: lineExpand 1s var(--ease-out) 0.9s both;
}

/* ─── Scroll Indicator ───────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  /* Push below the glowing line into the figure's waist zone */
  bottom: -26vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 35;
  opacity: 0.82;
  transition: opacity 0.7s var(--ease-out);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.scroll-indicator__text {
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 6px #fff,
    0 0 18px rgba(255,255,255,0.8),
    0 0 40px rgba(255,255,255,0.4);
}

.scroll-indicator__arrow {
  font-size: clamp(24px, 2.4vw, 32px);
  color: #fff;
  display: block;
  line-height: 1;
  text-shadow:
    0 0 8px #fff,
    0 0 22px rgba(255,255,255,0.8),
    0 0 50px rgba(255,255,255,0.4);
  animation: arrowFloat 2.4s ease-in-out infinite;
}

@keyframes arrowFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(9px); }
}

/* ─── Hero figure — straddles the glowing line ───────────── */
/*
 * hero.png is 2560×1080 (ultra-wide landscape).
 * The person is centered horizontally in the canvas.
 * We set a portrait-shaped box and use object-fit:cover + center
 * so the browser zooms in on the central person and discards
 * the empty black flanks.
 *
 * bottom: -30% of 100vh = -30vh → 30vh hangs into the dark panel
 */
.hero-figure {
  position: absolute;
  /* top = split - figure-height + figure-overhang */
  top: calc(var(--split) - var(--figure-height) + var(--figure-overhang));
  left: 50%;
  transform: translateX(-50%);
  width: var(--hero-figure-w);
  height: var(--figure-height);
  z-index: 30;                    /* above hero-bottom so full body shows */
  pointer-events: none;
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
  overflow: hidden;
}

/* Dual-axis mask:
 *  horizontal  — fade the black left/right edges of the wide image canvas
 *  vertical    — stay fully opaque through the waist (~58%), then fade out
 * mask-composite: intersect = pixel must pass BOTH gradients to be visible
 */
.hero-figure {
  mask-image:
    linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%),
    linear-gradient(to bottom, black 0%, black 67%, transparent 96%);
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%),
    linear-gradient(to bottom, black 0%, black 67%, transparent 96%);
  mask-composite: intersect;
  -webkit-mask-composite: destination-in;
}

.hero-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* center horizontally on person; 60% vertical targets waist/belt area */
  object-position: center 60%;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  filter: none;
}

/* ─── Frosted callouts — side columns (split + below stacked, no overlap) ─ */
.hero-frost-panes {
  position: absolute;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  top: 0;
  min-height: calc(var(--split) + 42vh);
  z-index: 28;
  pointer-events: none;
}

.hero-frost-panes__col {
  position: absolute;
  /*
   * Center stack vertically in the space between the glowing split line and
   * the viewport bottom so top and bottom gaps are balanced.
   * --hero-frost-line-clearance keeps cards off the line at any zoom/width.
   */
  top: calc(
    var(--split)
    + var(--hero-frost-line-clearance)
    + max(
      0px,
      (
        100vh
        - var(--split)
        - var(--hero-frost-stack-h)
        - 2 * var(--hero-frost-line-clearance)
      ) / 2
    )
  );
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--hero-frost-stack-gap);
  width: auto;
  max-width: none;
  pointer-events: none;
}

.hero-frost-panes__col--left {
  left: clamp(0.5rem, 3vw, 1.5rem);
}

.hero-frost-panes__col--right {
  right: clamp(0.5rem, 3vw, 1.5rem);
  left: auto;
  align-items: flex-end;
}

.hero-frost-panes__label {
  margin: 0 auto 0.4rem;
  width: 100%;
  text-align: center;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.58rem, 1.05vw, 0.7rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.hero-frost-panes__box {
  position: relative;
  width: auto;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(42px) saturate(1.75);
  -webkit-backdrop-filter: blur(42px) saturate(1.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 40px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

/* Uniform frost cards below the glowing line */
.hero-frost-panes__box--split,
.hero-frost-panes__box--below {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 0 0 auto;
  width: min(
    21rem,
    calc((100vw - var(--hero-figure-w)) / 2 - clamp(0.5rem, 1.5vw, 1.25rem))
  );
  padding: clamp(0.65rem, 1.45vw, 0.95rem) clamp(0.8rem, 1.8vw, 1.1rem);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 40px rgba(0, 0, 0, 0.35);
}

.hero-frost-panes__box--split {
  min-height: var(--hero-frost-split-min-h);
}

.hero-frost-panes__box--below {
  width: min(
    23.8rem,
    calc(
      (100vw - var(--hero-figure-w)) / 2
      - clamp(0.5rem, 1.5vw, 1.25rem)
      + var(--hero-frost-below-inward)
    )
  );
  min-height: clamp(7rem, 13.1vh, 9.4rem);
}

.hero-frost-panes__text {
  margin: 0;
  text-align: center;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.72rem, 1.35vw, 0.85rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

.hero-frost-panes__text--lg {
  font-size: clamp(0.9rem, 1.75vw, 1.05rem);
  line-height: 1.5;
  letter-spacing: 0.03em;
}

/* ─── Social media icon cards ────────────────────────────── */
.hero-frost-panes__box--social {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.hero-frost-panes__box--social:hover,
.hero-frost-panes__box--social:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 48px rgba(0, 0, 0, 0.5);
}

.hero-frost-panes__box--social:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

.hero-frost-panes__social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-out);
}

.hero-frost-panes__social-icon svg {
  width: clamp(34px, 2.2vw, 44px);
  height: clamp(34px, 2.2vw, 44px);
}

.hero-frost-panes__box--social:hover .hero-frost-panes__social-icon,
.hero-frost-panes__box--social:focus-visible .hero-frost-panes__social-icon {
  transform: scale(1.05);
}

.hero-frost-panes__social-label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ─── Resume card: "View Resume" secondary text ──────────── */
.hero-frost-panes__social-subtext {
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.63rem, 1vw, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
}

/* ─── Button reset for frost-pane card used as a button ───── */
button.hero-frost-panes__box {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

/* ─── Introduction video modal overlay ───────────────────── */
.intro-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition:
    background 0.4s ease,
    backdrop-filter 0.4s ease,
    opacity 0.4s ease;
}

.intro-video-overlay.is-open {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 1;
  pointer-events: auto;
}

.intro-video-modal {
  position: relative;
  width: min(780px, 90vw);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 32px 80px rgba(0, 0, 0, 0.65);
  border-radius: 20px;
  overflow: hidden;
  transform: scale(0.82) translateY(28px);
  transition: transform 0.5s cubic-bezier(0.34, 1.38, 0.64, 1);
}

.intro-video-overlay.is-open .intro-video-modal {
  transform: scale(1) translateY(0);
}

.intro-video-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 10;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.intro-video-close:hover {
  background: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 1);
}

.intro-video-player {
  display: block;
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: #000;
}

/* ─── Dark panel (flows after the split) ─────────────────── */
.hero-bottom {
  position: relative;
  z-index: 15;
  min-height: 100vh;
  /*
   * Abstract flowing B&W gradient — multiple soft light orbs against near-black,
   * giving a cinematic atmospheric depth without colour.
   */
  background:
    radial-gradient(ellipse 70% 45% at 12% 20%,  rgba(255,255,255,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 55% 65% at 88% 12%,  rgba(200,200,200,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 38% at 50% 68%,  rgba(160,160,160,0.05) 0%, transparent 48%),
    radial-gradient(ellipse 38% 55% at 78% 52%,  rgba(180,180,180,0.03) 0%, transparent 42%),
    radial-gradient(ellipse 62% 28% at 28% 92%,  rgba(130,130,130,0.04) 0%, transparent 42%),
    linear-gradient(148deg, #1c1c1c 0%, #0d0d0d 38%, #131313 68%, #080808 100%);
  padding: calc(var(--figure-overhang) + clamp(2.5rem, 5vh, 4rem))
           clamp(1rem, 4vw, 2.5rem)
           4rem;
}

/* Grain overlay for cinematic texture */
.hero-bottom::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/*
 * Figure cast shadow — centered under the hero cutout, on the dark panel.
 * Sits above grain (::before), below card/content (z-index 1).
 */
.hero-bottom::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -8%);
  width: var(--figure-cast-shadow-w);
  height: var(--figure-cast-shadow-h);
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse 38% 52% at 50% 32%,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.22) 42%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 95% 48% at 50% 12%,
      rgba(0, 0, 0, 0.38) 0%,
      rgba(0, 0, 0, 0.12) 48%,
      transparent 72%
    );
  filter: blur(var(--figure-cast-shadow-blur));
  opacity: 0.92;
}

/* Ensure card and content sit above the grain + shadow layers */
.hero-bottom > * { position: relative; z-index: 1; }

.about-me {
  width: min(1120px, 100%);
  margin: clamp(1.75rem, 4.5vh, 4rem) auto 0;
}

.about-me__title {
  margin: 0 0 clamp(0.95rem, 2vw, 1.35rem);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.7rem, 5.6vw, 4.75rem);
  line-height: 0.92;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
  color: rgba(255, 255, 255, 0.95);
}

.about-me-collage {
  width: min(510px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.about-me-collage__col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 100%;
}

.about-me-collage__cell {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(7, 7, 7, 0.62);
  transition: border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}

.about-me-collage__cell:hover,
.about-me-collage__cell:focus-within {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 14px rgba(255, 255, 255, 0.32),
    0 0 26px rgba(255, 255, 255, 0.16);
}

.about-me-collage__cell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.16) 34%,
    transparent 62%
  );
}

.about-me-collage__media {
  width: 100%;
  height: auto;
}

.about-me-collage__media img,
.about-me-collage__media video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.about-me-collage__cell--crop {
  aspect-ratio: var(--about-crop-ratio, 1 / 1);
}

.about-me-collage__cell--crop .about-me-collage__media,
.about-me-collage__cell--crop .about-me-collage__media img {
  width: 100%;
  height: 100%;
}

.about-me-collage__cell--crop .about-me-collage__media img {
  object-fit: cover;
  object-position: var(--about-crop-pos, center center);
}

.about-me-collage__cell--crop-halloween {
  --about-crop-ratio: 1 / 0.66;
  --about-crop-pos: center 44%;
}

.about-me-collage__cell--crop-palm {
  --about-crop-ratio: 1 / 1.22;
  --about-crop-pos: center 52%;
}

.about-me-collage__cell--crop-drinks {
  --about-crop-ratio: 1 / 1.12;
  --about-crop-pos: center 46%;
}

.about-me-collage__cell--stretch {
  flex: 1 1 auto;
  min-height: 0;
}

.about-me-collage__cell--stretch .about-me-collage__media,
.about-me-collage__cell--stretch .about-me-collage__media img {
  width: 100%;
  height: 100%;
}

.about-me-collage__cell--stretch .about-me-collage__media img {
  object-fit: cover;
  object-position: var(--about-stretch-pos, center center);
}

.about-me-collage__cell--stretch-gym {
  --about-stretch-pos: center 42%;
}

.about-me-collage__cell--stretch-steak {
  --about-stretch-pos: center 52%;
}

.about-me-collage__cell--stretch-drinks {
  --about-stretch-pos: center 46%;
}

.about-me__divider {
  margin: clamp(1.35rem, 3vw, 2rem) 0 clamp(1.5rem, 3.8vw, 2.25rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.about-me__content {
  display: grid;
  grid-template-columns: minmax(320px, 510px) minmax(0, 1fr);
  gap: clamp(1rem, 2.6vw, 2rem);
  align-items: start;
}

.about-me__bio p {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 400;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.83);
}

.about-me__bio {
  max-width: 64ch;
}

.about-me__bio p + p {
  margin-top: 1rem;
}

.about-me__story-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(1rem, 2.4vw, 1.5rem);
  padding: 0.55rem 1.05rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  transition:
    color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    text-shadow 0.25s var(--ease-out);
}

.about-me__story-link:hover,
.about-me__story-link:focus-visible {
  color: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.96);
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 16px rgba(255, 255, 255, 0.32);
}

.about-me__story-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.62);
  outline-offset: 3px;
}

.glass-card {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.bio {
  margin: 0 0 1.5rem;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  animation: tagPop 0.55s var(--ease-out) both;
}

.skill-tag:nth-child(1) { animation-delay: 1.30s; }
.skill-tag:nth-child(2) { animation-delay: 1.38s; }
.skill-tag:nth-child(3) { animation-delay: 1.46s; }
.skill-tag:nth-child(4) { animation-delay: 1.54s; }
.skill-tag:nth-child(5) { animation-delay: 1.62s; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: color 0.3s var(--ease-out),
              background 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out);
}

.cta-btn:hover,
.cta-btn:focus-visible {
  color: #111;
  background: #fff;
  border-color: #fff;
}

.cta-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

.projects-strip {
  max-width: 920px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.projects-strip__title {
  margin: 0 0 0.75rem;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.projects-strip__placeholder {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
}

.site-footer {
  max-width: 920px;
  margin: 3rem auto 0;
  text-align: center;
}

.site-footer__note {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
}

/* ─── Load animations ────────────────────────────────────── */
.anim-name     { animation: titleUp  1s   var(--ease-out) 0.5s  both; }
.anim-subtitle { animation: titleUp  0.9s var(--ease-out) 0.62s both; }
.anim-name-rule {
  animation: nameRuleIn 0.85s var(--ease-out) 0.75s both;
}
.anim-card    { animation: cardUp  1s var(--ease-out) 1.1s both; }
.anim-frost-col { animation: frostIn 0.95s var(--ease-out) 0.95s both; }
.hero-frost-panes__col--right.anim-frost-col { animation-delay: 1.05s; }
.anim-scroll-indicator {
  opacity: 0;
  animation: scrollIndicatorIn 0.85s var(--ease-out) 0.95s both;
}

.scroll-indicator.anim-scroll-indicator.is-hidden {
  animation: scrollIndicatorOut 0.75s var(--ease-out) forwards;
}

.anim-hero img {
  will-change: transform, opacity;
  animation: heroScale 1.1s var(--ease-out) 0.6s both;
}

@keyframes navFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes titleUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0);     }
}

@keyframes nameRuleIn {
  from {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.35);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}

@keyframes heroScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1);    }
}

@keyframes lineExpand {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes cardUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0);     }
}

@keyframes frostIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes scrollIndicatorIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }
  to {
    opacity: 0.82;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes scrollIndicatorOut {
  from {
    opacity: var(--scroll-indicator-fade-from, 0.82);
    transform: translateX(-50%) translateY(0);
    visibility: visible;
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    visibility: hidden;
  }
}

@keyframes tagPop {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Standard laptop (≤ 1280px) ────────────────────────── */
@media (max-width: 1280px) {
  :root {
    /* Slightly tighten name so it doesn't overwhelm the section */
    --hero-name-size: clamp(88px, 16.5vw, 250px);
    /* Narrower figure frees more side space for frost cards */
    --hero-figure-w: clamp(520px, 62vw, 860px);
    /* Frost below cards: a touch less inward reach */
    --hero-frost-below-inward: clamp(2rem, 4.5vw, 5.5rem);
  }
}

/* ─── Small laptop (≤ 1024px) ───────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --split: 68vh;
    --figure-height: 85vh;
    --figure-overhang: 27vh;
    /* Narrower figure → more side room for frost pane cards */
    --hero-figure-w: clamp(440px, 56vw, 680px);
    /* Scale name down so layout breathes at laptop sizes */
    --hero-name-size: clamp(136px, 19.5vw, 320px);
    --hero-name-pad-top: clamp(4.4rem, 6.8vw, 5.6rem);
    --name-tagline-gap: clamp(0.55rem, 1.2vh, 0.8rem);
    --tagline-carousel-gap: clamp(0.28rem, 0.62vh, 0.5rem);
    --carousel-mini-gap: clamp(0.65rem, 1.5vh, 0.95rem);
    --carousel-line-gap: clamp(0.45rem, 0.95vh, 0.7rem);
    /*
     * Marquee height reduced so it fits cleanly between the subtitle
     * and the glowing split line without overlapping either.
     */
    --skills-marquee-h: 26vh;
    --skills-marquee-gap: 1.1vh;
    --skills-marquee-nudge: 2.5vh;
    /* Frost pane positioning */
    --hero-frost-split-nudge: 1.6vh;
    --hero-frost-split-box-half: clamp(3.5rem, 9vh, 5.75rem);
    --hero-frost-col-shift: clamp(1.75rem, 3.4vh, 2.65rem);
    --hero-frost-below-inward: clamp(1.25rem, 3.5vw, 3.5rem);
    --hero-frost-stack-gap: clamp(0.48rem, 1.2vh, 0.75rem);
    --hero-frost-cards-top-gap: clamp(0.38rem, 0.9vh, 0.64rem);
    --hero-frost-split-min-h: clamp(4.6rem, 7.8vh, 5.8rem);
    --hero-frost-below-min-h: clamp(8rem, 15vh, 10.2rem);
    --hero-frost-stack-h: calc(
      var(--hero-frost-split-min-h) + var(--hero-frost-below-min-h) + var(--hero-frost-stack-gap)
    );
    /* Shadow */
    --figure-cast-shadow-w: min(75vw, 720px);
    --tagline-zone-h: clamp(2rem, 4.2vh, 3.1rem);
    --carousel-zone-h: clamp(13rem, 26vh, 18rem);
    --skills-pill-font-size: clamp(0.64rem, 0.56rem + 0.46vh, 0.88rem);
    --skills-pill-pad-y: clamp(0.3rem, 0.18rem + 0.3vh, 0.46rem);
    --skills-pill-pad-x: clamp(0.72rem, 0.54rem + 0.38vw, 1.04rem);
    --skills-row-gap: clamp(0.92rem, 0.32rem + 0.76vh, 1.4rem);
    --skills-band-pad-block: clamp(0.18rem, 0.08rem + 0.28vh, 0.38rem);
  }

  /* Frost split card: constrained to available gutter */
  .hero-frost-panes__box--split {
    width: min(
      18rem,
      calc((100vw - var(--hero-figure-w)) / 2 - clamp(0.5rem, 1.2vw, 1rem))
    );
    min-height: var(--hero-frost-split-min-h);
  }

  .hero-frost-panes__box--below {
    width: min(
      20.6rem,
      calc(
        (100vw - var(--hero-figure-w)) / 2
        - clamp(0.5rem, 1.2vw, 1rem)
        + var(--hero-frost-below-inward)
      )
    );
    min-height: clamp(6.6rem, 12.6vh, 8.7rem);
  }

}

/* ─── Tablet (≤ 768px) ───────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --split: 64vh;
    --figure-height: 76vh;
    --figure-overhang: 25vh;
    /* Lower minimum so the figure doesn't dominate the full width */
    --hero-figure-w: clamp(320px, 64vw, 540px);
    --hero-name-size: clamp(110px, 21.5vw, 250px);
    --hero-name-pad-top: clamp(4.1rem, 7vw, 5rem);
    --name-tagline-gap: clamp(0.5rem, 1.05vh, 0.72rem);
    --tagline-carousel-gap: clamp(0.24rem, 0.56vh, 0.44rem);
    --carousel-mini-gap: clamp(0.58rem, 1.3vh, 0.82rem);
    --carousel-line-gap: clamp(0.4rem, 0.85vh, 0.62rem);
    --skills-marquee-h: 24vh;
    --skills-marquee-gap: 1vh;
    --skills-marquee-nudge: 2.25vh;
    --hero-frost-split-nudge: 1.35vh;
    --hero-frost-split-box-half: clamp(3rem, 8vh, 5rem);
    --hero-frost-col-shift: clamp(1.5rem, 3vh, 2.35rem);
    --hero-frost-below-inward: clamp(0.75rem, 2.5vw, 2rem);
    --hero-frost-stack-gap: clamp(0.42rem, 1vh, 0.62rem);
    --hero-frost-cards-top-gap: clamp(0.32rem, 0.74vh, 0.5rem);
    --hero-frost-split-min-h: clamp(4.25rem, 7vh, 5.25rem);
    --hero-frost-below-min-h: clamp(7.2rem, 13.5vh, 9.2rem);
    --hero-frost-stack-h: calc(
      var(--hero-frost-split-min-h) + var(--hero-frost-below-min-h) + var(--hero-frost-stack-gap)
    );
    --figure-cast-shadow-w: min(88vw, 640px);
    --tagline-zone-h: clamp(1.85rem, 3.8vh, 2.8rem);
    --carousel-zone-h: clamp(11.5rem, 23vh, 16rem);
    --skills-pill-font-size: clamp(0.58rem, 0.5rem + 0.36vh, 0.8rem);
    --skills-pill-pad-y: clamp(0.26rem, 0.15rem + 0.24vh, 0.38rem);
    --skills-pill-pad-x: clamp(0.62rem, 0.46rem + 0.28vw, 0.88rem);
    --skills-row-gap: clamp(0.68rem, 0.2rem + 0.8vh, 1.12rem);
    --skills-band-pad-block: clamp(0.14rem, 0.06rem + 0.2vh, 0.28rem);
  }

  .hero-frost-panes__box--split {
    width: min(13rem, calc((100vw - var(--hero-figure-w)) / 2 - 0.75rem));
    min-height: var(--hero-frost-split-min-h);
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
  }

  .hero-frost-panes__box--below {
    width: min(
      15.1rem,
      calc((100vw - var(--hero-figure-w)) / 2 - 0.75rem + var(--hero-frost-below-inward))
    );
    min-height: clamp(6rem, 11.4vh, 7.6rem);
    padding: 0.6rem 0.8rem;
    border-radius: 14px;
  }

  .hero-frost-panes__text {
    font-size: clamp(0.64rem, 1.15vw, 0.78rem);
  }

  .hero-frost-panes__label {
    font-size: 0.55rem;
    letter-spacing: 0.13em;
  }

  .hero-frost-panes__social-icon svg {
    width: 52px;
    height: 52px;
  }

  .about-me__content {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

}

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --split: 60vh;
    --figure-height: 65vh;
    --figure-overhang: 27vh;
    /* Override figure width so it doesn't exceed the viewport on small phones */
    --hero-figure-w: clamp(260px, 58vw, 440px);
    --hero-name-size: clamp(88px, 22.5vw, 210px);
    --hero-name-pad-top: 4.5rem;
    --name-tagline-gap: clamp(0.44rem, 0.95vh, 0.64rem);
    --tagline-carousel-gap: clamp(0.2rem, 0.5vh, 0.38rem);
    --carousel-mini-gap: clamp(0.48rem, 1.1vh, 0.72rem);
    --carousel-line-gap: clamp(0.34rem, 0.72vh, 0.52rem);
    --skills-marquee-h: 30vh;
    --skills-marquee-gap: 1vh;
    --skills-marquee-nudge: 2vh;
    --figure-cast-shadow-w: min(92vw, 560px);
    --figure-cast-shadow-h: clamp(14vh, 36vw, 24vh);
    --figure-cast-shadow-blur: 28px;
    --figure-cast-shadow-top-h: clamp(12vh, 32vw, 22vh);
    --figure-cast-shadow-top-blur: 26px;
    --hero-frost-split-nudge: 1.25vh;
    --hero-frost-split-box-half: clamp(3.25rem, 8.5vh, 5.25rem);
    --hero-frost-stack-gap: clamp(0.34rem, 0.82vh, 0.52rem);
    --hero-frost-cards-top-gap: clamp(0.28rem, 0.62vh, 0.42rem);
    --hero-frost-split-min-h: clamp(3.9rem, 6.2vh, 4.8rem);
    --hero-frost-below-min-h: clamp(6.6rem, 12.2vh, 8.1rem);
    --hero-frost-stack-h: calc(
      var(--hero-frost-split-min-h) + var(--hero-frost-below-min-h) + var(--hero-frost-stack-gap)
    );
    --hero-frost-col-shift: clamp(1.55rem, 3.1vh, 2.45rem);
    --tagline-zone-h: clamp(1.7rem, 3.3vh, 2.35rem);
    --carousel-zone-h: clamp(10.5rem, 21vh, 14.5rem);
    --skills-pill-font-size: clamp(0.54rem, 0.47rem + 0.28vh, 0.72rem);
    --skills-pill-pad-y: clamp(0.22rem, 0.14rem + 0.18vh, 0.3rem);
    --skills-pill-pad-x: clamp(0.54rem, 0.42rem + 0.24vw, 0.78rem);
    --skills-row-gap: clamp(0.64rem, 0.18rem + 0.72vh, 1.04rem);
    --skills-band-pad-block: clamp(0.1rem, 0.05rem + 0.16vh, 0.24rem);
  }

  .site-nav { gap: 0.2rem; font-size: 0.65rem; }
  .nav-dot  { display: none; }

  .name-display {
    font-size: var(--hero-name-size);
    gap: 0.2em;
  }

  .name-rule {
    width: min(8.5em, 94vw);
  }

  .hero-subtitle {
    font-size: clamp(0.75rem, 3vw, 1rem);
    white-space: normal;
    padding: 0 clamp(0.75rem, 4vw, 1.5rem);
  }

  .name-display__first,
  .name-display__last { display: inline; }

  .hero-frost-panes__label {
    font-size: 0.52rem;
    letter-spacing: 0.12em;
  }

  .hero-frost-panes__box--split {
    width: min(
      11.5rem,
      calc((100vw - var(--hero-figure-w)) / 2 - 0.65rem)
    );
    min-height: var(--hero-frost-split-min-h);
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
  }

  .hero-frost-panes__box--below {
    width: min(
      13.1rem,
      calc((100vw - var(--hero-figure-w)) / 2 - 0.65rem + var(--hero-frost-below-inward))
    );
    min-height: clamp(5.6rem, 10.7vh, 7rem);
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
  }

  .hero-frost-panes__text {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }

  .hero-frost-panes__text--lg {
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .hero-frost-panes__social-icon svg {
    width: 56px;
    height: 56px;
  }

  .hero-frost-panes__social-label {
    font-size: 0.55rem;
    letter-spacing: 0.18em;
  }

  .glass-card { border-radius: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   NAV — Dropdown & Hamburger
   ════════════════════════════════════════════════════════ */

/* ─── Nav item container ─────────────────────────────────── */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

/* ─── Trigger button (dropdown parent) ───────────────────── */
.nav-link--trigger {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  padding: 0.25rem 0;
  position: relative;
}

.nav-link--trigger::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease-out);
}

.nav-link--trigger:hover::after,
.nav-link--trigger:focus-visible::after { width: 100%; }

.nav-link--trigger:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
}

/* Active state — persistent underline */
.nav-link.is-active::after,
.nav-link--trigger.is-active::after { width: 100%; }

/* ─── Chevron ─────────────────────────────────────────────── */
.nav-chevron {
  display: block;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out);
  pointer-events: none;
}

.nav-item--has-dropdown:hover .nav-chevron,
.nav-item--has-dropdown:focus-within .nav-chevron {
  transform: rotate(180deg);
}

/* ─── Hover bridge — fills the gap between trigger and panel ─
   Without this, moving the cursor through the gap loses :hover
   and the dropdown vanishes before the user can reach an item. */
.nav-item--has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.85rem; /* must match .nav-dropdown top offset */
  pointer-events: auto;
}

/* ─── Dropdown panel ─────────────────────────────────────── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.85rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  list-style: none;
  margin: 0;
  padding: 0.45rem 0;
  min-width: 12rem;
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-radius: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s var(--ease-out),
    transform 0.22s var(--ease-out),
    visibility 0s 0.22s;
}

.nav-item--has-dropdown:hover .nav-dropdown,
.nav-item--has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition:
    opacity 0.22s var(--ease-out),
    transform 0.22s var(--ease-out),
    visibility 0s 0s;
}

.nav-dropdown__link {
  display: block;
  padding: 0.52rem 1.1rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  transition: color 0.18s ease;
}

.nav-dropdown__link:hover,
.nav-dropdown__link:focus-visible { color: rgba(255, 255, 255, 1); }

.nav-dropdown__link.is-active { color: rgba(255, 255, 255, 1); }

.nav-dropdown__link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: -2px;
  border-radius: 4px;
}

/* ─── Hamburger button ──────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-hamburger__bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  transition:
    transform 0.3s var(--ease-out),
    opacity   0.3s var(--ease-out),
    width     0.3s var(--ease-out);
  transform-origin: center;
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ─── Mobile nav ────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-hamburger {
    display: flex;
  }

  /* Position nav panel below the fixed header */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 0 0.75rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 0.25s var(--ease-out),
      transform 0.25s var(--ease-out),
      visibility 0s 0.25s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition:
      opacity 0.25s var(--ease-out),
      transform 0.25s var(--ease-out),
      visibility 0s 0s;
  }

  .nav-dot { display: none; }

  .nav-item {
    display: block;
    position: relative;
  }

  .nav-link,
  .nav-link--trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
  }

  .nav-link::after,
  .nav-link--trigger::after { display: none; }

  /* Suppress desktop CSS hover/focus-within triggers on mobile */
  .nav-item--has-dropdown:hover .nav-dropdown,
  .nav-item--has-dropdown:focus-within .nav-dropdown {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
  }

  .nav-item--has-dropdown:hover .nav-chevron,
  .nav-item--has-dropdown:focus-within .nav-chevron {
    transform: none;
  }

  /* Mobile dropdown — static, toggled by .is-open class */
  .nav-dropdown {
    position: static;
    transform: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
    min-width: unset;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      max-height 0.3s var(--ease-out),
      opacity 0.3s var(--ease-out),
      visibility 0s 0.3s;
  }

  .nav-item--has-dropdown.is-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 200px;
    transition:
      max-height 0.3s var(--ease-out),
      opacity 0.3s var(--ease-out),
      visibility 0s 0s;
  }

  .nav-item--has-dropdown.is-open .nav-chevron {
    transform: rotate(180deg);
  }

  .nav-dropdown__link {
    padding: 0.55rem clamp(2.5rem, 8vw, 4rem);
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
  }

  /* Bridge not needed on mobile — no hover */
  .nav-item--has-dropdown::after {
    display: none;
  }
}
