/* ============================================================
   Sivan Eyal — Portfolio
   Palette: near-black ground, bone text, single dusty-rose accent.
   Headline: Hammersmith One (bold, rounded display sans). Ships as a
   single weight (400, no italic) on Google Fonts, so every rule below
   that uses --font-head explicitly sets font-weight: 400 — requesting
   anything heavier would trigger the browser's synthetic bold instead
   of using a real face.
   Body: Archivo (neutral grotesk with more character than a system sans).
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-raised: #111110;
  --bone: #f2f0ec;
  --bone-dim: #b9b6ae;
  --bone-faint: #7a7770;
  --accent: #c1667f;        /* muted dusty rose — the single accent */
  --accent-soft: rgba(193, 102, 127, 0.35);
  --line: rgba(242, 240, 236, 0.12);

  --font-head: "Hammersmith One", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 84px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul, dl, dd { margin: 0; padding: 0; list-style: none; }

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

.is-hidden { display: none !important; }

/* The native `hidden` attribute has the same specificity as a class
   selector, so any element with its own `display` rule (grid/flex
   tab panels, etc.) would silently ignore `hidden` without this. */
[hidden] { display: none !important; }

::selection {
  background: var(--accent);
  color: var(--bone);
}

/* ---------- Fine-pointer only: hide native cursor ---------- */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
}

/* ============================================================
   Custom cursor
   ============================================================ */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-dot,
  .cursor-ring { display: block; }
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--bone);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  opacity: 0.8;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cursor-ring.is-active {
  width: 64px;
  height: 64px;
  opacity: 1;
  border-color: var(--bone);
}

/* ============================================================
   Grain overlay
   ============================================================ */
.grain {
  position: fixed;
  inset: -10%;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain-shift 8s steps(8) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2%, 2%); }
  40%  { transform: translate(2%, -1%); }
  60%  { transform: translate(-1%, -2%); }
  80%  { transform: translate(1%, 2%); }
  100% { transform: translate(0, 0); }
}

/* ============================================================
   Ambient cursor-reactive glow (cheap radial gradient, GPU-only)
   ============================================================ */
.glow-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    480px circle at var(--glow-x, 50%) var(--glow-y, 30%),
    var(--accent-soft),
    transparent 70%
  );
  opacity: 0.5;
  transition: opacity 0.6s var(--ease);
}

/* ============================================================
   Nav
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 56px);
  height: var(--nav-h);
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0));
  transition: background 0.3s var(--ease);
}

/* The gradient above fades to fully transparent at the nav's own
   bottom edge — fine at rest, but as soon as the page scrolls, the
   hero name/bio (large type, positioned right below the nav) scrolls
   up behind it and shows straight through, colliding visually with
   the nav's own wordmark/links. Swap to a fully opaque background
   the moment any scrolling happens (see initNavScrollState in
   js/main.js) so nothing can ever show through underneath it. */
.site-nav.is-scrolled {
  background: var(--bg);
}

.nav-mark {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
}

.nav-link {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bone-dim);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}

.nav-link:hover {
  color: var(--bone);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  z-index: 501;
}

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

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* On desktop .hero-bottom is absolutely positioned and ignores this;
     on mobile it's the sole in-flow child, and this bottom padding is
     what keeps it from centering too low, past the scroll cue. */
  padding: calc(var(--nav-h) + 24px) clamp(20px, 5vw, 56px) 220px;
  z-index: 2;
  overflow: hidden;
}

/* Full-bleed background video, edge to edge regardless of hero padding */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: #0a0a0a;
}

.hero-video-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, rgba(10, 10, 10, 0.82) 0%, rgba(10, 10, 10, 0.5) 45%, rgba(10, 10, 10, 0.38) 100%),
    linear-gradient(to top, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0) 30%);
}

/* Name + category nav as one bottom-anchored group, instead of the
   name being vertically centered on its own with the nav positioned
   separately - see the "Fix hero nav button sizing"/name-simplification
   request this came from. */
.hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  /* clearance below the row so it never crowds the scroll cue */
  bottom: clamp(96px, 13vh, 130px);
  z-index: 2;
  padding: 0 clamp(20px, 5vw, 56px);
}

.hero-name {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 6px 26px rgba(0, 0, 0, 0.5);
}

/* Category nav — a single organized row directly under the name,
   above the scroll cue, rather than scattered across the frame. */
