/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0e0e10;
  --surface: #18181b;
  --text: #efeff1;
  --text-muted: #adadb8;
  --accent: #7c6aef;
  --accent-hover: #9d8ff7;
  --radius: 10px;
  --gap: 16px;
}

body {
  font-family: ui-sans-serif,system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text-muted); }

img { display: block; max-width: 100%; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  text-align: center;
  padding: 48px 24px 32px;
}
.site-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.subtitle {
  color: var(--text-muted);
  margin-top: 4px;
  font-size: 0.95rem;
}

/* ── Gallery Grid (Index) ──────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  padding: 0 24px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.cover-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}

.cover-image {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #222;
}

.cover-info {
  padding: 14px 16px;
}
.cover-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.cover-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.cover-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Gallery Page ───────────────────────────────────────────── */
.gallery-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.back-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.back-link:hover { color: var(--accent); }
.gallery-header h1 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
}
.gallery-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
  text-align: center;
}
.gallery-description {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 8px;
  text-align: center;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 0 24px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.photo-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.photo-title {
  padding: 10px 14px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid #222;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .gallery-grid,
  .photo-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 32px;
  }
  .site-header { padding: 32px 16px 24px; }
  .site-header h1 { font-size: 1.5rem; }
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none; border: none;
  color: #fff; font-size: 1.8rem;
  cursor: pointer; z-index: 10;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: #fff; font-size: 3rem;
  cursor: pointer; padding: 20px;
  opacity: 0.6;
}
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-caption {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 0.9rem;
  padding: 0 20px;
  text-align: center;
}
