/* Inter Black / Bold - the display face used on the original mr-pinoux.com */
@font-face {
  font-family: "InterBlack"; font-style: normal; font-weight: 900; font-display: swap;
  src: local("Inter Black"),
       url("/assets/fonts/InterBlack.woff2") format("woff2"),
       url("/assets/fonts/InterBlack.woff") format("woff");
}
@font-face {
  font-family: "InterBold"; font-style: normal; font-weight: 700; font-display: swap;
  src: local("Inter Bold"),
       url("/assets/fonts/InterBold.woff2") format("woff2"),
       url("/assets/fonts/InterBold.woff") format("woff");
}

:root {
  --bg: #0a0a0c;
  --bg-soft: #121217;
  --bg-card: #16161d;
  --line: #26262f;
  --text: #ececf1;
  --muted: #8a8a99;
  --accent: #43db24;
  --accent-soft: rgba(67, 219, 36, 0.14);
  --radius: 14px;
  --maxw: 1240px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "InterBlack", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* client/brand logo height - scales with viewport so it stays clean on small
     screens (caps at 180px on wide desktops) */
  --logo-size: clamp(64px, 9vw, 180px);
  /* intro band sizing (desktop) */
  --intro-avatar-size: 360px;
  --intro-copy-width: 1200px;
  --intro-lead-size: 30px;
  --intro-mosaic-bright: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* ===== RGB split / glitch (from the original site) ===== */
.rgb {
  text-shadow: -3px 0 0 #ff0078, 3px 0 0 #00eaff;
}
/* glitch is a short burst toggled by JS (on scroll-into-view + occasionally),
   not a hover effect - titles aren't buttons */
.glitching {
  animation: glitch .3s linear 1;   /* one quick burst, not a loop */
}
@keyframes glitch {
  10% { text-shadow: -7px 0 0 #ff0078, 6px 0 0 #06ff00, -8px 0 0 #00eaff; }
  20% { text-shadow: 5px 0 0 #ff0078, 1px 0 0 #06ff00, 2px 0 0 #00eaff; }
  30% { text-shadow: 8px 0 0 #ff0078, 5px 0 0 #06ff00, -4px 0 0 #00eaff; }
  40% { text-shadow: -6px 0 0 #ff0078, 13px 0 0 #06ff00, -9px 0 0 #00eaff; }
  50% { text-shadow: 15px 0 0 #ff0078, -5px 0 0 #06ff00, 7px 0 0 #00eaff; }
  0%, 60%, 100% { text-shadow: -3px 0 0 #ff0078, 3px 0 0 #00eaff; }
}
/* RGB-split jitter for boxes (rectangular buttons, social icons) */
@keyframes glitchBox {
  0%, 100% { box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff; }
  33% { box-shadow: 3px 0 0 #00eaff, -3px 0 0 #ff0078; }
  66% { box-shadow: -3px 0 0 #ff0078, 3px 0 0 #00eaff; }
}
/* button glitch - like the thumbnail frameGlitch (rotate + offset colour copies)
   but gentler: mostly clean, two short bursts per cycle */
@keyframes btnGlitch {
  0%, 14%, 44%, 100% { transform: none; box-shadow: none; }
  16% { transform: rotate(-1.3deg) translate(-3px, 1px);  box-shadow: -7px 0 0 #ff19d0, 7px 0 0 #00eaff; }
  20% { transform: rotate(1deg) translate(3px, -2px);     box-shadow: 7px 0 0 #06ff00, -7px 0 0 #00eaff; }
  24% { transform: rotate(-0.7deg) translate(-2px, 1px);  box-shadow: -5px 0 0 #00eaff, 5px 0 0 #ff19d0; }
  46% { transform: rotate(1.2deg) translate(3px, 1px);    box-shadow: 6px 0 0 #00eaff, -6px 0 0 #ff19d0; }
  50% { transform: rotate(-0.9deg) translate(-3px, -1px); box-shadow: -6px 0 0 #06ff00, 6px 0 0 #00eaff; }
}
@media (prefers-reduced-motion: reduce) {
  .glitching { animation: none; }
  .intro-cta:hover, .cf-submit:hover, .social:hover { animation: none; }
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  cursor: url("/assets/img/arrow.png") 2 2, auto;       /* big arrow at rest */
}
/* big hand on anything clickable (rollover) - !important to beat the
   scattered cursor:pointer declarations on cards, buttons, etc. */
a, button, summary, label, select, [role="button"],
.card, .social, .nav-toggle, .tab, .hero-cta, .cf-submit, .lb-bar-close {
  cursor: url("/assets/img/cursor.png") 50 5, pointer !important;
}
input, textarea { cursor: text !important; }

/* themed scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg-soft); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: #2a2a33; border-radius: 0;
  border: 3px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.lb-scroll::-webkit-scrollbar-track { background: var(--bg); }
.lb-scroll::-webkit-scrollbar-thumb { border-color: var(--bg); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(10, 10, 12, 0.92); border-color: var(--line); }
.nav-brand { margin-right: auto; }   /* push brand left, group categories + links on the right */
.nav-logo { height: 34px; width: auto; }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  position: relative; padding: 8px 14px 12px; font-family: var(--font-display); font-weight: 900;
  font-size: 15px; letter-spacing: .04em; color: var(--muted);
  text-transform: uppercase; transition: color .18s;
}
/* hover = glitch the text (not an underline) */
.nav-links a:hover { color: #fff; animation: glitch .3s linear infinite; }
/* color/glitch stripe - only on the active item */
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px;
  background: var(--accent);
  box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff;     /* RGB split - the glitch look */
  animation: navStripe 3s steps(1) infinite;
}
/* mostly steady, with occasional glitch jitters of the RGB-split offsets */
@keyframes navStripe {
  0%, 86%, 100% { box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff; }
  88% { box-shadow: -6px 0 0 #ff0078, 5px 0 0 #00eaff; }
  90% { box-shadow: 5px 0 0 #ff0078, -4px 0 0 #06ff00; }
  92% { box-shadow: -3px 0 0 #00eaff, 7px 0 0 #ff0078; }
  94% { box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff; }
}
@media (prefers-reduced-motion: reduce) { .nav-links a.active::after { animation: none; } }
/* category sub-menu - a full-width bar that drops below the nav (right-aligned),
   revealed when the Work page is active. Kept off the top row so it never
   collides with the main menu, whatever the screen width. */
.nav-cats {
  position: absolute; top: 100%; left: 0; right: 0; margin: 0;
  display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 2px 6px;
  background: rgba(10, 10, 12, 0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 2px clamp(16px, 4vw, 40px) 8px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, visibility .3s;
}
.nav-cats.open { opacity: 1; visibility: visible; pointer-events: auto; }
.nav-cat {
  position: relative; padding: 8px 7px 12px; font-family: var(--font-display); font-weight: 900;
  font-size: 12px; letter-spacing: .01em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; transition: color .18s;
}
.nav-cat:hover { color: #fff; }
.nav-cat.active { color: var(--accent); }
.nav-cat.active::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 5px; height: 2px;
  background: var(--accent); box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff;
}
/* wide screens: center the main menu (brand pinned left) and the category bar */
@media (min-width: 900px) {
  .nav { justify-content: center; }
  .nav-brand { position: absolute; left: clamp(16px, 4vw, 28px); top: 50%; transform: translateY(-50%); margin-right: 0; }
  .nav-cats { justify-content: center; }
}
.nav-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 22px; cursor: pointer;
}

/* ============ HERO ============ */
.hero { position: relative; height: 100vh; min-height: 600px; overflow: hidden; }
/* on the Work page the hero fills the full viewport - the reel BG covers the
   whole screen, with the discipline marquee line pinned to the bottom of it */
.hero.hero-strip { height: 100vh; min-height: 560px; }
.hero-video { position: absolute; inset: 0; }
.reel-mount { position: absolute; inset: 0; border: 0; pointer-events: none; }
/* Cover the whole hero at any aspect ratio: a plain width/height:100% stretches
   the iframe to the hero's box, so YouTube letterboxes the 16:9 video inside it
   (pillarbox bars on wide 4K screens). Instead size the iframe to a 16:9 box big
   enough to fill, then center it and let the hero's overflow:hidden crop it. */
.reel-mount iframe {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1.02); transform-origin: center;
  width: 100vw; height: 56.25vw;            /* 16:9 keyed to the full width */
  min-width: 177.78vh; min-height: 100vh;   /* …and cover when the hero is tall/narrow */
  border: 0;
}
/* dark poster over the hero loop until the video actually plays - hides YouTube's
   loading spinner / title chrome on first (cold) load. Faded out from JS. */
.reel-poster {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: #0a0a0c; opacity: 1; transition: opacity .9s ease;
}
.reel-poster.hidden { opacity: 0; }
/* cinematic scrim: vignette + heavier top & bottom so text always reads */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10,10,12,.78) 0%, rgba(10,10,12,.32) 22%, rgba(10,10,12,.28) 52%, rgba(10,10,12,.96) 100%),
    radial-gradient(120% 80% at 50% 30%, transparent 40%, rgba(10,10,12,.6) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(180deg, transparent, transparent 2px, rgba(0,0,0,.5) 3px);
}
/* intro band - "a little about me", reads big right under the fullscreen reel,
   over a darkened drifting thumbnail mosaic, with a round avatar on the left */
.intro-band {
  position: relative; overflow: hidden; max-width: none; margin: 0;
  padding: clamp(72px, 10vw, 150px) clamp(28px, 5vw, 80px) clamp(48px, 7vw, 96px);
}
.intro-bg { position: absolute; inset: 0; z-index: 0; }
.intro-bg-grid {
  position: absolute; inset: 0 -160px;
  display: grid; grid-template-columns: repeat(auto-fill, 130px); grid-auto-rows: 82px; gap: 3px;
  animation: mosaicDrift 80s linear infinite alternate;
}
.intro-bg-grid img { width: 100%; height: 100%; object-fit: cover; opacity: var(--intro-mosaic-bright); }
/* heavy darken so the white lead text always reads clearly */
.intro-bg-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(5,5,10,.82) 20%, rgba(5,5,10,.8) 80%, var(--bg) 100%),
    radial-gradient(120% 120% at 30% 50%, rgba(5,5,10,.5), rgba(5,5,10,.84));
}
.intro-inner {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: clamp(26px, 4vw, 60px);
}
.intro-avatar {
  flex: 0 0 auto; width: var(--intro-avatar-size); aspect-ratio: 1;
  border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 8px var(--accent-soft), 0 16px 48px rgba(0,0,0,.6);
}
.intro-copy { flex: 1 1 auto; min-width: 0; max-width: var(--intro-copy-width); }
/* mobile/tablet: stack the avatar ON TOP and CENTER everything.
   override the knobs via the vars (not the props) so they win regardless of
   source order; desktop keeps the slider-driven :root values */
@media (max-width: 860px) {
  .intro-band {
    --intro-avatar-size: clamp(210px, 54vw, 320px);
    --intro-copy-width: 640px;
    --intro-lead-size: clamp(24px, 6vw, 34px);
    padding-bottom: clamp(20px, 5vw, 36px);   /* less gap before the next section */
  }
  .intro-inner { flex-direction: column; align-items: center; text-align: center; gap: 26px; }
}
.intro-eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 900;
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
}
.intro-eyebrow::after {
  content: ""; display: inline-block; width: 46px; height: 2px; margin: 0 0 4px 14px;
  vertical-align: middle; background: var(--accent);
}
.intro-lead {
  max-width: none; margin: 22px 0 0;
  font-family: "InterBold", var(--font); font-weight: 700; letter-spacing: -.005em;
  font-size: var(--intro-lead-size); line-height: 1.18;
  color: #f1f1f6;
  white-space: pre-line;   /* honor the line breaks typed in the admin intro */
}
.intro-cta {
  display: inline-block; margin-top: clamp(28px, 4vw, 48px); padding: 14px 30px;
  border: 1px solid rgba(255,255,255,.3); border-radius: 0;
  font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: var(--text);
  transition: background .2s, border-color .2s, color .2s;
}
.intro-cta { position: relative; }
.intro-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; z-index: 1; animation: btnGlitch .6s steps(1) infinite; }

/* sound toggle */
.sound-toggle {
  position: absolute; top: 90px; right: 28px; z-index: 4;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: rgba(10,10,12,.5); border: 1px solid rgba(255,255,255,.2);
  color: var(--text); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  backdrop-filter: blur(8px); transition: all .2s;
}
.sound-toggle:hover { border-color: var(--accent); }
.sound-toggle.on { border-color: var(--accent); color: var(--accent); }

/* discipline marquee */
.hero-marquee {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; overflow: hidden;
  padding: 14px 0; border-top: 1px solid rgba(255,255,255,.08);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: inline-flex; align-items: center; gap: 26px; white-space: nowrap; animation: marquee 28s linear infinite; }
.marquee-track span { font-size: 14px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.marquee-track i { color: var(--accent); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* scroll cue */
.scroll-cue {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 3;
  width: 24px; height: 38px; border: 1px solid rgba(255,255,255,.4); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; border-radius: 2px;
  background: var(--text); transform: translateX(-50%); animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 30% { opacity: 1; } 70% { opacity: 1; top: 20px; } 100% { opacity: 0; top: 22px; } }

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .scroll-cue span { animation: none !important; opacity: 1 !important; }
}

/* ============ SECTIONS ============ */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 7vw, 84px) 28px; }
.section-head { display: flex; flex-direction: column; align-items: center; gap: 26px; margin-bottom: 48px; text-align: center; }
.section-title {
  font-family: var(--font-display); font-weight: 900;
  /* one fluid clamp: big on desktop, never overflows on phones - sized to sit
     within the page width (with side margins) rather than edge-to-edge */
  font-size: clamp(40px, 10.5vw, 150px); line-height: .95; letter-spacing: -.01em;
  text-transform: uppercase; text-align: center; overflow-wrap: break-word;
  text-shadow: -3px 0 0 #ff0078, 3px 0 0 #00eaff;
}
/* small divider under each section title (like the resume) */
.section-title::after {
  content: ""; display: block; width: 52px; height: 3px; margin: 22px auto;
  background: var(--accent);
}

/* CAPABILITIES - "what the studio does" band (numbered pillar cards) */
.capabilities { text-align: center; }
/* full-bleed cards: section spans the page width (header stays centered) */
#capabilities.capabilities { max-width: none; padding-left: clamp(16px, 2.2vw, 40px); padding-right: clamp(16px, 2.2vw, 40px); }
/* long single word - smaller cap so it stays on one line (no mid-word break) */
.capabilities .section-title { font-size: clamp(30px, 9vw, 150px); white-space: nowrap; }
.cap-eyebrow {
  display: block; color: var(--accent); font-size: 13px; font-weight: 700;
  letter-spacing: .32em; text-transform: uppercase; margin-bottom: 16px;
}
.capabilities .cap-lead {
  max-width: 880px; margin: 4px auto 52px; color: #b8b8c4;
  font-size: clamp(16px, 1.7vw, 19px); line-height: 1.6;
}
/* text/title above a square image - no overlay, no hover */
.cap-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; text-align: left;
}
.cap-card { display: flex; flex-direction: column; gap: 16px; }
.cap-body { display: flex; flex-direction: column; }
.cap-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: 13px; letter-spacing: .18em; color: var(--accent); margin-bottom: 8px;
}
.cap-title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(18px, 1.5vw, 26px); line-height: 1.04; letter-spacing: -.01em;
  margin: 0 0 8px; color: #fff;
}
.cap-text { margin: 0; color: rgba(206,206,220,.7); font-size: 14px; line-height: 1.5; }
.cap-media {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,.06);
}
.cap-img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  position: relative; z-index: 1;
}
/* blur-up placeholder: tiny LQIP sits behind, the real image fades in over it */
.cap-blur {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(12px); transform: scale(1.12);   /* scale hides the blurred edge */
}
.cap-img.blurup { opacity: 0; transition: opacity .55s ease; }
.cap-img.blurup.loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cap-img.blurup { transition: none; } }
/* cohesive cool blue "filter" tint across all capability images */
.cap-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(160deg, rgba(20,90,150,.28), rgba(10,40,80,.34));
  mix-blend-mode: soft-light;
}

/* portfolio spans the full viewport width */
#portfolio { max-width: none; padding-top: clamp(16px, 2.5vw, 28px); padding-left: clamp(20px, 4vw, 64px); padding-right: clamp(20px, 4vw, 64px); }

/* projects grouped by category: big title + divider, then that category's grid */
.work-cat, #portfolio, #sec-brands, #sec-clients, #sec-testimonials { scroll-margin-top: 140px; }   /* clear the fixed nav + category bar when jumped to */
.work-cat + .work-cat { margin-top: 96px; }
.work-cat > .section-title { margin-bottom: 8px; }
.work-cat > .grid { margin-top: 28px; }

/* grid - 4 thumbnails per row, dropping to 3 / 2 / 1 on smaller screens so the
   card overlay text always has room (never cut off) */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1600px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.card {
  position: relative; overflow: hidden;            /* square - no radius */
  background: var(--bg-card);
  aspect-ratio: 16 / 10; cursor: pointer;
}
/* "work in progress" placeholder - fills an incomplete last row, dark desaturated green */
.card-wip {
  aspect-ratio: 16 / 10; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px;
  background: #182019; border: 1px dashed rgba(125, 170, 135, .22);
}
.wip-label {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  letter-spacing: .14em; font-size: 11px; color: rgba(140, 180, 150, .45);
}
/* colour veil + white frame.
   - While the cursor RESTS on a card it stays lit (green veil + white outline),
     held via :hover with transitions (grows in on enter, degrows out on leave).
   - On EACH rollover a one-shot burst fires (the .pulse class is added on
     mouseenter, removed on animationend) that flickers RGB then settles INTO the
     held state - so a quick sweep still cascades a full flash across thumbnails. */
/* hover: image dimmed by a black veil (so the text reads) + a FAT GREEN outline
   that stays INSIDE the grid (clean at rest). Only during the glitch bursts does
   the split outline + jolt spill out of the grid. */
.card::before, .reel-arch-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: #328f4d; opacity: 0; transition: opacity .15s ease;
}
.card:hover::before, .reel-arch-card:hover::before { opacity: .9; }            /* green veil for text (tuned via tester) */
.card::after, .reel-arch-card::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--accent); transition: box-shadow .12s ease;
}
.card:hover::after, .reel-arch-card:hover::after { box-shadow: inset 0 0 0 13px var(--accent); }  /* clean fat outline */
.card:hover, .reel-arch-card:hover { z-index: 2; animation: frameGlitch 3.1s steps(1) infinite; }
/* the card's OWN box-shadow only fires during bursts → the split outline spills
   out of the grid then; at rest it's none (clean). */