.hero-orbit {
  padding: 24px 0 0;
  /* a quiet top rule + the padding above are the aesthetic gap that
     separates this from the name above it */
  border-top: 1px solid var(--line);
  pointer-events: none;
}

.orbit-list {
  display: flex;
  /* flex-start (not baseline) so every item's box starts at the same
     top edge — .orbit-index is always the first child at a fixed
     font-size, so this is what actually keeps all six numbers level
     regardless of how tall each label below them renders. */
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  row-gap: 22px;
  /* a fixed column-gap (not space-between's leftover-space split)
     guarantees the gap between every pair of items is identical,
     regardless of how wide any given label is. Tightened slightly
     from the original clamp — Hammersmith One's letterforms run wider
     than the previous headline font at the same sizes, which pushed
     the row's total width just past a single line at common desktop
     widths (e.g. 1440px) with the old values. */
  column-gap: clamp(24px, 3.7vw, 68px);
  width: 100%;
}

.orbit-item {
  position: static;
  /* magnetic-pull offset the JS drives via --mx/--my on hover proximity */
  transform: translate(var(--mx, 0px), var(--my, 0px));
  pointer-events: auto;
  will-change: transform;
}

/* One balanced size for all five labels (Performance Artist hidden -
   see index.html) - sized up slightly from the six-item version so
   the row still reads as intentional rather than sparse, while still
   fitting in a single line at common desktop widths. */
.orbit-item {
  --label-size: clamp(1.4rem, 2.3vw, 2.1rem);
}

.orbit-link {
  display: flex;
  /* it's a <button> (triggers the overlay), not a link — reset button chrome */
  background: none;
  border: none;
  padding: 10px;
  font: inherit;
  color: inherit;
}

/* The slow vertical breathing drift lives here, on its own wrapper,
   so it never fights with the hover scale/color transitions set on
   .orbit-label below (both would be animating `transform` otherwise). */
.orbit-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  will-change: transform;
  animation: float-breathe 7s ease-in-out infinite;
  animation-delay: calc(var(--float-delay, 0) * 1s);
}

.orbit-item--1 .orbit-text { --float-delay: 0; }
.orbit-item--2 .orbit-text { --float-delay: 0.6; }
.orbit-item--3 .orbit-text { --float-delay: 1.2; }
.orbit-item--4 .orbit-text { --float-delay: 1.8; }
.orbit-item--5 .orbit-text { --float-delay: 2.4; }

@keyframes float-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.orbit-index {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  transition: color 0.35s var(--ease);
}

.orbit-label {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: var(--label-size);
  line-height: 1.1;
  color: var(--bone);
  text-align: center;
  white-space: nowrap;
  /* legibility over unpredictable video brightness, without a background shape */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 6px 26px rgba(0, 0, 0, 0.5);
  transition: color 0.35s var(--ease), transform 0.35s var(--ease);
}

.orbit-link:hover .orbit-label,
.orbit-link:focus-visible .orbit-label {
  color: var(--accent);
  transform: scale(1.08);
}

.orbit-link:hover .orbit-index,
.orbit-link:focus-visible .orbit-index {
  color: var(--bone);
}

@media (prefers-reduced-motion: reduce) {
  .orbit-text { animation: none; }
}

/* Mobile: not enough width for one row of five — wrap into a centered
   multi-row block instead, still plain text like desktop (no boxed/
   bordered buttons), anchored in the lower third of the viewport
   rather than vertically centered. */
@media (max-width: 860px) {
  .hero-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5%;
    padding: 0 clamp(20px, 6vw, 32px);
  }

  .hero-name {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .hero-orbit {
    padding-top: 10px;
  }

  .orbit-list {
    justify-content: center;
    row-gap: 8px;
    column-gap: 20px;
  }

  .orbit-item {
    transform: none;
    --label-size: 1.15rem;
  }

  .orbit-text {
    gap: 4px;
  }
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  right: clamp(20px, 5vw, 56px);
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bone-faint);
}

.scroll-cue-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: cue-pulse 2.4s ease-in-out infinite;
}

@keyframes cue-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================================
   Shared section framing
   ============================================================ */
.section-frame {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

.section-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0 0 48px;
}

section {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 12vh, 140px) 0;
  border-top: 1px solid var(--line);
}

.hero { border-top: none; }

