:root,
[data-theme="light"] {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b6b66;
  --muted-soft: #8a857c;
  --card: #ececec;
  --line: rgba(17, 17, 17, 0.10);
  --line-strong: rgba(17, 17, 17, 0.20);
  --hover-tint: rgba(17, 17, 17, 0.06);
  --hover-border: rgba(17, 17, 17, 0.40);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0e0e0e;
    --ink: #f1f1f1;
    --muted: #9a9a9a;
    --muted-soft: #6f6f6f;
    --card: #1d1d1d;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.25);
    --hover-tint: rgba(255, 255, 255, 0.08);
    --hover-border: rgba(255, 255, 255, 0.40);
  }
}

[data-theme="dark"] {
  --bg: #0e0e0e;
  --ink: #f1f1f1;
  --muted: #9a9a9a;
  --muted-soft: #6f6f6f;
  --card: #1d1d1d;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.25);
  --hover-tint: rgba(255, 255, 255, 0.08);
  --hover-border: rgba(255, 255, 255, 0.40);
}

:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);  /* easeOutQuint — entrances */
  --ease-snap: cubic-bezier(0.4, 0, 0.2, 1); /* fast-start — hovers */

  /* 8px spacing scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 56px;
  --space-7: 80px;
  --space-8: 120px;

  --card-base-w: 36vw;
  /* Derived from --card-base-w via the 16:9 card aspect ratio so every
     placement that references this (heading, meta, nav arrows) tracks
     the card's actual rendered height. */
  --card-base-h: calc(var(--card-base-w) * 9 / 16);
}

/* Smooth color transitions when switching theme */
html, body, .nav, .stage__nav, .film-card, .more-projects .film-card,
.gallery__hero, .gallery__item, .card__image, .film-card__image,
.page-footer, .stage__bottom {
  transition: background-color 0.25s var(--ease-snap),
              color 0.25s var(--ease-snap),
              border-color 0.25s var(--ease-snap);
}

/* ---------- Focus styles (keyboard) ---------- */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

.nav :focus-visible,
.nav__links a:focus-visible {
  outline-color: currentColor;
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  opacity: 0.85;
  transition:
    opacity 0.18s var(--ease-snap),
    background-color 0.18s var(--ease-snap),
    border-color 0.18s var(--ease-snap);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  opacity: 1;
  background-color: var(--hover-tint);
  border-color: var(--hover-border);
}

.theme-toggle__icon {
  width: 14px;
  height: 14px;
  display: block;
}

/* Show sun in dark mode (so user can switch to light), moon in light mode */
.theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon--moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__icon--sun { display: block; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  outline: none;
}

/* (Cross-document View Transitions removed — they overlapped with the
   per-page intro timelines, causing the animations to play partway through
   before the new page was fully visible. The intro animations themselves
   provide enough page-to-page continuity.) */

/* ---------- Scroll reveals ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-children] > * {
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}

/* Animation (not transition) so the per-child stagger only delays the
   reveal — leaving hover/state transitions on the card unaffected. */
[data-reveal-children].is-revealed > * {
  animation: reveal-children-clip 0.85s var(--ease) forwards;
}

[data-reveal-children].is-revealed > *:nth-child(1) { animation-delay: 0ms; }
[data-reveal-children].is-revealed > *:nth-child(2) { animation-delay: 80ms; }
[data-reveal-children].is-revealed > *:nth-child(3) { animation-delay: 160ms; }
[data-reveal-children].is-revealed > *:nth-child(4) { animation-delay: 240ms; }
[data-reveal-children].is-revealed > *:nth-child(5) { animation-delay: 320ms; }

