/* 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: #16e06a;
  --accent-soft: rgba(22, 224, 106, 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; }
}
@media (prefers-reduced-motion: reduce) {
  .glitching { 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 — CENTERED in the top bar, appears once you reach the grid */
.nav-cats {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-50% - 6px));
  display: flex; align-items: center; gap: 2px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.nav-cats.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -50%); }
.nav-cat {
  position: relative; padding: 8px 11px 12px; font-family: var(--font-display); font-weight: 900;
  font-size: 13px; letter-spacing: .03em; 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: 11px; right: 11px; bottom: 5px; height: 2px;
  background: var(--accent); box-shadow: -2px 0 0 #ff0078, 2px 0 0 #00eaff;
}
@media (max-width: 1080px) { .nav-cats { display: none; } }  /* top-bar sub-menu is a desktop feature */
.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; }
/* 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;
}
/* transparent cover swallows mouse events so YouTube's controls never appear */
.reel-cover { position: absolute; inset: 0; z-index: 2; }
/* 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(150px, 34vw, 240px);
    --intro-copy-width: 640px;
    --intro-lead-size: clamp(24px, 6vw, 34px);
  }
  .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,.25); border-radius: 999px;
  font-size: 14px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--text);
  transition: background .25s, border-color .25s, transform .25s;
}
.intro-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* 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: 120px 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 */
  font-size: clamp(40px, 14vw, 190px); 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);
}

/* portfolio spans the full viewport width */
#portfolio { max-width: none; 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 { scroll-margin-top: 84px; }   /* clear the fixed nav when jumped to via the menu */
.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;
}
/* 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: #000; opacity: 0; transition: opacity .25s ease;
}
.card:hover::before, .reel-arch-card:hover::before { opacity: .8; }            /* black veil for text */
.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 .2s ease;
}
.card:hover::after, .reel-arch-card:hover::after { box-shadow: inset 0 0 0 9px 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 5px #06ff00, -10px 2px 0 5px #a64dff; transform: rotate(-1.4deg) translate(-2px,1px); }
  2.7%  { box-shadow: -11px 1px 0 5px #06ff00, 11px -1px 0 5px #a64dff; transform: rotate(1deg) translate(3px,-1px); }
  3.4%  { box-shadow: 9px 2px 0 5px #06ff00, -9px -2px 0 5px #a64dff; transform: rotate(-.7deg) translate(-1px,-2px); }
  4.1%  { box-shadow: -10px 0 0 5px #06ff00, 10px 0 0 5px #a64dff; transform: rotate(1.3deg) translate(2px,2px); }
  34%   { box-shadow: -10px 0 0 5px #06ff00, 10px 0 0 5px #a64dff; transform: rotate(1.4deg) translate(3px,1px); }
  34.6% { box-shadow: 11px -1px 0 5px #06ff00, -11px 1px 0 5px #a64dff; transform: rotate(-1deg) translate(-3px,-2px); }
  35.2% { box-shadow: -9px 2px 0 5px #06ff00, 9px -2px 0 5px #a64dff; transform: rotate(.6deg) translate(1px,2px); }
  67%   { box-shadow: 10px 1px 0 5px #06ff00, -10px -1px 0 5px #a64dff; transform: rotate(-1.5deg) translate(-2px,2px); }
  67.6% { box-shadow: -11px -1px 0 5px #06ff00, 11px 1px 0 5px #a64dff; 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(175,60,255,.85) 6px 9px,
    transparent 9px 16px, rgba(22,224,106,.8) 16px 19px, transparent 19px 26px);
}
.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); }
}
@keyframes cardThumbFx {
  0%, 1.9%, 5%, 33.9%, 36.4%, 66.9%, 69%, 100% { clip-path: inset(0); filter: none; }
  2%    { clip-path: inset(18% 0 52% 0); filter: hue-rotate(90deg) saturate(2.6) contrast(1.4); }
  2.6%  { clip-path: inset(48% 0 24% 0); filter: invert(.3) hue-rotate(-60deg); }
  3.2%  { clip-path: inset(6% 0 72% 0);  filter: brightness(1.5) saturate(3); }
  3.8%  { clip-path: inset(62% 0 10% 0); filter: hue-rotate(200deg) contrast(1.8); }
  4.4%  { clip-path: inset(33% 0 39% 0); filter: invert(1); }
  34%   { clip-path: inset(44% 0 26% 0); filter: hue-rotate(-80deg) saturate(2.8); }
  34.7% { clip-path: inset(10% 0 66% 0); filter: invert(.4) contrast(1.6); }
  35.4% { clip-path: inset(58% 0 14% 0); filter: hue-rotate(160deg) saturate(3); }
  36.1% { clip-path: inset(26% 0 48% 0); filter: brightness(1.6) hue-rotate(40deg); }
  67%   { clip-path: inset(22% 0 50% 0); filter: hue-rotate(110deg) saturate(2.6); }
  67.7% { clip-path: inset(54% 0 18% 0); filter: invert(.35) hue-rotate(-50deg); }
  68.4% { clip-path: inset(8% 0 70% 0);  filter: brightness(1.5) saturate(3.2); }
}
@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 .3s ease-in;               /* quick zoom, ease-in */
}
.card-thumb.blurup { opacity: 0; transition: opacity .55s ease, transform .3s ease-in; }
.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%;
}
.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; }
.reel-fs {
  display: inline-flex; align-items: center; gap: 8px; margin: 22px auto 0;
  padding: 12px 24px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  background: transparent; color: var(--text);
  font-size: 14px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  transition: background .25s, border-color .25s, transform .25s;
}
.reel-fs:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }

