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

:root {
  --bg:        #0d0d0d;
  --surface:   #161616;
  --border:    #262626;
  --text:      #f0f0f0;
  --muted:     #888;
  --accent:    #c8f55a;   /* lime-green — change freely */
  --radius:    10px;
  --gap:       14px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100dvh;
}

/* ── Header ── */
.site-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  text-align: center;
}

.site-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.site-header h1 em {
  font-style: normal;
  color: var(--accent);
}

.site-header p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
}

/* ── Gallery ── */
.gallery-wrap {
  padding: 0 16px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

/* CSS masonry via column-count */
.gallery {
  column-count: 1;
  column-gap: var(--gap);
}

@media (min-width: 560px)  { .gallery { column-count: 2; } }
@media (min-width: 900px)  { .gallery { column-count: 3; } }
@media (min-width: 1200px) { .gallery { column-count: 4; } }

/* ── Tiles ── */
.tile {
  break-inside: avoid;
  margin-bottom: var(--gap);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.tile:hover {
  transform: translateY(-3px);
  border-color: #3a3a3a;
}

.tile img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--border);  /* placeholder while loading */
}

.tile figcaption {
  padding: 10px 12px 11px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* ── Loading skeleton ── */
.skeleton {
  break-inside: avoid;
  margin-bottom: var(--gap);
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Empty / error state ── */
.state-msg {
  text-align: center;
  color: var(--muted);
  padding: 80px 24px;
  font-size: 1rem;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(90vw, 960px);
  max-height: 80dvh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}

.lightbox-caption {
  color: #ccc;
  font-size: 0.9rem;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.lightbox-close:hover { opacity: 1; }

/* arrow nav */
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.4rem;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.18); }

/* ── Footer / CTA ── */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 48px 24px 64px;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 8px;
  transition: opacity 0.15s, transform 0.15s;
  letter-spacing: -0.01em;
}

.cta-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