/* ============================================================
   About
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(170px, 240px) 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-photo {
  aspect-ratio: 3 / 4;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  border: 1px solid var(--line);
  overflow: hidden;
}

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

/* Fallback layout if the photo fails to load (see initAboutPhoto in
   js/main.js) - the same centered-placeholder-text look this box had
   before a real photo existed. */
.about-photo.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.about-photo span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bone-faint);
}

/* Body copy set in the site's body font (matching work-item-desc,
   etc.) rather than the headline serif — the
   italic-Bodoni treatment this used to have read as a different,
   unrelated typeface next to the rest of the site. */
.about-bio {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.75;
  color: var(--bone-dim);
  max-width: 620px;
}

/* ============================================================
   News — a fixed, compact-height horizontal strip. Items scroll
   natively (touch/trackpad both work) with the arrow buttons just
   nudging that same scroll position, and scroll-snap keeps items
   settling cleanly instead of stopping mid-thumbnail. Unlike the
   generic `section` rule, this section keeps a small, constant
   padding so the row of items is the only thing determining its
   height — that height never grows, no matter how many items exist.
   ============================================================ */
.news {
  padding: 44px 0;
}

.news .section-frame {
  margin-bottom: 20px;
}

.news-strip-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
  display: flex;
  align-items: center;
  gap: 14px;
}

.news-strip {
  display: flex;
  /* Items keep their own natural height (thumb + however many lines
     the caption needs) instead of the flex default of stretching
     every item to match the tallest one - a short caption just ends
     sooner, it doesn't leave a stretched, empty gap under it. Since
     every item renders up front (not swapped in/out as the strip
     scrolls), the row's height - and so the section's - is still
     fully determined the moment the page loads, and never changes
     from there regardless of which items happen to be in view. */
  align-items: flex-start;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 4px 2px 8px;
  /* Navigation is via the arrow buttons (swipe/trackpad scroll still
     works underneath) - the native scrollbar would be redundant. */
  scrollbar-width: none;
}

.news-strip::-webkit-scrollbar {
  display: none;
}

.news-item {
  /* Button reset - this used to be a plain <a>, now a <button> that
     opens the image lightbox instead of navigating away directly. */
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;

  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: clamp(190px, 15vw, 240px);
}

/* 4:5 - a standard Instagram post's proportions, sized proportionally
   with the rest of the site (clamp on .news-item above) rather than a
   fixed pixel width. */
.news-item-thumb {
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.3s var(--ease);
}

.news-item:hover .news-item-thumb {
  border-color: var(--accent-soft);
}

.news-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.news-item-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.news-item-thumb-placeholder {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bone-faint);
  text-align: center;
}

/* Wraps freely (2-3 lines for most captions here) instead of the old
   single-line ellipsis truncation - never cut off mid-sentence. No
   line-clamp/max-height: every item still renders up front (see
   align-items: flex-start on .news-strip), so a longer caption can't
   cause any layout shift - it just makes that one item's column
   taller within a row height that was already fixed at load time. */
.news-item-caption {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--bone-dim);
  transition: color 0.3s var(--ease);
}

.news-item:hover .news-item-caption {
  color: var(--bone);
}

.news-nav {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.6);
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.news-nav:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.news-nav.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ============================================================
   Image lightbox — a full-size, uncropped view of a real photo
   (Venus Sucks' gallery, the News strip), built lazily and reused
   from js/main.js (see ensureLightbox/openImageLightbox). Sits above
   the category overlay (z-index 900/910 below) since it can open on
   top of it, but stays below the custom cursor layer.
   ============================================================ */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 60px 24px;
  background: rgba(10, 10, 10, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.image-lightbox-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-width: 100%;
}

.image-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.6);
  color: var(--bone);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.image-lightbox-link {
  flex: 0 0 auto;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bone);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.image-lightbox-link:hover {
  color: var(--accent);
  border-color: var(--bone);
}

/* ============================================================
   Full-screen category overlay
   A fixed, always-in-DOM panel toggled purely via the "is-open"
   class from JS (see openCategoryOverlay/closeCategoryOverlay in
   js/main.js) — never an anchor jump or in-page scroll. The main
   page's scroll position is untouched while it's open (body scroll
   is just frozen), so closing returns you exactly where you were.
   ============================================================ */
.category-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.5s;
}

.category-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.overlay-close {
  position: fixed;
  top: clamp(20px, 4vw, 36px);
  right: clamp(20px, 5vw, 56px);
  z-index: 910;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  padding: 8px;
  color: var(--bone-dim);
  transition: color 0.3s var(--ease);
}

