:root {
  --bg: #2b2b2b;
  --surface: #383838;
  --text: #f0ede8;
  --muted: #b5b0a8;
  --accent: #d8c9a3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

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

.page-header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.page-header h1 {
  margin: 0.25rem 0 0;
  font-weight: normal;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: 0.04em;
}

.page-header .subtitle {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.08em;
}

.page-header .back {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

main { max-width: 1200px; margin: 0 auto; padding: 0 1rem 3rem; }

/* ---- album overview ---- */
.albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  padding-top: 1rem;
}

.album-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

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

.album-card:hover img { transform: scale(1.04); }
.album-card:hover { text-decoration: none; }

.album-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.5rem 1rem 0.8rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
}

.album-label strong {
  display: block;
  font-weight: normal;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
}

.album-label em {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

/* ---- photo grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  padding-top: 1rem;
}

.tile {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
}

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

.tile:hover img { transform: scale(1.05); opacity: 0.9; }

.page-footer {
  text-align: center;
  padding: 0 1rem 3rem;
  font-size: 0.95rem;
}

/* ---- lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 15, 0.96);
  touch-action: pan-y;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 5rem);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 2.2rem;
  line-height: 1;
  padding: 1rem;
  cursor: pointer;
  user-select: none;
}

.lightbox button:hover { color: #fff; }
.lightbox .lb-close { top: 0.25rem; right: 0.5rem; }
.lightbox .lb-prev { left: 0.25rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 0.25rem; top: 50%; transform: translateY(-50%); }

.lightbox .lb-counter {
  position: absolute;
  bottom: 0.9rem;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
  .lightbox .lb-prev, .lightbox .lb-next { font-size: 1.8rem; padding: 0.75rem 0.5rem; }
}
