* { box-sizing: border-box; }
:root {
  --bg: #0b100f;
  --panel: #111816;
  --line: #2b3934;
  --text: #f4f0e6;
  --muted: #b8c1ba;
  --gold: #dfc58c;
}
body {
  margin: 0;
  background: radial-gradient(circle at top, #17201c 0, var(--bg) 45%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.site-header, .container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.site-header {
  padding: 58px 0 30px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}
.eyebrow {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 4px;
  font-weight: 700;
}
h1 { font-size: clamp(34px, 5vw, 64px); margin: 12px 0 8px; }
h2 { font-size: 24px; margin: 38px 0 16px; }
p { color: var(--muted); }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
a { color: var(--gold); text-decoration: none; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.filter, .primary-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 17px;
  cursor: pointer;
  font: inherit;
}
.filter.active, .primary-button {
  background: var(--gold);
  color: #201b10;
  border-color: var(--gold);
}
.status { margin: 18px 0; }
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.image-card {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.image-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #17201c;
}
figcaption {
  padding: 12px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.empty, .panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 22, .8);
  padding: 28px;
}
.admin-page { padding-top: 60px; }
.back-link { display: inline-block; margin-bottom: 24px; }
.note { margin-top: 28px; font-size: 14px; }
footer { text-align: center; color: var(--muted); padding: 60px 0 30px; font-size: 13px; }
@media (max-width: 720px) {
  .site-header { display: block; }
  nav { margin-top: 24px; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .image-card { border-radius: 10px; }
}


.image-link {
  display: block;
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, .88);
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  display: block;
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, .55);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(17, 24, 22, .9);
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--gold);
  color: #201b10;
  border-color: var(--gold);
}

body.lightbox-open {
  overflow: hidden;
}

.image-caption{padding:12px 0 0;text-align:center;color:#f4efe5;font-weight:600;line-height:1.6}.caption{margin-top:8px;color:#d8c18b;line-height:1.5;white-space:pre-wrap;word-break:break-word}.image-card .body .caption{font-size:.9rem}

/* Performance and loading feedback */
.image-card {
  contain: layout paint;
}
.image-card.is-loading {
  background: linear-gradient(110deg, #111a16 8%, #1c2923 18%, #111a16 33%);
  background-size: 200% 100%;
  animation: gallery-shimmer 1.4s linear infinite;
}
.gallery-image {
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-image.is-loaded {
  opacity: 1;
}
.image-card.is-error {
  animation: none;
  background: #171d19;
}
.lightbox-image {
  opacity: 0;
  transition: opacity .2s ease;
}
.lightbox-image.is-loaded {
  opacity: 1;
}
@keyframes gallery-shimmer {
  to { background-position-x: -200%; }
}
@media (prefers-reduced-motion: reduce) {
  .image-card.is-loading {
    animation: none;
  }
  .gallery-image,
  .lightbox-image {
    transition: none;
  }
}
