@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:      #080808;
  --surface:    #111111;
  --surface-2:  #1c1c1c;
  --white:      #ededed;
  --muted:      #666;
  --gap:        10px;
  --nav-h:      68px;
  --side:       40px;
  --nav-bg:     rgba(8, 8, 8, 0.88);
  --nav-overlay: rgba(8, 8, 8, 0.97);
}

[data-theme="light"] {
  --black:      #f0eeea;
  --surface:    #e4e2de;
  --surface-2:  #d0ceca;
  --white:      #1a1a1a;
  --muted:      #888;
  --nav-bg:     rgba(240, 238, 234, 0.92);
  --nav-overlay: rgba(240, 238, 234, 0.97);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── NAV ──────────────────────────────────────── */
nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--side);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}


/* Logo block: name + subtitle stacked — entire block is a link */
.nav-logo-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  cursor: pointer;
}

.nav-logo {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  line-height: 1;
}

.nav-logo-sub {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

/* Right cluster: nav-links + social icons */
.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  position: relative;
  transition: opacity 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* ─── HERO ─────────────────────────────────────── */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--side) 52px;
}

.hero-reel {
  position: absolute;
  inset: 0;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-reel-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #2a2a2a;
  user-select: none;
}

.hero-reel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 8, 8, 0.38) 0%,
    rgba(8, 8, 8, 0.10) 12%,
    transparent 24%
  );
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-name {
  font-size: clamp(32px, 5.5vw, 76px);
  font-weight: 200;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--white);
}

.hero-role {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── PAGE HEADER (work pages) ─────────────────── */
.page-header {
  padding: calc(var(--nav-h) + 52px) var(--side) 0;
}

.page-title {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--surface-2);
  margin-bottom: 22px;
}

/* ─── SECTION ───────────────────────────────────── */
.section {
  padding: 72px var(--side) 0;
}

.section-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--surface-2);
  margin-bottom: 22px;
}

/* ─── GRID ──────────────────────────────────────── */
.grid { display: grid; gap: var(--gap); }

.grid-12 { grid-template-columns: repeat(12, 1fr); }
.grid-4  { grid-template-columns: repeat(4, 1fr); }
.grid-3  { grid-template-columns: repeat(3, 1fr); }
.grid-2  { grid-template-columns: repeat(2, 1fr); }

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

/* ─── THUMB ─────────────────────────────────────── */
.thumb {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  display: block;
}

.thumb::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 */
}

.thumb img,
.thumb .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94), background 0.3s;
}

.thumb .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.thumb .ph span {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #2d2d2d;
  user-select: none;
}

.thumb .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s;
  background: rgba(0,0,0,0.18);
}

.thumb .play svg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.6));
}

.thumb:hover .play    { opacity: 1; }
.thumb:hover .ph      { background: #181818; }
.thumb:hover img,
.thumb:hover .ph      { transform: scale(1.025); }

/* ─── PROJECT META ──────────────────────────────── */
.project-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.project-title {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--white);
}

.project-cat {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── STILL ─────────────────────────────────────── */
.still {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}

.still::before {
  content: '';
  display: block;
  padding-top: 66.67%; /* 3:2 */
}

.still img,
.still .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
}

.still .ph {
  display: flex;
  align-items: center;
  justify-content: center;
}

.still .ph span {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #2d2d2d;
  user-select: none;
}

.still:hover img,
.still:hover .ph { transform: scale(1.04); }

