/* ============================================
   ROOT TOKENS — "Paper" light editorial theme
   ============================================ */
:root {
  --bg:           #F4EFE5;
  --bg-soft:      #FBF7EE;
  --surface:      #FFFFFF;
  --hairline:     rgba(20, 17, 13, 0.10);

  --ink:          #14110D;
  --text:         #14110D;
  --text-dim:     #5E574B;
  --text-faint:   #9A9181;

  --accent:       #D24A1F;
  --accent-deep:  #FFFFFF;
  --accent-hot:   #8C2A0F;
  --accent-mute:  rgba(210, 74, 31, 0.14);

  --dark-section: #14110D;
  --dark-cream:   #F4EFE5;

  --side-pad:     clamp(20px, 5vw, 96px);
  --max-content:  1280px;
  --header-h:     72px;

  --ease:         cubic-bezier(.22,.61,.36,1);

  --shadow-sm:    0 1px 2px rgba(20,17,13,0.05), 0 2px 8px rgba(20,17,13,0.04);
  --shadow-md:    0 4px 12px rgba(20,17,13,0.06), 0 14px 30px rgba(20,17,13,0.06);
  --shadow-lg:    0 10px 28px rgba(20,17,13,0.10), 0 30px 60px rgba(20,17,13,0.08);
}

/* ============================================
   RESET / BASE
   ============================================ */
*,*::before,*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;        /* fullpage: native page scrolling disabled */
  overscroll-behavior: none;
}
/* Hard-lock body to the viewport. On mobile, `overflow: hidden` alone
   isn't always enough — content overflow or touch leaks past handlers
   can still cause native scrolling. `position: fixed` + `inset: 0`
   anchors body to the viewport rectangle so nothing can scroll it.
   The .site-header (also position:fixed) is unaffected — fixed elements
   use the viewport, not body, as their containing block. */
body {
  position: fixed;
  inset: 0;
}

/* ============================================
   FULLPAGE (vertical reels/slideshow scroller)
   ============================================ */
