:root {
  --bg: #f5f2ed;
  --ink: #1a1a1a;
  --muted: #7a766f;
  --line: rgba(26, 26, 26, 0.12);
  --display: 'Cormorant Garamond', 'Times New Roman', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 4vw, 3rem);
}
a { color: inherit; text-decoration: none; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.top .logo { font-weight: 500; }
.top .loc { color: var(--muted); }

main {
  flex: 1;
  padding: clamp(3rem, 8vh, 6rem) 0 clamp(2rem, 5vh, 4rem);
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.back {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
  transition: color 0.2s ease;
}
.back:hover { color: var(--ink); }

.project-head { max-width: none; margin-top: clamp(2rem, 5vh, 3.5rem); margin-bottom: clamp(2.5rem, 6vh, 4rem); }
h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.005em;
  margin-bottom: 1.25rem;
}
h1 em { font-style: italic; font-weight: 400; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}
.meta span::after { content: '·'; margin-left: 0.75rem; color: var(--line); }
.meta span:last-child::after { content: ''; margin-left: 0; }

.lede {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.4;
  color: var(--muted);
  margin-bottom: 1.75rem;
}
.body-copy p { max-width: none; line-height: 1.75; margin-bottom: 1rem; }
.body-copy p:last-child { margin-bottom: 0; }

.placeholder-note {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 0.4rem 0.7rem;
}

/* Placeholder image grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}
.slot {
  position: relative;
  background: rgba(26, 26, 26, 0.04);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot.portrait { aspect-ratio: 2 / 3; }
.slot.landscape { aspect-ratio: 3 / 2; grid-column: 1 / -1; }
.slot.square { aspect-ratio: 1 / 1; }
.slot span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Justified overview gallery ---- */
.overview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(1.5rem, 4vh, 2.75rem);
}
.tile {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: rgba(26, 26, 26, 0.04);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}
.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.tile .num {
  position: absolute;
  left: 12px;
  bottom: 11px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #fff;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .tile:hover {
    transform: scale(1.045);
    z-index: 5;
    box-shadow: 0 18px 44px rgba(26, 26, 26, 0.20);
  }
  .tile:hover::after { opacity: 1; }
  .tile:hover .num { opacity: 1; transform: translateY(0); }
}

/* ---- Lightbox (light / museum) ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(245, 242, 237, 0.98);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: clamp(2.5rem, 6vw, 5rem);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(26, 26, 26, 0.18);
  -webkit-user-select: none;
  user-select: none;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 242, 237, 0.7);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lb-nav:hover { background: var(--bg); border-color: var(--ink); }
.lb-prev { left: clamp(0.75rem, 3vw, 2.5rem); }
.lb-next { right: clamp(0.75rem, 3vw, 2.5rem); }
.lb-close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.lb-close:hover { opacity: 1; }
.lb-counter {
  position: absolute;
  bottom: clamp(1rem, 3vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
}

footer {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .slot.landscape { grid-column: auto; }
}

/* ---- Sequential one-by-one view ---- */
.sequence {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.5rem, 7vh, 5rem);
  margin-top: clamp(2rem, 5vh, 3.5rem);
}
.shot { margin: 0; width: 100%; text-align: center; }
.shot img {
  display: inline-block;
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
}
.shot figcaption {
  margin-top: 0.9rem;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* ---- Single-image carousel (one at a time, controls below) ---- */
.carousel { margin-top: clamp(2rem, 5vh, 3.5rem); }
.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(420px, 78vh, 880px);
  cursor: pointer;
}
.stage img {
  display: none;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
.stage img.active { display: block; }
.c-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1.4rem;
}
.c-nav {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.c-nav:hover { background: rgba(26, 26, 26, 0.05); border-color: var(--ink); }
.c-counter {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  min-width: 66px;
  text-align: center;
}

.mob-only { display: none; }

@media (max-width: 640px) {
  main { padding-top: 1.5rem; }
  .back { margin-bottom: 1rem; }
  .carousel { margin-top: 1rem; }
  .stage { height: 48vh; }
  .c-controls { margin-top: 1rem; }
  .project-head { margin-top: 3.5rem; }
  .mob-only { display: inline; }
  .desk-only { display: none; }
}