/* about — portrait on the left, text on the right (like the reference) */
.about { background: var(--bg-soft); max-width: none; }
.about-inner {
  max-width: var(--maxw); margin: 0 auto; text-align: left;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 5vw, 72px); align-items: center;
}
/* no photo → fall back to a single centered column */
.about-inner.no-portrait { grid-template-columns: 1fr; max-width: 820px; text-align: center; }
.about-portrait {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 1px solid var(--line); border-radius: 4px;
}
/* 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; }
  .about-portrait { max-width: 380px; margin: 0 auto; aspect-ratio: 1 / 1; }
  .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(3, 1fr); gap: 26px 14px; } }
.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: var(--radius);
  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: 999px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; transition: filter .2s;
}
.cf-submit:hover { filter: brightness(1.1); }
.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); }
.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,.08);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.footer-copy { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.footer-craft { display: inline-flex; align-items: center; gap: 14px; }
.footer-craft-by { color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.footer-craft-logo { height: 22px; width: auto; opacity: .85; transition: opacity .2s; }
.footer-craft-cc:hover .footer-craft-logo { opacity: 1; }
.footer-craft-cc-text {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: .06em;
  font-size: 14px; color: #fff; opacity: .9;
}
@media (max-width: 560px) {
  .footer-bar { flex-direction: column; gap: 14px; text-align: center; }
}

/* 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; }
.lightbox.detail .lb-close { display: none; }
.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; }
.lb-scroll { flex: 1; min-height: 0; overflow-y: auto; 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;
}
.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;
}
.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(22,224,106,.4); transition: border-color .2s, color .2s;
}
.lb-link:hover { border-color: var(--accent); color: #fff; }
.lb-tools { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.lb-tools-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-tag {
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
}
.lb-gallery { display: flex; flex-direction: column; gap: 14px; }
.lb-row { display: grid; grid-template-columns: repeat(var(--cols, 1), 1fr); gap: 14px; }
.lb-media, .lb-embed { width: 100%; display: block; }   /* square — old-site look */
.lb-media { background: var(--bg-soft); }
/* blur-in reveal: gallery images sharpen+fade in as they load */
.lb-blurup { filter: blur(16px); opacity: .35; transition: filter .55s ease, opacity .55s ease; }
.lb-blurup.loaded { filter: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lb-blurup { transition: none; } }
.lb-row[style*="--cols:3"] .lb-media,
.lb-row[style*="--cols:2"] .lb-media { aspect-ratio: 1 / 1; object-fit: cover; }
.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-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: 1fr; }
  .stats { gap: 30px; }
  .cf-row { grid-template-columns: 1fr; }
}