@keyframes reveal-children-clip {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Project / About page intro orchestration ----------
   One direction system, one easing curve (easeOutQuint = --ease):
     0.00s  hero image clip-reveals top → bottom
     0.85s  title slides up from below the hero
     1.05s  subtitle slides up from below
     1.55s  meta items stagger in (bottom → top, 100ms apart)
     2.05s  description slides up
   Below-the-fold sections (gallery, more-projects) stay scroll-triggered. */
/* The whole hero (image + caption) is revealed by a single top-to-bottom
   clip-path on the parent. The title/subtitle "appear" as the descending
   clip uncovers their position — no separate slide-up animation. */
.page--project .project-hero,
.page--project .about-hero {
  clip-path: inset(0 0 100% 0);
  animation: hero-image-clip 1.2s var(--ease) forwards;
  will-change: clip-path;
}

.page--project .meta-item,
.page--project .project-description,
.page--project .about-description,
.page--project .about-contact {
  opacity: 0;
  transform: translateY(24px);
  animation: section-rise 0.95s var(--ease) forwards;
}

.page--project .meta-item:nth-child(1) { animation-delay: 0.75s; }
.page--project .meta-item:nth-child(2) { animation-delay: 0.85s; }
.page--project .meta-item:nth-child(3) { animation-delay: 0.95s; }
.page--project .meta-item:nth-child(4) { animation-delay: 1.05s; }

.page--project .project-description,
.page--project .about-description,
.page--project .about-contact {
  animation-delay: 1.25s;
}

@keyframes hero-image-clip {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes section-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Home carousel intro ---------- */
/* The cards reveal in two stages, like an editorial curtain:
   1. The card itself opens vertically from a thin strip to a full rectangle
      (clip-path doesn't fight the JS-driven transform on .card).
   2. The image inside fades up inside the now-open dark frame.
   Both stagger across the cards in their visual left-to-right order at load. */
.card {
  background: var(--ink);
  border-radius: 2px;
  clip-path: inset(48% 0 48% 0);
  animation: home-card-frame 0.65s var(--ease) forwards;
  transition: filter 0.25s var(--ease-snap);
  /* Hint the compositor: pre-allocate a GPU layer so the clip-path reveal
     animation runs without main-thread paint contention. The transform
     channel is already used by the carousel JS, so list it too. */
  will-change: clip-path, transform;
}

/* Hover-isolate: hovering any card lays a tinted overlay over the others
   so the focus is clear. Overlay uses var(--bg) so it tints toward white
   in light mode and toward the dark page background in dark mode —
   keeping the cards opaque rather than letting siblings show through. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-snap);
}

.carousel:hover .card:not(:hover)::after {
  opacity: 0.6;
}

/* Also desaturate the non-hovered card images so the focused card pops
   in full colour against grey siblings. */
.carousel:hover .card:not(:hover) {
  filter: grayscale(1);
}

.card__image {
  opacity: 0;
  animation: home-card-image 0.4s var(--ease) forwards;
  will-change: opacity;
}

/* Center-outward order at current=0:
   1 = center (0)
   2 = adjacents (1 + 4) — fire together
   3 = edges (2 + 3) — fire together */
.card[data-index="0"] { animation-delay: 0.05s; }
.card[data-index="1"],
.card[data-index="4"] { animation-delay: 0.20s; }
.card[data-index="2"],
.card[data-index="3"] { animation-delay: 0.35s; }

/* Image fades in once each card's frame is mostly open (~0.55s after its frame) */
.card[data-index="0"] .card__image { animation-delay: 0.60s; }
.card[data-index="1"] .card__image,
.card[data-index="4"] .card__image { animation-delay: 0.75s; }
.card[data-index="2"] .card__image,
.card[data-index="3"] .card__image { animation-delay: 0.90s; }

@keyframes home-card-frame {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes home-card-image {
  to { opacity: 1; }
}

/* Text reveals after the last image has finished settling */
.stage__heading,
.stage__meta,
.stage__bottom {
  opacity: 0;
  animation: home-fade-in 0.5s var(--ease) forwards;
}

.stage__heading { animation-delay: 1.30s; }
.stage__meta { animation-delay: 1.38s; }
.stage__bottom { animation-delay: 1.46s; }

@keyframes home-fade-in {
  to { opacity: 1; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-children] > * {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .page--project .project-hero,
  .page--project .about-hero,
  .card,
  .card__image,
  .stage__heading,
  .stage__meta,
  .stage__bottom {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    animation: none !important;
  }
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

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

/* ---------- Nav ---------- */
/* mix-blend-mode: difference + grayscale keeps the SASHA logo (and the rest of
   the nav) readable on every page — light cream backgrounds, dark project
   heroes, photographs — without ever taking on color from what's behind it. */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Match the rest of the page: max 1240 centered with the same clamp
     horizontal padding the content sections use. */
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px clamp(24px, 4vw, 56px);
  box-sizing: border-box;
  z-index: 50;
  mix-blend-mode: difference;
  filter: grayscale(1);
  color: #fff;
  transform: translateY(0);
  transition: transform 0.32s var(--ease-snap);
  will-change: transform;
}

/* Hidden when scrolling down past the top; revealed on scroll-up. */
.nav.is-hidden {
  transform: translateY(-100%);
}

.nav__logo {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: #fff;
}

.nav__links {
  display: flex;
  gap: 36px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.nav__links a {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.18s var(--ease-snap);
}

.nav__links a.is-active,
.nav__links a:hover {
  color: #fff;
}

/* ---------- Hamburger toggle (mobile only) ---------- */
.nav__menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
  color: inherit;
}

.nav__menu-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease-snap);
  transform-origin: center;
}

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

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

@media (max-width: 480px) {
  .nav__links { display: none; }
  .nav__menu-toggle { display: flex; }
}

/* ---------- Menu overlay (fullscreen) ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 80px 24px 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s var(--ease-snap),
    visibility 0.3s var(--ease-snap);
}

.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.menu-overlay__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.menu-overlay__close svg {
  width: 18px;
  height: 18px;
}

.menu-overlay__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
  padding: 0 12px;
}

.menu-overlay__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

.menu-overlay__list li {
  border-top: 1px solid var(--line);
}

.menu-overlay__list li:last-child {
  border-bottom: 1px solid var(--line);
}

.menu-overlay__list a {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 12px;
  transition: background-color 0.18s var(--ease-snap);
}

.menu-overlay__list a:hover,
.menu-overlay__list a:active {
  background-color: var(--hover-tint);
}

.menu-overlay__list a.is-active::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  align-self: center;
}

/* Lock background scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* ---------- Stage ---------- */
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  cursor: grab;
  /* Allow native vertical scroll while we capture horizontal drags ourselves. */
  touch-action: pan-y;
}


.stage.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.stage__heading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-1 * var(--card-base-h) / 2 - 36px));
  width: var(--card-base-w);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  z-index: 5;
}

