/* ==========================================================================
   SJMDP — Steven Mangurten, Cinematographer / DP
   Design tokens
   ========================================================================== */
:root {
  --bg: #fbfaf8;
  --bg-elevated: #f1f0eb;
  --text: #141412;
  --text-muted: #6b6a63;
  --hairline: rgba(20, 20, 18, 0.1);
  --hairline-strong: rgba(20, 20, 18, 0.2);
  --overlay-dim: rgba(6, 6, 7, 0.62);
  --header-h: 64px;
  --footer-h: 48px;

  /* Text/UI that sits on top of photography or video (reel, row-title overlays).
     Kept independent of --text/--bg so it stays legible over dark footage
     even though the page chrome itself is light. */
  --media-fg: #f5f4f0;
  --media-fg-invert: #100f0e;
  --media-border: rgba(245, 244, 240, 0.55);
  --media-bg-soft: rgba(6, 6, 7, 0.28);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Archivo";
  src: local("Archivo");
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: var(--footer-h);
}

img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 200;
  font-size: 14px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
  z-index: 100;
}

.site-header .logo-link {
  display: block;
  height: 34px;
}

.site-header .logo-link img {
  height: 34px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 1px;
  background: var(--text);
  transition: right 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  right: 0;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"]::after {
  right: 0;
  background: var(--text-muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s var(--ease), width 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle-bar:first-child { width: 22px; }
.nav-toggle-bar:last-child { width: 15px; }

.nav-toggle.is-open .nav-toggle-bar {
  width: 22px;
}

.nav-toggle.is-open .nav-toggle-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ==========================================================================
   Reel (homepage hero)
   ========================================================================== */
.reel {
  position: relative;
  width: 100%;
  height: 38vh;
  min-height: 220px;
  max-height: 520px;
  overflow: hidden;
  background: #050506;
}

.reel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.08) 40%, rgba(0,0,0,0.42) 100%);
  pointer-events: none;
}

/* ==========================================================================
   About page photo strip — mirrors the homepage reel's full-bleed shape,
   but static (a BTS/on-set photo instead of the motion reel).
   ========================================================================== */
.about-photo {
  position: relative;
  width: 100%;
  height: 38vh;
  min-height: 220px;
  max-height: 520px;
  overflow: hidden;
  background: #050506;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-cta {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px 14px 20px;
  border: 1px solid var(--media-border);
  border-radius: 999px;
  background: var(--media-bg-soft);
  backdrop-filter: blur(2px);
  color: var(--media-fg);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.reel-cta:hover,
.reel-cta:focus-visible {
  background: var(--media-fg);
  color: var(--media-fg-invert);
  border-color: var(--media-fg);
  transform: translate(-50%, -50%) scale(1.03);
}

.reel-cta:focus-visible {
  outline-color: var(--media-fg);
}

.reel-cta .play-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reel-cta .play-ring svg {
  width: 8px;
  height: 8px;
  fill: currentColor;
  margin-left: 1px;
}

/* ==========================================================================
   Project grid
   ========================================================================== */
.project-grid {
  width: 100%;
}

.project-row {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1500 / 206;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-elevated);
}

.project-row:last-child {
  border-bottom: none;
}

.project-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.45s var(--ease);
  filter: saturate(0.96);
}

.project-row .row-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay-dim);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.project-row .row-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.project-row .row-title-main {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--media-fg);
  font-size: clamp(14px, 2.4vw, 26px);
  position: relative;
}

.project-row .row-title-sub {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--media-fg);
  opacity: 0.7;
  font-size: clamp(10px, 1vw, 12px);
}

.project-row .row-title-main::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  background: var(--media-fg);
  margin: 10px auto 0;
  transition: width 0.45s var(--ease) 0.05s;
}

.project-row:hover img,
.project-row:focus-visible img {
  transform: scale(1.035);
  filter: saturate(1);
}

.project-row:hover .row-overlay,
.project-row:focus-visible .row-overlay {
  opacity: 1;
}

.project-row:hover .row-title-main::after,
.project-row:focus-visible .row-title-main::after {
  width: 48px;
}

.project-row:focus-visible {
  outline-color: var(--media-fg);
  outline-offset: -3px;
}

/* ==========================================================================
   Page header / section intro (category pages, about)
   ========================================================================== */
.page-intro {
  padding: 56px 24px 32px;
  max-width: 720px;
}

.page-intro .eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.page-intro h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: 0.01em;
  margin: 0;
}

/* ==========================================================================
   Homepage sections
   ========================================================================== */
