/* ============================================================
   PORTFOLIO — Global Stylesheet
   Cinematic dark luxury aesthetic
   ============================================================ */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --bg:          #131313;
  --surface:     #1c1b1b;
  --surface-2:   #201f1f;
  --border:      #353534;
  --border-soft: #2a2a2a;
  --text:        #e5e2e1;
  --text-muted:  #d1c5b0;
  --text-dim:    #9a907d;
  --gold:        #ecc155;   /* Primary — bright gold */
  --gold-dim:    #cca43b;   /* Primary container — deeper bronze */
  --pink:        #ffb2be;   /* Secondary — rose pink */
  --cyan:        #1F9E9E;   /* Tertiary — dark cyan */
  --plum:        #6B2737;   /* Wine Plum — accent */
  --white:       #FCF7F8;   /* Snow white */
  --stage:       #000000;   /* Configurator stage: stays black in both themes */
  --stage-bar:   #1c1b1b;   /* Configurator controls on the light theme */

  --font-display: 'Epilogue', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out:   cubic-bezier(0.76, 0, 0.24, 1);

  --nav-h: 72px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max-w: 1440px;
}

/* ── Glass Card (ported from TrackKit GlassCard component) ── */
/* Radial-gradient border stroke with directional light (11 o'clock).
   Two pseudo-elements simulate the SVG radial-gradient stroke:
   TL glow (bright, 0.5 opacity) + BR glow (subtle, 0.3 opacity). */
.glass-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 2px 4px 16px rgba(0,0,0,0.35);
  overflow: hidden;
}
/* Top-left radial glow — 11 o'clock light source */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(ellipse at 0% 0%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 35%, transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
/* Bottom-right radial glow — 5 o'clock fill light */
.glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(ellipse at 100% 100%, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 35%, transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
/* Light mode — glass effect falls back to clean solid surfaces */
html[data-theme="light"] .glass-card {
  background: var(--surface);
  border-color: var(--border-soft);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
html[data-theme="light"] .glass-card::before,
html[data-theme="light"] .glass-card::after {
  display: none;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}
body.menu-open { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: none; border: none; background: none; font: inherit; color: inherit; }
ul { list-style: none; }

/* ── Film Grain ───────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: grain-shift 0.5s steps(2) infinite;
  mix-blend-mode: overlay;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, -3%); }
  50%  { transform: translate(1%, 2%); }
  75%  { transform: translate(-1%, 1%); }
  100% { transform: translate(2%, -1%); }
}

/* ── Custom Cursor ────────────────────────────────────────── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}
.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  top: 0; left: 0;
}
.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(201, 168, 76, 0.5);
  top: 0; left: 0;
  transition: transform 0.12s var(--ease-out-expo), width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}
.cursor-ring.hover {
  width: 56px;
  height: 56px;
  border-color: var(--gold);
}
.cursor-ring.click {
  width: 24px;
  height: 24px;
}
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
  button { cursor: pointer; }
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  mix-blend-mode: normal;
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(19, 19, 19, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
  transition: opacity 0.5s ease;
}
html[data-theme="light"] .nav::before {
  background: rgba(252, 247, 248, 0.8);
}
/* scrolled state — driven by .nav--scrolled class set in JS */
.nav--scrolled {
  /* glass effect handles all states */
}
html[data-theme="light"] .nav--scrolled {
  box-shadow: 0 1px 0 var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}
.nav-logo span { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  transition: color 0.3s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease-out-expo);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.nav-reel-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  transition: all 0.3s ease;
}
.nav-reel-btn:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 1001;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: all 0.4s var(--ease-out-expo);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.nav-mobile.open {
  opacity: 1;
  pointer-events: all;
}
.nav-mobile a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}
.nav-mobile a:hover { color: var(--text); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Page Transition ──────────────────────────────────────── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9998;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

/* ── TrackKit Page ────────────────────────────────────────── */
.trackkit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.trackkit-hero-icon { text-align: center; }
.trackkit-app-icon {
  width: clamp(140px, 18vw, 220px);
  height: auto;
  border-radius: 28%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
html[data-theme="light"] .trackkit-app-icon {
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.trackkit-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0;
  color: var(--text-muted);
  text-transform: none;
}

.trackkit-screenshots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  max-width: 1000px;
  margin-inline: auto;
}
/* Real app stills: three phone shots in a row, the iPad shot on its own row below. */
.trackkit-shot { margin: 0; min-width: 0; }
.trackkit-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  outline: 1px solid var(--border);
  outline-offset: -1px;
}
.trackkit-shot figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--text-dim); }
.trackkit-shot:last-child { grid-column: 1 / -1; }
.trackkit-shot:last-child img { border-radius: 14px; }

/* Features: a plain two-column list, no cards or icons. */
.trackkit-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 5rem);
}
.trackkit-feature {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem 2rem;
}
.trackkit-feature h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.trackkit-feature p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 52ch;
}
.trackkit-video-slot {
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .trackkit-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .trackkit-hero-text { order: 2; }
  .trackkit-hero-icon { order: 1; justify-self: center; }
  .trackkit-hero-text div { justify-content: center; }
  .trackkit-screenshots { gap: 1.5rem 0.75rem; }
  .trackkit-shot img { border-radius: 10px; }
  .trackkit-shot figcaption { font-size: 0.8rem; }
  .trackkit-features { grid-template-columns: minmax(0, 1fr); }
}

/* ── Etch Page (reuses the TrackKit hero, badges and feature list) ── */
.etch-shot { margin: 0 auto; max-width: 1000px; }
.etch-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  outline: 1px solid var(--border);
  outline-offset: -1px;
}
.etch-shot figcaption { margin-top: 0.75rem; font-size: 0.875rem; color: var(--text-dim); }