/* ─── PROJECT BLOCK ─────────────────────────────── */
.project-block {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.project-block .stills-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.col-4 .stills-row,
.col-3 .stills-row { grid-template-columns: repeat(2, 1fr); }

/* ─── CONTACT ───────────────────────────────────── */
.contact-page {
  min-height: calc(100vh - var(--nav-h) - 80px);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) var(--side) 80px;
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-email {
  font-size: clamp(22px, 3.5vw, 48px);
  font-weight: 200;
  letter-spacing: 0.04em;
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
  display: block;
}

.contact-email:hover { color: var(--muted); }

.contact-socials {
  display: flex;
  gap: 32px;
  padding-top: 4px;
}

.contact-socials a {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-socials a:hover { color: var(--white); }

/* ─── FOOTER ────────────────────────────────────── */
footer {
  padding: 28px var(--side);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--surface-2);
}

footer p {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #383838;
}

footer .foot-links { display: flex; gap: 28px; }

footer .foot-links a {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #383838;
  text-decoration: none;
  transition: color 0.2s;
}

footer .foot-links a:hover { color: var(--muted); }

/* ─── LIGHTBOX ──────────────────────────────────── */
.lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.96);
  align-items: center;
  justify-content: center;
}

.lb.open { display: flex; }

.lb-inner {
  position: relative;
  width: min(90vw, 1280px);
}

.lb-ratio {
  position: relative;
  padding-top: 56.25%;
}

.lb-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.lb-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
  font-family: inherit;
}

.lb-close:hover { color: var(--white); }

/* ─── STILL LIGHTBOX ────────────────────────────── */
.slb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.96);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slb.open { display: flex; }

.slb-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(90vw, 1400px);
}

/* Clipping stage for simultaneous slide */
.slb-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slb-viewport img {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.slb-close {
  display: none;
}

.slb-counter { display: none; }

.slb-close:hover { color: var(--white); }

/* ─── SCROLL REVEAL ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.25,0.46,0.45,0.94),
              transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94);
}
.reveal.visible { opacity: 1; transform: none; }

.reveal-group > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.25,0.46,0.45,0.94),
              transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
/* Staggered reveal for up to 20 children */
.reveal-group.visible > * { opacity:1; transform:none; }
.reveal-group.visible > *:nth-child(1)  { transition-delay:0s; }
.reveal-group.visible > *:nth-child(2)  { transition-delay:0.06s; }
.reveal-group.visible > *:nth-child(3)  { transition-delay:0.12s; }
.reveal-group.visible > *:nth-child(4)  { transition-delay:0.18s; }
.reveal-group.visible > *:nth-child(5)  { transition-delay:0.22s; }
.reveal-group.visible > *:nth-child(6)  { transition-delay:0.26s; }
.reveal-group.visible > *:nth-child(7)  { transition-delay:0.30s; }
.reveal-group.visible > *:nth-child(8)  { transition-delay:0.34s; }
.reveal-group.visible > *:nth-child(9)  { transition-delay:0.38s; }
.reveal-group.visible > *:nth-child(10) { transition-delay:0.40s; }
.reveal-group.visible > *:nth-child(11) { transition-delay:0.42s; }
.reveal-group.visible > *:nth-child(12) { transition-delay:0.44s; }
.reveal-group.visible > *:nth-child(n+13) { transition-delay:0.46s; }

/* Hero scroll indicator — hidden */
.hero-scroll { display: none; }

/* ─── HAMBURGER ─────────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── UTILITIES ─────────────────────────────────── */
.mt-gap { margin-top: var(--gap); }

/* ─── MOBILE ────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --side: 20px; --gap: 8px; }

  /* Allow contact page body to scroll */
  body { height: auto !important; overflow: auto !important; }

  /* ── Nav: strip down to name + hamburger only ── */
  /* Remove backdrop-filter so position:fixed children aren't trapped in stacking context */
  nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(8,8,8,0.97);
  }

  .nav-social  { display: none !important; }
  .theme-toggle { display: none !important; }
  .nav-reel-item { display: list-item !important; }
  .nav-logo { font-weight: 700; }

  /* ── Hamburger: 2 bars, visible X when open ── */
  .nav-burger { display: flex; gap: 7px; position: relative; z-index: 210; }
  .nav-burger span { height: 2px; }
  .nav-burger span:nth-child(2) { display: none; }

  .nav-burger.open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); opacity: 1; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

  /* ── Full-screen nav overlay (z-index below nav bar) ── */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(8,8,8,0.97);
    z-index: 190;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  /* Match project wireframe text style — not uppercase */
  .nav-links a {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    text-align: center;
    color: var(--white);
  }

  .nav-links a::after { display: none; }

  /* ── Nav overlay social icons row — pinned to bottom of overlay ── */
  .nav-mobile-social {
    display: flex !important;
    gap: 28px;
    list-style: none;
    position: absolute;
    bottom: 44px;
    left: 0;
    right: 0;
    justify-content: center;
  }
  .nav-mobile-social a {
    color: rgba(200,200,200,0.6);
    display: flex;
    align-items: center;
    line-height: 0;
  }
  .nav-mobile-social svg { width: 20px; height: 20px; stroke-width: 2; }

  /* ── Nav separator on non-hero pages ── */
  body:not(.page-hero) nav {
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  .hero-scroll { display: none; }

  /* ── Hero: video rotated 90° — landscape film on a portrait phone ── */
  .hero {
    height: 100dvh;
    min-height: unset;
    padding: 0;
    background: #000;
    overflow: hidden;
    position: relative;
  }

  .hero-reel {
    position: absolute;
    inset: 0;
    background: #000;
  }

  .hero-reel img {
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: calc(100vw * 16 / 9) !important;
    height: 100vw !important;
    object-fit: cover !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transition: opacity 0.15s ease;
    z-index: 1;
    pointer-events: none;
  }

  .hero-reel video {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: calc(100vw * 16 / 9) !important;
    height: 100vw !important;
    min-width: unset !important;
    min-height: unset !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    object-fit: cover;
    pointer-events: none;
  }

  .hero-reel::after { display: none; }

  /* ── Selected Works: full-bleed thumbnails, no text overlay ── */
  .page-grid { padding: calc(var(--nav-h) + 0px) 0 0 !important; }
  .thumb-link .thumb-name { display: none; }

  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 {
    grid-column: 1 / -1;
  }

  .project-block .stills-row { grid-template-columns: repeat(2, 1fr) !important; }

  /* Stills are tappable on mobile — swipe lightbox is enabled */
  .still { pointer-events: auto; cursor: pointer; }

  .section { padding-top: 52px; }
  .page-header { padding-top: calc(var(--nav-h) + 32px); }

  .contact-inner { grid-template-columns: 1fr; gap: 36px; padding-bottom: 60px; }

  footer { flex-direction: column; gap: 16px; text-align: center; }

}