@keyframes frameGlitch {
  0%, 1.9%, 4.6%, 33.9%, 35.6%, 66.9%, 68%, 100% { box-shadow: none; transform: none; }
  2%    { box-shadow: 10px -2px 0 7px #06ff00, -10px 2px 0 7px #ff19d0, 3px 8px 0 5px #00eaff; transform: rotate(-1.4deg) translate(-2px,1px); }
  2.7%  { box-shadow: -11px 1px 0 7px #06ff00, 11px -1px 0 7px #ff19d0, -4px -7px 0 5px #00eaff; transform: rotate(1deg) translate(3px,-1px); }
  3.4%  { box-shadow: 9px 2px 0 7px #06ff00, -9px -2px 0 7px #ff19d0, 6px -6px 0 5px #00eaff; transform: rotate(-.7deg) translate(-1px,-2px); }
  4.1%  { box-shadow: -10px 0 0 7px #06ff00, 10px 0 0 7px #ff19d0, 0 9px 0 5px #00eaff; transform: rotate(1.3deg) translate(2px,2px); }
  34%   { box-shadow: -10px 0 0 7px #06ff00, 10px 0 0 7px #ff19d0, 2px -9px 0 5px #00eaff; transform: rotate(1.4deg) translate(3px,1px); }
  34.6% { box-shadow: 11px -1px 0 7px #06ff00, -11px 1px 0 7px #ff19d0, -5px 7px 0 5px #00eaff; transform: rotate(-1deg) translate(-3px,-2px); }
  35.2% { box-shadow: -9px 2px 0 7px #06ff00, 9px -2px 0 7px #ff19d0, 7px 5px 0 5px #00eaff; transform: rotate(.6deg) translate(1px,2px); }
  67%   { box-shadow: 10px 1px 0 7px #06ff00, -10px -1px 0 7px #ff19d0, -3px 8px 0 5px #00eaff; transform: rotate(-1.5deg) translate(-2px,2px); }
  67.6% { box-shadow: -11px -1px 0 7px #06ff00, 11px 1px 0 7px #ff19d0, 4px -8px 0 5px #00eaff; transform: rotate(.9deg) translate(2px,-2px); }
}
/* FRENETIC datamosh: a displaced/colour-shifted copy of the image tears into slices
   in short bursts - the first fires the instant you roll over. */
.card-glitch {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background-size: cover; background-position: center; mix-blend-mode: screen;
}
.card-glitch::after {
  content: ""; position: absolute; inset: 0; opacity: inherit; mix-blend-mode: screen;
  background: repeating-linear-gradient(0deg,
    transparent 0 6px, rgba(255,25,208,.85) 6px 9px,
    transparent 9px 16px, rgba(67, 219, 36,.8) 16px 19px,
    transparent 19px 23px, rgba(0,234,255,.72) 23px 26px, transparent 26px 34px);
}
.card:hover .card-glitch, .reel-arch-card:hover .card-glitch { animation: cardGlitch 3.7s steps(1) infinite; }
.card:hover .card-thumb, .reel-arch-card:hover .card-thumb { animation: cardThumbFx 2.9s steps(1) infinite; }
/* RGB split - only flashes during the bursts (so a parked thumbnail reads clean) */
.card-rgb { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; }
.card-rgb::before, .card-rgb::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: screen;
  background-image: var(--t); background-size: cover; background-position: center;
}
.card-rgb::before { filter: grayscale(1) brightness(.62) sepia(1) saturate(8) hue-rotate(-32deg); transform: translateX(-4px); }
.card-rgb::after  { filter: grayscale(1) brightness(.72) sepia(1) saturate(8) hue-rotate(135deg); transform: translateX(4px); }
.card:hover .card-rgb, .reel-arch-card:hover .card-rgb { animation: cardRgb 3.3s steps(1) infinite; }
@keyframes cardRgb {
  0%, 1.9%, 5%, 33.9%, 36%, 66.9%, 68.5%, 100% { opacity: 0; }
  2%, 2.6%, 3.2%, 3.8%, 4.4%,
  34%, 34.6%, 35.2%, 35.8%,
  67%, 67.6%, 68.2% { opacity: .92; }
}
@keyframes cardGlitch {
  0%, 1.9%, 5%, 33.9%, 36.4%, 66.9%, 69.4%, 100% { opacity: 0; transform: translateX(0); clip-path: inset(0); filter: none; }
  2%    { opacity: 1;  transform: translateX(-12px); clip-path: inset(9% 0 64% 0);  filter: hue-rotate(285deg) saturate(3.5) brightness(1.3); }
  2.5%  { opacity: 1;  transform: translateX(10px);  clip-path: inset(58% 0 15% 0); filter: hue-rotate(110deg) saturate(3); }
  3%    { opacity: .9; transform: translateX(-15px); clip-path: inset(32% 0 42% 0); filter: invert(1) hue-rotate(40deg); }
  3.6%  { opacity: 1;  transform: translateX(7px);   clip-path: inset(73% 0 6% 0);  filter: hue-rotate(190deg) saturate(4) contrast(1.6); }
  4.2%  { opacity: .85;transform: translateX(-6px);  clip-path: inset(4% 0 83% 0);  filter: brightness(1.7) hue-rotate(300deg); }
  4.7%  { opacity: 1;  transform: translateX(13px);  clip-path: inset(46% 0 30% 0); filter: hue-rotate(140deg) saturate(3.5); }
  34%   { opacity: 1;  transform: translateX(11px);  clip-path: inset(14% 0 58% 0); filter: hue-rotate(120deg) saturate(3); }
  34.5% { opacity: .9; transform: translateX(-13px); clip-path: inset(50% 0 22% 0); filter: invert(1) hue-rotate(280deg); }
  35.1% { opacity: 1;  transform: translateX(8px);   clip-path: inset(28% 0 47% 0); filter: hue-rotate(60deg) saturate(4); }
  35.7% { opacity: .85;transform: translateX(-9px);  clip-path: inset(66% 0 9% 0);  filter: contrast(1.8) hue-rotate(200deg); }
  36.3% { opacity: 1;  transform: translateX(14px);  clip-path: inset(6% 0 78% 0);  filter: hue-rotate(300deg) saturate(3.5) brightness(1.4); }
  67%   { opacity: 1;  transform: translateX(-10px); clip-path: inset(20% 0 52% 0); filter: hue-rotate(285deg) saturate(4); }
  67.5% { opacity: .9; transform: translateX(12px);  clip-path: inset(60% 0 12% 0); filter: invert(1) hue-rotate(90deg); }
  68.1% { opacity: 1;  transform: translateX(-7px);  clip-path: inset(36% 0 38% 0); filter: hue-rotate(110deg) saturate(3.5) contrast(1.6); }
  68.7% { opacity: .85;transform: translateX(9px);   clip-path: inset(8% 0 74% 0);  filter: brightness(1.6) hue-rotate(220deg); }
}
/* the zoom is folded into this animation so it STUTTERS (steps(1)) on the bursts -
   a glitchy, jerky zoom instead of a smooth scale; rest frames hold scale(1.09). */
@keyframes cardThumbFx {
  0%, 1.9%, 5%, 33.9%, 36.4%, 66.9%, 69%, 100% { clip-path: inset(0); filter: none; transform: scale(1.09); }
  2%    { clip-path: inset(18% 0 52% 0); filter: hue-rotate(90deg) saturate(2.6) contrast(1.4); transform: scale(1.18) translate(-3px,2px); }
  2.6%  { clip-path: inset(48% 0 24% 0); filter: invert(.3) hue-rotate(-60deg); transform: scale(1.04) translate(2px,-1px); }
  3.2%  { clip-path: inset(6% 0 72% 0);  filter: brightness(1.5) saturate(3); transform: scale(1.14) translate(-1px,3px); }
  3.8%  { clip-path: inset(62% 0 10% 0); filter: hue-rotate(200deg) contrast(1.8); transform: scale(1.06) translate(3px,1px); }
  4.4%  { clip-path: inset(33% 0 39% 0); filter: invert(1); transform: scale(1.16) translate(-2px,-2px); }
  34%   { clip-path: inset(44% 0 26% 0); filter: hue-rotate(-80deg) saturate(2.8); transform: scale(1.05) translate(2px,2px); }
  34.7% { clip-path: inset(10% 0 66% 0); filter: invert(.4) contrast(1.6); transform: scale(1.17) translate(-3px,1px); }
  35.4% { clip-path: inset(58% 0 14% 0); filter: hue-rotate(160deg) saturate(3); transform: scale(1.08) translate(1px,-2px); }
  36.1% { clip-path: inset(26% 0 48% 0); filter: brightness(1.6) hue-rotate(40deg); transform: scale(1.14) translate(-2px,2px); }
  67%   { clip-path: inset(22% 0 50% 0); filter: hue-rotate(110deg) saturate(2.6); transform: scale(1.06) translate(3px,-1px); }
  67.7% { clip-path: inset(54% 0 18% 0); filter: invert(.35) hue-rotate(-50deg); transform: scale(1.18) translate(-2px,2px); }
  68.4% { clip-path: inset(8% 0 70% 0);  filter: brightness(1.5) saturate(3.2); transform: scale(1.07) translate(2px,1px); }
}
/* roll-OUT: a short reverse stutter (zoom-down + brief datamosh) fired by the
   .leaving class added on mouseleave, then removed ~440ms later (see app.js) */
.card.leaving .card-thumb, .reel-arch-card.leaving .card-thumb { animation: cardThumbOut .26s steps(1) 1; }
.card.leaving, .reel-arch-card.leaving { animation: frameGlitchOut .26s steps(1) 1; }
.card.leaving .card-glitch, .reel-arch-card.leaving .card-glitch { animation: cardGlitchOut .26s steps(1) 1; }
.card.leaving .card-rgb, .reel-arch-card.leaving .card-rgb { animation: cardRgbOut .26s steps(1) 1; }
@keyframes cardThumbOut {
  0%   { transform: scale(1.09); clip-path: inset(0); filter: none; }
  15%  { transform: scale(1.16) translate(-3px,2px); clip-path: inset(42% 0 26% 0); filter: hue-rotate(120deg) saturate(2.6) contrast(1.4); }
  32%  { transform: scale(1.03) translate(2px,-2px); clip-path: inset(8% 0 70% 0);  filter: invert(.3) hue-rotate(-55deg); }
  50%  { transform: scale(1.1) translate(-2px,1px);  clip-path: inset(62% 0 10% 0);  filter: brightness(1.5) saturate(3); }
  68%  { transform: scale(1.04); clip-path: inset(0); filter: hue-rotate(40deg); }
  100% { transform: scale(1); clip-path: inset(0); filter: none; }
}
@keyframes frameGlitchOut {
  0%, 100% { box-shadow: none; transform: none; }
  15%  { box-shadow: 9px -2px 0 6px #06ff00, -9px 2px 0 6px #ff19d0, 3px 7px 0 4px #00eaff; transform: rotate(1deg) translate(2px,-1px); }
  40%  { box-shadow: -10px 1px 0 6px #06ff00, 10px -1px 0 6px #ff19d0, -4px -6px 0 4px #00eaff; transform: rotate(-.8deg) translate(-2px,1px); }
  70%  { box-shadow: 6px 0 0 4px #06ff00, -6px 0 0 4px #ff19d0, 0 7px 0 3px #00eaff; transform: none; }
}
@keyframes cardGlitchOut {
  0%   { opacity: 1;  transform: translateX(-10px); clip-path: inset(12% 0 56% 0); filter: hue-rotate(285deg) saturate(3.5); }
  30%  { opacity: .9; transform: translateX(11px);  clip-path: inset(52% 0 18% 0); filter: invert(1) hue-rotate(90deg); }
  55%  { opacity: 1;  transform: translateX(-7px);  clip-path: inset(30% 0 44% 0); filter: hue-rotate(120deg) saturate(3); }
  70%, 100% { opacity: 0; transform: translateX(0); clip-path: inset(0); filter: none; }
}
@keyframes cardRgbOut {
  0% { opacity: .92; } 18% { opacity: 0; } 34% { opacity: .9; } 52% { opacity: 0; } 68% { opacity: .8; } 72%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card:hover, .card:hover .card-glitch, .card:hover .card-thumb, .card:hover .card-rgb,
  .reel-arch-card:hover, .reel-arch-card:hover .card-glitch,
  .reel-arch-card:hover .card-thumb, .reel-arch-card:hover .card-rgb { animation: none; }
}
/* blur-up placeholder: the tiny LQIP sits behind, the real thumb fades in over it */
.card-blur {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(12px); transform: scale(1.12);   /* scale hides the blurred edge */
}
.card-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .16s ease-out;             /* snappy zoom-in on roll-over */
}
.card-thumb.blurup { opacity: 0; transition: opacity .55s ease, transform .16s ease-out; }
.card-thumb.blurup.loaded { opacity: 1; }
.card:hover .card-thumb { transform: scale(1.09); }
@media (prefers-reduced-motion: reduce) { .card-thumb.blurup { transition: none; } }
.card-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--line); font-size: 42px;
  background: radial-gradient(circle at 50% 40%, #1c1c25, #101015);
}
/* overlay: title centered in the middle, role bottom-left + year bottom-right */
.card-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 20px; opacity: 0; transition: opacity .25s ease-in;
}
.card-overlay .card-title, .card-overlay .card-role, .card-overlay .card-year {
  text-shadow: 0 1px 10px rgba(0,0,0,.55);
}
.card:hover .card-overlay { opacity: 1; }
.card-title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(17px, 2vw, 25px); line-height: 1.08; text-align: center; max-width: 94%;
}
/* optional second title line (e.g. artist on line 1, song on line 2) */
.card-title2 { display: block; margin-top: 3px; font-size: .76em; opacity: .85; }
.card-foot {
  position: absolute; left: 18px; right: 18px; bottom: 15px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 10px;
}
.card-role { font-size: 11px; color: #e9e9f0; text-transform: uppercase; letter-spacing: .05em; text-align: left; }
.card-year { font-size: 11px; color: #e9e9f0; text-transform: uppercase; letter-spacing: .05em; text-align: right; flex: 0 0 auto; }

/* reel page - big, clearly watchable 16:9 player */
.reel-page { text-align: center; }
.reel-lead { color: var(--muted); margin: 0 auto 40px; font-size: 16px; }
.reel-player {
  position: relative; max-width: 1100px; margin: 0 auto; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.reel-big, .reel-big iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* archive reels - grid of older showreels below the main player.
   Full-width, 4-up like the Work grid (1-up on mobile). */
.reel-archive {
  padding-top: 40px; max-width: none;
  padding-left: clamp(20px, 4vw, 64px); padding-right: clamp(20px, 4vw, 64px);
}
.reel-archive-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 640px) {
  .reel-archive-grid { grid-template-columns: 1fr; }
}
.reel-arch-card {
  position: relative; display: block; width: 100%; padding: 0; font: inherit;
  text-align: left; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text);
}
.reel-arch-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.reel-arch-card:hover img { transform: scale(1.09); }
.reel-arch-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line); font-size: 34px; }
.reel-arch-veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(5,5,8,.86)); }
.reel-arch-play {
  position: absolute; top: 50%; left: 50%; z-index: 2; transform: translate(-50%, -50%) scale(.9);
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(10,10,12,.5); border: 1px solid rgba(255,255,255,.55); color: #fff;
  font-size: 19px; padding-left: 3px; opacity: 0; backdrop-filter: blur(4px);
  transition: opacity .25s, transform .25s;
}
.reel-arch-card:hover .reel-arch-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.reel-arch-label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; text-align: left;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px;
}
.reel-arch-title { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 18px; line-height: 1; }
.reel-arch-year { color: var(--accent); font-size: 13px; font-weight: 700; flex: 0 0 auto; }
/* when the player itself goes fullscreen, drop the framing so it fills the screen */
.reel-player:fullscreen { max-width: none; width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; border-radius: 0; }
.reel-player:-webkit-full-screen { max-width: none; width: 100vw; height: 100vh; border: 0; border-radius: 0; }
/* year selector under the player - text + green glitch stripe like the top nav */
.reel-years {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  max-width: 1100px; margin: 24px auto 0;
}
.reel-year {
  position: relative; padding: 8px 14px 12px; cursor: pointer;
  font-family: var(--font-display); font-weight: 900; font-size: 15px;
  letter-spacing: .04em; color: var(--muted);
  background: none; border: 0; transition: color .18s;
}
.reel-year:hover { color: #fff; animation: glitch .3s linear infinite; }
.reel-year.active { color: #fff; }
.reel-year.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px;
  background: var(--accent);
  box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff;     /* RGB split - the glitch look */
  animation: navStripe 3s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) { .reel-year.active::after { animation: none; } }

/* about - portrait on the left, text on the right (like the reference) */
.about { background: var(--bg-soft); max-width: none; overflow-x: clip; padding: 0; }
.about-inner {
  max-width: none; margin: 0; text-align: left;
  display: grid; grid-template-columns: minmax(0, 46vw) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px); align-items: center;
  /* image bleeds full to the LEFT edge (no left padding); text keeps the page gutter on the right */
  padding: clamp(64px, 9vw, 120px) max(28px, calc((100vw - var(--maxw)) / 2 + 28px)) clamp(64px, 9vw, 120px) 0;
}
/* no photo → fall back to a single centered column */
.about-inner.no-portrait {
  grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; text-align: center;
  padding: clamp(64px, 9vw, 120px) 28px;
}
/* keep the heading on one line inside its column */
.about-text .section-title { text-align: left; font-size: clamp(40px, 9vw, 128px); white-space: nowrap; }
.about-text .section-title::after { margin: 22px 0; }
.about-inner.no-portrait .about-text .section-title { text-align: center; }
.about-inner.no-portrait .about-text .section-title::after { margin: 22px auto; }
.about-body { font-size: clamp(16px, 1.6vw, 19px); color: #c9c9d4; margin: 4px 0 0; }
.about-inner.no-portrait .about-body { max-width: 760px; margin: 6px auto 0; }
.stats { display: flex; gap: clamp(28px, 4vw, 48px); margin-top: 36px; flex-wrap: wrap; }
.about-inner.no-portrait .stats { justify-content: center; }
.stat-value { font-size: clamp(30px, 4vw, 48px); font-weight: 800; color: var(--accent); }
.stat-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* stack on narrow screens: portrait on top, text below */
@media (max-width: 760px) {
  .about-inner { grid-template-columns: 1fr; text-align: center; gap: 28px; padding: 64px 28px; }
  .about-text .section-title { text-align: center; }
  .about-text .section-title::after { margin: 22px auto; }
  .about-body { max-width: 600px; margin: 4px auto 0; }
  .stats { justify-content: center; }
}

/* clients - static logo wall on black; grey logos light up to white on scroll */
.clients { max-width: none; padding-left: clamp(24px, 5vw, 80px); padding-right: clamp(24px, 5vw, 80px); }
.logo-strip { display: flex; flex-direction: column; gap: 54px; margin-top: 8px; }
.logo-group-title {
  font-size: 13px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--muted); text-align: center; font-weight: 600;
}
.logo-group-title::after { content: ""; display: block; width: 46px; height: 2px; background: var(--line); margin: 16px auto 0; }
.logo-grid {
  /* max 10 columns on wide screens (the calc caps it), fewer on smaller */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(128px, calc((100% - 216px) / 10)), 1fr));
  gap: 12px 24px; align-items: center; margin-top: 32px;   /* tight vertical rhythm */
}
/* pack more logos per row on small screens (avoid a long single-column scroll) */
@media (max-width: 900px) { .logo-grid { grid-template-columns: repeat(4, 1fr); gap: 34px 20px; } }
@media (max-width: 560px) { .logo-grid { grid-template-columns: repeat(5, 1fr); gap: 20px 8px; } }
.logo-cell { display: flex; align-items: center; justify-content: center; height: calc(var(--logo-size) + 14px); }
.logo-img {
  max-height: var(--logo-size); max-width: 100%; width: auto; object-fit: contain;
  /* fill flat white for now (placeholder until real mono logos are supplied);
     dim grey-white at rest, full white once lit */
  filter: brightness(0) invert(1); opacity: .5;
  transition: opacity .6s ease;
}
.logo-cell.lit .logo-img { opacity: 1; }
/* brands group ("Projects for") shows real colours: desaturated at rest, full
   colour once scrolled past (studios stay flat-white via the rule above) */
.is-color .logo-img { filter: grayscale(1); opacity: .55; transition: filter .6s ease, opacity .6s ease; }
.is-color .logo-cell.lit .logo-img { filter: grayscale(0); opacity: 1; }
.logo-name { color: #666; font-size: 18px; font-weight: 700; transition: color .6s ease; }
.logo-cell.lit .logo-name { color: #fff; }
@media (prefers-reduced-motion: reduce) { .logo-img, .logo-name { transition: none; } }

/* testimonials - horizontal carousel with prev/next arrows + auto-advance */
.testimonials { background: var(--bg-soft); max-width: none; }
.testimonial-strip { position: relative; }
.ts-scroll {
  overflow-x: auto; overflow-y: hidden; padding: 54px clamp(46px, 6vw, 80px) 12px;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.ts-scroll::-webkit-scrollbar { display: none; }
.ts-track { display: inline-flex; align-items: stretch; gap: 24px; }
.ts-nav {
  position: absolute; top: calc(50% + 21px); transform: translateY(-50%); z-index: 4;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  background: rgba(10,10,14,.82); border: 1px solid var(--line); color: var(--text);
  font: 900 28px/1 var(--font-display); display: grid; place-items: center;
  backdrop-filter: blur(6px); transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.ts-nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.ts-nav:active { transform: translateY(-50%) scale(.92); }
.ts-prev { left: clamp(6px, 1.5vw, 20px); }
.ts-next { right: clamp(6px, 1.5vw, 20px); }
@media (max-width: 560px) {
  .ts-scroll { padding-left: 38px; padding-right: 38px; }
  .ts-nav { width: 38px; height: 38px; font-size: 22px; }
  .ts-card { width: min(300px, 78vw); }
}
/* card: avatar overlapping the top, centered quote + name (resume look) */
.ts-card {
  flex: 0 0 auto; width: 360px; margin: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px;
  padding: 70px 30px 30px; position: relative; white-space: normal;
}
.ts-av-wrap { position: absolute; top: -58px; left: 50%; transform: translateX(-50%); }
.ts-avatar {
  width: 116px; height: 116px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--bg-card); box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(0,0,0,.5);
}
.ts-initials {
  display: grid; place-items: center; background: var(--accent-soft);
  color: var(--accent); font-weight: 800; font-size: 38px;
}
/* big opening quote, pinned to the top-left corner of the card */
.ts-quote {
  position: absolute; top: 14px; left: 24px;
  font-family: Georgia, serif; font-size: 92px; line-height: 1;
  color: var(--accent); opacity: .55; pointer-events: none;
}
.ts-text { margin: 30px 0 0; font-size: 15px; color: #d6d6df; line-height: 1.65; flex: 1 1 auto; }
.ts-foot { display: flex; flex-direction: column; gap: 3px; margin-top: 24px; }
.ts-name {
  font-family: var(--font-display); font-weight: 900; color: var(--accent);
  text-transform: uppercase; letter-spacing: .03em; font-size: 15px;
}
.ts-role { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* contact form */
.contact-form { margin-top: 36px; text-align: left; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form input, .contact-form textarea {
  width: 100%; margin-bottom: 12px; padding: 13px 15px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 15px; font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 120px; }  /* drag down only, never wider */
.contact-form .cf-hp { display: none; }
.cf-submit {
  padding: 13px 28px; border: none; border-radius: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-size: 15px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .05em; transition: filter .2s;
}
.cf-submit { position: relative; }
.cf-submit:hover { filter: brightness(1.1); z-index: 1; animation: btnGlitch .6s steps(1) infinite; }
.cf-submit:disabled { opacity: .6; cursor: default; }
.cf-status { min-height: 20px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.cf-status.ok { color: var(--accent); }
.cf-status.err { color: #ff6b6b; }

/* contact */
.contact { background: var(--bg-soft); max-width: none; text-align: center; }
.contact-inner { max-width: 620px; margin: 0 auto; }
.contact-line { font-size: clamp(20px, 4vw, 34px); font-weight: 700; margin: 8px 0; }
.contact-line a:hover { color: var(--accent); }
.contact-sub { color: var(--muted); margin-top: 6px; }
.socials { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.social {
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--muted);
  transition: all .2s;
}
.social:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); animation: glitchBox .3s steps(2) infinite; }
.social-svg { width: 20px; height: 20px; fill: currentColor; }

@keyframes mosaicDrift { from { transform: translateX(0); } to { transform: translateX(-120px); } }

/* footer - drifting thumbnail mosaic under the SAME darkened veil as the intro,
   with three world clocks on top */
.footer { position: relative; overflow: hidden; }
.footer-bg { position: absolute; inset: 0; z-index: 0; }
.footer-mosaic {
  position: absolute; inset: 0 -160px;
  display: grid; grid-template-columns: repeat(auto-fill, 130px); grid-auto-rows: 82px; gap: 3px;
  animation: mosaicDrift 80s linear infinite alternate;
}
.footer-mosaic img { width: 100%; height: 100%; object-fit: cover; opacity: var(--intro-mosaic-bright); }
.footer-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(5,5,10,.82) 22%, rgba(5,5,10,.8) 78%, var(--bg) 100%),
    radial-gradient(120% 120% at 50% 50%, rgba(5,5,10,.5), rgba(5,5,10,.84));
}
@media (prefers-reduced-motion: reduce) { .footer-mosaic { animation: none; } }
.footer-inner {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) clamp(28px, 5vw, 80px) clamp(44px, 5vw, 72px);
  display: flex; flex-direction: column; align-items: center;
}
/* bottom bar - FULL WIDTH, its own dark veil so it reads as a separate block */
.footer-bar {
  position: relative; z-index: 1;
  padding: 20px clamp(28px, 5vw, 80px);
  background: rgba(4, 4, 8, .82);
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
}
.footer-craft { display: inline-flex; align-items: center; gap: 12px; }
.footer-craft-logos { display: inline-flex; align-items: center; gap: 12px; }
.footer-brand-logo { height: 22px; width: auto; opacity: .85; transition: opacity .2s; }
.footer-craft:hover .footer-brand-logo { opacity: 1; }
.footer-copy { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.footer-craft-by { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.footer-craft-cc { display: inline-flex; align-items: center; gap: 8px; }
.cc-ico { height: 22px; width: auto; mix-blend-mode: lighten; }
/* desktop: everything on one line; mobile: stacked with a divider before "crafted by" */
@media (max-width: 760px) {
  .footer-bar { flex-direction: column; gap: 16px; text-align: center; }
  .footer-craft {
    flex-direction: column; gap: 14px; width: 100%;
    border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px;
  }
  .footer-craft-logos { justify-content: center; gap: 22px; }
}
/* bottom-bar socials: smaller than the contact ones, sit inline with the copy */
.footer-socials { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.footer-socials .social { width: 34px; height: 34px; }
.footer-socials .social-svg { width: 15px; height: 15px; }
/* discreet contact meta line: email rolls over to accent green */
.contact-meta a { color: inherit; text-decoration: none; transition: color .2s; }
.contact-meta a:hover { color: var(--accent); }

/* world clocks */
.clocks { display: flex; justify-content: center; align-items: flex-start; }
.clock {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 0 clamp(22px, 4vw, 64px);
}
.clk-face { width: clamp(130px, 18vw, 280px); height: auto; display: block; }
.clk-ring { fill: none; stroke: rgba(255,255,255,.32); stroke-width: 1; }
.clk-tick { stroke: rgba(255,255,255,.5); stroke-width: .9; }
.clk-tick.maj { stroke: #fff; stroke-width: 1.6; }
/* hands: rotation set as an SVG transform attribute (rotate angle cx cy) */
.clk-h { stroke: #fff; stroke-linecap: round; }
.clk-h.hour { stroke-width: 3.4; }
.clk-h.min  { stroke-width: 2.4; }
.clk-h.sec  { stroke-width: 1.2; stroke: var(--accent); }
.clk-cap { fill: #fff; }
.clk-city { font-family: var(--font-display); font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .clock { padding: 0 8px; gap: 12px; }
  .clk-face { width: clamp(78px, 24vw, 104px); }
  .clk-city { font-size: 10px; letter-spacing: .08em; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(5,5,7,.94); padding: 5vh 5vw;
}
.lb-content { max-width: 1000px; width: 100%; }
.lb-content img, .lb-content iframe { width: 100%; }
.lb-close {
  position: absolute; top: 22px; right: 28px; background: none; border: none;
  color: var(--text); font-size: 26px; cursor: pointer; z-index: 2;
}

/* project detail viewer (self-hosted gallery) */
.lightbox.detail { padding: 2.5vh 2vw; align-items: stretch; justify-content: center; }
/* big close ✕ - centred at the top, pinned above the content, on a black fade */
.lightbox.detail .lb-content::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 110px; z-index: 4;
  pointer-events: none; border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 42%, transparent 100%);
}
.lightbox.detail .lb-content { position: relative; }
.lightbox.detail .lb-close { display: none; }   /* replaced by the in-box .lb-x */
/* close ✕ anchored to the content box (sits just left of the scrollbar, not over it) */
.lb-x {
  position: absolute; top: clamp(10px, 2vh, 20px); right: clamp(22px, 2.2vw, 38px); z-index: 6;
  background: none; border: none; padding: 0; cursor: pointer; color: var(--text);
  font-size: clamp(44px, 4.6vw, 68px); line-height: .8; font-weight: 700;
  -webkit-text-stroke: 2px currentColor; transition: transform .35s ease, color .2s ease;
}
.lb-x:hover { color: var(--accent); transform: rotate(180deg); }
/* clear the fixed close + fade so the title isn't hidden under them */
.lightbox.detail .lb-scroll { padding-top: 96px; }
.lightbox.detail .lb-content {
  max-width: 1320px; width: 100%; height: 95vh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
}
.lb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; background: var(--bg-card); border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.lb-bar-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lb-bar-title .lb-cat { color: var(--accent); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.lb-bar-title strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bar-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lb-open {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; text-transform: uppercase; letter-spacing: .04em; transition: all .2s;
}
.lb-open:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.lb-bar-close {
  background: none; border: none; color: var(--muted); font-size: 22px;
  cursor: pointer; line-height: 1; padding: 0 4px;
}
.lb-bar-close:hover { color: var(--text); }

.lb-bar > .lb-cat { color: var(--accent); text-transform: uppercase; font-size: 12px; letter-spacing: .12em; font-weight: 700; }
/* always reserve the scrollbar so the justified gallery measures a stable width
   (auto would size cells before the scrollbar appears -> overflow -> bad wraps) */
.lb-scroll { flex: 1; min-height: 0; overflow-y: scroll; padding: 40px clamp(18px, 5vw, 64px); }
/* archive reel lightbox: just the title + video, vertically centered */
.lightbox.reel .lb-scroll { display: flex; flex-direction: column; justify-content: center; }
.lightbox.reel .lb-title { text-align: center; }
.lb-title { max-width: 1040px; margin: 0 auto 24px; text-align: center; }
.lb-head { max-width: 1040px; margin: 26px auto 30px; text-align: center; }
.lb-label {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(30px, 4.6vw, 58px); text-align: center; margin: 56px 0 24px;
  text-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff;
}
/* in-gallery section heading (editable "text" media item) */
.lb-section {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(30px, 4.6vw, 58px); letter-spacing: -.01em; text-align: center;
  color: var(--text); margin: 48px auto 16px; max-width: 1040px;
}
.lb-section::after {
  content: ""; display: block; width: 44px; height: 3px; margin: 14px auto 0; background: var(--accent);
}
.lb-section-sub {
  max-width: 760px; margin: 16px auto 0; text-align: center;
  color: #b8b8c4; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.7; white-space: pre-line;
}
.lb-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.lb-rel {
  padding: 0; background: var(--bg-card); border: 1px solid var(--line); overflow: hidden;
  text-align: left; color: var(--text); transition: border-color .2s;
}
.lb-rel:hover { border-color: var(--accent); }
.lb-rel img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.lb-rel-empty { display: grid; place-items: center; aspect-ratio: 16/10; color: var(--line); font-size: 30px; }
.lb-rel-title { display: block; padding: 9px 12px; font-size: 13px; font-weight: 700; }
.lb-title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(34px, 6vw, 68px); line-height: .95; letter-spacing: -.01em;
  text-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff;
}
/* title1 + title2 on the same line, same size, separated by " - ".
   each phrase never breaks mid-word; if the pair is too long, .stacked
   drops the separator and puts them on two close lines (JS-toggled). */
.lb-t1, .lb-t2 { white-space: nowrap; }
.lb-t2 { opacity: .9; }
.lb-title.stacked .lb-sep { display: none; }
.lb-title.stacked .lb-t1, .lb-title.stacked .lb-t2 { display: block; }
.lb-role { margin-top: 14px; color: var(--accent); font-size: clamp(17px, 2.3vw, 25px); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.lb-sub { margin-top: 5px; color: var(--muted); font-size: 15px; }
.lb-desc { margin: 20px auto 0; max-width: 800px; color: #d2d2dc; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.8; }
.lb-link {
  color: var(--accent); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(67, 219, 36,.4); transition: border-color .2s, color .2s;
}
.lb-link:hover { border-color: var(--accent); color: #fff; }
/* keywords as a metadata line (not buttons): middot-separated, accent dots */
.lb-keywords {
  margin: 22px auto 0; text-align: center;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .18em;
}
.lb-keywords .kw { color: #c9c9d4; }
.lb-keywords .kw-sep { color: var(--accent); margin: 0 12px; }
.lb-share {
  display: inline-block; margin: 24px auto 0; padding: 9px 22px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer; transition: all .2s;
}
.lb-share:hover { background: var(--accent); border-color: var(--accent); color: #06140d; }
.lb-gallery { display: flex; flex-direction: column; gap: 14px; }
.lb-row { display: grid; grid-template-columns: repeat(var(--cols, 1), 1fr); gap: 14px; }
/* the main project video sits directly in the scroll column - space it off the
   gallery/label that follows (gallery rows live inside .lb-gallery, untouched) */
.lb-scroll > .lb-row { margin: 22px 0 34px; }
.lb-media, .lb-embed { width: 100%; display: block; }
.lb-media { background: var(--bg-soft); }
/* multi-up rows use uniform cells (object-fit cover) so they align cleanly like the
   live site; --ga is the cell aspect (default 16/9), set per project (e.g. 1/1 for
   square work like "46"). Single (cols:1) images keep their native aspect. */
.lb-row[style*="--cols:3"] .lb-media,
.lb-row[style*="--cols:2"] .lb-media { aspect-ratio: var(--ga, 16 / 9); object-fit: cover; }
/* justified rows: cells are sized by JS (layoutJustified) to each image's real
   aspect so a row fills the width with equal heights - no cropping, no gaps. */
.lb-just { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-cell { overflow: hidden; background: var(--bg-soft); }
.lb-cell .lb-media { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  /* stack full-width at native aspect on phones (no tiny multi-up rows) */
  .lb-just { flex-direction: column; }
  .lb-cell { width: 100% !important; height: auto !important; }
  .lb-cell .lb-media { height: auto; }
}
/* blur-in reveal: gallery images sharpen+fade in as they load */
/* the tiny LQIP sits as the element's own background → a blurred coloured
   placeholder shows instantly while the real image/video downloads */
.lb-lqip { background-size: cover; background-position: center; background-repeat: no-repeat; }
.lb-blurup { filter: blur(16px); transition: filter .55s ease; }
.lb-blurup.loaded { filter: none; }
@media (prefers-reduced-motion: reduce) { .lb-blurup { transition: none; } }
.lb-embed { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.lb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) {
  .lb-row { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
  .lightbox.detail { padding: 0; }
  .lightbox.detail .lb-content { height: 100vh; border-radius: 0; border: 0; }
  .lb-open { padding: 7px 12px; font-size: 12px; }
}

/* responsive */
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-cats { display: none; }   /* no floating category bar on mobile - categories are reached by scrolling */
  .nav-links {
    position: absolute; top: 100%; right: 0; flex-direction: column; gap: 0;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
    padding: 8px; min-width: 180px; display: none;
  }
  .nav-links.open { display: flex; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .work-cat + .work-cat { margin-top: 48px; }   /* tighter gap between categories on mobile */
  .stats { gap: 30px; }
  .cf-row { grid-template-columns: 1fr; }
  /* capabilities: two pillar cards per row on mobile, tighter */
  .capabilities { padding-top: 48px; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cap-card { gap: 12px; }
  .cap-num { font-size: 11px; margin-bottom: 6px; }
  .cap-title { font-size: 15px; margin-bottom: 6px; }
  .cap-text { font-size: 12.5px; line-height: 1.45; }
}