.stage__meta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(var(--card-base-h) / 2 + 18px));
  text-align: left;
  width: var(--card-base-w);
  z-index: 5;
}

/* ---------- Roller (vertical text slider) ---------- */
.roller {
  position: relative;
  height: 1.4em;
  overflow: hidden;
  display: block;
}

.roller__slot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1.4em;
  display: flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

.stage__heading .roller {
  width: 100%;
  text-align: left;
}

.stage__heading .roller__slot {
  justify-content: flex-start;
}

.roller--meta {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.roller--meta-sub {
  font-size: 15px;
  color: var(--muted);
  font-weight: 400;
}

.roller--counter {
  display: inline-block;
  width: 1.6em;
  vertical-align: middle;
}

/* ---------- Carousel ---------- */
.carousel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}

.card {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--card-base-w);
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  will-change: transform;
  cursor: pointer;
}

.card__image {
  width: 100%;
  height: 100%;
  background: var(--card);
  border-radius: 2px;
  object-fit: cover;
  display: block;
  transition: filter 0.2s var(--ease-snap);
}

.card:hover .card__image {
  filter: brightness(0.96);
}

/* ---------- Carousel arrows ----------
   Vertically aligned with the role/type meta line that sits below the
   active card, anchored to the right edge, side-by-side. */