.section-label {
  padding: 40px 24px 18px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ==========================================================================
   Project detail page
   ========================================================================== */
.project-detail {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.project-detail .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
  transition: color 0.25s var(--ease);
}

.project-detail .back-link:hover { color: var(--text); }

.project-detail .eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.project-detail h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4.5vw, 42px);
  margin: 0 0 8px;
  letter-spacing: 0.005em;
}

.project-detail .title-subtitle {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* default; overridden inline per-video via the `aspect` field */
  background: #050506;
  border: 1px solid var(--hairline);
}

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

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* contain (not cover): if the `aspect` value in data.js doesn't exactly
     match the file's true ratio, this adds harmless letterbox/pillarbox
     bars instead of cropping the frame — matching how Vimeo/YouTube
     players always behave inside an embed. */
  object-fit: contain;
  background: #050506;
}

/* Single video: full-width block with normal spacing below it. */
.video-frame {
  margin-bottom: 40px;
}

/* Multiple videos (e.g. a multi-spot campaign): side by side, sharing the
   same row instead of each getting full-width spacing. Falls back to
   stacked columns on narrow screens. */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4px;
  margin-bottom: 40px;
}

.video-grid .video-frame {
  margin-bottom: 0;
}

.project-detail .synopsis {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 640px;
  margin: 0 0 16px;
}

.project-detail .synopsis:last-of-type {
  margin-bottom: 48px;
}

.credits-table {
  border-top: 1px solid var(--hairline);
}

.credits-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.credits-row dt {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.credits-row dd {
  margin: 0;
  font-size: 15px;
}

.gallery-heading {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 56px 0 16px;
}

.selections-heading {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.selections-list {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  max-width: 640px;
}

.selections-list li {
  font-size: 15px;
  color: var(--text);
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}

.selections-list li:first-child {
  border-top: 1px solid var(--hairline);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px;
}

.gallery-item {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.3s var(--ease);
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.04);
  filter: brightness(0.88);
}

/* ==========================================================================
   About & Contact
   ========================================================================== */
.about-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
}

.about-layout .eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.about-layout h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 24px;
}

.about-bio p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 52ch;
  margin: 0 0 16px;
}

.about-bio p:last-child { margin-bottom: 0; }

.about-side h2 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.contact-list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}

.contact-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
}

.contact-list li:first-child { padding-top: 0; }

.contact-list a {
  transition: color 0.25s var(--ease);
}

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

.press-list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}

.press-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.press-list li:first-child { padding-top: 0; }

.press-list a {
  transition: color 0.25s var(--ease);
}

.press-list a:hover { color: var(--text-muted); }

.press-outlet {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.social-list a {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 2px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.social-list a:hover {
  color: var(--text-muted);
  border-color: transparent;
}

.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--hairline-strong);
  padding: 12px 20px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.resume-link:hover {
  background: var(--text);
  color: var(--bg);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-h);
  border-top: 1px solid var(--hairline);
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  background: var(--bg);
  z-index: 90;
}

.footer-copy { text-align: left; }
.footer-location { text-align: right; }

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: var(--text);
}

.footer-social svg {
  width: 17px;
  height: 17px;
  display: block;
}

.footer-social a[aria-label="IMDb"] svg {
  width: 26px;
  height: 16px;
}

.site-footer a { transition: color 0.25s var(--ease); }
.site-footer a:hover { color: var(--text); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
  .site-header { padding: 0 16px; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; padding: 40px 16px 72px; }
  .page-intro { padding: 40px 16px 24px; }
  .section-label { padding: 32px 16px 14px; }
  .project-detail { padding: 40px 16px 72px; }
  .credits-row { grid-template-columns: 120px 1fr; gap: 12px; }
  .reel { height: 42vh; }
}

@media (min-width: 681px) and (max-width: 720px) {
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 10.5px; letter-spacing: 0.08em; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }

  .site-nav.is-open {
    max-height: 280px;
  }

  .site-nav a {
    padding: 16px;
    border-top: 1px solid var(--hairline);
  }

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

  .site-footer {
    grid-template-columns: auto 1fr;
    justify-content: space-between;
    font-size: 10px;
    padding: 0 16px;
  }

  .footer-social { justify-content: flex-end; gap: 14px; }
  .footer-location { display: none; }
}

@media (max-width: 400px) {
  .site-header .logo-link,
  .site-header .logo-link img {
    height: 28px;
  }

  :root { --footer-h: 60px; }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 6px;
    padding: 8px 16px;
  }

  .footer-copy { text-align: center; }
}