.fullpage {
  position: relative;
  width: 100%;
  /* dvh matches the *visible* viewport — accounts for iOS Safari URL bar.
     vh stays as the fallback for older browsers (cascades, second wins). */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.fullpage__track {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.panel {
  flex: 0 0 100vh;
  flex: 0 0 100dvh;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  position: relative;
  overflow: hidden;        /* clip any inner overflow so panels never bleed */
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }

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

.wrap {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal--delay { transition-delay: .15s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================
   GRAIN OVERLAY
   ============================================ */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  /* mix-blend-mode:multiply was removed — a full-screen blend layer forces
     the GPU to recomposite the whole viewport every frame whenever anything
     animates behind it. Plain low-opacity overlay is near-free. The noise
     SVG already outputs semi-transparent black, so it still reads as grain.
     Tune opacity to taste (was 0.4 under multiply). */
  opacity: 0.22;
  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.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0.12 0.12 0 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  /* backdrop-filter removed: a fixed blurred bar over the moving fullpage
     track forces the GPU to recompute the blur over changing content every
     frame of every scroll (the main scroll-time spike). A near-opaque
     solid background gives the same "frosted" read at ~zero cost. */
  background: rgba(244, 239, 229, 0.92);
  border-bottom: 1px solid var(--hairline);
  transition: background .45s ease, border-color .45s ease;
}
.site-header .logo__name,
.site-header .logo__mark,
.site-header .main-nav a,
.site-header .btn-pill {
  transition: color .45s ease, background .45s ease, border-color .45s ease;
}

/* When the visible panel is the dark "about" section, invert the header */
body[data-section="about"] .site-header {
  background: rgba(20, 17, 13, 0.92);
  border-bottom-color: rgba(244, 239, 229, 0.08);
}
body[data-section="about"] .logo__name { color: var(--dark-cream); }
body[data-section="about"] .logo__mark { background: var(--dark-cream); color: var(--ink); }
body[data-section="about"] .main-nav a { color: rgba(244, 239, 229, 0.75); }
body[data-section="about"] .main-nav a:hover { color: var(--dark-cream); }
body[data-section="about"] .main-nav a.is-current { color: var(--accent); }
body[data-section="about"] .btn-pill--ghost { border-color: var(--dark-cream); color: var(--dark-cream); }
body[data-section="about"] .btn-pill--ghost:hover { background: var(--dark-cream); color: var(--ink); border-color: var(--dark-cream); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: 'Fraunces', serif; }
.logo__mark {
  display: inline-flex;
  width: 32px; height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 13px;
}
.logo__name { font-style: italic; font-weight: 500; font-size: 16px; color: var(--ink); }
.main-nav { display: flex; gap: 32px; }
.main-nav a {
  font-size: 13px;
  color: var(--text-dim);
  position: relative;
  transition: color .2s ease;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.is-current { color: var(--accent); }
.main-nav a.is-current::after { transform: scaleX(1); }

.btn-pill {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: background .2s ease, color .2s ease;
}
.btn-pill--ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-pill--ghost:hover { background: var(--ink); color: var(--bg); }

/* ============================================
   JUMP PILL (chains sections, sits at bottom of each)
   ============================================ */
.jump-pill {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: var(--shadow-lg);
  z-index: 5;
  transition: transform .2s var(--ease), background .2s ease, box-shadow .2s ease;
  animation: pillFloat 2.4s ease-in-out infinite;
}
.jump-pill:hover {
  background: var(--accent);
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 18px 44px rgba(210,74,31,0.30);
}
.jump-pill__chev { font-size: 12px; transform: translateY(1px); }
.jump-pill--dark { background: var(--bg); color: var(--ink); box-shadow: 0 14px 36px rgba(0,0,0,0.4); }
.jump-pill--dark:hover { background: var(--accent); color: #fff; }

@keyframes pillFloat {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(5px); }
}

/* Only the jump-pill inside the active panel animates. The other 4–5 pills
   sit off-screen but their infinite transform animation still ticks every
   frame and keeps the compositor awake — pause them. body[data-section]
   is set by goToPanel() to the visible panel's id. */
.jump-pill { animation-play-state: paused; }
body[data-section="hero"]     #hero     .jump-pill,
body[data-section="reels"]    #reels    .jump-pill,
body[data-section="carousel"] #carousel .jump-pill,
body[data-section="about"]    #about    .jump-pill { animation-play-state: running; }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-head {
  text-align: center;
  padding: 0 var(--side-pad);
  margin-bottom: 18px;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-kicker { margin: 0; font-size: 13px; color: var(--text-dim); }

/* Minimal title variant — used on reels/carousels/about */
.section-head--minimal .section-title {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.01em;
  text-transform: lowercase;
  color: var(--ink);
}
.section-head--minimal .section-kicker {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.3px;
}

.section-head--dark .section-title { color: var(--dark-cream); }
.section-head--dark .section-kicker { color: rgba(244,239,229,0.6); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 30px) 0 90px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr minmax(240px, 378px);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  width: 100%;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.kicker__dot {
  position: relative;
  z-index: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
/* Pulsing halo as a pseudo-element animated with transform/opacity only.
   The old version animated box-shadow spread, which forces a repaint
   every frame; transform + opacity are composited (no paint). */
.kicker__dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent-mute);
  z-index: -1;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1);   opacity: 1;    }
  50%      { transform: scale(1.7); opacity: 0.15; }
}

/* 20% smaller than v2 hero */
.display {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 144;
  font-weight: 700;
  font-size: clamp(38px, 7.2vw, 106px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
}
.display .line { display: block; color: var(--ink); }
.display .line--italic {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  padding-left: clamp(32px, 6vw, 88px);
}

.hero-lede {
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 460px;
  margin: 0;
}

/* Showreel tile — 10% smaller (was 420 → 378) */
.hero-visual { width: 100%; display: flex; justify-content: flex-end; }
.showreel {
  position: relative;
  width: 100%;
  max-width: 378px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(100% 70% at 30% 20%, rgba(210,74,31,0.22), transparent 60%),
    linear-gradient(180deg, #2a2520 0%, #14110d 100%);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Video fills the tile, sitting under the scanlines, corner labels and play
   button. object-fit: cover crops to fill the 3:4 frame. */
.showreel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.showreel__corner,
.showreel__time,
.showreel__play { z-index: 2; }
.showreel::before {
  z-index: 1;
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0) 0,
    rgba(255,255,255,0) 3px,
    rgba(255,255,255,0.025) 3px,
    rgba(255,255,255,0.025) 4px
  );
  pointer-events: none;
}
.showreel__corner {
  position: absolute; top: 16px; left: 18px;
  font-size: 11px; letter-spacing: 1px;
  color: rgba(244,239,229,0.7);
  font-family: 'Fraunces', serif; font-style: italic;
}
.showreel__time {
  position: absolute; bottom: 16px; right: 18px;
  font-size: 11px; letter-spacing: 1px;
  color: rgba(244,239,229,0.7);
  font-variant-numeric: tabular-nums;
}
.showreel__play {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  padding-left: 4px;
  box-shadow: 0 14px 40px rgba(210,74,31,0.55);
  transition: transform .25s var(--ease);
}
.showreel__play:hover { transform: scale(1.08); }

/* ============================================
   SLIDER SECTION (REELS) — fits in one view
   ============================================ */
.slider-section {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h) + 40px) 0 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slideshow {
  --card-w: 220px;
  --card-gap: 22px;
  --card-ar: 9 / 16;
  position: relative;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 1120px;
}
.slideshow__viewport {
  overflow: hidden;
  position: relative;
  /* 40px vertical padding gives the scaled active card's drop-shadow room
     (overflow:hidden clips at the padding box; a CSS mask is in play so the
     overflow-clip-margin trick used elsewhere can't apply here). The
     negative vertical margin removes that added height from layout flow so
     the caption/description below aren't pushed down — net footprint
     matches the old 16px. Horizontal padding stays 0, so the side
     edge-fade mask and clipping are unchanged. */
  padding: 40px 0;
  margin: -24px 0;
  cursor: grab;
  user-select: none;
  /* Soft fade at the left / right edges so the outermost cards dissolve
     into the page background instead of being abruptly clipped. */
  -webkit-mask-image: linear-gradient(to right,
    transparent 0,
    black 8%,
    black 92%,
    transparent 100%);
  mask-image: linear-gradient(to right,
    transparent 0,
    black 8%,
    black 92%,
    transparent 100%);
}
.slideshow__viewport.is-dragging { cursor: grabbing; }
.slideshow__track {
  display: flex;
  gap: var(--card-gap);
  transition: transform .55s var(--ease);
  will-change: transform;
}
.slideshow__track.is-dragging { transition: none; }
/* When the track silently re-centres for the infinite wrap, freeze every
   inner card transition too — otherwise the active-card scale/opacity
   transitions fire mid-jump and the wrap-around feels laggy. */
.slideshow__track.no-anim,
.slideshow__track.no-anim .slide-card { transition: none; }

/* Fast "rewind" transition used when wrapping past the last card back to
   the first (and vice versa). Shorter duration so it reads as a snappy
   restart rather than a long scroll across every reel. */
.slideshow__track.wrap-back {
  transition: transform 0.35s cubic-bezier(0.6, 0, 0.4, 1);
}

.slide-card {
  flex: 0 0 var(--card-w);
  aspect-ratio: var(--card-ar);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  opacity: 0.55;
  transform: scale(0.88);
  transition: opacity .35s ease, transform .55s var(--ease), box-shadow .35s ease, filter .35s ease;
  filter: saturate(0.7) brightness(0.95);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20,17,13,0.08);
}
/* Real video / image fills the card behind the title overlay */
.slide-card__video,
.slide-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;  /* let drag / tap reach the card */
}