/* ── Legal pages (privacy.html, etch-privacy.html) ── */
.container.legal { max-width: 760px; line-height: 1.75; }
.legal-title { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; line-height: 1.05; margin: 0.75rem 0 0.5rem; }
.legal-updated { color: var(--text-dim); font-size: 0.875rem; margin-bottom: 3rem; }
.legal h2 { font-size: 1.25rem; margin: 2.5rem 0 0.75rem; }
.legal p + p { margin-top: 1rem; }
.legal ul { margin: 1rem 0 0; padding-left: 1.25rem; display: grid; gap: 0.6rem; }
.legal li::marker { color: var(--text-dim); }
.legal a { color: var(--gold); text-underline-offset: 0.2em; }
.legal a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.legal code { font-family: var(--font-mono); font-size: 0.85em; overflow-wrap: anywhere; }

/* ── Footer ───────────────────────────────────────────────── */
.footer-grid {
  background: #0e0e0e;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 5rem var(--gutter) 2rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-logo-icon {
  height: 28px;
  width: auto;
  filter: invert(1);
  margin-bottom: 0.75rem;
}
html[data-theme="light"] .footer-grid { background: #f3eef0; }
html[data-theme="light"] .footer-logo-icon { filter: none; }
.footer-tagline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.8;
  color: rgba(252, 247, 248, 0.4);
}
html[data-theme="light"] .footer-tagline { color: var(--text-muted); }
.footer-heading {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.footer-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(252, 247, 248, 0.4);
  transition: color 0.3s ease;
}
a.footer-link:hover { color: var(--pink, #ffb2be); }
html[data-theme="light"] .footer-link { color: var(--text-muted); }
html[data-theme="light"] a.footer-link:hover { color: var(--plum); }
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(78, 70, 54, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(252, 247, 248, 0.2);
}
.footer-meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(252, 247, 248, 0.2);
}
html[data-theme="light"] .footer-copy,
html[data-theme="light"] .footer-meta { color: var(--text-dim); }

/* ── Utility Classes ──────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: clamp(5rem, 10vw, 10rem) 0; }
.section-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.reveal {
  opacity: 0;
  transform: translateY(40px);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  white-space: nowrap;
  padding: 1rem 2rem;
  transition: all 0.35s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--gold);
  color: var(--bg);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out-expo);
  z-index: 0;
}
.btn-primary:hover::before { transform: scaleX(1); }
.btn-primary span { position: relative; z-index: 1; }
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.btn-arrow::after {
  content: '→';
  transition: transform 0.3s var(--ease-out-expo);
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 var(--gutter);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video-wrap video,
.hero-video-wrap .hero-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Hero image slices */
.hero-slices {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 4px;
}
.hero-slice {
  flex: 1;
  background-size: cover;
  background-position: center;
  transition: flex 0.6s var(--ease-out-expo);
}
.hero-slice:hover {
  flex: 1.5;
}
@media (max-width: 768px) {
  .hero-slice:nth-child(n+6) { display: none; }
  .hero-slices { gap: 3px; }
}
.hero-overlay {
  display: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-glass {
  background: rgba(10, 10, 10, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: clamp(1.5rem, 3vw, 2.5rem) var(--gutter);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(20px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.92;
  color: var(--text);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.hero-name .line {
  display: block;
  overflow: hidden;
}
.hero-name .line span {
  display: block;
  transform: translateY(100%);
}
.hero-discipline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.92;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 237, 232, 0.25);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.hero-discipline .line {
  display: block;
  overflow: hidden;
}
.hero-discipline .line span {
  display: block;
  transform: translateY(100%);
}
.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}
.hero-desc {
  max-width: 440px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}
.hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
}
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  right: var(--gutter);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
}
.hero-scroll span {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  writing-mode: vertical-rl;
}
.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0%   { transform: scaleY(1); transform-origin: top; }
  50%  { transform: scaleY(0); transform-origin: top; }
  50.01% { transform: scaleY(0); transform-origin: bottom; }
  100% { transform: scaleY(1); transform-origin: bottom; }
}


/* ============================================================
   SELECTED WORK
   ============================================================ */
.work-section { background: var(--bg); }
.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.work-header h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(280px, 30vw, 420px);
  gap: 1.5rem;
}
/* Asymmetric layout
   Row 1: Sierra (7) + Karma Auto (5)
   Row 2: Karma Configurator (12, wide)
   Row 3: Aerion (6) + Large Space (6)
   Row 4: LoveSac (4) + Waterpik (4) + Bushido (4) */
.project-tile:nth-child(1) { grid-column: span 7; }
.project-tile:nth-child(2) { grid-column: span 5; }
.project-tile:nth-child(3) { grid-column: span 12; }
.project-tile:nth-child(4) { grid-column: span 6; }
.project-tile:nth-child(5) { grid-column: span 6; }
.project-tile:nth-child(6) { grid-column: span 4; }
.project-tile:nth-child(7) { grid-column: span 4; }
.project-tile:nth-child(8) { grid-column: span 4; }

@media (max-width: 1024px) {
  .project-tile:nth-child(n) { grid-column: span 6; }
  .project-tile:nth-child(3) { grid-column: span 12; }
}
@media (max-width: 640px) {
  .project-tile:nth-child(n) { grid-column: span 12; }
}

