/* =====================================================================
   AUSTIN CHERNICH — PORTFOLIO (v3)
   Front-end stylesheet. All design lives here.
   ===================================================================== */

:root {
  --bg: #faf9f6;
  --fg: #111;
  --fg-dim: #888;
  --rule: rgba(0,0,0,0.08);
  --crosshair: #2a5fff;
  --accent: #c45a29;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
}

/* ---------- TEXT SELECTION ----------
   Override the browser-default blue highlight with our crosshair accent
   color, so highlighting any text on the site signals craft and matches
   the brand. */
::selection      { background: var(--crosshair); color: #fff; }
::-moz-selection { background: var(--crosshair); color: #fff; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
input, textarea { cursor: text; }
button, a { cursor: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- CROSSHAIR CURSOR ---------- */
.crosshair {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0; transition: opacity 0.25s ease;
}
.crosshair.is-visible { opacity: 1; }
.crosshair__v, .crosshair__h {
  position: fixed; background: var(--crosshair); will-change: transform;
}
.crosshair__v { top: 0; bottom: 0; left: 0; width: 1px; transform: translateX(-100px); }
.crosshair__h { left: 0; right: 0; top: 0; height: 1px; transform: translateY(-100px); }
@media (pointer: coarse) {
  body { cursor: auto; }
  input, textarea, button, a { cursor: auto; }
  .crosshair { display: none; }
}

/* ---------- TOP BAR + LOGO ----------
   Logo is position:absolute inside the topbar so growing its height
   during the splash animation doesn't push layout. */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 88px;
  background: transparent;
  pointer-events: none;
}
.topbar__logo {
  position: absolute;
  top: 24px;
  right: 32px;
  pointer-events: auto;
  display: block;
  transform-origin: top right;
  /* JS sets transform: translate() scale() on every paint frame near the
     splash. will-change tells the browser to keep this on its own GPU
     compositing layer so the transform animation skips the main thread. */
  will-change: transform;
  /* Default rest state in case JS hasn't run yet (avoids flash of huge
     logo on first paint). Overwritten the instant the JS init runs. */
  transform: scale(0.143);
}
.topbar__logo img {
  height: var(--ac-logo-peak, 280px);
  width: auto;
  display: block;
}
.splash__hint { transition: opacity 0.3s ease; }

/* ---------- HAMBURGER ---------- */
.hamburger {
  position: fixed; top: 4px; left: 16px; z-index: 60;
  background: transparent; border: none;
  padding: 16px; width: 80px; height: 80px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.hamburger:hover { transform: scale(1.10); }
.hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--fg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.is-open span:first-child { transform: translateY(12px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:last-child { transform: translateY(-12px) rotate(-45deg); }

/* ---------- DRAWER ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.15);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: clamp(280px, 33vw, 480px);
  background: #ffffff;
  z-index: 200;
  padding: 120px 48px 48px;
  transform: translateX(-100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__nav { display: flex; flex-direction: column; gap: 18px; }
/* Drawer nav — pulled into the same serif-italic voice as the "Vol I / Vol II"
   mastheads so the whole book reads as one publication. Cormorant Garamond
   italic at a larger scale, with the small kicker label kept in sans caps
   for editorial contrast. */
.drawer__link {
  font-family: var(--serif);
  font-style: italic;
  font-size: 46px; font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.05;
  color: var(--fg);
  transition: color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; justify-content: space-between; align-items: baseline;
  transform-origin: left center;
}
.drawer__link:hover { color: var(--accent); transform: scale(1.04); }
.drawer__link.is-active { color: var(--accent); }
.drawer__link span {
  font-family: var(--sans);
  font-style: normal;
  font-size: 10px; font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.drawer__social {
  margin-top: auto;
  padding-top: 32px;
  display: flex; align-items: center; gap: 20px;
}
.drawer__icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-dim);
  transition: color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer__icon svg { width: 22px; height: 22px; display: block; }
.drawer__icon:hover { color: var(--fg); transform: scale(1.18); }

/* ---------- SPLASH ---------- */
.splash {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin-bottom: 120px;
}
.splash__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.splash__hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
  animation: splashHint 2.4s ease-in-out infinite;
}
@keyframes splashHint {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.85; }
  50%      { transform: translate(-50%, 6px); opacity: 1; }
}

/* ---------- BOOK INTRO (Book I + Book II) ----------
   Replaces the empty negative-space intro. Left: big italic serif Vol. label.
   Right: dense contact-sheet grid of every photo in this book. Each thumb is
   a link to its spread below; hover triggers a film negative + hand-drawn
   sharpie square overlay. */
.book-intro {
  padding: 110px 60px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;          /* centered after v3.12 — was flex-start */
  text-align: center;
  gap: 24px;
}
.book-intro__masthead {
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
}
.book-intro__vol {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;             /* bolder editorial display in v3.12 */
  font-size: clamp(72px, 11vw, 220px);
  line-height: 0.95;
  letter-spacing: -2px;
  color: var(--fg);
}
.book-intro__subtitle {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
}
.book-intro__meta {
  margin-top: 40px;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--fg-dim);
  line-height: 2;
}

/* Contact sheet — vertical stack of film strips. */
.book-intro__contact-sheet {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #000;
  padding: 4px 0;
}

/* Each .film-strip is one row of frames with sprocket-hole rails above and
   below. The strip background tone is the warm dark sepia of real film leader;
   the rails are SVG-tiled sprocket holes. */
.film-strip {
  position: relative;
  background-color: #1a140e;
  padding: 22px 6px 28px;        /* top: rail + small gap; bottom: rail + label area */
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}
.film-strip::before,
.film-strip::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 60 14' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='60' height='14' fill='%231a140e'/%3E%3Crect x='5' y='3' width='10' height='8' rx='1.5' fill='%23000'/%3E%3Crect x='25' y='3' width='10' height='8' rx='1.5' fill='%23000'/%3E%3Crect x='45' y='3' width='10' height='8' rx='1.5' fill='%23000'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 60px 100%;
  pointer-events: none;
}
.film-strip::before { top: 0; }
.film-strip::after  { bottom: 0; }

/* Each frame: real 3:2 landscape ratio, B&W high contrast, overflow visible
   so the messy pen marks can extend past the frame edges. */
.contact-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: visible;            /* allows the pen mark to overshoot edges */
  cursor: none;
  background: #000;
}
.contact-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.4s ease;
  filter: grayscale(1) contrast(1.08) brightness(1.02);
}