.slide-card__inner {
  position: absolute;
  inset: 0;
  z-index: 1;            /* title sits on top of any video / image */
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.slide-card__title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  color: rgba(255,255,255,0.96);
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.slide-card--adjacent {
  opacity: 0.8;
  transform: scale(0.94);
  filter: saturate(0.9) brightness(1);
}
.slide-card--active {
  opacity: 1;
  transform: scale(1.08);
  z-index: 2;
  filter: saturate(1.05) brightness(1);
  box-shadow: 0 0px 10px rgba(20,17,13,0.22), 0 0 0 1px rgba(20,17,13,0.06) inset;
}

.slideshow__arrow {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  z-index: 4;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--hairline);
  transition: background .15s ease, color .15s ease, transform .15s ease, border-color .15s ease;
  box-shadow: var(--shadow-md);
}
.slideshow__arrow:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translate(-50%, -50%) scale(1.06); }
/* Sit just outside the centred (active) reel's left/right edges.
   --card-w is the unscaled card width; +30px clears the card + a small gap. */
.slideshow__arrow--left  { left: calc(50% - var(--card-w) / 2 - 30px); right: auto; }
.slideshow__arrow--right { left: calc(50% + var(--card-w) / 2 + 30px); right: auto; }

/* Caption sits tight under slides */
.slider-caption { text-align: center; margin-top: 14px; }
.slider-caption__title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.slider-caption__desc { margin: 0; font-size: 13px; color: var(--text-dim); }

/* ============================================
   CAROUSEL SECTION — fits in one view
   ============================================ */
.carousel-section {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h) + 30px) 0 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.glow {
  position: absolute;
  top: 30%;
  width: 400px; height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.glow--left  { left: -160px;  background: rgba(210,74,31,0.10); }
.glow--right { right: -160px; background: rgba(232,197,71,0.10); }

.post-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 22px;
  max-width: 600px;
  margin: 0 auto;
}
.post-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: transform .25s var(--ease);
}
.post-thumb:hover { transform: translateY(-3px); }
.post-thumb__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  /* Thin OUTER hairline so light covers don't blend into the cream page.
     Done as a 0-blur box-shadow ring (not a border): it sits outside the
     image, hugs the rounded corners, and adds no layout/box-size shift. */
  transition: box-shadow .25s ease;
  box-shadow: 0 0 0 1px rgba(20, 17, 13, 0.303), var(--shadow-md);
}
.post-thumb__count {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  z-index: 3;
  letter-spacing: 0.5px;
}
.post-thumb__title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
}
.post-thumb:hover .post-thumb__img {
  box-shadow: 0 18px 40px rgba(20,17,13,0.16), 0 0 0 2px var(--accent);
}