@media (max-width: 480px) {
  .hero-name { letter-spacing: 0.04em; }
}

/* ─── SECTION THUMBNAIL GRID ────────────────── */
.page-grid {
  padding: calc(var(--nav-h) + 24px) var(--side) 80px;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

/* Each thumbnail is an <a> link */
.thumb-link {
  display: block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.thumb-link::before {
  content: '';
  display: block;
  padding-top: 75%;
}

.thumb-link img,
.thumb-link .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
}

.thumb-link .ph {
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-link .ph span {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #2d2d2d;
  user-select: none;
}

/* Title hover overlay */
.thumb-link .thumb-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.25s;
}

.thumb-link .thumb-name span {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #ededed; /* hardcoded white — stays white in both light and dark mode */
  display: block;
}

.thumb-link .thumb-name em {
  display: block;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(237,237,237,0.55);
  margin-top: 3px;
}

.thumb-link:hover img,
.thumb-link:hover .ph { transform: scale(1.025); }

.thumb-link:hover .thumb-name { opacity: 1; }

@media (max-width: 768px) {
  /* Single column, no gaps — negative margin overlaps items by 1px to kill sub-pixel rendering gaps */
  .thumb-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .thumb-link {
    width: 100%;
    flex-shrink: 0;
    margin-bottom: -1px;
  }
  .stills-grid { gap: 0; }

  /* No hover scale on touch */
  .thumb-link:hover img,
  .thumb-link:hover .ph { transform: none; }

  /* Instant reveal on mobile — no scroll animation delay */
  .reveal-group > *,
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── PROJECT DETAIL PAGE ────────────────────── */

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  padding: 20px var(--side) 0;
  display: block;
  padding-top: calc(var(--nav-h) + 20px);
}

.back-link::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  margin-right: 7px;
  vertical-align: middle;
}