.overlay-close:hover,
.overlay-close:focus-visible {
  color: var(--bone);
}

.overlay-close-cross {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.overlay-close-cross::before,
.overlay-close-cross::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1px;
  background: currentColor;
}

.overlay-close-cross::before { transform: translate(-50%, -50%) rotate(45deg); }
.overlay-close-cross::after { transform: translate(-50%, -50%) rotate(-45deg); }

.overlay-close-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.overlay-scroll {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(90px, 12vh, 140px) 0 100px;
}

.overlay-head {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

.overlay-index {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.overlay-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  margin: 0 0 20px;
}

.overlay-desc {
  max-width: 640px;
  color: var(--bone-dim);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.overlay-subnav {
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 18px clamp(20px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
  /* Fully opaque background alone still read as a floating strip once
     it pinned to the top - this shadow gives it real depth against
     whatever's scrolling underneath, so it reads as a deliberate
     fixed header bar rather than a disconnected panel. */
  box-shadow: 0 16px 24px -12px rgba(0, 0, 0, 0.65);
}

.overlay-subnav:empty {
  display: none;
}

.overlay-subnav-pill {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bone-dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.overlay-subnav-pill:hover,
.overlay-subnav-pill:focus-visible {
  color: var(--bone);
  border-color: var(--bone-dim);
}

.overlay-subnav-pill.is-active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.overlay-body {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 56px) 0;
}

@media (max-width: 560px) {
  .overlay-close-label { display: none; }
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(24px, 3vw, 36px);
}

.work-group + .work-group {
  margin-top: clamp(48px, 6vw, 64px);
}

.work-group-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bone-faint);
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.work-item { display: flex; flex-direction: column; }

.work-item-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease);
}

.work-item-details-toggle {
  align-self: flex-start;
  margin-top: 14px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 0 0 2px;
  transition: border-color 0.3s var(--ease);
}

.work-item-details-toggle:hover,
.work-item-details-toggle.is-open {
  border-color: var(--accent);
}

.work-item-subhead {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 14px 0 6px;
}

.work-item-screenings {
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-item-screenings li {
  font-size: 0.82rem;
  color: var(--bone-dim);
  line-height: 1.6;
  position: relative;
  padding-left: 14px;
}

.work-item-screenings li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.work-item-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  margin: 16px 0 0;
}

.work-item-specs dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bone-faint);
}

.work-item-specs dd {
  font-size: 0.82rem;
  color: var(--bone-dim);
  margin: 0;
}

.work-item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 16px;
}

.work-item-link {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bone);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.work-item-link:hover {
  color: var(--accent);
  border-color: var(--bone);
}

/* ============================================================
   Inline video embeds — Vimeo / YouTube / Google Drive links play
   in place instead of navigating away. A click-to-play poster
   (media-embed-facade) is shown first so nothing autoloads/autoplays
   until the visitor asks for it, and swaps for the real <iframe>.
   ============================================================ */
.work-item-media {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 16px;
}

.work-item-media-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-item-media-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bone-faint);
}

.media-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  overflow: hidden;
}

.media-embed-facade {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.media-embed-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-embed-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding: 0 20px 18px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bone-faint);
}

.media-embed-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.6);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}

.media-embed-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 56%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--bone);
}

.media-embed-facade:hover .media-embed-play,
.media-embed-facade:focus-visible .media-embed-play {
  border-color: var(--accent);
  background: rgba(10, 10, 10, 0.8);
  transform: translate(-50%, -50%) scale(1.08);
}

.media-embed-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* A self-hosted video file (see parseEmbedUrl's "file" platform) swaps
   in a native <video> instead of an <iframe> - same click-to-play
   facade, same box. */
.media-embed-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* A plain external-link card with a real preview image (e.g. a
   screenshot of a curated website) instead of a click-to-play video
   facade - the whole card just links straight out to the site. */
.link-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-preview-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.3s var(--ease);
}

.link-preview:hover .link-preview-thumb {
  border-color: var(--accent-soft);
}

.link-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.link-preview-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-preview-thumb-placeholder {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bone-faint);
  text-align: center;
  padding: 0 20px;
}

.link-preview-label {
  align-self: flex-start;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bone);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.link-preview:hover .link-preview-label {
  color: var(--accent);
  border-color: var(--bone);
}