.stage__nav {
  /* Buttons sit 1.5rem below the card's bottom edge, aligned to the
     card's right edge so they trail the role/type text. */
  --nav-y: calc(var(--card-base-h) / 2 + 1.5rem);
  position: absolute;
  top: 50%;
  bottom: auto;
  transform: translateY(var(--nav-y));
  z-index: 120;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0.85;
  transition:
    opacity 0.18s var(--ease-snap),
    background-color 0.18s var(--ease-snap),
    border-color 0.18s var(--ease-snap);
}

.stage__nav-icon {
  width: 16px;
  height: 16px;
  display: block;
  /* Slight shape-rendering tweak so 1.4px strokes stay crisp at small sizes */
  shape-rendering: geometricPrecision;
  transition: transform 0.25s var(--ease-snap);
}

.stage__nav:hover,
.stage__nav:focus-visible {
  opacity: 1;
  background-color: var(--hover-tint);
  border-color: var(--hover-border);
}

/* Subtle icon nudge inside the button on hover (instead of moving the button) */
.stage__nav--prev:hover .stage__nav-icon { transform: translateX(-2px); }
.stage__nav--next:hover .stage__nav-icon { transform: translateX(2px); }

/* The next arrow's right edge aligns exactly with the focused card's
   right edge; prev arrow sits 50px to its left. */
.stage__nav--next { right: calc((100vw - var(--card-base-w)) / 2); }
.stage__nav--prev { right: calc((100vw - var(--card-base-w)) / 2 + 50px); }

@media (max-width: 600px) {
  .stage__nav { width: 38px; height: 38px; }
  .stage__nav-icon { width: 14px; height: 14px; }
}

/* ---------- Bottom row ---------- */
.stage__bottom {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 56px);
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  z-index: 5;
}

.counter {
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.counter__total {
  color: var(--ink);
}

.stage__bottom__right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.socials {
  display: flex;
  gap: 32px;
}

.socials a {
  color: var(--ink);
  transition: opacity 0.18s var(--ease-snap);
}

.socials a:hover {
  opacity: 0.55;
}

/* ---------- Scroll spacer drives the horizontal scrub ---------- */
.scroll-spacer {
  /* Tall buffer; JS silently resets scroll to the middle for an infinite loop */
  height: 1100vh;
}

/* ---------- Static pages (Film, Design, About) ---------- */
.page--static {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page--static .film {
  flex: 1;
}

.film {
  height: 100vh;
  max-width: 1240px;
  margin: 0 auto;
  padding: 120px clamp(24px, 4vw, 56px) 100px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.film__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  align-items: start;
}

.film-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
  transition: filter 0.25s var(--ease-snap);
}

.film-card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--card);
  object-fit: cover;
  object-position: center top;
  display: block;
  transition:
    filter 0.35s var(--ease-snap),
    transform 0.35s var(--ease-snap);
}

/* Title/tag fill the card and are centred both axes; stacked vertically.
   Hidden by default — revealed on hover (or via .is-highlighted on mobile). */
.film-card__info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  color: #fff;
  text-align: center;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease-snap);
}

/* On hover, the image picks up a soft blur + slight darken and the
   centred title fades in; siblings dim back to focus the hovered card. */
@media (hover: hover) {
  .film__row:has(.film-card:hover) .film-card:not(:hover) {
    filter: opacity(0.5) grayscale(1);
  }
  .film-card:hover .film-card__image {
    filter: blur(6px) brightness(0.78);
    /* Slight zoom so the blurred soft edges extend beyond the card and
       get clipped by the overflow:hidden parent — no white halo. */
    transform: scale(1.06);
  }
  .film-card:hover .film-card__info {
    opacity: 1;
  }
}

/* Mobile mirror: the scroll-driven .is-highlighted card reveals its info. */
@media (max-width: 600px) {
  .film-card.is-highlighted .film-card__info {
    opacity: 1;
  }
  .film-card.is-highlighted .film-card__image {
    filter: blur(6px) brightness(0.78);
    transform: scale(1.06);
  }
}