.back-link:hover { color: var(--white); }

/* Two-column layout: left = info, right = video */
.project-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: calc(var(--side) * 1.5);
  padding: 18px var(--side) 28px;
  align-items: start;
}

/* LEFT: title + credits */
.project-left {}

.proj-title {
  font-size: clamp(17px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 8px;
}

.proj-views {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 20px;
}

/* Credits directly on black — minimalistic 2-col layout */
.project-left .credits {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.project-left .credit-row {
  display: flex;
  gap: 18px;
  align-items: baseline;
}

.project-left .credit-label {
  font-style: normal;
  font-weight: 600;
  color: var(--white);
  min-width: 170px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.project-left .credit-label::after {
  content: none;
}

.project-left .credit-value {
  font-style: normal;
  font-weight: 400;
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.project-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}

.project-thumb-wrap::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

.project-thumb-wrap img,
.project-thumb-wrap .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94);
}

.project-thumb-wrap .ph {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumb-wrap .ph span {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #2d2d2d;
  user-select: none;
}

/* ─── PROJECT THUMBNAIL PLAY BUTTON ──────────── */
.project-thumb-wrap .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  background: rgba(0,0,0,0.14);
}

.project-thumb-wrap .play svg {
  width: 36px;
  height: 43px;
  filter: drop-shadow(0 2px 14px rgba(0,0,0,0.65));
  pointer-events: auto;
  transition: transform 0.22s cubic-bezier(0.25,0.46,0.45,0.94);
}

.project-thumb-wrap .play svg:hover {
  transform: scale(1.12);
}

/* Inline metadata row beneath the thumbnail */
.project-inline-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 2;
}

.project-inline-meta .m {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.project-inline-meta .m::after {
  content: '|';
  margin: 0 10px;
  color: var(--surface-2);
}

.project-inline-meta .m:last-child::after { display: none; }

.project-inline-meta .m b {
  font-weight: 400;
  color: var(--muted);
  margin-right: 5px;
}

.project-inline-meta .m span {
  color: var(--white);
}

/* RIGHT: description + credits stacked */
.project-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-description {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  padding: 24px 28px;
  min-height: 110px;
}

.project-description p {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: #888;
}

.credits-panel {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  padding: 24px 28px;
}

.credits-panel-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface-2);
}

/* Credits */
.credits {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.credit-row {
  display: flex;
  gap: 20px;
  align-items: baseline;
}

.credit-label {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 130px;
  flex-shrink: 0;
}

.credit-value {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--white);
}

/* Bottom stills: 3-column 4:3 grid, edge-to-edge */
.project-stills {
  padding: 0;
  margin-top: 0;
}

.stills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 0;
}

.stills-grid .still {
  cursor: pointer;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.stills-grid .still::before {
  content: '';
  display: block;
  padding-top: 75%; /* 4:3 aspect ratio */
}

.stills-grid .still img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}

.stills-grid .still:hover img { transform: scale(1.03); }

/* Keep legacy stills-stack for any page that still uses it */
.stills-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.stills-stack .still { cursor: pointer; overflow: hidden; }
.stills-stack .still::before { display: none; }
.stills-stack .still img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94);
}
.stills-stack .still:hover img { transform: scale(1.012); }

/* Inline video area (replaces thumbnail on play) */
.project-video-embed {
  display: none;
  position: relative;
  padding-top: 56.25%;
}

.project-video-embed.active { display: block; }