/* ============================================
   LIGHTBOX — top/bottom layout, Instagram-style track
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.lightbox[aria-hidden="false"] { opacity: 1; pointer-events: auto; }

.lightbox__backdrop {
  position: absolute; inset: 0;
  /* blur(20px) was the heaviest GPU op in the file. At 0.94 opacity the
     cream is nearly solid anyway, so the blur added cost for little gain. */
  background: rgba(244, 239, 229, 0.94);
}
.lightbox__close {
  position: absolute;
  top: 24px; right: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 24px;
  line-height: 1;
  padding: 0;
  /* flex-centre the "×" so it stays in the dead-centre of the circle
     during the hover rotate (otherwise default text alignment drifts) */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background .15s ease, transform .15s ease;
  box-shadow: var(--shadow-md);
}
.lightbox__close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }

.lightbox__panel {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: clamp(60px, 8vh, 100px) clamp(24px, 5vw, 80px) clamp(30px, 5vh, 60px);
  transform: translateY(20px);
  opacity: 0;
  transition: opacity .45s var(--ease) .05s, transform .55s var(--ease) .05s;
}
.lightbox[aria-hidden="false"] .lightbox__panel { opacity: 1; transform: translateY(0); }

.lightbox__media {
  position: relative;
  width: min(560px, 100%);
  max-height: 70vh;
}
/* Per-type sizing: portrait video, square post */
.lightbox[data-type="reel"]     .lightbox__media { width: min(40vh, 100%); }
.lightbox[data-type="carousel"] .lightbox__media { width: min(560px, 100%); }

.lightbox__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
}
.lightbox__track::-webkit-scrollbar { display: none; }
.lightbox__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(72px, 14vh, 160px);
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.04em;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* Per-type aspect ratios */
.lightbox[data-type="reel"]     .lightbox__slide { aspect-ratio: 9 / 16; border-radius: 22px; }
.lightbox[data-type="carousel"] .lightbox__slide { aspect-ratio: var(--lb-ar, 1 / 1); border-radius: 6px; }

/* =========================================================
   CAROUSEL preview — coverflow layout with blurred neighbours,
   title/description floated over the leftmost (blurred) slide,
   numbered thumbnail strip below.
   ========================================================= */

.lightbox[data-type="carousel"] .lightbox__media {
  width: min(95vw, 1200px);
  max-height: 100vh;
  /* overflow:clip + a clip-margin lets the active slide's drop-shadow
     bleed past the box (which still clips the far side slides) without
     any padding that would shrink the slide. overflow:hidden stays
     first as a safe fallback for Safari < 16. */
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 70px;
}

/* Stop using scroll-snap — use transform-based centering instead.
   Slides sit flush against each other (no gap). */
.lightbox[data-type="carousel"] .lightbox__track {
  overflow: visible;
  scroll-snap-type: none;
  width: max-content;
  gap: 0;
  transition: transform 0.45s var(--ease);
  border-radius: 0;
}

/* Each slide is a fixed share of the viewport so neighbours sit beside the
   active one with no space. By default slides are clear; only the slide
   immediately before the active one gets blurred so the title/description
   overlay sitting on top of it stays readable. */
.lightbox[data-type="carousel"] .lightbox__slide {
  flex: 0 0 clamp(260px, 30vw, 400px);
  scroll-snap-align: none;
  filter: none;
  transform: scale(1);
  transition: filter 0.4s ease;
}
/* 4:5 (portrait) carousels — slides 2,3,4. Size is WIDTH-driven and the
   height follows from aspect-ratio (height = width x 5/4), so to make
   these smaller/larger you change the WIDTH here, not max-height.
   Max 320px wide -> 400px tall, matching the square slides' height.
   This is the single knob for the 4:5 carousels — tune the clamp(). */
.lightbox[data-type="carousel"][data-lb-ar="portrait"] .lightbox__slide {
  flex-basis: clamp(210px, 24vw, 320px);
}
.lightbox[data-type="carousel"] .lightbox__slide.is-active {
  z-index: 2;
}
/* Left slide is now treated like any other neighbour — no blur, no dim.
   (Title + description live below the slides instead.) */
.lightbox[data-type="carousel"] .lightbox__slide-num {
  opacity: 0;
  transition: opacity 0.35s ease;
}
.lightbox[data-type="carousel"] .lightbox__slide.is-active .lightbox__slide-num {
  opacity: 1;
}

/* Title + description sit below the slides — normal flow in the panel,
   centred, no overlay box. */
.lightbox[data-type="carousel"] .lightbox__info {
  position: static;
  /* Negative top pulls the title up closer to the thumbnail strip,
     trimming the gap created by the panel's shared 24px flex gap. */
  margin: -14px auto 0;
  max-width: 560px;
  text-align: center;
  padding: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}
