:root {
  --bg: #0B0908;
  --fg: #EDE6DD;
  --display: Impact, 'Anton', 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
  --accent: 'Instrument Serif', 'Times New Roman', serif;
  --gutter: 28px;
  --gap: 240px;
  --max: 1680px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background-color 600ms ease;
}

a { color: inherit; text-decoration: none; transition: opacity 300ms ease; }
a:hover { opacity: .6; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }

header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  padding: 22px var(--gutter);
  background: var(--bg);
}
header .name { font-size: var(--name-size, 18px); }
header nav { display: flex; gap: 28px; font-size: var(--nav-size, 14px); }
header nav a[aria-current="page"] { opacity: .5; }

main { padding-bottom: 80px; }
.spacer { height: var(--gap); }

/* Image frames: slow zoom and hover caption */
.frame { position: relative; display: block; overflow: hidden; }
.frame:hover { opacity: 1; }
.frame :is(img, video) { transition: transform 1400ms cubic-bezier(.2,.6,.2,1), opacity 900ms ease; opacity: 0; }
.frame :is(img, video).loaded { opacity: 1; }
.frame:hover :is(img, video) { transform: scale(1.025); }
.frame .cap {
  position: absolute; left: 20px; bottom: 18px;
  display: flex; gap: 20px; color: #f3ece4;
  font-family: var(--accent); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 20px;
  opacity: 0; transition: opacity 700ms ease;
}
.frame:hover .cap { opacity: 1; }
.contain { background: transparent; }
.contain :is(img, video) { object-fit: contain; }

/* Layouts
   Photos keep their own proportions (no cropping) and widths scale with the
   window, so the page looks the same on a laptop and a big monitor. */
.frame :is(img, video) { height: auto; }
.row, .single, .meta, .credits, .info { max-width: var(--max); margin-left: auto; margin-right: auto; }
.hero { height: min(880px, 92vh); margin: 0 var(--gutter); }
.hero :is(img, video) { height: 100%; object-fit: contain; }
/* Width follows the photo's shape (set on load) so the whole photo fits on screen under the header. */
.full { width: min(100%, calc((100vh - 120px) * var(--ar, 1.5))); margin: 0 auto; }
.row { display: flex; flex-wrap: wrap; gap: var(--gutter); padding: 0 var(--gutter); }
.row.bottom { align-items: flex-end; }
.row.top { align-items: flex-start; }
.pair-detail .big { flex: 5 1 420px; }
.pair-detail .small { flex: 3 1 260px; }
.stagger .frame { flex: 1 1 360px; }
.stagger .frame:first-child { margin-top: 160px; }
.single { display: flex; padding: 0 var(--gutter); }
.single.center { justify-content: center; }
.single.right { justify-content: flex-end; }
.single.left { justify-content: flex-start; }
.single .frame { width: 44%; min-width: 320px; max-width: 100%; }
.single.right .frame { width: 36%; }
.single.left .frame { width: 54%; }

/* Editorial layouts */
/* Photos keep their shape; capped so a pair of 4:5 photos fits on one screen under the header. */
.spread { display: flex; max-width: min(var(--max), calc((100vh - 120px) * 1.6)); margin: 0 auto; }
.spread .frame { flex: var(--ar, .8) 1 0; min-width: 0; }
/* Even rows: widths follow each photo's shape (set on load) so they share one height. */
.even { flex-wrap: nowrap; }
.even .frame { flex: var(--ar, .8) 1 0; min-width: 0; }
.wide-pair .frame { --ar: 1.5; }
.overlap { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.overlap .under { width: 62%; }
.overlap .over { position: absolute; right: 6%; bottom: -14%; width: 40%; z-index: 2; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.overlap:has(.over) { margin-bottom: 14%; }
/* Center layer: front photo centered, sized to fit the screen; back photos peek out behind it. */
.layer { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.layer .l1 { position: relative; z-index: 3; width: min(44%, calc((100vh - 160px) * var(--ar, .8))); margin: 0 auto; box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.layer .l2 { position: absolute; z-index: 1; right: calc(50% + 9%); top: 8%; width: 30%; }
.layer .l3 { position: absolute; z-index: 2; left: calc(50% + 9%); bottom: 8%; width: 30%; }
.layer:has(.l2, .l3) { padding-top: 4%; padding-bottom: 4%; }
.strip { justify-content: center; }
.strip .frame { flex: 0 1 calc(22% - var(--gutter)); min-width: 160px; }
.intimate .frame { width: 22%; min-width: 220px; }
.scatter { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); align-items: start; }
.scatter .s1 { grid-column: 1 / span 5; }
.scatter .s2 { grid-column: 8 / span 4; margin-top: 30%; }
.scatter .s3 { grid-column: 4 / span 4; margin-top: -8%; }
.scatter .frame:nth-child(n+4) { grid-column: span 4; }
.statement { max-width: 980px; margin: 0 auto; padding: 80px var(--gutter); text-align: center; }
.statement p, .note p { margin: 0; font-family: var(--accent); font-style: italic; text-transform: none; letter-spacing: 0; }
.statement p { font-size: clamp(30px, 4.2vw, 68px); line-height: 1.1; }
.note { align-items: flex-end; }
.note .frame { flex: 0 1 46%; min-width: 300px; }
.note p { flex: 1 1 260px; max-width: 460px; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.3; }

/* Magazine horizontal: one landscape photo across a two-page spread, with a soft center fold */
.mag-wide { max-width: var(--max); margin: 0 auto; padding: 0 calc(var(--gutter) * 3); }
.mag-wide .frame::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 6%; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.12) 40%, rgba(0,0,0,.22) 50%, rgba(255,255,255,.04) 52%, rgba(0,0,0,.1) 62%, transparent);
}
.mag-wide .cap { z-index: 1; }
.mag-wide figcaption { margin-top: 14px; max-width: 44%; font-family: var(--accent); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 18px; line-height: 1.35; opacity: .8; }