.film-card__title {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: inherit;
}

.film-card__tag {
  font-size: 13px;
  color: inherit;
  opacity: 0.75;
  font-weight: 400;
}

/* In the .more-projects list (typographic, no image background) the cards
   inherit the page foreground colors, not the white overlay ones. */
.more-projects .film-card__title { color: var(--ink); }
.more-projects .film-card__tag { color: var(--muted); opacity: 1; }

.static-bottom {
  position: fixed;
  bottom: 36px;
  right: 56px;
  z-index: 5;
}

/* ---------- Page footer (shared) ---------- */
/* Outer footer is full-width and carries the hairline; inner row is
   constrained to the same content max-width as the rest of the site. */
.page-footer {
  width: 100%;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.page-footer__inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px clamp(24px, 4vw, 56px) 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  box-sizing: border-box;
}

.page-footer__copy {
  color: var(--muted);
  font-size: 13px;
}

.page-footer__copy a {
  color: inherit;
  border-bottom: 1px solid currentColor;
  transition: color 0.18s var(--ease-snap);
}

.page-footer__copy a:hover {
  color: var(--ink);
}

.page-footer__right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.page-footer__socials {
  display: flex;
  gap: 28px;
}

.page-footer__socials a {
  color: var(--ink);
  transition: opacity 0.18s var(--ease-snap);
}

.page-footer__socials a:hover {
  opacity: 0.55;
}

@media (max-width: 600px) {
  .page-footer__inner {
    padding: 20px 24px 24px;
    flex-direction: column-reverse; /* right-group first, then copyright */
    align-items: stretch;
    gap: 16px;
  }
  .page-footer__right {
    justify-content: space-between;
    gap: 16px;
  }
  .page-footer__socials {
    gap: 20px;
  }
}

/* ---------- More projects section ---------- */
.more-projects {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding:
    clamp(16px, 2vw, 28px)
    clamp(24px, 4vw, 56px)
    clamp(16px, 2vw, 24px);
  box-sizing: border-box;
}

.more-projects__label {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-transform: none;
  margin-bottom: 28px;
  color: var(--ink);
}

/* More-projects always renders as a typographic list — no images, just
   project title + tag rows separated by hairlines. This is the same
   pattern previously used only on mobile, now applied at all sizes. */
.more-projects__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.more-projects .film-card {
  display: flex;
  padding: 22px 12px;
  margin: 0 -12px;
  border-top: 1px solid var(--line);
  background-color: transparent;
  transition:
    background-color 0.18s var(--ease-snap),
    padding 0.18s var(--ease-snap);
}

.more-projects .film-card:last-child {
  border-bottom: 1px solid var(--line);
}

.more-projects .film-card:hover,
.more-projects .film-card:active {
  background-color: var(--hover-tint);
}

.more-projects .film-card__image {
  display: none;
}

.more-projects .film-card__info {
  /* Reset the archive card's absolute / column / centred layout back to
     a normal in-flow row so title is left, tag is right. */
  position: static;
  inset: auto;
  width: 100%;
  color: inherit;
  text-align: left;
  opacity: 1;
  transform: none;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.more-projects .film-card__title {
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.more-projects .film-card__tag {
  font-size: 0.875rem; /* 14px */
  color: var(--muted);
}

@media (max-width: 600px) {
  .more-projects {
    padding: 40px 24px 12px;
  }
}

/* ---------- Project / About detail page ---------- */
.page--project {
  overflow-x: hidden;
}

.project,
.about {
  padding-top: 96px; /* clear the fixed nav */
}

.project-hero,
.about-hero {
  position: relative;
  width: 100%;
  /* Scales with viewport width (cinematic strip), clamped so it never
     gets oversized or unreadably small. */
  height: 25vw;
  max-height: 20rem;
  min-height: 9rem;
  overflow: hidden;
}

.project-hero__media,
.about-hero__media {
  width: 100%;
  height: 100%;
  background: #2a2a2a;
  object-fit: cover;
  display: block;
}

/* Caption overlays the hero image (bottom-left). */
.project-hero__caption,
.about-hero__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(20px, 2.5vw, 32px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 56px);
  color: #fff;
  z-index: 2;
}

.project-hero__sub,
.about-hero__sub {
  font-size: 0.875rem; /* 14px */
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.75);
  text-transform: none;
  margin: 0 0 4px;
}