.lightbox[data-type="carousel"] .lightbox__title { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 8px; }
.lightbox[data-type="carousel"] .lightbox__desc  { font-size: 13px; }
.lightbox[data-type="carousel"] .lightbox__hint  { display: none; }

/* Arrows sit on the active slide's left/right edges */
.lightbox[data-type="carousel"] .lightbox__arrow--prev {
  left: calc(50% - clamp(130px, 15vw, 200px));
  right: auto;
  transform: translate(-50%, -50%);
}
.lightbox[data-type="carousel"] .lightbox__arrow--next {
  left: calc(50% + clamp(130px, 15vw, 200px));
  right: auto;
  transform: translate(-50%, -50%);
}

/* Counter is replaced by the thumbnail strip */
.lightbox[data-type="carousel"] .lightbox__counter { display: none; }

/* Thumbnail strip */
.lightbox__thumbs {
  display: none;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 6px 20px 22px;
  margin-top: 6px;
}
.lightbox[data-type="carousel"] .lightbox__thumbs { display: flex; }

.lightbox__thumb {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity .2s ease, transform .15s var(--ease), outline-color .2s ease;
  outline: 2px solid transparent;
  outline-offset: 3px;
  border: none;
  padding: 0;
}
.lightbox__thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.lightbox__thumb.is-active { opacity: 1; outline-color: var(--accent); }
.lightbox__thumb-num {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  pointer-events: none;
}
.lightbox__thumb.is-active .lightbox__thumb-num { color: var(--accent); font-weight: 700; }
.lightbox__slide::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 20% 15%, rgba(255,255,255,0.22), transparent 60%),
    linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.28));
  pointer-events: none;
}
.lightbox__slide-num { position: relative; z-index: 1; }

/* Real carousel slide image — fills the square slide */
.lightbox__slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 16px;
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  box-shadow: var(--shadow-md);
}
.lightbox__arrow:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lightbox__arrow--prev { left: -20px; }
.lightbox__arrow--next { right: -20px; }
.lightbox__arrow[hidden] { display: none; }

.lightbox__counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,17,13,0.65);
  color: var(--bg);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  z-index: 3;
}

.lightbox__info { max-width: 560px; text-align: center; }
.lightbox__title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.1;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.lightbox__desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 0 14px;
}
.lightbox__hint {
  margin: 0;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

/* ============================================
   LIGHTBOX — type-specific decorations
   ============================================ */

/* Real video inside the reel lightbox — fills the 9:16 frame */
.lb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: #000;
}

/* Shared corner tag (REEL / POSTER) */
.lb-tag {
  position: absolute;
  top: 14px; left: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.42);
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3;
}
/* ---------- REEL — vertical video player ---------- */
.lb-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  transition: transform .2s var(--ease), background .2s ease;
}
.lb-play svg { transform: translateX(2px); }
.lb-play:hover { transform: scale(1.08); background: #fff; }

.lb-time {
  position: absolute;
  bottom: 24px; right: 14px;
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.42);
  padding: 4px 9px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  z-index: 3;
}

.lb-progress {
  position: absolute;
  left: 14px; right: 14px;
  bottom: 14px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
  z-index: 3;
}
.lb-progress i {
  display: block;
  height: 100%;
  background: rgba(255,255,255,0.85);
  border-radius: inherit;
}

.lb-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0) 0,
    rgba(255,255,255,0) 3px,
    rgba(0,0,0,0.04) 3px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 2;
}


/* ============================================
   ABOUT — inverted dark, fits in one view
   ============================================ */
.about {
  position: relative;
  background: var(--dark-section);
  color: var(--dark-cream);
  min-height: 100vh;
  padding: calc(var(--header-h) + 30px) 0 90px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;     /* title sits near the top, not mid-screen */
}
.about-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.05) 0, transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 32px);
  pointer-events: none;
}
.about-inner { position: relative; z-index: 1; }
.about .section-head { margin-bottom: 36px; }

.about-card { max-width: 920px; margin: 0 auto; }

/* Avatar + name + meta stacked centred — bigger avatar/name */
.about-header {
  display: flex;
  /* Horizontal: avatar on the left, name + meta on the right.
     Mobile (<=720px) reverts to column + centred via the existing
     responsive override below. */
  flex-direction: row;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  margin-bottom: 28px;
}
.about-intro { text-align: left; }

