/* ============================================================
   DESIGN TOKENS: change these to restyle the whole site.
   ============================================================ */
:root {
  --bg: #0d0c0a;          /* page background: warm near-black */
  --bg-2: #15130f;        /* slightly lifted panels */
  --line: #2a261f;        /* hairlines */
  --text: #eee8dc;        /* ivory body text */
  --muted: #8f877a;       /* secondary text */
  --gold: #c9a46a;        /* brass accent */

  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --row: 340px;           /* target height of a gallery row */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* A faint film grain over everything, for texture. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--gold); color: var(--bg); }

.mono {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.muted { color: var(--muted); }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(13, 12, 10, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 14px;
  padding-bottom: 14px;
  border-color: var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: .01em;
}
.brand-mark {
  width: 18px; height: 18px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text);
  opacity: .75;
  transition: opacity .2s, color .2s;
}
.nav-links a:hover { opacity: 1; color: var(--gold); }

/* ---------- Hero (opening screen) ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: drift 18s var(--ease) forwards;
}
@keyframes drift { to { transform: scale(1); } }
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13,12,10,.55) 0%, rgba(13,12,10,0) 30%),
    linear-gradient(0deg, rgba(13,12,10,1) 0%, rgba(13,12,10,.55) 35%, rgba(13,12,10,0) 70%);
}
.hero-content {
  position: relative;
  padding: 0 var(--gutter) clamp(72px, 12vh, 140px);
  max-width: 1100px;
  animation: rise 1.4s .2s var(--ease) both;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0 0 24px;
}
.hero-tagline { max-width: 480px; color: #cfc7b8; font-size: 1.05rem; margin: 0; }
.hero-credit {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(72px, 12vh, 140px);
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: color .2s;
}
.hero-credit:hover { color: var(--gold); }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: var(--muted);
  padding-bottom: 34px;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 26px;
  background: var(--gold);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .2; transform: scaleY(.4); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* ---------- Statement, stats, series index ---------- */
.statement {
  padding: clamp(80px, 14vh, 160px) var(--gutter) clamp(60px, 10vh, 120px);
  max-width: 1280px;
  margin: 0 auto;
}
.statement-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.9rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0 0 72px;
  max-width: 1000px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.stats > div {
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stats > div + div { border-left: 1px solid var(--line); padding-left: clamp(16px, 3vw, 40px); }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
}
.series-index { display: grid; }
.series-index-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding .4s var(--ease), color .3s;
}
.series-index-item:hover { padding-left: 14px; color: var(--gold); }
.series-index-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
}

/* ---------- Chapters (one per series) ---------- */
#work { padding: 0 var(--gutter); }
.chapter { padding: clamp(60px, 10vh, 120px) 0 20px; scroll-margin-top: 60px; }
.chapter-head {
  display: grid;
  grid-template-columns: auto 1fr minmax(0, 420px);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  padding-bottom: 36px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.chapter-num {
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 300;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
}
.chapter-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0 0 10px;
}
.chapter-sub { margin: 0; color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1.15rem; }
.chapter-intro { margin: 0; color: #c4bcae; font-size: .98rem; }

/* Justified gallery: each tile grows in proportion to its shape,
   so every row lines up at the same height without cropping. */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.grid::after { content: ""; flex-grow: 999; }
.tile {
  position: relative;
  flex-grow: var(--r);
  flex-basis: calc(var(--row) * var(--r));
  overflow: hidden;
  background: var(--bg-2);
}
.tile img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--r);
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter .6s;
  filter: saturate(.92);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 45%);
  opacity: 0;
  transition: opacity .5s;
}
.tile-cap {
  position: absolute;
  left: 18px; right: 18px; bottom: 16px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s, transform .5s var(--ease);
}
.tile-cap .mono { color: var(--gold); }
.tile-title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); filter: saturate(1.05); }
.tile:hover::after, .tile:focus-visible::after,
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; transform: none; }
.tile:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