/* A password-protected embed still shows the video (Vimeo/YouTube's
   own password gate appears inside the iframe once played) — this
   button replaces displaying the password itself, routing the
   request through Sivan instead. */
.request-password-btn {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bone);
  border: 1px solid var(--accent);
  padding: 9px 18px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.request-password-btn:hover,
.request-password-btn:focus-visible {
  color: var(--bg);
  background: var(--accent);
}

.work-thumb {
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s var(--ease);
}

.work-item:hover .work-thumb {
  border-color: var(--accent-soft);
}

.work-thumb-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bone-faint);
  text-align: center;
  padding: 0 16px;
}

/* A real production still for password/screener-gated tiles (Field
   Trip, Orange Juice, Today I Am, Biofeedback) - shown plain, no lock
   icon or label over it. .work-thumb already has position:relative/
   overflow:hidden from the base rule above. */
.work-thumb-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.work-item-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.15rem;
  margin: 0;
}

.work-item-year {
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}

.work-item-desc {
  font-size: 0.9rem;
  color: var(--bone-dim);
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   Project panel — the full detail view for a single tab-isolated
   project (Directing, Curation, Performance Artist, Production):
   a small image gallery beside a stack of labeled sections
   (Synopsis / Technical Details / Awards & Screening History).
   ============================================================ */
.project-panel {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

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

.project-gallery-main {
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

/* A real photo (see .project-gallery-main-img) fills the frame edge
   to edge - the placeholder's centering padding only applies to the
   placeholder's own text label. */
.project-gallery-main.has-photo {
  padding: 0;
}

.project-gallery-main span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bone-faint);
}

.project-gallery-main-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.project-gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Opt-in for images that must never be cropped (e.g. a movie poster) -
   paired with a matching aspect-ratio (set inline per-project via
   options.aspect) so "contain" doesn't letterbox it. */
.project-gallery-main--contain .project-gallery-main-img {
  object-fit: contain;
}

.project-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.project-gallery-thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease);
}

.project-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-gallery-thumb:hover,
.project-gallery-thumb.is-active {
  border-color: var(--accent);
}

.project-gallery-thumb.is-video {
  position: relative;
}

.project-gallery-thumb-play {
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--bone-faint);
}

.project-gallery-thumb.is-video:hover .project-gallery-thumb-play,
.project-gallery-thumb.is-video.is-active .project-gallery-thumb-play {
  border-left-color: var(--accent);
}

.project-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.project-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0;
}

.project-year {
  font-size: 0.85rem;
  color: var(--accent);
}

.project-year.is-placeholder {
  color: var(--bone-faint);
  font-style: italic;
}

.project-section {
  margin-top: 26px;
}

.project-section:first-of-type {
  margin-top: 0;
}

.project-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 10px;
}

.project-section-body {
  font-size: 0.95rem;
  color: var(--bone-dim);
  line-height: 1.65;
  margin: 0;
}

.project-section-body.is-placeholder {
  color: var(--bone-faint);
  font-style: italic;
}

.project-info .work-item-specs,
.project-info .work-item-screenings {
  margin-top: 0;
}

.project-info .work-item-links {
  margin-top: 30px;
}

/* ============================================================
   Photography — dedicated swipe/zoom gallery viewer, used only
   inside the overlay when a category's `type` is "gallery".
   ============================================================ */
.overlay-body--gallery {
  max-width: 1100px;
}

.gallery-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Contact-sheet layout: the large stage + caption sit side by side
   (stacked on narrow screens), with the full-series thumbnail strip
   running below as one continuous horizontally-scrolling row. */
.gallery-stage-row {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  width: 100%;
}

@media (max-width: 760px) {
  .gallery-stage-row {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
}

.gallery-back {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  background: none;
  border: none;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bone-dim);
  transition: color 0.3s var(--ease);
}

.gallery-back:hover,
.gallery-back:focus-visible {
  color: var(--accent);
}

.gallery-back span {
  font-size: 1.1rem;
}

.gallery-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 3 / 2;
  touch-action: pan-y;
  transition: aspect-ratio 0.5s var(--ease);
}

@media (max-width: 640px) {
  .gallery-stage {
    aspect-ratio: 3 / 4;
  }
}