.project-tile {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: none;
}
.project-tile-inner {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.project-tile-img {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.project-placeholder {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  transition: transform 0.8s var(--ease-out-expo);
}
.project-tile:hover .project-placeholder { transform: scale(1.05); }
.project-tile-img img,
.work-tile-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
}
.project-tile:hover .project-tile-img img {
  transform: scale(1.05);
}

/* Unique cinematic gradient backgrounds per tile — dark but distinct */
.tile-bg-1 { background: linear-gradient(145deg, #0d1420 0%, #0f1e35 40%, #081020 100%); }
.tile-bg-2 { background: linear-gradient(225deg, #1a1008 0%, #2a1a08 40%, #160e05 100%); }
.tile-bg-3 { background: linear-gradient(315deg, #081510 0%, #0c2018 40%, #060f0b 100%); }
.tile-bg-4 { background: linear-gradient( 45deg, #120a1e 0%, #1e1030 40%, #0d0818 100%); }
.tile-bg-5 { background: linear-gradient(180deg, #0a0e1a 0%, #10141e 50%, #080c14 100%); }

.tile-accent {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}
.tile-accent-1 {
  background: radial-gradient(ellipse at 25% 75%, rgba(61,126,255,0.28) 0%, rgba(40,80,180,0.08) 50%, transparent 70%);
}
.tile-accent-2 {
  background: radial-gradient(ellipse at 75% 25%, rgba(201,168,76,0.35) 0%, rgba(180,120,20,0.1) 50%, transparent 70%);
}
.tile-accent-3 {
  background: radial-gradient(ellipse at 30% 55%, rgba(40,200,110,0.22) 0%, rgba(20,140,70,0.06) 50%, transparent 70%);
}
.tile-accent-4 {
  background: radial-gradient(ellipse at 70% 65%, rgba(210,60,130,0.22) 0%, rgba(150,30,80,0.06) 50%, transparent 70%);
}
.tile-accent-5 {
  background: radial-gradient(ellipse at 50% 45%, rgba(61,126,255,0.18) 0%, rgba(201,168,76,0.12) 45%, transparent 70%);
}

/* Frame lines aesthetic */
.tile-frame {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(201,168,76,0.12);
  pointer-events: none;
  z-index: 1;
  transition: border-color 0.4s ease;
}
.tile-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.project-tile:hover .tile-frame { border-color: rgba(201,168,76,0.3); }

.project-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.9) 0%, transparent 50%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.project-tile:hover .project-tile-overlay { opacity: 1; }

.project-tile-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  z-index: 3;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.4s var(--ease-out-expo);
}
.project-tile:hover .project-tile-info {
  transform: translateY(0);
  opacity: 1;
}
.project-tile-static {
  display: none;
}
.project-cat {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.project-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.project-client {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.project-tile-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(240,237,232,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  z-index: 3;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.4s var(--ease-out-expo);
}
.project-tile:hover .project-tile-arrow {
  opacity: 1;
  transform: scale(1);
}

/* ============================================================
   DISCIPLINES SECTION
   ============================================================ */
.disciplines { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.disciplines-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 3vw, 3rem) clamp(1.25rem, 2.5vw, 2.5rem);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem);
}
/* Each discipline is shown by a real frame, not an icon. */
.discipline { display: flex; flex-direction: column; min-width: 0; }
.discipline-frame { display: block; overflow: hidden; border-radius: 6px; outline: 1px solid var(--border-soft); outline-offset: -1px; }
.discipline-frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.6s var(--ease-out-expo); }
.discipline-frame:hover img { transform: scale(1.03); }
.discipline-frame:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.discipline-credit { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.75rem; }
.discipline-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.discipline-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.65; max-width: 42ch; }
.discipline-tools { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.75rem; }

@media (max-width: 900px) {
  .disciplines-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .discipline-frame img { transition: none; }
  .discipline-frame:hover img { transform: none; }
}

/* ============================================================
   ABOUT TEASER
   ============================================================ */
.about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}
.about-teaser-visual {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--surface);
}
.about-teaser-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.about-teaser-badge {
  position: absolute;
  bottom: 1.5rem;
  right: -1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  z-index: 2;
}
.about-teaser-badge-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.about-teaser-badge-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.about-teaser-text h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin-bottom: 1.5rem;
}
.about-teaser-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .about-teaser { grid-template-columns: 1fr; }
  .about-teaser-badge { right: 1.5rem; }
}

/* ============================================================
   CLIENT MARQUEE
   ============================================================ */
.marquee-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.marquee-label {
  text-align: center;
  margin-bottom: 2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}
.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  padding: 0 3.5rem;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.marquee-item:last-child { border-right: none; }
.marquee-name {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-dim);
  text-transform: none;
  transition: color 0.3s ease;
}
.marquee-item:hover .marquee-name { color: var(--text-muted); }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  text-align: center;
  padding: clamp(6rem, 12vw, 12rem) var(--gutter);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 {
  font-size: clamp(3rem, 8vw, 8rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 2rem;
  position: relative;
}
.cta-section h2 em {
  font-style: normal;
  color: var(--gold);
}
.cta-section p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 400px;
  margin: 0 auto 3rem;
}
.cta-email {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.cta-email::after {
  content: '↗';
  font-size: 0.8em;
  transform: translateY(-2px);
}
.cta-email:hover { color: var(--gold); }

/* ============================================================
   WORK PAGE
   ============================================================ */
.page-hero {
  padding-top: calc(var(--nav-h) + clamp(3rem, 6vw, 5rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
}
.page-hero p {
  color: var(--text-muted);
  max-width: 500px;
  font-size: 0.95rem;
}
.filter-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 1.5rem var(--gutter);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  margin-right: 0.5rem;
}
.filter-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.3s ease;
  cursor: none;
}
.filter-btn:hover { border-color: var(--text-muted); color: var(--text); }
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}
.work-grid-full {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(320px, 32vw, 470px);
  gap: 1px;
  background: var(--border);
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}
.work-tile {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  cursor: none;
  transition: opacity 0.5s ease;
}
.work-tile.hidden { display: none; }
/* Widths repeat 7 / 5 / 12 across the visible tiles; main.js re-deals data-span after filtering. */
.work-tile[data-span="a"] { grid-column: span 7; }
.work-tile[data-span="b"] { grid-column: span 5; }
.work-tile[data-span="c"] { grid-column: span 12; }
@media (max-width: 900px) {
  .work-tile[data-span] { grid-column: span 12; }
  .work-grid-full { gap: 1px; }
}

/* Each tile is a frame with its caption underneath, always visible (no hover-only labels). */
.work-tile a {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.work-tile-img {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.work-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
}
.work-tile a:hover .work-tile-img img { transform: scale(1.03); }
.work-tile a:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
/* Captions read like a credit: client, then the project's own title in a lighter weight. */
.work-tile-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.15rem 0.6rem;
  padding: 0.9rem clamp(1rem, 2vw, 1.5rem) 1.1rem;
  background: var(--bg);
}
.work-tile-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.work-tile-job {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  letter-spacing: -0.01em;
  color: var(--text-dim);
}
.work-tile a:hover .work-tile-title { color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .work-tile-img img { transition: none; }
  .work-tile a:hover .work-tile-img img { transform: none; }
}

/* About: real client names as a plain typed list. */
.client-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 1.5rem;
  gap: 0;
  border-top: 1px solid var(--border);
}
.client-list li {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) { .client-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .client-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; } .client-list li { font-size: 1rem; } }
.bio-text .bio-lead { color: var(--text); font-weight: 600; }