.avatar {
  width: clamp(150px, 16vw, 180px);
  height: clamp(150px, 16vw, 180px);
  border-radius: 26px;
  /* Real photo on top, cream gradient below as fallback. Drop your
     image at v3/assets/avatar.jpg — if the file is missing, the
     gradient placeholder shows through automatically. */
  background:
    url('assets/avatar.jpg') center / cover no-repeat,
    radial-gradient(100% 80% at 30% 20%, #fff, #e6dcc4);
  margin: 0;
  flex-shrink: 0;
  box-shadow: 0 18px 50px rgba(0,0,0,0.42), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.about-name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  /* Much larger so the name dominates the horizontal header (was up to
     58px). Mobile override below pulls it back down. */
  font-size: clamp(48px, 8.5vw, 110px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--dark-cream);
  text-align: left;
}
.about-name em { font-style: italic; font-weight: 500; color: var(--accent); }
.about-meta {
  display: flex;
  gap: 28px;
  justify-content: flex-start;
  margin-bottom: 0;
  font-size: 12px;
  color: rgba(244,239,229,0.7);
  flex-wrap: wrap;
}
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.dot--accent { background: var(--accent); }

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.tab {
  padding: 14px 8px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(244,239,229,0.55);
  position: relative;
  z-index: 1;
  transition: color .2s ease;
}
.tab:hover { color: var(--dark-cream); }
.tab--active { color: var(--dark-cream); font-weight: 700; }
.tabs__indicator {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 20%;
  background: var(--accent);
  transition: transform .35s var(--ease), width .35s var(--ease);
}
.tab-panel {
  max-width: 720px;
  margin: 22px auto 0;
  min-height: 130px;
  text-align: left;
  font-size: 13px;
  color: rgba(244,239,229,0.85);
  line-height: 1.7;
}
.tab-panel ul { padding-left: 18px; margin: 0; }
.tab-panel li { margin-bottom: 8px; }

/* Software grid — 3-column horizontal list (icon + name/role side-by-side) */
.software-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 22px;
  padding-top: 4px;
}
.software {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.software__icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.5px;
  line-height: 1;
  flex-shrink: 0;
}
.software__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.software__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark-cream);
  line-height: 1.2;
  letter-spacing: 0.2px;
}
.software__role {
  font-size: 10px;
  color: rgba(244,239,229,0.55);
  line-height: 1.2;
  letter-spacing: 0.3px;
}
@media (max-width: 720px) {
  .software-grid { grid-template-columns: repeat(2, 1fr); }
  /* Note: the compact horizontal About-header and slider tabs are set
     in the second @media (max-width: 720px) block below — having them
     there keeps every mobile About rule together. */
}
.tab-panel strong {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  color: var(--dark-cream);
}

/* ============================================
   EXPERIENCE TAB — editorial role blocks + brand credit line
   ============================================ */
.exp { display: flex; flex-direction: column; gap: 18px; }

/* Flex row so company + role title sit on the same line; the detail
   paragraph forces a wrap to the next line via flex-basis: 100%. */
.exp__role {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
}

.exp__company {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--dark-cream);
  margin: 0;
}
.exp__title {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.55);
  margin: 0;
}
.exp__detail {
  flex-basis: 100%;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(244, 239, 229, 0.82);
  margin: 4px 0 0;
}
/* Lead-in phrase ("Creative Execution.") in italic accent so it reads
   like a typeset opening, not just bolded text. */
.exp__detail em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  margin-right: 3px;
}

/* Brand credit line — sits at the bottom, separated by a hairline. */
.exp__brands {
  margin: 2px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 239, 229, 0.10);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}
.exp__brands-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.55);
  flex-shrink: 0;
}
.exp__brands em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  color: var(--dark-cream);
}

/* Education variant of the role block — same vocabulary, different rhythm:
   school name sits alone on the first line, then the degree + dates and
   the GPA share the next line. The degree info is readable real content
   (not a label), so it's mixed-case and larger than the experience title. */
.exp--edu .exp__company {
  /* Forces the title row onto the next line within the flex parent. */
  flex-basis: 100%;
}
.exp--edu .exp__title {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(244, 239, 229, 0.78);
  margin: 2px 0 0;
}
.exp--edu .exp__detail {
  /* Sit inline with the title (no forced wrap) and align baseline. */
  flex-basis: auto;
  margin: 2px 0 0;
  font-size: 14px;
}


/* ============================================
   SKILLS TAB — label / items rows, same editorial vocabulary
   as the experience tab (uppercase tracking label + italic
   Fraunces credit line, middot-separated items).
   ============================================ */
.skl { display: flex; flex-direction: column; gap: 12px; }

.skl__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}

.skl__label {
  /* Fixed-ish label column so all four labels left-align in a tidy column.
     Wraps to its own line on narrow screens (flex-wrap on .skl__row). */
  flex: 0 0 clamp(120px, 14vw, 170px);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.55);
}

.skl__items {
  flex: 1 1 240px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  color: var(--dark-cream);
}

/* ============================================
   CONTACT — covers the viewport
   ============================================ */