.project-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Hero image / video support */
.hero-reel img,
.hero-reel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Self-hosted hero video — object-fit:cover handles 16:9 fill */
.hero-reel video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}

@media (max-width: 768px) {
  .project-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .stills-grid { grid-template-columns: 1fr; gap: 0; }

  .back-link {
    padding-top: calc(var(--nav-h) + 14px);
    font-size: 11px;
    color: var(--muted);
  }

  .nav-right { gap: 20px; }

  /* Lightbox: animated blur backdrop + smooth pop on mobile */
  .slb {
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
  .slb.open {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slb-backdrop-in 0.45s cubic-bezier(0.25,0.46,0.45,0.94) both;
  }
  .slb-inner { width: 100%; padding: 0; }
  .slb-viewport { width: 100vw; }
  .slb-viewport img {
    max-width: 100vw;
    max-height: 88vh;
  }

  /* Smooth pop-in — runs once on open, not re-triggered by swipe */
  .slb.open .slb-viewport {
    animation: slb-img-pop 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  }

  /* Hide arrow buttons on mobile — swipe replaces them */
  .slb-prev, .slb-next { display: none; }

  /* Hide counter */
  .slb-counter { display: none; }
}

@keyframes slb-backdrop-in {
  from {
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
  to {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

@keyframes slb-img-pop {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
  .project-info {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px var(--side) 32px;
  }

  .stills-full { grid-template-columns: repeat(2, 1fr); }

  .back-link {
    display: inline-block;
    padding: calc(var(--nav-h) + 16px) var(--side) 16px;
    -webkit-tap-highlight-color: rgba(0,0,0,0.06);
  }
}

/* ─── HERO CTA BUTTON ───────────────────────── */
.hero-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  text-underline-offset: 5px;
  transition: transform 0.22s ease, text-decoration-color 0.22s;
}
.hero-cta:hover {
  text-decoration: underline;
  text-decoration-color: var(--white);
  transform: translate(-50%, -50%) scale(1.06);
}

/* ─── HERO-PAGE: transparent nav, no black bar ─ */
.page-hero nav {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ─── HERO COPY (name overlay) ──────────────── */
.hero-copy {
  position: relative;
  z-index: 2;
  padding-bottom: 4px;
}

.hero-copy::before {
  content: '';
  position: absolute;
  inset: -60px -80px -20px -80px;
  background: radial-gradient(ellipse at center bottom,
    rgba(8,8,8,0.55) 0%,
    rgba(8,8,8,0.25) 40%,
    transparent 72%
  );
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}

/* ─── LIGHTBOX ARROW BUTTONS ─────────────────── */
.slb-prev,
.slb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(237,237,237,0.45);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
  line-height: 0;
  z-index: 2;
}
.slb-prev { left: -52px; }
.slb-next { right: -52px; }
.slb-prev:hover,
.slb-next:hover { color: var(--white); }
.slb-prev svg,
.slb-next svg {
  width: 30px;
  height: 30px;
  display: block;
}

/* ─── ASPECT RATIO OVERRIDES ─────────────────── */
.ratio-4-3::before              { padding-top: 75% !important; }
.project-video-embed.ratio-4-3  { padding-top: 75%; }

/* Andre Lawrence dual-video ratios — both identical (64.31% ≈ 3:2) */
.ratio-andre-1::before,
.ratio-andre-2::before             { padding-top: 64.31% !important; }
.project-video-embed.ratio-andre-1,
.project-video-embed.ratio-andre-2 { padding-top: 64.31%; }

/* Side-by-side video layout (Andre Lawrence) */
.project-right-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

/* ─── MOBILE FULLSCREEN VIDEO MODAL ─────────── */
.mvid-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.mvid-modal.open { display: flex; }

.mvid-modal iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

.mvid-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: rgba(237,237,237,0.75);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  z-index: 1;
  font-family: inherit;
}

/* ─── THEME TOGGLE ──────────────────────────── */
.theme-toggle {
  display: none !important;
  align-items: center;
  line-height: 0;
  transition: color 0.2s, filter 0.2s;
  filter: drop-shadow(0 0 2px rgba(200,200,200,0.18));
}
.theme-toggle:hover {
  color: #fff;
  filter: drop-shadow(0 0 7px rgba(220,220,220,0.6));
}
.theme-toggle svg { width: 15px; height: 15px; display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle { color: rgba(60,60,60,0.8); filter: none; }
[data-theme="light"] .theme-toggle:hover { color: #000; filter: drop-shadow(0 0 4px rgba(0,0,0,0.25)); }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Vimeo play-count badge, injected by vimeo-views.js */
.proj-view-count {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

/* Specs & Optics row — same formatting as other credit rows */

/* Contact bio in light mode */
[data-theme="light"] .contact-bio { color: var(--white); }

/* Andre Lawrence wider right column — thumbnails ~30% bigger */
.project-layout-andre { grid-template-columns: 0.6fr 2fr; }

/* ─── NAV SOCIAL ICONS ──────────────────────── */
.nav-social {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-social a {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s;
  line-height: 0;
}

.nav-social a:hover { color: var(--white); }

.nav-social svg {
  width: 15px;
  height: 15px;
}

/* ─── CONTACT / ABOUT PAGE ──────────────────── */
.contact-about {
  height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  padding-top: var(--nav-h);
  gap: 0;
}

.contact-photos {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap);
  padding: 24px 24px 24px 40px;
}

.contact-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface);
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* BTS slideshow — JS-driven, overflow clipped by contact-photo */
.bts-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.bts-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}
.bts-slideshow img:first-child { opacity: 1; }

/* Slideshow arrow controls */
.bts-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  padding: 8px;
  z-index: 4;
  line-height: 0;
  transition: color 0.2s;
}
.bts-arrow:hover { color: #fff; }
.bts-arrow svg { width: 20px; height: 20px; display: block; }
.bts-prev { left: 6px; }
.bts-next { right: 6px; }

.contact-info-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 60px 52px 40px;
}

.contact-bio-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
  align-self: flex-end;
}

.contact-details a,
.contact-details p {
  font-size: clamp(11px, 1.1vw, 15px);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--white);
  text-decoration: none;
  display: block;
  transition: color 0.2s;
  margin: 0;
}