/* ============================================================
   CASE STUDY
   ============================================================ */
.case-hero {
  width: 100%;
  aspect-ratio: 21/9;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}
.case-hero video,
.case-hero .case-hero-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-hero-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}
@media (max-width: 768px) {
  .case-hero { aspect-ratio: 16/9; }
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.case-meta-item {
  padding: 1.5rem var(--gutter);
  border-right: 1px solid var(--border);
}
.case-meta-item:last-child { border-right: none; }
.case-meta-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.case-meta-value {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
@media (max-width: 768px) {
  .case-meta { grid-template-columns: repeat(3, 1fr); }
  .case-meta-item:nth-child(3) { border-right: none; }
  .case-meta-item:nth-child(n+4) { border-top: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  .case-meta-item:nth-child(even) { border-right: none; }
  .case-meta-item:nth-child(n+3) { border-top: 1px solid var(--border); }
}

.case-body {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: clamp(3rem, 6vw, 6rem);
  padding: clamp(3rem, 6vw, 6rem) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}
.case-sidebar h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}
.case-tools {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.case-tool {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.case-tool:hover { border-color: var(--gold); color: var(--gold); }
.case-content h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 1.25rem;
}
.case-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.case-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.75rem;
  margin-top: 2.5rem;
}
@media (max-width: 900px) {
  .case-body { grid-template-columns: 1fr; }
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  padding: 0 var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto clamp(3rem, 6vw, 6rem);
}
.gallery-item { overflow: hidden; }
.gallery-item:nth-child(1) { grid-column: span 8; }
.gallery-item:nth-child(2) { grid-column: span 4; }
.gallery-item:nth-child(3) { grid-column: span 4; }
.gallery-item:nth-child(4) { grid-column: span 8; }
.gallery-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface);
  overflow: hidden;
  position: relative;
  transition: transform 0.6s var(--ease-out-expo);
}
.gallery-img:hover { transform: scale(1.02); }
.gallery-placeholder {
  width: 100%;
  height: 100%;
}
@media (max-width: 768px) {
  .gallery-item:nth-child(n) { grid-column: span 12; }
}

.case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}
.case-nav-item {
  padding: 2.5rem var(--gutter);
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.case-nav-item:hover { background: var(--surface); }
.case-nav-item:first-child { border-right: 1px solid var(--border); }
.case-nav-dir {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}
.case-nav-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.case-nav-item:last-child { text-align: right; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
  padding-top: calc(var(--nav-h) + clamp(4rem, 8vw, 7rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--border);
}
.about-hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: end;
}
.about-hero-title {
  font-size: clamp(3.5rem, 9vw, 8rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.about-hero-title em {
  font-style: normal;
  color: var(--gold);
  display: block;
}
.about-hero-aside {
  padding-bottom: 0.5rem;
}
.about-hero-aside p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .about-hero-content { grid-template-columns: 1fr; }
}

.bio-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: start;
}
.bio-img {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  aspect-ratio: 3/4;
  background: var(--surface);
  overflow: hidden;
}
.bio-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111318 0%, #0d1017 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bio-img-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  writing-mode: vertical-rl;
}
.bio-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.bio-text p:first-child {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .bio-section { grid-template-columns: 1fr; }
  .bio-img { position: relative; top: auto; }
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.tool-item {
  background: var(--bg);
  padding: 1.25rem;
  transition: background 0.3s ease;
}
.tool-item:hover { background: var(--surface); }
.tool-item-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.tool-item-type {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.process-step {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.process-step:last-child { border-right: none; }
.process-step-num {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-dim);
  line-height: 1;
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}
.process-step:hover .process-step-num { color: rgba(201,168,76,0.2); }
.process-step-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.process-step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}
@media (max-width: 900px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .process-step:nth-child(2) { border-right: none; }
  .process-step:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .process-steps { grid-template-columns: 1fr; }
  .process-step { border-right: none; border-top: 1px solid var(--border); }
  .process-step:first-child { border-top: none; }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(3rem, 8vw, 8rem);
  padding-top: clamp(3rem, 6vw, 5rem);
}
.contact-info h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.contact-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(40, 200, 100, 0.3);
  margin-bottom: 2.5rem;
}
.availability-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28c864;
  box-shadow: 0 0 8px rgba(40, 200, 100, 0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px rgba(40, 200, 100, 0.5); }
  50% { box-shadow: 0 0 12px rgba(40, 200, 100, 0.9); }
}
.availability-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: #28c864;
}
.contact-direct {
  margin-top: 3rem;
}
.contact-direct-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.contact-email:hover { color: var(--gold); }
.contact-social {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
.social-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.social-link:hover { border-color: var(--text-muted); color: var(--text-muted); }
.contact-note {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--text-dim);
  line-height: 1.8;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.form-field {
  position: relative;
  border-bottom: 1px solid var(--border);
}
.form-field:nth-child(even) { border-left: 1px solid var(--border); }
.form-field.full { grid-column: span 2; }
.form-field label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  padding: 1.25rem 1.5rem 0;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.5rem 1.5rem 1.25rem;
  appearance: none;
  -webkit-appearance: none;
}
/* Example text sits well below the labels so an empty form never looks filled in. */
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-dim); opacity: 0.55; }
.form-field select:has(option[value=""]:checked) { color: var(--text-dim); }
.form-field select option { background: var(--surface); }
.form-field textarea { resize: none; min-height: 120px; }
.form-field::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.5s var(--ease-out-expo);
}
.form-field:focus-within::after { width: 100%; }
.form-submit {
  padding: 1.5rem;
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.form-submit-note {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--text-dim);
}
.form-submit-btn {
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
  background: var(--gold);
  color: var(--bg);
  border: none;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  cursor: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.35s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}
