body.gallery-page {
  background: #0a0a0a;
  padding: 0;
  color: #e5e5e5;
}

/* ─── Navigation ──────────────────────────────────────────────────────────── */
.gallery-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.gallery-nav a {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.gallery-nav a:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.gallery-nav .wordmark {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
}

/* ─── Album overview ──────────────────────────────────────────────────────── */
.gallery-overview {
  padding: 80px 0 60px;
}

.gallery-overview h1 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

.gallery-intro {
  font-family: var(--font-sans);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  margin-bottom: 36px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 40px;
  max-width: 900px;
  margin: 0 auto;
}

.album-card {
  text-decoration: none;
  color: inherit;
}

.album-card:hover {
  text-decoration: none;
}

.album-cover {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.album-card:hover .album-cover img {
  opacity: 0.85;
}

.album-info {
  padding: 10px 0 0;
}

.album-info h3 {
  font-family: var(--font-sans) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 !important;
}

.album-count {
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
}

/* ─── Slideshow viewer ────────────────────────────────────────────────────── */
body.gallery-page:has(.gallery-viewer) {
  overflow: hidden;
}

.gallery-viewer {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  padding: 40px 80px;
  box-sizing: border-box;
}

.gallery-frame {
  display: flex;
  flex-direction: column;
  max-width: 75vw;
}

.gallery-viewer img {
  display: block;
  animation: gallery-enter 0.6s ease both;
}

@keyframes gallery-enter {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-below {
  margin-top: 10px;
  text-align: left;
  min-width: 0;
  animation: gallery-caption-in 0.6s ease 0.2s forwards;
  opacity: 0;
}

@keyframes gallery-caption-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-title {
  font-family: var(--font-sans);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
}

.gallery-description {
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 3px;
  line-height: 1.5;
}

.gallery-description:empty {
  display: none;
}

.gallery-credit {
  font-family: var(--font-sans);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 5px;
}

.gallery-counter {
  position: fixed;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  z-index: 5;
}

.gallery-close {
  position: fixed;
  top: 16px;
  right: 20px;
  font-size: 28px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  z-index: 10;
  line-height: 1;
  transition: color 0.2s;
}

.gallery-close:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.gallery-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.2);
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 5;
  padding: 20px;
  line-height: 1;
}

.gallery-arrow:hover {
  color: rgba(255, 255, 255, 0.5);
}

.gallery-arrow.prev {
  left: 12px;
}

.gallery-arrow.next {
  right: 12px;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 24px;
  }
  .gallery-viewer {
    padding: 40px 40px;
  }
  .gallery-nav {
    padding: 16px 20px;
  }
}

@media (max-width: 500px) {
  .album-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
  .gallery-viewer {
    padding: 30px 20px;
  }
  .gallery-viewer img {
    max-width: 90vw;
  }
}