.contact-details a:hover { color: var(--muted); }

.contact-bio {
  font-size: clamp(11px, 1.05vw, 14px);
  font-weight: 300;
  line-height: 1.95;
  color: #e8e3d5;
  letter-spacing: 0.015em;
  max-width: 780px;
  text-align: left;
}

/* Contact footer — bottom-left */
.contact-foot {
  padding: 20px var(--side) 52px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.contact-details-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.contact-foot a,
.contact-foot p {
  font-size: clamp(13px, 1.3vw, 18px);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--white);
  text-decoration: none;
  display: block;
  transition: color 0.2s;
  margin: 0;
}

.contact-foot a:hover { color: var(--muted); }

/* Coming soon project cards — non-clickable */
.thumb-link-soon {
  cursor: default;
}

.thumb-soon-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(237, 237, 237, 0.9);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

.thumb-link-soon:hover .thumb-soon-label { opacity: 1; }

@media (max-width: 768px) {
  .contact-about {
    grid-template-columns: 1fr;
    height: auto;
    min-height: unset;
  }

  .contact-photos {
    height: 80vw;
    flex-direction: column;
    padding: 0;
    gap: 0;
  }

  .contact-photos .contact-photo {
    flex: 1;
    border-radius: 0;
    overflow: hidden;
  }

  .contact-info-col {
    padding: 24px var(--side) 40px;
    justify-content: flex-start;
    gap: 32px;
  }

  .contact-bio-wrap { flex: none; }
  .contact-bio { text-align: left; font-size: 11px; line-height: 1.65; }
  .contact-foot { padding: 0; }
}