/* ---------- About & gear ---------- */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  padding: clamp(100px, 16vh, 180px) var(--gutter) clamp(60px, 10vh, 120px);
  max-width: 1280px;
  margin: 0 auto;
  scroll-margin-top: 40px;
}
.about-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 28px;
}
.about-title em { color: var(--gold); }
.about-text { color: #c4bcae; max-width: 560px; margin: 0; }
.gear-list { margin: 0; }
.gear-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.gear-row:first-child { border-top: 1px solid var(--line); }
.gear-row dd { margin: 0; font-family: var(--serif); font-size: 1.2rem; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
}
.footer a:hover { color: var(--gold); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   SINGLE PHOTO PAGE
   ============================================================ */
.viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  min-height: 100svh;
  padding-top: 64px;
}
.stage {
  margin: 0;
  position: sticky;
  top: 64px;
  height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 48px);
  cursor: zoom-in;
  background: radial-gradient(ellipse at center, #1a1813 0%, var(--bg) 70%);
}
.stage-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  animation: fadein 1s var(--ease) both;
}
@keyframes fadein { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

.panel {
  border-left: 1px solid var(--line);
  padding: clamp(32px, 5vh, 64px) 40px 48px;
  background: var(--bg-2);
  animation: rise 1s .15s var(--ease) both;
}
.panel .eyebrow { display: flex; justify-content: space-between; gap: 12px; }
.panel-series { border-bottom: 1px solid transparent; transition: border-color .2s; }
.panel-series:hover { border-color: var(--gold); }
.panel-count { color: var(--muted); letter-spacing: .1em; }
.panel-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 3.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}
.panel-meta { color: var(--muted); margin: 0 0 32px; text-transform: none; letter-spacing: .04em; }
.panel-story p { margin: 0 0 1.1em; color: #d8d0c2; font-size: 1.02rem; line-height: 1.75; }
.panel-story p:first-child::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.6em;
  line-height: .85;
  padding: 6px 10px 0 0;
  color: var(--gold);
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 40px 0;
  border-top: 1px solid var(--line);
}
.spec {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.spec:nth-child(odd) { padding-right: 12px; }
.spec:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.spec dt { margin-bottom: 4px; }
.spec dd { margin: 0; font-size: .95rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  transition: border-color .3s, background .3s;
}
.pager-item:hover { border-color: var(--gold); background: rgba(201, 164, 106, .05); }
.pager-item img { width: 52px; height: 52px; object-fit: cover; flex: none; }
.pager-item.next { flex-direction: row-reverse; text-align: right; }
.pager-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pager-title { font-family: var(--serif); font-size: 1rem; line-height: 1.2; }
.empty-slot { border-color: transparent; }
.hint { margin: 28px 0 0; text-transform: none; letter-spacing: .04em; }
.empty { padding: 160px var(--gutter); text-align: center; color: var(--muted); grid-column: 1 / -1; }
.empty a { color: var(--gold); }

/* Full-screen view (click the photo) */
body.zoomed { overflow: hidden; }
body.zoomed .stage {
  position: fixed;
  inset: 0;
  top: 0;
  height: 100svh;
  z-index: 200;
  background: #000;
  cursor: zoom-out;
  padding: 12px;
}
body.zoomed .stage-img { box-shadow: none; }

/* ---------- Tablets & phones ---------- */
@media (max-width: 1000px) {
  .chapter-head { grid-template-columns: auto 1fr; }
  .chapter-intro { grid-column: 1 / -1; max-width: 640px; }
  .about { grid-template-columns: 1fr; }
  .viewer { grid-template-columns: 1fr; }
  .stage { position: relative; top: 0; height: auto; min-height: 50vh; padding: 16px; }
  .stage-img { max-height: 80vh; }
  .panel { border-left: 0; border-top: 1px solid var(--line); padding: 32px var(--gutter) 48px; }
}
@media (max-width: 640px) {
  :root { --row: 190px; }
  .grid { gap: 8px; }
  .nav-links { gap: 18px; }
  .hero-credit { display: none; }
  .statement-text { margin-bottom: 48px; }
  .stats > div { padding: 20px 0; }
  .series-index-item { grid-template-columns: 36px 1fr auto; }
  .chapter-head { grid-template-columns: 1fr; gap: 14px; }
  .chapter-num { font-size: 3.6rem; }
  .tile-cap { opacity: 1; transform: none; left: 10px; bottom: 8px; }
  .tile-title { font-size: 1rem; }
  .tile::after { opacity: .9; }
  .pager { grid-template-columns: 1fr; }
  .pager-item.next { flex-direction: row; text-align: left; }
  .specs { grid-template-columns: 1fr 1fr; }
}

/* On touch screens there's no hover, so captions stay visible. */
@media (hover: none) {
  .tile-cap { opacity: 1; transform: none; }
  .tile::after { opacity: .9; }
}

/* Respect people who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