.gallery-photo {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.gallery-photo.is-zoomed {
  cursor: zoom-out;
}

/* Both the placeholder and the two crossfading photo layers below stack
   on top of one another edge to edge, then toggle opacity via
   .is-visible - that overlap is what makes the swap a real crossfade
   instead of a fade-to-blank-then-in. */
.gallery-photo-placeholder {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.5s var(--ease), border-color 0.4s var(--ease);
}

.gallery-photo-placeholder.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.gallery-photo.is-zoomed .gallery-photo-placeholder {
  transform: scale(1.3);
  border-color: var(--accent-soft);
}

.gallery-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.45s var(--ease), transform 0.5s var(--ease);
  /* Casual-download deterrent, paired with deterImageDownload in JS -
     not real protection, just removes the easy drag/select affordance. */
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.gallery-photo-img.is-visible {
  opacity: 1;
}

.gallery-photo.is-zoomed .gallery-photo-img {
  transform: scale(1.3);
}

.gallery-photo-placeholder span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bone-faint);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.6);
  color: var(--bone);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.gallery-nav:hover,
.gallery-nav:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.gallery-nav--prev { left: -10px; }
.gallery-nav--next { right: -10px; }

.gallery-caption {
  max-width: 560px;
  margin: 32px auto 0;
  text-align: center;
}

/* The contact-sheet stage's caption sits beside the large photo
   instead of centered underneath it - same fields, different frame. */
.gallery-caption--sidebar {
  flex: 0 0 280px;
  max-width: 280px;
  margin: 0;
  padding-top: 4px;
  text-align: left;
}

.gallery-caption--sidebar .gallery-caption-meta {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  .gallery-caption--sidebar {
    flex: none;
    width: 100%;
    max-width: 560px;
    text-align: center;
  }

  .gallery-caption--sidebar .gallery-caption-meta {
    justify-content: center;
  }
}

.gallery-caption-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 12px;
}

.gallery-caption-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.gallery-caption-field {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.gallery-caption-field.is-placeholder {
  color: var(--bone-faint);
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: none;
}

.gallery-caption-note {
  font-size: 0.95rem;
  color: var(--bone-dim);
  line-height: 1.6;
  margin: 0;
}

.gallery-caption-note.is-placeholder {
  color: var(--bone-faint);
  font-style: italic;
}

@media (max-width: 640px) {
  .gallery-nav--prev { left: 6px; }
  .gallery-nav--next { right: 6px; }
}

/* The film-strip row of small square frames underneath the stage -
   one per photo in the active series. Scrolls horizontally as one
   continuous strip rather than wrapping to multiple rows. */
.gallery-strip {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 28px;
  padding-bottom: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.gallery-strip::-webkit-scrollbar {
  height: 6px;
}

.gallery-strip::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.gallery-strip-thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--bone-faint);
  font-size: 0.7rem;
  opacity: 0.55;
  transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

@media (max-width: 640px) {
  .gallery-strip-thumb {
    width: 64px;
    height: 64px;
  }
}

.gallery-strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Casual-download deterrent, paired with deterImageDownload in JS -
     not real protection, just removes the easy drag/select affordance. */
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.gallery-strip-thumb:hover,
.gallery-strip-thumb:focus-visible {
  opacity: 0.85;
  border-color: var(--bone-dim);
}

/* The currently-displayed frame - a visible accent-colored border,
   using box-shadow instead of a wider border so the strip doesn't
   shift layout when the active frame changes. */
.gallery-strip-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ============================================================
   Social "reels" playlist viewer — a compact grid of small clickable
   thumbnails (Selected Social Media Content) that opens a one-at-a-
   time playlist stage. Reuses .gallery-back / .gallery-nav /
   .gallery-caption from the Photography viewer above for a
   consistent look, rather than duplicating that styling.
   ============================================================ */
.reel-panel {
  width: 100%;
}

.reel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.reel-tile {
  position: relative;
  aspect-ratio: 9 / 16;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(242, 240, 236, 0.04),
      rgba(242, 240, 236, 0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    var(--bg-raised);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.reel-tile:hover,
.reel-tile:focus-visible {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.reel-tile-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* A screenshot thumbnail (see buildScreenshotThumbnailUrl) is a
     full page capture, much taller than this 9:16 tile - anchoring to
     the top keeps the actual post content in frame instead of
     whatever happens to fall at the vertical center of the page. */
  object-position: top;
  display: block;
}

.reel-tile-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bone-faint);
  line-height: 1.4;
}

.reel-tile-play {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.65);
  border: 1px solid var(--line);
}

.reel-tile-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 58%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent var(--bone);
}