/* ─── NAV MOBILE SOCIAL (desktop: hidden) ──── */
.nav-mobile-social { display: none; }

/* ─── REEL NAV ITEM (mobile only) ───────────── */
.nav-reel-item { display: none; }


/* ─── FRAMESET LINK ─────────────────────────── */
.proj-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.proj-title-row .proj-title {
  margin-bottom: 0;
}
.proj-title-dot {
  color: var(--muted);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
}
.proj-frameset-link {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  margin-top: 0;
  transition: opacity 0.2s;
  border-bottom: 1px solid var(--muted);
  padding-bottom: 1px;
  white-space: nowrap;
}
.proj-frameset-link:hover { opacity: 0.7; }

/* ─── PROJECT CATEGORY (mobile only) ─────────── */
.proj-category {
  display: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.proj-category a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
@media (max-width: 768px) {
  .proj-category { display: block; }
  .proj-title-dot { display: none; }
  .proj-frameset-link { display: none; }
}

/* ─── ANDRE LAWRENCE MOBILE ─────────────────── */
@media (max-width: 768px) {
  .project-layout-andre { grid-template-columns: 1fr; }
  .project-right-dual { grid-template-columns: 1fr; }
  .project-left .credit-label { min-width: 100px; }
}

/* ─── LIGHT MODE: HERO PAGE ALWAYS WHITE ─────── */
/* Hero nav is transparent over video — force white text/icons in light mode */
[data-theme="light"] .page-hero nav .nav-logo,
[data-theme="light"] .page-hero nav .nav-logo-sub { color: #ededed; }
[data-theme="light"] .page-hero nav .nav-links a { color: #ededed; }
[data-theme="light"] .page-hero nav .nav-links a::after { background: #ededed; }
[data-theme="light"] .page-hero nav .nav-social a { color: rgba(200, 200, 200, 0.65); }
[data-theme="light"] .page-hero nav .nav-social a:hover { color: #ededed; }
[data-theme="light"] .page-hero nav .nav-burger span { background: #ededed; }
[data-theme="light"] .page-hero nav .theme-toggle { color: rgba(220, 220, 220, 0.78); filter: drop-shadow(0 0 2px rgba(200,200,200,0.18)); }
[data-theme="light"] .page-hero nav .theme-toggle:hover { color: #fff; filter: drop-shadow(0 0 7px rgba(220,220,220,0.6)); }

/* ─── LIGHT MODE: MOBILE NAV ─────────────────── */
@media (max-width: 768px) {
  [data-theme="light"] body:not(.page-hero) nav {
    background: rgba(240, 238, 234, 0.97);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  /* Hero nav stays transparent on mobile so video fills screen */
  [data-theme="light"] .page-hero nav { background: transparent !important; }
  /* Full-screen overlay stays dark — force white text so it's visible */
  [data-theme="light"] .nav-links.open a { color: #ededed; }
}

/* ─── EUPHORIA: 2% scale to clip letterbox bars ─ */
.euph-thumb img { transform: scale(1.02); }
.stills-euph .still img { transform: scale(1.02); }
.stills-euph .still:hover img { transform: scale(1.05); }
/* Euphoria thumbnail on Selected Works page */
.euph-featured img { transform: scale(1.06); }
.euph-featured:hover img { transform: scale(1.086); }

/* ─── AMERICAN JUKEBOX: solo layout (no video col) ─ */
.project-layout-solo {
  grid-template-columns: 1fr;
  padding-bottom: 48px;
}

/* ─── BIO LINK ───────────────────────────────── */
.bio-link {
  color: inherit;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.bio-link:hover { opacity: 1; }

/* ─── STILLS 16:9 ASPECT RATIO ───────────────── */
.stills-grid-16-9 .still::before { padding-top: 56.25% !important; }

@media (max-width: 768px) {
  .project-layout-solo { padding-bottom: 16px; }
}