.form-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out-expo);
}
.form-submit-btn:hover::before { transform: scaleX(1); }
.form-submit-btn span { position: relative; z-index: 1; }

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .form-field:nth-child(even) { border-left: none; }
  .form-field.full { grid-column: span 1; }
}

/* ============================================================
   REEL PAGE
   ============================================================ */
.reel-page {
  background: #000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.reel-page .nav { mix-blend-mode: difference; }
.reel-container {
  width: 100%;
  max-width: 1400px;
  padding: clamp(5rem, 10vw, 8rem) var(--gutter);
}
.reel-header {
  text-align: center;
  margin-bottom: 3rem;
}
.reel-header h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}
.reel-header p {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  margin-top: 0.75rem;
}
.reel-video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid rgba(255,255,255,0.05);
}
.reel-video-wrap iframe,
.reel-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.reel-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #030303;
}
.reel-play-icon {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  padding-left: 3px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}
.reel-play-icon:hover { border-color: var(--gold); color: var(--gold); }
.reel-placeholder-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255,255,255,0.15);
}
.reel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.reel-meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}
.reel-actions {
  display: flex;
  gap: 0.75rem;
}
.reel-action-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: none;
  transition: all 0.3s ease;
}
.reel-action-btn:hover { border-color: var(--text-muted); color: var(--text); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ============================================================
   NAV LOGO IMAGE
   ============================================================ */
.nav-logo-img {
  height: 30px;
  width: auto;
  display: block;
  filter: invert(1);                  /* dark mode: black SVG → white */
  transition: opacity 0.3s ease, filter 0.5s ease;
}
html[data-theme="light"] .nav-logo-img {
  filter: none;                       /* light mode: natural black */
}
.nav-logo:hover .nav-logo-img {
  opacity: 0.65;
}

/* ============================================================
   LIGHT THEME — warm editorial
   Activated by: html[data-theme="light"]
   ============================================================ */
html[data-theme="light"] {
  --bg:          #FCF7F8;   /* Snow */
  --surface:     #F3EEF0;
  --surface-2:   #EDE8EA;
  --border:      #D8D0D3;
  --border-soft: #E5DEE0;
  --text:        #131313;
  --text-muted:  #4e4636;
  --text-dim:    #9a907d;
  --gold:        #cca43b;   /* primary-container in light */
  --gold-dim:    #775a00;   /* inverse-primary for deeper contrast */
  --pink:        #762f3f;   /* secondary-container in light */
}

/* Light — invert grain blend mode */
html[data-theme="light"] .grain {
  mix-blend-mode: multiply;
  opacity: 0.04;
}

/* Light — hero placeholder gets a warm ivory gradient */
html[data-theme="light"] .hero-placeholder {
  background: linear-gradient(160deg, #ddd8d0 0%, #e8e3da 40%, #d5d0c8 100%);
}
html[data-theme="light"] .hero-placeholder-orb {
  background: radial-gradient(circle, rgba(184,146,46,0.12) 0%, rgba(61,126,255,0.06) 50%, transparent 70%);
}
html[data-theme="light"] .hero-placeholder-grid {
  background-image:
    linear-gradient(rgba(15,14,12,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,14,12,0.04) 1px, transparent 1px);
}

/* Light — hero overlay flips direction */
html[data-theme="light"] .hero-overlay {
  background: linear-gradient(
    to top,
    rgba(240,237,232,0.96) 0%,
    rgba(240,237,232,0.4) 50%,
    rgba(240,237,232,0.1) 100%
  );
}

/* Light — nav gradient */
html[data-theme="light"] .nav::before {
  background: linear-gradient(to bottom, rgba(240,237,232,0.92) 0%, transparent 100%);
}

/* Light — cursor ring color */
html[data-theme="light"] .cursor-dot { background: var(--gold); }
html[data-theme="light"] .cursor-ring { border-color: rgba(204,164,59,0.4); }
html[data-theme="light"] .cursor-ring.hover { border-color: var(--gold); }

/* Light — tile backgrounds: warmer, lighter */
html[data-theme="light"] .tile-bg-1 { background: linear-gradient(145deg, #c8d4e0 0%, #b8c8d8 40%, #c0ccd8 100%); }
html[data-theme="light"] .tile-bg-2 { background: linear-gradient(225deg, #e0cdb0 0%, #d4bc98 40%, #dcc8a8 100%); }
html[data-theme="light"] .tile-bg-3 { background: linear-gradient(315deg, #b8d4c0 0%, #a8c8b4 40%, #b4ccbc 100%); }
html[data-theme="light"] .tile-bg-4 { background: linear-gradient( 45deg, #ccc0d8 0%, #bfb0cc 40%, #c8bcd4 100%); }
html[data-theme="light"] .tile-bg-5 { background: linear-gradient(180deg, #c4ccd8 0%, #bcc4d0 50%, #c0c8d4 100%); }

/* Light — tile accents: more saturated since backgrounds are lighter */
html[data-theme="light"] .tile-accent-1 { background: radial-gradient(ellipse at 25% 75%, rgba(31,158,158,0.35) 0%, transparent 60%); }
html[data-theme="light"] .tile-accent-2 { background: radial-gradient(ellipse at 75% 25%, rgba(204,164,59,0.45) 0%, transparent 60%); }
html[data-theme="light"] .tile-accent-3 { background: radial-gradient(ellipse at 30% 55%, rgba(107,39,55,0.25) 0%, transparent 60%); }
html[data-theme="light"] .tile-accent-4 { background: radial-gradient(ellipse at 70% 65%, rgba(31,158,158,0.28) 0%, transparent 60%); }
html[data-theme="light"] .tile-accent-5 { background: radial-gradient(ellipse at 50% 45%, rgba(204,164,59,0.22) 0%, rgba(31,158,158,0.16) 50%, transparent 70%); }

/* Light — tile frame */
html[data-theme="light"] .tile-frame { border-color: rgba(15,14,12,0.12); }
html[data-theme="light"] .tile-frame::before {
  background-image:
    linear-gradient(rgba(15,14,12,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,14,12,0.04) 1px, transparent 1px);
}

/* Light — tiles with real images: keep overlay text light on dark imagery */
html[data-theme="light"] .project-tile-img img ~ .project-tile-overlay,
html[data-theme="light"] .project-tile:has(.project-tile-img img) .project-tile-overlay {
  color: #e5e2e1;
}
html[data-theme="light"] .project-tile:has(.project-tile-img img) .project-title { color: #e5e2e1; }
html[data-theme="light"] .project-tile:has(.project-tile-img img) .project-client { color: rgba(229,226,225,0.6); }
html[data-theme="light"] .project-tile:has(.project-tile-img img) .project-tile-static { color: #e5e2e1; border-top-color: rgba(255,255,255,0.1); }
html[data-theme="light"] .project-tile:has(.project-tile-img img) .project-tile-static .project-title { color: #e5e2e1; }
html[data-theme="light"] .project-tile:has(.project-tile-img img) .project-tile-static .project-cat { color: var(--gold); }
html[data-theme="light"] .project-tile:has(.project-tile-img img) { background: #0a0a0e; }

html[data-theme="light"] .work-tile:has(.work-tile-img img) .work-tile-view { color: #e5e2e1; }


/* btn-primary hover: swap white sweep → dark bronze so text stays legible on Snow bg */
html[data-theme="light"] .btn-primary { color: var(--bg); }
html[data-theme="light"] .btn-primary::before { background: var(--gold-dim); }
html[data-theme="light"] .btn-primary:hover { color: var(--white); }

/* Light — scrollbar */
html[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--border); }

/* Light — reel page override */
html[data-theme="light"] .reel-page { background: var(--bg); }
html[data-theme="light"] .reel-video-wrap { border-color: rgba(15,14,12,0.1); }
html[data-theme="light"] .reel-placeholder { background: var(--surface); }

/* Smooth theme transitions */
html, body {
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}
.nav, .footer, .grain,
.discipline-panel, .tool-item, .process-step,
.project-tile, .work-tile, .about-teaser-badge,
.contact-form, .form-field, .form-submit {
  transition:
    background-color 0.5s ease,
    border-color 0.5s ease,
    color 0.5s ease;
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: border-color 0.3s ease, background 0.3s ease;
  overflow: hidden;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle-icon {
  position: absolute;
  width: 14px;
  height: 14px;
  transition: transform 0.5s var(--ease-out-expo), opacity 0.3s ease;
}
/* Sun icon (shown in dark mode — click to go light) */
.theme-toggle .icon-sun {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}
.theme-toggle .icon-moon {
  opacity: 0;
  transform: translateY(20px) rotate(-30deg);
}
/* Light mode: show moon, hide sun */
html[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: translateY(-20px) rotate(30deg);
}
html[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

/* ============================================================
   CYCLING HEADLINE ANIMATION
   ============================================================ */
@keyframes word-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes word-stay {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes word-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}

.hero-discipline-cycling {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.92;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 237, 232, 0.25);
  margin-bottom: 2.5rem;
  min-height: 1.1em; /* prevent height jump as words change */
  position: relative;
}
html[data-theme="light"] .hero-discipline-cycling {
  -webkit-text-stroke: 1px rgba(15, 14, 12, 0.2);
}

.cycling-word {
  display: inline-block;
  animation-fill-mode: both;
}
.cycling-word.animating {
  animation:
    word-fade-in  0.5s cubic-bezier(0.19, 1, 0.22, 1) 0s    both,
    word-stay     0.9s linear                          0.5s   both,
    word-fade-out 0.4s cubic-bezier(0.76, 0, 0.24, 1) 1.4s   both;
}

@media (prefers-reduced-motion: reduce) {
  .cycling-word.animating { animation: none; opacity: 1; }
}

/* ── "We [word] pixels." hero statement ─────────────────── */
.hero-statement {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;                    /* wrap on very small screens */
  gap: 0.35em;
  margin: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.75rem, 4vw, 3rem);
  width: 100%;
  line-height: 1;
}
.hero-we,
.hero-pixels {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  opacity: 0;
  transform: translateY(16px);
}
.hero-cycling-word {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--gold);
  -webkit-text-stroke: 0px transparent;
}
html[data-theme="light"] .hero-cycling-word {
  color: var(--gold);
  -webkit-text-stroke: 0px transparent;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
/* (Moved above — duplicate removed) */

/* ============================================================
   VIDEO EMBEDS (Bunny.net placeholders + generic)
   ============================================================ */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0A0A0E;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
}
.video-embed .video-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo), filter 0.4s ease;
}
.video-embed:hover .video-poster { transform: scale(1.03); filter: brightness(0.75); }
.video-embed .video-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(10,10,14,0.6);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.video-embed:hover .video-play {
  background: var(--gold);
  border-color: var(--gold);
  color: #0A0A0E;
  transform: translate(-50%, -50%) scale(1.08);
}
.video-embed .video-play svg { width: 24px; height: 24px; margin-left: 3px; }
.video-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-embed.is-loaded .video-poster,
.video-embed.is-loaded .video-play { display: none; }
.video-embed-label {
  position: absolute; bottom: 12px; left: 14px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255,255,255,0.7);
  background: rgba(10,10,14,0.6);
  padding: 4px 8px;
  border-radius: 2px;
  pointer-events: none;
}

/* ============================================================
   SCROLL SEQUENCE (Canvas-based scrubbed PNG frames)
   ============================================================ */
.scroll-sequence {
  position: relative;
  width: 100%;
  background: #0A0A0E;
}
.scroll-sequence-pin {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.scroll-sequence-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.scroll-sequence-caption {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 5vh;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}

/* ============================================================
   PROJECT PAGE — shared flagship / stub layout
   ============================================================ */
.project-hero {
  padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(2rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
  padding-left: clamp(1.5rem, 4vw, 3rem);
  padding-right: clamp(1.5rem, 4vw, 3rem);
}
.project-hero-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.project-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
}
.project-hero-summary {
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.project-hero-media {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.project-section {
  max-width: 1400px;
  margin: clamp(3rem, 7vw, 6rem) auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}
.project-section-header { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.project-section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.25rem 0 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.video-grid--two { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.video-grid--three { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.still-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.still-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  transition: transform 0.6s var(--ease-out-expo), filter 0.3s ease;
}
.still-gallery a { display: block; overflow: hidden; border-radius: 2px; }
.still-gallery a:hover img { transform: scale(1.03); filter: brightness(1.05); }
.still-gallery--wide { grid-template-columns: 1fr; max-width: 1200px; margin: 0 auto; }

.project-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .project-split { grid-template-columns: 1fr; } }
.project-split p { color: var(--text-muted); line-height: 1.75; font-size: 1rem; margin: 0 0 1rem; }

/* Filter buttons — ensure active state works for new categories */
.filter-btn[data-filter="broadcast"].active,
.filter-btn[data-filter="event"].active { background: var(--gold); color: #0A0A0E; }

/* ============================================================
   PROJECT PAGES v2 — image-forward layout
   Prefix: .ph-*
   ============================================================ */

/* 1. Full-bleed media-first hero */
.ph-hero {
  position: relative;
  width: 100%;
  height: 88vh;
  min-height: 640px;
  overflow: hidden;
  margin: 0;
  background: #0A0A0E;
  cursor: default;
}
.ph-hero[data-bunny-video] { cursor: pointer; }
.ph-hero-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ph-hero[data-bunny-video]:hover .ph-hero-media { transform: scale(1.015); }
.ph-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}
.ph-hero-content {
  position: absolute;
  left: clamp(1.5rem, 5vw, 5rem);
  right: clamp(1.5rem, 5vw, 5rem);
  bottom: clamp(2rem, 6vw, 4rem);
  color: #fff;
  z-index: 2;
}
.ph-hero-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.85;
  margin: 0 0 0.75rem 0;
}
.ph-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0;
  max-width: 14ch;
}
.ph-hero-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
  z-index: 3;
}
.ph-hero-play:hover { background: rgba(255,255,255,0.2); transform: translate(-50%, -50%) scale(1.08); }
.ph-hero-play svg { width: 32px; height: 32px; margin-left: 4px; }
.ph-hero.is-loaded .ph-hero-media,
.ph-hero.is-loaded .ph-hero-overlay,
.ph-hero.is-loaded .ph-hero-play { display: none; }
.ph-hero iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* 2. Centered copy column */
.ph-copy {
  max-width: 680px;
  margin: clamp(5rem, 12vw, 10rem) auto;
  padding: 0 1.5rem;
}
.ph-copy .eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  margin: 0 0 2rem 0;
}
.ph-copy p {
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
}

/* 3. Full-bleed image break */
.ph-fullbleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 80vh;
  min-height: 500px;
  overflow: hidden;
  margin-top: clamp(3rem, 8vw, 6rem);
  margin-bottom: clamp(3rem, 8vw, 6rem);
}
.ph-fullbleed--tall { height: 100vh; }
.ph-fullbleed img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* 4. Oversized typographic break */
.ph-display {
  margin: clamp(6rem, 15vw, 12rem) auto;
  padding: 0 1.5rem;
  max-width: 1400px;
}
.ph-display h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  max-width: 18ch;
}
.ph-display-sub {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  margin-top: 2rem;
  max-width: 40ch;
}

/* 5. Horizontal scroll rail */
.ph-rail-wrap {
  margin: clamp(4rem, 10vw, 7rem) 0;
}
.ph-rail-header {
  max-width: 1400px;
  margin: 0 auto 2rem;
  padding: 0 clamp(1.5rem, 5vw, 5rem);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
}
.ph-rail-header h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}
.ph-rail-header .ph-rail-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}
.ph-rail-header .ph-rail-hint {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  white-space: nowrap;
}
.ph-rail {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: clamp(1.5rem, 5vw, 5rem);
  padding: 0 clamp(1.5rem, 5vw, 5rem) 2rem;
  scrollbar-width: thin;
}
.ph-rail-item {
  flex: 0 0 clamp(280px, 42vw, 560px);
  aspect-ratio: 16 / 9;
  scroll-snap-align: start;
  overflow: hidden;
  position: relative;
  background: var(--surface, #14141a);
  cursor: pointer;
}
.ph-rail-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: block;
}
.ph-rail-item:hover img { transform: scale(1.04); }
.ph-rail-item .ph-rail-label {
  position: absolute;
  left: 1rem; bottom: 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  pointer-events: none;
}
.ph-rail-item .ph-rail-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s ease;
  pointer-events: none;
}
.ph-rail-item:hover .ph-rail-play { opacity: 1; }
.ph-rail-item .ph-rail-play svg { width: 18px; height: 18px; margin-left: 2px; }

/* 6. Asymmetric masonry */
.ph-masonry {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  max-width: 1600px;
  margin: clamp(4rem, 10vw, 7rem) auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}
.ph-masonry > * { overflow: hidden; background: var(--surface, #14141a); display: block; }
.ph-masonry a { cursor: zoom-in; }
.ph-masonry img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ph-masonry a:hover img { transform: scale(1.03); }

/* Default asymmetric spans — 10 items. Pages can override with inline style on individual items. */
.ph-masonry > *:nth-child(10n+1) { grid-column: span 4; aspect-ratio: 16/10; }
.ph-masonry > *:nth-child(10n+2) { grid-column: span 2; aspect-ratio: 4/5; }
.ph-masonry > *:nth-child(10n+3) { grid-column: span 2; aspect-ratio: 1/1; }
.ph-masonry > *:nth-child(10n+4) { grid-column: span 2; aspect-ratio: 1/1; }
.ph-masonry > *:nth-child(10n+5) { grid-column: span 2; aspect-ratio: 1/1; }
.ph-masonry > *:nth-child(10n+6) { grid-column: span 3; aspect-ratio: 3/2; }
.ph-masonry > *:nth-child(10n+7) { grid-column: span 3; aspect-ratio: 3/2; }
.ph-masonry > *:nth-child(10n+8) { grid-column: span 2; aspect-ratio: 4/5; }
.ph-masonry > *:nth-child(10n+9) { grid-column: span 2; aspect-ratio: 4/5; }
.ph-masonry > *:nth-child(10n+10) { grid-column: span 2; aspect-ratio: 4/5; }

.ph-masonry-header {
  max-width: 1600px;
  margin: 0 auto 1.5rem;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}
.ph-masonry-header .ph-rail-eyebrow { margin-bottom: 0.5rem; }
.ph-masonry-header h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}

@media (max-width: 820px) {
  .ph-masonry { grid-template-columns: repeat(2, 1fr); }
  .ph-masonry > * { grid-column: span 2 !important; aspect-ratio: 4/3 !important; }
}

/* 7. Paired split — image / copy */
.ph-pair {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 1500px;
  margin: clamp(4rem, 10vw, 7rem) auto;
  padding: 0 1.5rem;
  align-items: center;
}
.ph-pair--copy-left { grid-template-columns: 1fr 1.4fr; }
.ph-pair-media { position: relative; }
.ph-pair-media img { width: 100%; height: auto; display: block; }
.ph-pair-media .video-embed { aspect-ratio: 16/9; }
.ph-pair-copy .eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}
.ph-pair-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  line-height: 1.05;
}
.ph-pair-copy p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0 0 1rem;
}
@media (max-width: 820px) {
  .ph-pair,
  .ph-pair--copy-left { grid-template-columns: 1fr; }
}

/* 8. Tech list — re-used from legacy */
.ph-tech {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 1400px;
  margin: clamp(4rem, 10vw, 7rem) auto;
  padding: 0 1.5rem;
}
.ph-tech-header {
  max-width: 1400px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
}
.ph-tech-card {
  padding: 1.75rem 1.5rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
}
body.light-mode .ph-tech-card { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
.ph-tech-card .num {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  color: var(--gold);
  margin: 0 0 0.75rem;
}
.ph-tech-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.ph-tech-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* Configurator hero caption (small overlay on work/karma.html) */
.karma-hero-overlay {
  position: absolute;
  left: clamp(1.25rem, 4vw, 3rem);
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  color: var(--white);
  z-index: 4;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0,0,0,0.45);
}
/* The title and the viewer share a box so the title can overlay the car. */
.karma-stage { position: relative; }
@media (max-width: 600px) {
  /* Phones: the title moves above the car so it doesn't cover it. */
  .karma-hero-overlay {
    position: static;
    color: var(--text);
    text-shadow: none;
    padding: 1.25rem var(--gutter) 1rem;
  }
}
.karma-hero-overlay .k-cat {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.9;
  margin: 0 0 0.5rem;
}
.karma-hero-overlay .k-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0 0 0.35rem;
  max-width: 14ch;
}
.karma-hero-overlay .k-client {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.85;
  margin: 0;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .grain { animation: none; }
  .marquee-track { animation: none; }
}