/* Horizontal layouts */
.wide-pair { max-width: var(--max); }
.wide-tall { align-items: flex-end; }
.wide-stack { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wide-stack .frame { width: 64%; }
.wide-stack .frame:nth-child(2) { margin: -9% 0 0 auto; position: relative; z-index: 1; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.wide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.wide-grid { align-items: center; }

/* Square grid: four photos cropped to squares, 2 × 2 */
.square-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.square-grid .frame :is(img, video) { aspect-ratio: 1 / 1; object-fit: cover; }

/* Video */
.sound {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  padding: 6px 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
  background: rgba(0,0,0,.45); color: #f3ece4; cursor: pointer;
  font: inherit; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  opacity: .75; transition: opacity 300ms ease;
}
.sound:hover, .frame:hover .sound { opacity: 1; }
.v-cinema { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.v-cinema .frame { width: min(100%, calc((100vh - 120px) * var(--ar, 1.78))); margin: 0 auto; }
.v-cinema figcaption, .v-vertical p { font-family: var(--accent); font-style: italic; text-transform: none; letter-spacing: 0; }
.v-cinema figcaption { margin-top: 14px; font-size: 18px; line-height: 1.35; opacity: .8; text-align: center; }
.v-bleed { width: 100%; }
.v-vertical { justify-content: center; align-items: flex-end; gap: calc(var(--gutter) * 2); }
.v-vertical .frame { flex: 0 1 min(420px, 100%); }
.v-vertical .frame :is(img, video) { max-height: calc(100vh - 120px); object-fit: contain; }
.v-vertical p { flex: 0 1 360px; margin: 0; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.3; }

/* Project page */
.meta { display: flex; flex-wrap: wrap; gap: 24px 48px; padding: 28px var(--gutter) 0; }
.meta .title, .next .big { font-family: var(--accent); font-style: italic; text-transform: none; letter-spacing: 0; }
.meta .title { font-size: 28px; }
/* Work / Art Direction list: Helvetica Bold (Arial on devices without Helvetica). */
.index a span:first-child { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 700; font-style: normal; text-transform: none; letter-spacing: -.01em; font-size: 24px; }
.meta { align-items: baseline; }
.index a { align-items: baseline; }
.dim { opacity: .55; }
.credits { display: flex; flex-wrap: wrap; gap: 32px 64px; padding: 0 var(--gutter) 120px; }
.credits div, .info div { display: flex; flex-direction: column; gap: 8px; }
.next {
  display: flex; justify-content: space-between; align-items: center;
  padding: 40px var(--gutter);
  border-top: 1px solid color-mix(in srgb, var(--fg) 20%, transparent);
}
.next .big { font-size: 40px; }

/* Index list (Work / Art Direction) */
.index { padding: 40px var(--gutter); display: grid; gap: 0; }
.index a {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
}
.preview {
  position: fixed; right: var(--gutter); bottom: var(--gutter);
  pointer-events: none;
  opacity: 0; transition: opacity 500ms ease;
}
/* The frame takes each photo's own shape: up to 52% of the window wide or 70% tall. */
.preview img { width: auto; height: auto; max-width: min(52vw, 820px); max-height: 70vh; object-fit: contain; }
.preview.on { opacity: 1; }

/* Info page */
.info-page { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 0; }
.info-intro { display: flex; flex-wrap: wrap; gap: calc(var(--gutter) * 2); align-items: flex-end; margin-bottom: 120px; }
.info-photo { flex: 0 1 min(420px, 100%); }
.info-bio { flex: 1 1 420px; max-width: 880px; margin: 0; font-family: var(--accent); font-size: var(--bio-size, 40px); line-height: 1.15; text-transform: none; letter-spacing: 0; }
.info-list { display: grid; margin-bottom: 80px; }
.info-label { padding-bottom: 14px; font-size: 12px; border-bottom: 1px solid color-mix(in srgb, var(--fg) 15%, transparent); }
.info-row {
  display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 700; text-transform: none; letter-spacing: -.01em;
}
.info-list.pub .info-row { font-size: var(--pub-size, 24px); }
.info-list.contact .info-row { font-size: var(--contact-size, 24px); }

/* Info */
.info { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; padding: 0 var(--gutter) 80px; }
.info p { flex: 1 1 420px; max-width: 620px; margin: 0; text-transform: none; letter-spacing: 0; font-family: var(--accent); font-size: var(--bio-size, 26px); line-height: 1.3; }
.info .pub { font-size: var(--pub-size, 14px); }
.info .contact { font-size: var(--contact-size, 14px); }

footer { padding: 22px var(--gutter); opacity: .55; font-size: var(--footer-size, 14px); }

@media (max-width: 700px) {
  :root { --gutter: 16px; --gap: 120px; }
  .single .frame, .single.right .frame, .single.left .frame { width: 100%; min-width: 0; }
  .spread { flex-direction: column; }
  .even { flex-wrap: wrap; }
  .even .frame { flex-basis: 100%; }
  .wide-stack .frame { width: 88%; }
  .wide-stack .frame:nth-child(2) { margin-top: -12%; }
  .wide-grid { grid-template-columns: 1fr; }
  .overlap .under { width: 100%; }
  .overlap .over { position: relative; right: auto; bottom: auto; display: block; width: 62%; margin: -20% 0 0 auto; }
  .statement { padding: 40px var(--gutter); }
  .mag-wide { padding: 0; }
  .mag-wide .frame::after { display: none; }
  .mag-wide figcaption { max-width: none; padding: 0 var(--gutter); font-size: 16px; }
  .overlap:has(.over) { margin-bottom: 0; }
  .layer { padding: 0; }
  .layer .l1 { width: 62%; }
  .layer .l2 { right: auto; left: 0; top: 6%; width: 46%; }
  .layer .l3 { left: auto; right: 0; bottom: 6%; width: 46%; }
  .strip .frame { flex: 1 1 40%; min-width: 0; }
  .intimate .frame { width: 60%; min-width: 0; }
  .scatter { grid-template-columns: 1fr; }
  .scatter .frame { grid-column: auto !important; margin-top: 0 !important; }
  .scatter .s2 { width: 70%; justify-self: end; }
  .note .frame { flex-basis: 100%; min-width: 0; }
  .stagger .frame:first-child { margin-top: 0; }
  .preview { display: none; }
}

/* Inside the editor's live preview: no fade on redraw, photos are clickable to select */
.preview-mode .frame :is(img, video) { opacity: 1; transition: none; }
.preview-mode .frame { cursor: pointer; }
.frame.shrunk > :is(img, video) { scale: var(--size); }
.pv-size { position: absolute; z-index: 20; translate: -100% 0; display: flex; align-items: flex-start; gap: 6px; flex-direction: row-reverse; padding: 6px; opacity: 0; transition: opacity 150ms; touch-action: none; user-select: none; }
.frame:hover > .pv-size, .pv-size.dragging { opacity: 1; }
.pv-arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.78); color: #fff; font: 600 18px/1 -apple-system, Helvetica, Arial, sans-serif; cursor: nesw-resize; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.pv-pct { padding: 6px 8px; border-radius: 999px; background: rgba(0,0,0,.78); color: #fff; font: 600 12px/1 -apple-system, Helvetica, Arial, sans-serif; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity 150ms; }
.pv-size:hover .pv-pct, .pv-size.dragging .pv-pct { opacity: 1; }
.pv-size.dragging .pv-arrow { background: #fff; color: #000; }
/* The desktop preview is drawn at 1440px and shrunk to fit the editor, so make the handle bigger there. */
@media (min-width: 1000px) { .pv-size { padding: 10px; gap: 10px; } .pv-arrow { width: 56px; height: 56px; font-size: 32px; } .pv-pct { font-size: 22px; padding: 10px 14px; } }
