:root {
  --bg: #f6f4ef;
  --ink: #1a1a18;
  --muted: #8a877e;
  --line: #e3e0d6;
  --accent: #9c1c22;
  --surname: #4c4a44;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", -apple-system, sans-serif;
}

/* Photography index */

.photography {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) 8rem;
}

.index-list {
  max-width: 1100px;
  margin: 0 auto;
  /* Matches the height of the "Directing"/"Producing" group label + its
     margin on the Film page, so the first tile here starts at the same
     height as the first tile there. */
  margin-top: clamp(3rem, 7vw, 4.25rem);
  display: flex;
  flex-direction: column;
  gap: clamp(5rem, 12vw, 10rem);
}

/* Tile */

.tile {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.tile-cover-wrap {
  position: relative;
  display: block;
}

.tile-cover {
  display: block;
  width: 100%;
  height: auto;
}

.tile-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.tile:hover .tile-caption {
  opacity: 1;
}

/* Revealed images: the rest of the gallery, opening below the cover
   in a flowing, staggered composition — gaps here are deliberately
   tighter than the space between two main tiles.
   Only a click opens this — hover only shows the caption above,
   so scrolling past a tile can never trigger it by accident. */

.tile-reveal {
  display: block;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.tile.is-pinned .tile-reveal {
  max-height: 8000px;
}

.tile-reveal-inner {
  display: block;
  opacity: 0;
  padding-top: clamp(0.9rem, 2vw, 1.4rem);
  transition: opacity 0.45s ease;
}

.tile.is-pinned .tile-reveal-inner {
  opacity: 1;
  transition-delay: 0.35s;
}

.tile-reveal-grid {
  display: block;
}

.tile-reveal-cols {
  display: block;
  columns: 2 340px;
  column-gap: clamp(0.7rem, 1.6vw, 1.1rem);
}

.tile-reveal-cols img {
  display: block;
  width: 100%;
  height: auto;
  break-inside: avoid;
  margin-bottom: clamp(0.7rem, 1.6vw, 1.1rem);
}

/* A standout shot, full width like the main cover image, sitting as its own
   block after the two-column set — not inside the column context, so its
   gap above stays consistent no matter how uneven the two columns end up. */
.tile-reveal-grid img.is-featured {
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(0.7rem, 1.6vw, 1.1rem);
}

/* Explicit two-column split, used instead of .tile-reveal-cols when a
   featured full-width image follows: the shorter column's second image is
   pushed down to align its bottom edge with the taller column, so the extra
   space lands as a gap *between* the two small images, not before the
   featured image below. */
.tile-reveal-split {
  display: flex;
  column-gap: clamp(0.7rem, 1.6vw, 1.1rem);
  align-items: stretch;
}

.tile-reveal-split .split-col {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Weighted instead of an even 50/50 split — the portrait shot naturally
   runs much taller than two stacked landscape shots at equal width, which
   left an oversized, ungainly gap between them. Giving the landscape pair
   a bit more width (so they render bigger) closes most of that gap while
   still leaving a deliberate, proportionate one instead of a tight seam. */
.tile-reveal-split .split-col--narrow {
  flex: 0.96 1 0%;
}

.tile-reveal-split .split-col--wide {
  flex: 1.04 1 0%;
}

.tile-reveal-split img {
  display: block;
  width: 100%;
  height: auto;
}

/* Responsive */

@media (max-width: 640px) {
  .tile-reveal-cols {
    columns: 1;
  }

  .tile-reveal-split {
    flex-direction: column;
    row-gap: clamp(0.7rem, 1.6vw, 1.1rem);
  }

  .tile-reveal-split .split-col {
    justify-content: flex-start;
    row-gap: clamp(0.7rem, 1.6vw, 1.1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile-reveal,
  .tile-reveal-inner,
  .tile-caption {
    transition: none !important;
  }
}