/* Portrait-orientation photos appear sideways in the landscape film frame —
   exactly how a portrait shot looks on a real 35mm contact sheet because the
   photographer turned the camera. JS adds .is-portrait after image load when
   naturalHeight > naturalWidth.
   The math: a 3:2 landscape frame becomes a 2:3 portrait box rotated 90°.
   Center-translate + rotate makes the rotated visual fill the parent exactly. */
.contact-thumb img.is-portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% * 2 / 3);   /* image CSS width = parent height (for 3:2 parent) */
  height: 150%;                /* image CSS height = parent width */
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
  object-fit: cover;
}
/* Frame edge label "→1A" sits below the frame in the strip's bottom padding. */
.contact-thumb__num {
  position: absolute;
  top: calc(100% + 4px);
  left: 4px;
  font-size: 7px;
  letter-spacing: 1.4px;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.55);
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

/* Hover: film negative + a messy red pen enclosure that overshoots edges. */
.contact-thumb:hover img {
  filter: invert(1) grayscale(1) contrast(1.08);
}
.contact-thumb__sharpie {
  --rot: 0deg;
  position: absolute;
  inset: -8px;                  /* extends 8px past every edge */
  pointer-events: none;
  opacity: 0;
  transform: scale(1.06) rotate(var(--rot));
  transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.contact-thumb:hover .contact-thumb__sharpie {
  opacity: 1;
  transform: scale(1) rotate(var(--rot));
}

/* Four variations of the SAME gesture — a messy red pen enclosure — that
   look natural rather than repeating. Each uses a different feTurbulence
   seed for unique line wobble, and a different path shape (full closure,
   open corner, double-pass, rounded). nth-child cycles them within a strip. */

/* V1: rough rectangle, slight corner overshoot at all four corners */
.contact-thumb:nth-child(4n+1) .contact-thumb__sharpie {
  --rot: -1.4deg;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 100 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.045' numOctaves='2' seed='3'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='5'/%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke='%23c8262d' stroke-width='3' stroke-linecap='round' filter='url(%23r)'%3E%3Cpath d='M -3,6 L 103,2 L 102,101 L -2,98 Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* V2: open at top-right corner (artist lifted the pen) */
.contact-thumb:nth-child(4n+2) .contact-thumb__sharpie {
  --rot: 0.9deg;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 100 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.06' numOctaves='2' seed='11'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='4.5'/%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke='%23c8262d' stroke-width='3' stroke-linecap='round' filter='url(%23r)'%3E%3Cpath d='M 4,3 L 88,1'/%3E%3Cpath d='M 96,12 L 100,99 L 2,103 L 5,2'/%3E%3C/g%3E%3C/svg%3E");
}

/* V3: double-stroke (drawn twice for emphasis) */
.contact-thumb:nth-child(4n+3) .contact-thumb__sharpie {
  --rot: -0.5deg;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 100 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.05' numOctaves='2' seed='17'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='4'/%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke='%23c8262d' stroke-width='2.6' stroke-linecap='round' filter='url(%23r)'%3E%3Cpath d='M 2,4 L 99,2 L 100,99 L 1,100 Z'/%3E%3Cpath d='M 5,2 L 97,5 L 98,101 L 3,99 Z' opacity='0.6'/%3E%3C/g%3E%3C/svg%3E");
}

/* V4: rounded loose enclosure (curved corners) */
.contact-thumb:nth-child(4n) .contact-thumb__sharpie {
  --rot: 1.3deg;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 100 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.055' numOctaves='2' seed='23'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='4'/%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke='%23c8262d' stroke-width='3' stroke-linecap='round' filter='url(%23r)'%3E%3Cpath d='M 4,12 Q 50,-2 96,8 Q 102,52 96,94 Q 50,104 4,94 Q -2,52 4,12 Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* On click, snap the scroll target so the spread sits just under the topbar */
.stream .spread { scroll-margin-top: 88px; }

/* ---------- HARD DRIVE ARCHIVE PAGE ----------
   Simple collage at /hd/[slug]/. Unlinked from main nav — meant to be
   accessed via QR code. Black background by default, photos flow as a
   masonry grid via CSS columns so each image keeps its NATIVE aspect ratio
   and orientation (no cropping). Portraits and landscapes mix freely.
   Click any photo opens it in the lightbox. */
.drive-view {
  background: var(--drive-bg, #000);
  color: var(--drive-fg, #fff);
  min-height: 100vh;
  padding-top: 88px;        /* clear the topbar */
}
.drive-header {
  padding: 40px 60px 32px;
  color: var(--drive-fg, #fff);
  border-bottom: 1px solid color-mix(in srgb, var(--drive-fg, #fff) 8%, transparent);
}
.drive-header__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -1px;
  line-height: 1;
  color: var(--drive-fg, #fff);
}
.drive-header__subtitle {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--drive-fg, #fff) 60%, transparent);
}
.drive-header__meta {
  margin-top: 16px;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--drive-fg, #fff) 40%, transparent);
  font-variant-numeric: tabular-nums;
}
.drive-header__meta code {
  background: color-mix(in srgb, var(--drive-fg, #fff) 5%, transparent);
  padding: 2px 8px;
  border-radius: 2px;
  font-family: ui-monospace, 'SF Mono', Monaco, monospace;
  letter-spacing: 1.5px;
}

/* Drive collage — CSS-columns masonry. Each <figure class="drive-tile"> sits
   inside a 3-column flow. Photos retain their native aspect ratio and
   orientation (no crop, no aspect-ratio override) — portraits stay tall,
   landscapes stay wide, mixed orientations fall into place like a contact
   sheet pinned to a wall. Click any photo opens it in the lightbox. */
.drive-collage {
  background: var(--drive-bg, #000);
  padding: 32px 40px 100px;
  column-count: 3;
  column-gap: 14px;
}
.drive-tile {
  break-inside: avoid;     /* keep each photo whole — no splitting across columns */
  margin: 0 0 14px;
  display: block;
  cursor: none;
  /* Subtle hover lift to signal clickability */
  transition: opacity 0.25s ease;
}
.drive-tile:hover { opacity: 0.85; }
.drive-tile img {
  width: 100%;
  height: auto;            /* let height follow the photo's native aspect */
  display: block;
}

@media (max-width: 1200px) {
  .drive-collage { column-count: 2; }
}
@media (max-width: 900px) {
  .drive-view { padding-top: 72px; }
  .drive-header { padding: 24px 20px 20px; }
  .drive-collage {
    padding: 18px 14px 60px;
    column-count: 2;
    column-gap: 10px;
  }
  .drive-tile { margin: 0 0 10px; }
}
@media (max-width: 560px) {
  .drive-collage { column-count: 1; }
}

/* ---------- INTRO (old; still used by Journal + About) ---------- */
.intro {
  padding: 160px 60px 120px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: end;
  min-height: 80vh;
}
.intro__title {
  font-size: clamp(40px, 7vw, 104px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -2.5px;
}
/* Default for any em inside the intro: normal style, dim — only the .intro__year keeps this look. */
.intro__title em { font-style: normal; color: var(--fg-dim); }

/* Italic em (the "field notes", "the short version" lines) — render in serif italic for editorial accent. */
.intro__title em:not(.intro__year) {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.5px;
  font-size: 0.62em;  /* slightly smaller than the sans title */
}
.intro__year {
  font-style: normal;
  color: var(--fg-dim);
  font-size: 0.28em;
  letter-spacing: 5px;
  display: block;
  margin-top: 16px;
}
.intro__meta {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--fg-dim);
  text-align: right;
  line-height: 2;
}

/* ---------- SPREADS — magazine layout ---------- */
.stream {
  display: flex; flex-direction: column;
  gap: 240px;
  padding: 80px 0 160px;
}
.spread {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.spread__media {
  margin: 0;
  overflow: hidden;
  position: relative;
  opacity: 0; transform: translateY(28px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.spread__media.in { opacity: 1; transform: translateY(0); }
.spread__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.spread__caption {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--fg-dim);
  max-width: 220px;
  line-height: 1.7;
}

/* Hero — single landscape, with side padding (NOT full-bleed).
   Aspect: 5/4 to match 4x5 medium-format landscape orientation. */
.spread--hero { padding: 0 60px; }
.spread--hero .spread__media {
  width: 100%; max-width: 1600px;
  aspect-ratio: 5 / 4;
}

/* Full-bleed — single photo, edge-to-edge at 100vw with NO crop.
   The container has no fixed aspect ratio — the image dictates the height,
   so the photo's composition is preserved. A wide pano stays short; a
   square pushes taller; a tall portrait gets enormous (use sparingly). */
.spread.spread--bleed {
  padding: 0 !important;
  width: 100%;
  max-width: 100% !important;
  margin: 0 !important;
}
.spread--bleed .spread__media {
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: auto;       /* override any default 16/9 */
  height: auto;
}
.spread--bleed .spread__media img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain;      /* never crop */
  max-width: 100%;
  display: block;
}

/* Flush — single photo, no side gutter, hugs the viewport edge.
   Three variants stack with these modifier classes:
     .spread--flush-left   → anchored at left edge
     .spread--flush-right  → anchored at right edge
     .spread--flush--landscape → wider, landscape aspect (otherwise portrait) */
.spread.spread--flush {
  padding: 0 !important;
  width: 100%;
  max-width: 100% !important;
  margin: 0 !important;
  align-items: stretch;
}
.spread.spread--flush.spread--flush-left  { justify-content: flex-start; }
.spread.spread--flush.spread--flush-right { justify-content: flex-end;   }
.spread--flush .spread__media {
  width: clamp(380px, 48vw, 720px);
  aspect-ratio: 4 / 5;
}
.spread--flush.spread--flush--landscape .spread__media {
  width: clamp(520px, 64vw, 1100px);
  aspect-ratio: 5 / 4;
}

/* Centered — portrait, plenty of negative space.
   Aspect: 4/5 (matches your native medium-format portrait crop). */
.spread--centered { padding: 0 120px; }
.spread--centered .spread__media {
  width: clamp(360px, 38vw, 600px);
  aspect-ratio: 4 / 5;
}

/* Off-center — image hugs one side. 4/5 portrait. */
.spread--off-center {
  padding: 0 120px;
  max-width: 1500px; margin: 0 auto;
  justify-content: flex-start;
}
.spread--off-center.spread--off-right { justify-content: flex-end; }
.spread--off-center .spread__media {
  width: clamp(360px, 42vw, 660px);
  aspect-ratio: 4 / 5;
}

/* Pair */
.spread--pair {
  gap: 30px;
  padding: 0 120px;
  align-items: stretch;
  max-width: 1500px; margin: 0 auto;
}
.spread--pair .spread__media {
  flex: 1;
  aspect-ratio: 4 / 5;
}

/* Text + image */
.spread--text-left, .spread--text-right {
  padding: 0 120px;
  gap: 60px;
  align-items: flex-end;
  max-width: 1500px; margin: 0 auto;
}
.spread--text-left .spread__media,
.spread--text-right .spread__media {
  flex: 0 0 58%;
  aspect-ratio: 4 / 5;
}
.spread--text-left .spread__text { flex: 1; padding-bottom: 40px; }
.spread--text-right { flex-direction: row-reverse; }
.spread--text-right .spread__text { flex: 1; padding-bottom: 40px; text-align: right; }
.spread--text-right .spread__caption { margin-left: auto; }

/* Triptych */
.spread--triptych {
  gap: 24px;
  padding: 0 100px;
  align-items: stretch;
  max-width: 1400px; margin: 0 auto;
}
.spread--triptych .spread__media {
  flex: 1;
  aspect-ratio: 4 / 5;
}

/* Bleed pair — 2 photos edge-to-edge, no gap, full viewport width.
   Inspired by editorial split-image layouts like the Zara campaign covers. */
.spread.spread--bleed-pair {
  padding: 0 !important;
  width: 100%;
  max-width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  gap: 0 !important;
  align-items: stretch;
}
.spread--bleed-pair .spread__media {
  flex: 1;
  aspect-ratio: 4 / 5;
  margin: 0;
}

/* Bleed triptych — 3 photos edge-to-edge, no gap, full viewport width.
   Like Zara's "Look 01 / Look 02 / Look 03" lookbook rows. */
.spread.spread--bleed-triptych {
  padding: 0 !important;
  width: 100%;
  max-width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  gap: 0 !important;
  align-items: stretch;
}
.spread--bleed-triptych .spread__media {
  flex: 1;
  aspect-ratio: 4 / 5;
  margin: 0;
}

/* Offset pair — same paired-photo composition as bleed-pair (no gap between)
   but smaller (~80vw) and shifted toward one viewport edge instead of centered.
   Slightly less aggressive than full-bleed — keeps some negative space on one
   side so the pair reads as a deliberately-placed editorial element. */
.spread.spread--offset-pair {
  padding: 0 !important;
  width: clamp(600px, 80vw, 1600px);
  max-width: calc(100vw - 60px) !important;
  display: flex !important;
  gap: 0 !important;
  align-items: stretch;
}
.spread--offset-pair .spread__media {
  flex: 1;
  aspect-ratio: 4 / 5;
  margin: 0;
}
.spread.spread--offset-pair-left  { margin-left: 40px;  margin-right: auto !important; }
.spread.spread--offset-pair-right { margin-left: auto !important; margin-right: 40px; }

/* Quad — 2×2 grid of landscape photos. Three position variants:
   - quad-center: centered on the page with equal negative space
   - quad-left:   hugs the left edge of the page
   - quad-right:  hugs the right edge of the page */
.spread.spread--quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: clamp(560px, 60vw, 920px);
  max-width: calc(100% - 120px);   /* always leaves a side gutter */
  padding: 0;
  align-items: stretch;
  justify-content: initial;        /* override .spread's flex centering */
}
.spread--quad .spread__media {
  aspect-ratio: 5 / 4;
  width: 100%;
}
.spread.spread--quad.spread--quad-center { margin: 0 auto; }
.spread.spread--quad.spread--quad-left   { margin-left: 60px;  margin-right: auto; }
.spread.spread--quad.spread--quad-right  { margin-left: auto;  margin-right: 60px; }

/* Asymmetric pair — small square on one side, tall portrait on the other.
   Modifier "spread--asymmetric-left" puts the small one on the left;
   "spread--asymmetric-right" mirrors it. */
.spread--asymmetric {
  gap: 30px;
  padding: 0 120px;
  align-items: flex-end;
  max-width: 1500px; margin: 0 auto;
}
.spread--asymmetric .spread__media:first-child {
  flex: 0 0 38%;
  aspect-ratio: 4 / 5;        /* matches 4x5 native; small in width only */
  margin-bottom: 40px;        /* tucks slightly above the bottom */
}
.spread--asymmetric .spread__media:last-child {
  flex: 0 0 55%;
  aspect-ratio: 4 / 5;        /* matches 4x5 native; asymmetry comes from width */
}
.spread--asymmetric-right { flex-direction: row-reverse; }

/* Smaller versions of existing single-image spreads. Modifier classes
   stack with the base ".spread--centered" / ".spread--off-center". */
.spread--centered.spread--centered--small .spread__media {
  width: clamp(280px, 28vw, 440px);
}
.spread--off-center.spread--off-center--small .spread__media {
  width: clamp(280px, 32vw, 480px);
}

/* Landscape pushed to one side, with caption space on the other.
   Matches the "wide image off-center with a small caption" layouts
   in editorial fashion sites. */
.spread--landscape {
  padding: 0 60px;
  max-width: 1600px;
  margin: 0 auto;
  gap: 40px;
  align-items: flex-end;
}
.spread--landscape .spread__media {
  flex: 0 0 72%;
  aspect-ratio: 5 / 4;
}
.spread--landscape .spread__text {
  flex: 1;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
/* Photo on the right, text on the left → caption hugs the right edge of the text column. */
.spread--landscape-right { flex-direction: row; }
.spread--landscape-right .spread__caption { text-align: right; margin-left: auto; }

/* Photo on the left, text on the right → caption hugs the left edge of the text column. */
.spread--landscape-left  { flex-direction: row-reverse; }
.spread--landscape-left  .spread__caption { text-align: left;  margin-right: auto; }

/* ---------- PHOTO JOURNAL ---------- */
.journal {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 60px 200px;
  display: flex; flex-direction: column;
  gap: 160px;
}
.journal-entry { display: flex; flex-direction: column; gap: 22px; }
.journal-entry__media { display: flex; gap: 14px; align-items: stretch; }
.journal-entry__caption {
  align-self: flex-end;
  max-width: 320px;
  text-align: right;
}
.journal-entry__date {
  display: block;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.journal-entry__note {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: #444;
  font-style: italic;
  font-weight: 400;
}
.journal-entry--solo .spread__media {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
}
.journal-entry--pair .journal-entry__media > .spread__media {
  flex: 1;
  aspect-ratio: 4 / 5;
}
.journal-entry--triad .journal-entry__media > .spread__media {
  flex: 1;
  aspect-ratio: 4 / 5;
}
.journal-entry--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.journal-entry--grid .spread__media { aspect-ratio: 4 / 5; }
.journal-entry--grid .journal-entry__caption {
  align-self: end;
  justify-self: end;
  max-width: 100%;
  padding: 0 12px 12px 0;
}
.journal-entry--side {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: end;
}
.journal-entry--side .spread__media {
  aspect-ratio: 4 / 5;
  max-width: 720px;
}
.journal-entry--side .journal-entry__caption {
  align-self: end;
  text-align: right;
  margin: 0;
}

/* ---------- JOURNAL LANDSCAPE LAYOUTS ---------- */

/* Landscape solo — single wide photo, caption below right (like solo but landscape).
   Aspect: 5/4 to match 4x5 native crop rotated to landscape. */
.journal-entry--landscape-solo .spread__media {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 5 / 4;
}

/* Landscape wide — bigger photo, caption centered below */
.journal-entry--landscape-wide .spread__media {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 5 / 4;
}
.journal-entry--landscape-wide .journal-entry__caption {
  align-self: center;
  text-align: center;
  max-width: 540px;
}

/* Landscape side — wide photo with caption floating to its right */
.journal-entry--landscape-side {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 40px;
  align-items: end;
}
.journal-entry--landscape-side .spread__media {
  aspect-ratio: 5 / 4;
  max-width: 980px;
}
.journal-entry--landscape-side .journal-entry__caption {
  align-self: end;
  text-align: right;
  margin: 0;
}

/* Landscape pair — 2 wide photos side by side. 5/4 = 4x5 medium-format landscape. */
.journal-entry--landscape-pair .journal-entry__media > .spread__media {
  flex: 1;
  aspect-ratio: 5 / 4;
}

/* Landscape stacked — 2 wide photos, one above the other */
.journal-entry--landscape-stacked .journal-entry__media {
  flex-direction: column;
  gap: 14px;
}
.journal-entry--landscape-stacked .journal-entry__media > .spread__media {
  width: 100%;
  aspect-ratio: 5 / 4;
}

/* Landscape trio — 3 wide photos stacked vertically */
.journal-entry--landscape-trio .journal-entry__media {
  flex-direction: column;
  gap: 14px;
}
.journal-entry--landscape-trio .journal-entry__media > .spread__media {
  width: 100%;
  aspect-ratio: 5 / 4;
}

/* ---------- ABOUT ---------- */
.about-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 60px 200px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
/* About portrait — no forced aspect ratio. The photo fills the column at its
   NATIVE aspect (portrait, landscape, or square). Height is determined by the
   image itself, so a wide landscape sits short and a tall portrait sits long
   without any cropping. */
.about-page__portrait .spread__media {
  width: 100%;
  aspect-ratio: auto;
  height: auto;
}
.about-page__portrait .spread__media img {
  width: 100%;
  height: auto;
  object-fit: contain;   /* override the global cover — never crop this photo */
  max-width: 100%;
  display: block;
}
.about-page__body {
  display: flex; flex-direction: column; gap: 24px;
  font-size: 17px; line-height: 1.65; color: #333;
  max-width: 560px;
}
.about-page__lede {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 300; line-height: 1.4;
  letter-spacing: -0.4px;
  color: var(--fg);
  margin-bottom: 12px;
}
/* Italicized publication names ("Outside", "Kinfolk") and other emphasis in
   the bio render in serif italic — small but high-impact editorial detail. */
.about-page__body em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--fg);
  font-size: 1.05em;
}
.about-page__contact {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 12px;
}
.about-page__contact-label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--fg-dim);
}
.about-page__contact-detail { font-size: 17px; line-height: 1.7; }
.about-page__contact-detail a {
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.25s ease;
}
.about-page__contact-detail a:hover { border-color: var(--fg); }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(250, 249, 246, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 7vh 6vw;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure {
  max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px;
}
.lightbox__img {
  max-width: 100%; max-height: 82vh;
  object-fit: contain; display: block;
  box-shadow: 0 30px 60px rgba(0,0,0,0.08);
  opacity: 0; transition: opacity 0.4s ease;
}
.lightbox.is-open .lightbox__img { opacity: 1; }
.lightbox__caption {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--fg-dim);
}
.lightbox button {
  position: absolute;
  background: transparent; border: none;
  color: var(--fg);
  font-family: var(--sans); font-weight: 300;
  padding: 12px 16px;
  transition: opacity 0.2s;
}
.lightbox button:hover { opacity: 0.5; }
.lightbox__close { top: 18px; right: 24px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); font-size: 40px; line-height: 1; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-size: 10px; letter-spacing: 3px; color: var(--fg-dim);
}
body.lightbox-open, body.drawer-open { overflow: hidden; }

/* ---------- FILM NEGATIVE FLASH ----------
   On mouseenter (handled by JS), the image snaps to a color-negative look
   for ~1 second and then eases back to normal. Mimics a shutter snap rather
   than a held state, so the underlying photo stays the focus. JS adds the
   .is-flashing-negative class and removes it after 600ms (see FLASH_MS in
   portfolio.js — keep these two values in sync). Fires once per photo per
   page load; the JS sets __negFired and never clears it. */
.spread__media img,
.journal-entry .spread__media img,
.about-page__portrait .spread__media img {
  transition: filter 0.5s ease;
}
/* GPU compositing is applied ONLY during the flash animation, via JS in
   portfolio.js. Doing it always-on (v3.12.2) put every spread image on
   its own GPU layer, which crushed scroll performance near the splash.
   Scoping it to .is-flashing-negative keeps hovers smooth and scrolls
   smooth at the same time. */
.spread__media.is-flashing-negative img {
  animation: ac-film-negative-flash 0.6s ease-out;
  transform: translateZ(0);
  will-change: filter;
  backface-visibility: hidden;
}
@keyframes ac-film-negative-flash {
  0%   { filter: none; }
  8%   { filter: invert(1) hue-rotate(180deg) saturate(0.45) contrast(1.05); }
  60%  { filter: invert(1) hue-rotate(180deg) saturate(0.45) contrast(1.05); }
  100% { filter: none; }
}

/* ---------- FILM GRAIN OVERLAY ----------
   Subtle noise texture over the entire viewport. SVG-based so no asset to
   load. mix-blend-mode: multiply ties it into the warm background.
   pointer-events: none so it never intercepts clicks/hovers. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  /* No mix-blend-mode. Plain alpha compositing is GPU-cheap; multiply
     forces a per-frame read+blend of whatever's underneath, which becomes
     expensive over full-bleed photos. Compensated with a slightly higher
     opacity so the visual texture is still readable. */
  opacity: 0.12;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}
@media (pointer: coarse) {
  /* Reduce grain on touch devices where DPI variance can make it look heavy. */
  .grain { opacity: 0.08; }
}

/* ---------- FOLIO (page numbers) ----------
   Tiny "001 / 014" counter pinned bottom-right. Visible only on pages that
   contain spreads. Updates as you scroll, like flipping through a photo book. */
.folio {
  position: fixed;
  bottom: 22px;
  right: 32px;
  z-index: 60;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  display: none;            /* shown by JS when there are spreads on the page */
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.folio.is-active { display: block; }
.folio__current { color: var(--accent); }   /* highlight the current page */
.folio__sep { margin: 0 6px; opacity: 0.5; }
body.lightbox-open .folio,
body.drawer-open  .folio { opacity: 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .topbar { height: 72px; }
  .topbar__logo { top: 18px; right: 20px; }
  .topbar__logo img { height: 32px; }
  .hamburger { top: 14px; left: 14px; width: 72px; height: 72px; padding: 14px; gap: 10px; }
  /* Landscape phones / small tablets still get a generous hero. */
  .splash { height: 88vh; margin-bottom: 60px; }
  .splash__hint { bottom: 18px; }
}

/* Portrait phones: drop the full-viewport hero in favor of an aspect-ratio
   container matching a typical landscape photo. Avoids the heavy crop you'd
   get cramming a 3:2 image into a tall narrow 100vh box. */
@media (orientation: portrait) and (max-width: 900px) {
  .splash {
    height: auto;
    aspect-ratio: 3 / 2;
    margin-bottom: 40px;
  }
  .splash__hint { bottom: 12px; }
}

@media (max-width: 900px) {
  .intro { padding: 120px 24px 60px; grid-template-columns: 1fr; gap: 24px; }
  .book-intro {
    padding: 100px 24px 60px;
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: 0;
  }
  .film-strip {
    grid-template-columns: repeat(3, 1fr);
    padding: 18px 4px 22px;
  }
  .contact-thumb__num { font-size: 6px; left: 3px; }
  .intro__meta { text-align: left; }
  .stream { gap: 80px; padding: 20px 0 60px; }
  .spread,
  .spread--hero,
  .spread--centered,
  .spread--off-center,
  .spread--pair,
  .spread--text-left,
  .spread--text-right,
  .spread--triptych,
  .spread--asymmetric,
  .spread--landscape { padding: 0 20px; gap: 16px; flex-direction: column !important; align-items: stretch; }

  /* Quad — collapse 2×2 to single column on small screens */
  .spread.spread--quad {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 20px !important;
    margin: 0 !important;
    gap: 12px;
  }

  /* Bleed pair/triptych — keep edge-to-edge but stack vertically with no gap */
  .spread.spread--bleed-pair,
  .spread.spread--bleed-triptych,
  .spread.spread--offset-pair {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
  }
  .spread--bleed-pair .spread__media,
  .spread--bleed-triptych .spread__media,
  .spread--offset-pair .spread__media {
    width: 100%; aspect-ratio: 4 / 5;
  }

  /* Full-bleed + flush — stay edge-to-edge on mobile too. Bleed preserves
     image aspect (no crop); flush variants use a sensible mobile aspect. */
  .spread.spread--bleed .spread__media { aspect-ratio: auto; height: auto; }
  .spread.spread--bleed .spread__media img { width: 100% !important; height: auto !important; object-fit: contain; }
  .spread.spread--flush .spread__media,
  .spread.spread--flush.spread--flush--landscape .spread__media {
    width: 100% !important;
    aspect-ratio: 4 / 5;
  }
  .spread.spread--flush.spread--flush--landscape .spread__media { aspect-ratio: 5 / 4; }
  .spread--text-right,
  .spread--asymmetric-right,
  .spread--landscape-left { flex-direction: column !important; }
  .spread--text-right .spread__text,
  .spread--text-left .spread__text,
  .spread--landscape .spread__text { text-align: left; padding-bottom: 0; }
  .spread--landscape-left .spread__caption,
  .spread--landscape-right .spread__caption { text-align: left; margin: 0; }
  .spread--hero .spread__media,
  .spread--centered .spread__media,
  .spread--off-center .spread__media,
  .spread--pair .spread__media,
  .spread--text-left .spread__media,
  .spread--text-right .spread__media,
  .spread--triptych .spread__media,
  .spread--asymmetric .spread__media,
  .spread--landscape .spread__media { width: 100%; flex: 1 0 auto; aspect-ratio: 4 / 5; margin-bottom: 0 !important; }
  .spread--asymmetric .spread__media:first-child,
  .spread--landscape .spread__media { aspect-ratio: 5 / 4; }
  .journal { padding: 20px 24px 120px; gap: 80px; }
  .journal-entry__media { flex-direction: column; gap: 12px; }
  .journal-entry__caption { max-width: 100%; text-align: right; }
  .journal-entry--grid { grid-template-columns: 1fr; }
  .journal-entry--grid .journal-entry__caption { justify-self: stretch; padding: 0; }
  .journal-entry--side,
  .journal-entry--landscape-side { grid-template-columns: 1fr; gap: 16px; align-items: stretch; }
  .journal-entry--side .spread__media,
  .journal-entry--landscape-side .spread__media { max-width: 100%; }
  .journal-entry--landscape-wide .journal-entry__caption { text-align: right; max-width: 100%; }
  .about-page { padding: 20px 24px 120px; grid-template-columns: 1fr; gap: 40px; }
  .drawer { width: 80vw; padding: 100px 32px 32px; }
  .drawer__link { font-size: 30px; }
}