@media (max-width: 600px) {
  .project-hero__sub,
  .about-hero__sub {
    font-size: 0.75rem; /* 12px */
  }
}

.project-hero__title,
.about-hero__title {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  text-transform: none;
  margin: 0;
}

.project-meta,
.about-meta {
  display: grid;
  /* Each column sizes to its widest value/label — the whole row only
     takes the space the content actually needs. */
  grid-template-columns: repeat(4, max-content);
  gap: clamp(20px, 3vw, 32px);
  padding:
    clamp(27px, 3.7vw, 53px)
    clamp(24px, 4vw, 56px)
    clamp(32px, 4vw, 56px);
  /* Shrink the box to its grid-track width so it doesn't reserve the
     full row. Align left, with the same wide-screen shift as before so
     the left edge matches the centred 1240-max content above. */
  width: max-content;
  max-width: 100%;
  margin-left: max(0px, calc((100vw - 1240px) / 2));
  margin-right: auto;
  box-sizing: border-box;
}

/* Shared section-label style — used by meta items, description headings,
   and the contact block on the about page. One styling, one source of truth. */
.meta-item__label,
.project-description__label,
.about-description__label,
.about-contact__label {
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Per-context bottom-margin overrides (spacing is contextual, not styling) */
.meta-item__label { margin-bottom: 6px; }
.project-description__label,
.about-description__label { margin-bottom: 14px; }

.meta-item__value {
  font-size: 1rem;
  color: var(--ink);
}

.project-description,
.about-description {
  padding: 0 clamp(24px, 4vw, 56px) clamp(48px, 6vw, 80px);
  max-width: 1240px;
  margin: 0 auto;
}

.project-description__text {
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
  color: var(--ink);
  max-width: 80ch;
}

.about-description__text {
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
  color: var(--ink);
}

@media (max-width: 600px) {
  .project-description__text,
  .about-description__text {
    font-size: 1rem; /* 16px */
  }
}

.project-gallery,
.about-gallery {
  padding: 0 clamp(24px, 4vw, 56px) clamp(60px, 7vw, 100px);
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

/* ---------- Project videos (Vimeo embeds) ---------- */
.project-videos {
  padding: 0 clamp(24px, 4vw, 56px) clamp(48px, 6vw, 80px);
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

.project-videos__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--card);
  border-radius: 2px;
  overflow: hidden;
}

/* 9:16 vertical story format */
.project-videos__embed--vertical {
  aspect-ratio: 9 / 16;
}

.project-videos__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Lite-vimeo: a click-to-load placeholder so the heavy Vimeo player
   script only loads when the user actually wants to watch. */
.video-lite {
  cursor: pointer;
}

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

.video-lite__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background-color 0.2s var(--ease-snap),
    transform 0.2s var(--ease-snap);
}

.video-lite__play svg {
  width: 26px;
  height: 26px;
  margin-left: 3px; /* nudge the play icon optically into centre */
}

.video-lite:hover .video-lite__play,
.video-lite__play:focus-visible {
  background: rgba(0, 0, 0, 0.85);
  transform: translate(-50%, -50%) scale(1.06);
}

/* Two 9:16 stories side by side in a row */
.project-videos__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 32px);
}

@media (max-width: 600px) {
  .project-videos__pair {
    grid-template-columns: 1fr;
  }
}