.reel-browse {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reel-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  touch-action: pan-y;
}

/* Instagram's official embed widget sizes its own iframe internally
   (Instagram, not this stylesheet, decides its height) rather than
   filling a container the way the custom media-embed iframe does, so
   forcing the usual fixed 9:16 box here would just clip or leave a
   large gap. Used instead of aspect-ratio on .reel-stage whenever the
   current reel is Instagram-sourced. */
.reel-stage--auto {
  aspect-ratio: auto;
  min-height: 200px;
}

.reel-stage-media {
  width: 100%;
  height: 100%;
}

.reel-stage--auto .reel-stage-media {
  height: auto;
}

.reel-stage-media .media-embed {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.instagram-embed-wrap {
  width: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Shown only until (or unless) Instagram's script replaces the
   blockquote with the real embed — see buildInstagramEmbed. */
.instagram-embed-fallback {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bone);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.instagram-embed-fallback:hover,
.instagram-embed-fallback:focus-visible {
  color: var(--accent);
  border-color: var(--bone);
}

.reel-caption {
  margin-top: 24px;
}

/* ============================================================
   Contact / Footer
   ============================================================ */
.contact { padding-bottom: 60px; }

.contact-frame {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.contact-email {
  font-family: var(--font-head);
  /* Explicit weight matters here (see the --font-head note at the top
     of this file): Hammersmith One only ships weight 400, so this
     must match every other var(--font-head) rule exactly rather than
     inheriting body's 300. */
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}

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

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

.contact-links a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bone-dim);
  transition: color 0.3s var(--ease);
}

.contact-links a:hover { color: var(--accent); }

.contact-foot {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--bone-faint);
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Responsive nav (mobile)
   ============================================================ */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 400;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 0 32px;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
  }

  .nav-links.is-open { transform: translateX(0); }

  .nav-links .nav-link { font-size: 1.4rem; }

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

/* ============================================================
   404 page (404.html) — a plain static page, no js/main.js. The
   nav stays in its "at rest" gradient state since there's no scroll
   tracking here, which is fine over the near-black background.
   ============================================================ */
.notfound {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 24px) clamp(20px, 5vw, 56px) 80px;
}

.notfound-kicker {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--bone);
  margin: 0;
}

.notfound-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 18px 0 20px;
}

.notfound-text {
  max-width: 440px;
  color: var(--bone-dim);
  font-size: 0.96rem;
  line-height: 1.7;
  margin: 0 0 36px;
}

.notfound-link {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bone);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.notfound-link:hover,
.notfound-link:focus-visible {
  color: var(--accent);
  border-color: var(--bone);
}

/* ============================================================
   Legal pages (privacy.html, and any future page like an
   impressum) — plain static pages, no js/main.js, reusing this
   stylesheet directly for a consistent look. Simple single-column
   layout, deliberately less decorative than the rest of the site
   since this is informational/legal content meant to be read.
   ============================================================ */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 56px) clamp(20px, 5vw, 56px) 100px;
}

.legal-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
}

.legal-updated {
  font-size: 0.78rem;
  color: var(--bone-faint);
  margin: 0 0 48px;
}

.legal-section + .legal-section {
  margin-top: 40px;
}

.legal-heading {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0 0 14px;
}

.legal-text {
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--bone-dim);
  margin: 0 0 14px;
}

.legal-text:last-child { margin-bottom: 0; }

.legal-text a {
  color: var(--bone);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.legal-text a:hover,
.legal-text a:focus-visible {
  color: var(--accent);
  border-color: var(--bone);
}

.legal-list {
  margin: 0 0 14px;
  padding-left: 4px;
  color: var(--bone-dim);
  font-size: 0.96rem;
  line-height: 1.75;
}

.legal-list li {
  position: relative;
  margin-bottom: 4px;
  padding-left: 16px;
}

.legal-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.legal-list a {
  color: var(--bone);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.legal-list a:hover,
.legal-list a:focus-visible {
  color: var(--accent);
  border-color: var(--bone);
}

.legal-back {
  display: inline-block;
  margin-top: 56px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bone);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.legal-back:hover,
.legal-back:focus-visible {
  color: var(--accent);
  border-color: var(--bone);
}

/* Small "Privacy Policy" link alongside the footer's copyright line. */
.contact-legal {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--bone-faint);
}

.contact-legal a {
  color: var(--bone-faint);
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.contact-legal a:hover,
.contact-legal a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}
