/* ── Page layout ─────────────────────────────────────────── */

main {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 6rem;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.page-header {
  margin-bottom: 3rem;
}

.page-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.page-label a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.page-label a:hover {
  color: var(--color-text);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.page-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

/* ── Caption ─────────────────────────────────────────────── */

.shoot-caption {
  max-width: 720px;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

/* ── Photo grid ──────────────────────────────────────────── */

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.photo-thumb {
  flex: 1 0 220px;
  max-width: 280px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(90deg, #141210 25%, #1e1b0e 50%, #141210 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.35s ease, filter 0.25s;
}

.photo-thumb img.loaded {
  opacity: 1;
}

.photo-thumb:hover img {
  transform: scale(1.04);
  filter: brightness(1.1);
}

/* ── Lightbox ────────────────────────────────────────────── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-shimmer {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(60vw, calc((100vh - 6rem) * 1.5));
  aspect-ratio: 3 / 2;
  background: linear-gradient(90deg, #1a180f 25%, #24210f 50%, #1a180f 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 2px;
}

.lightbox-shimmer.visible {
  display: block;
}

.lightbox-img {
  max-width: calc(100vw - 8rem);
  max-height: calc(100vh - 6rem);
  object-fit: contain;
  user-select: none;
  transition: opacity 0.4s ease;
}

.lightbox-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem 1.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-btn:hover {
  color: var(--color-text);
}

.lightbox-btn.prev { left: 0; }
.lightbox-btn.next { right: 0; }

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.75rem;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--color-text);
}

.lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-muted);
}

.lightbox-meta {
  position: fixed;
  left: 50%;
  bottom: 3.25rem;
  transform: translateX(-50%);
  max-width: min(calc(100vw - 8rem), 1100px);
  padding: 0.55rem 1rem;
  background: rgba(12, 11, 8, 0.72);
  color: var(--color-text);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 201;
}

/* ── Back to gallery ─────────────────────────────────────── */

.back-to-gallery {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 4rem;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.back-to-gallery .back-arrow {
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.back-to-gallery:hover {
  color: var(--color-accent);
}

.back-to-gallery:hover .back-arrow {
  transform: translateX(-4px);
}

/* ── Error state ─────────────────────────────────────────── */

.error {
  padding: 4rem 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.error a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}

.error a:hover {
  color: var(--color-text);
}