.contact {
  background: var(--bg-soft);
  text-align: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) var(--side-pad) 60px;
  border-top: 1px solid var(--hairline);
}
.contact-inner {
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
  /* The element has both .wrap and .contact-inner classes; .wrap adds
     horizontal padding that doubles up with .contact's own padding and
     pinches the content into a too-narrow column (the big italic title
     then overflows asymmetrically and reads as off-centre). Override
     padding to 0 so .contact alone controls the side spacing. */
  padding: 0;
}
.contact__title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  color: var(--ink);
}
.contact__cta { font-style: italic; font-weight: 700; color: var(--accent); }
.contact__lede {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 40px;
}
.contact__buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 56px;
}
.contact-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  min-height: 92px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  text-align: left;
  transition: transform .2s var(--ease), border-color .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-sm);
}
.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.contact-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  flex-shrink: 0;
  transition: background .2s ease, color .2s ease;
}
.contact-btn__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;            /* let value text truncate instead of stretching */
}
.contact-btn__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.contact-btn__value {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s ease;
}

/* Brand-color hovers — Gmail red, WhatsApp green, Telegram blue */
.contact-btn--email:hover     { border-color: #EA4335; }
.contact-btn--email:hover     .contact-btn__icon  { background: #EA4335; color: #fff; }
.contact-btn--email:hover     .contact-btn__value { color: #EA4335; }

.contact-btn--whatsapp:hover  { border-color: #25D366; }
.contact-btn--whatsapp:hover  .contact-btn__icon  { background: #25D366; color: #fff; }
.contact-btn--whatsapp:hover  .contact-btn__value { color: #25D366; }

.contact-btn--telegram:hover  { border-color: #229ED9; }
.contact-btn--telegram:hover  .contact-btn__icon  { background: #229ED9; color: #fff; }
.contact-btn--telegram:hover  .contact-btn__value { color: #229ED9; }
.contact__credit { margin: 0; font-size: 11px; letter-spacing: 1px; color: var(--text-faint); }

/* ============================================
   RESPONSIVE
   ============================================ */
/* -------- tablet (≤ 980px) -------- */
@media (max-width: 980px) {
  .main-nav { display: none; }

  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { justify-content: center; }
  .showreel { max-width: 280px; }

  .slideshow { --card-w: 150px; --card-gap: 18px; }
  /* Bigger centre reel on tablets/smaller screens. */
  .slide-card--active { transform: scale(1.18); }
  /* More vertical padding so the larger scaled active card + its shadow
     isn't clipped top/bottom; negative margin cancels the added height
     so the caption below isn't pushed (net = +16, same as base). */
  .slideshow__viewport { padding: 52px 0; margin: -36px 0; }
  .post-grid { grid-template-columns: repeat(3, 1fr); max-width: 540px; }
  .lightbox__arrow--prev { left: -8px; }
  .lightbox__arrow--next { right: -8px; }
  .contact__buttons { grid-template-columns: 1fr; }
}

/* -------- large phone / small tablet (≤ 720px) -------- */
@media (max-width: 720px) {
  /* Sections — tighter top/bottom padding so content can breathe */
  .hero               { padding: calc(var(--header-h) + 16px) 0 90px; }
  .slider-section,
  .carousel-section   { padding: calc(var(--header-h) + 20px) 0 80px; }
  .about              { padding: calc(var(--header-h) + 28px) 0 80px; }
  .contact            { padding: calc(var(--header-h) + 24px) var(--side-pad) 50px; }

  /* Hero */
  .display            { font-size: clamp(34px, 11vw, 56px); margin-bottom: 18px; }
  .display .line--italic { padding-left: 24px; }
  .hero-lede          { font-size: 14px; }
  .kicker             { font-size: 11px; margin-bottom: 16px; }
  .showreel           { max-width: 220px; }

  /* Section heads */
  .section-head       { margin-bottom: 14px; }
  .section-head--minimal .section-title { font-size: clamp(22px, 7vw, 32px); }

  /* Slideshow */
  .slideshow          { --card-w: 130px; --card-gap: 14px; }
  /* Bigger active scale on mobile so the centre reel reads as clearly
     the focused one against the tighter side cards. */
  .slide-card--active { transform: scale(1.18); }
  /* Viewport padding tuned for the larger scaled card; -36 margin cancels
     the added height so the caption stays at its original position. */
  .slideshow__viewport { padding: 52px 0; margin: -36px 0; }
  .slideshow__arrow   { width: 38px; height: 38px; font-size: 14px; }
  /* Match the desktop behaviour — arrows hug the centre reel's edges
     (the old left:4px/right:4px pinned them to the viewport edges).
     Smaller gap on mobile since cards are smaller. */
  .slideshow__arrow--left  { left: calc(50% - var(--card-w) / 2 - 18px); right: auto; }
  .slideshow__arrow--right { left: calc(50% + var(--card-w) / 2 + 18px); right: auto; }
  .slider-caption__title { font-size: 17px; }
  .slider-caption__desc  { font-size: 12px; }

  /* Carousel grid — 3 cols × 3 rows, smaller covers */
  .post-grid          { grid-template-columns: repeat(3, 1fr); max-width: 380px; gap: 16px 12px; }
  .post-thumb__img::before { font-size: 22px; padding: 10px; }
  .post-thumb__count  { font-size: 9px; padding: 2px 6px; top: 6px; right: 6px; }
  .post-thumb__title  { font-size: 11px; }

  /* About — compact horizontal header on mobile so the panel fits in
     one viewport. Avatar shrinks, name/meta sit on the right of it. */
  .about-header       {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
  }
  .about-intro        { text-align: left; }
  .avatar             { width: 88px; height: 88px; border-radius: 18px; flex-shrink: 0; box-shadow: 0 10px 24px rgba(0,0,0,0.4); }
  .about-name         { font-size: 32px; text-align: left; margin: 0 0 4px; }
  .about-meta         {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: baseline;
    gap: 4px 14px;
    font-size: 10px;
  }
  .about .section-head{ margin-bottom: 18px; }

  /* Tabs — single horizontal scrollable slider (instead of a 3x2 grid).
     Gives every label visibility without wrapping; user can swipe
     sideways. The .tabs__indicator is hidden because it can't track the
     scrollLeft offset cleanly; the active tab gets a background tint
     + accent text instead. */
  .tabs               {
    display: flex;
    flex-direction: row;
    grid-template-columns: unset;          /* override desktop grid */
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab                {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 11px 16px;
    font-size: 10px;
    letter-spacing: 1px;
  }
  .tabs__indicator    { display: none; }
  .tab--active        {
    background: rgba(255, 255, 255, 0.10);
    color: var(--accent);
  }
  .tab-panel          { font-size: 12px; line-height: 1.6; margin-top: 16px; }

  /* Software list */
  .software-grid      { grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
  .software__icon     { width: 28px; height: 28px; font-size: 10px; border-radius: 5px; }
  .software__name     { font-size: 11px; }
  .software__role     { font-size: 9px; }

  /* Contact */
  .contact__title     { font-size: clamp(36px, 11vw, 56px); }
  .contact__lede      { font-size: 13px; margin-bottom: 28px; }
  .contact-btn        { padding: 14px 18px; min-height: 72px; gap: 12px; }
  .contact-btn__icon  { width: 38px; height: 38px; }
  .contact-btn__value { font-size: 14px; }
  .contact__buttons   { margin-bottom: 32px; gap: 10px; }
  .contact__credit    { font-size: 10px; }

  /* Lightbox */
  .lightbox__panel    { padding: 70px 18px 30px; gap: 18px; }
  .lightbox__close    { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 22px; }
  .lightbox__arrow    { width: 38px; height: 38px; font-size: 14px; }
  .lightbox__arrow--prev { left: -6px; }
  .lightbox__arrow--next { right: -6px; }
  .lightbox__title    { font-size: clamp(20px, 6vw, 28px); }
  .lightbox__desc     { font-size: 12px; line-height: 1.6; }
  .lightbox[data-type="carousel"] .lightbox__slide { flex: 0 0 clamp(200px, 60vw, 320px); }
  .lightbox[data-type="reel"]     .lightbox__media { width: min(36vh, 70vw); }

  /* Jump pill */
  .jump-pill          { font-size: 11px; padding: 9px 16px; bottom: 22px; }
}

/* -------- phone (≤ 480px) -------- */
@media (max-width: 480px) {
  /* Hero squeezes harder */
  .display            { font-size: 36px; }
  .display .line--italic { padding-left: 18px; }
  .hero-lede          { font-size: 13px; }
  .showreel           { max-width: 190px; }

  /* Slideshow */
  .slideshow          { --card-w: 108px; --card-gap: 12px; }
  .slideshow__viewport{ padding: 32px 0; margin: -16px 0; }

  /* Carousel grid: still 3 cols, narrower */
  .post-grid          { max-width: 320px; gap: 14px 10px; }

  /* About on tiny phones — keep the compact horizontal layout from the
     720px block, just shrink a touch more. Tabs stay as the horizontal
     scrollable slider; no grid override here. */
  .avatar             { width: 72px; height: 72px; border-radius: 16px; }
  .about-name         { font-size: 26px; letter-spacing: -0.01em; }
  .about-meta         { flex-direction: row; flex-wrap: wrap; gap: 3px 12px; font-size: 9.5px; }
  .tab                { padding: 10px 14px; }

  /* Software 1 col on the tiniest screens for legibility */
  .software-grid      { grid-template-columns: 1fr; max-width: 240px; margin: 0 auto; }

  /* Contact buttons more compact */
  .contact-btn        { padding: 12px 14px; min-height: 64px; }
  .contact-btn__icon  { width: 34px; height: 34px; }
  .contact-btn__label { font-size: 9px; }
  .contact-btn__value { font-size: 13px; }

  /* Lightbox close tighter to edge */
  .lightbox__close    { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