/* ---------- 404 error page ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(80px, 8vw, 120px) clamp(24px, 4vw, 56px);
}

.error-page__label {
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 14px;
}

.error-page__title {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--ink);
}

.error-page__text {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: 50ch;
  margin: 0 0 32px;
}

.error-page__link {
  display: inline-block;
  font-size: 1rem;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.18s var(--ease-snap);
}

.error-page__link:hover {
  opacity: 0.6;
}

/* ---------- About: Get-in-touch contact block ---------- */
.about-contact {
  padding: 0 clamp(24px, 4vw, 56px) clamp(80px, 8vw, 120px);
  max-width: 1240px;
  margin: 0 auto;
}

.about-contact__label { margin-bottom: 18px; }

.about-contact__email {
  display: inline-block;
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  transition: opacity 0.18s var(--ease-snap);
}

.about-contact__email:hover {
  opacity: 0.6;
}

.about-contact__socials {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  font-size: 14px;
}

.about-contact__socials a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.18s var(--ease-snap), opacity 0.18s var(--ease-snap);
}

.about-contact__socials a:hover {
  border-color: currentColor;
  opacity: 0.7;
}

.gallery__hero {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--card);
  border-radius: 2px;
  object-fit: cover;
  display: block;
}

/* Gallery is a clean 2×2 grid so items flow horizontally:
   item 1 → item 2 (top row), item 3 → item 4 (bottom row).
   One consistent aspect ratio means rows align cleanly without masonry quirks. */
.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.gallery__item {
  width: 100%;
  height: auto;
  background: var(--card);
  border-radius: 2px;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* Variant: items at 16:9 instead of 4:3 */
.gallery__grid--16-9 .gallery__item {
  aspect-ratio: 16 / 9;
}

/* Variant: Fashionswap layout — 2 columns, 3 rows.
     Row 1: two posters (3:4)
     Row 2: two portraits (3:4)
     Row 3: solo portrait, spans both columns, centred and featured. */
.gallery__grid--fashionswap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 24px);
}

.gallery__grid--fashionswap > .gallery__item {
  aspect-ratio: 3 / 4;
}

/* "Solo and shining" — the 5th item spans both columns, framed wider so
   it reads as a featured spread rather than another portrait card. */
.gallery__grid--fashionswap > .gallery__item:nth-child(5) {
  aspect-ratio: 3 / 4;
  object-position: center;
}

@media (max-width: 600px) {
  .gallery__grid--fashionswap {
    grid-template-columns: 1fr;
  }
  .gallery__grid--fashionswap > .gallery__item:nth-child(5) {
    grid-column: auto;
    aspect-ratio: 3 / 4;
  }
}

/* iPad: film grid becomes 2-up; metadata stays 4-up at this size. */
@media (max-width: 1024px) {
  .film {
    height: auto;
    min-height: 100vh;
  }
  .film__row {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* Small mobile: hero scales down, metadata collapses to 2x2,
   gallery stacks vertically. */
@media (max-width: 600px) {
  .project-hero__caption,
  .about-hero__caption {
    padding: 0 24px;
    bottom: 18px;
  }
  .project-meta,
  .about-meta {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .film {
    padding: 100px 24px 80px;
  }
  .film__row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Very small phones: metadata collapses to a single column */
@media (max-width: 320px) {
  .project-meta,
  .about-meta {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  :root {
    --card-base-w: 62vw;
    /* --card-base-h auto-derives from --card-base-w via 16:9 */
  }
  .nav { padding: 20px clamp(24px, 4vw, 56px); }
  .nav__links { gap: 18px; font-size: 13px; }
  .stage__bottom { bottom: 28px; font-size: 14px; }
  .socials { gap: 18px; }
  .stage__heading {
    transform: translate(-50%, calc(-1 * var(--card-base-h) / 2 - 26px));
  }
  .stage__heading .roller { width: 100%; }
  .stage__meta {
    transform: translate(-50%, calc(var(--card-base-h) / 2 + 14px));
  }
}
