:root {
  --bg: #ffffff;
  --tile: #f3f2ef;
  --text: #1a1917;
  --muted: #77746e;
  --radius: 0px;
  --max: 1440px;
  --scrim: rgba(12, 11, 10, 0.38);
}

* { box-sizing: border-box; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header { max-width: var(--max); margin: 0 auto; padding: 3rem 1.5rem 1.25rem; text-align: center; }
.home-link { text-decoration: none; color: inherit; }
#site-title { font-size: 1.6rem; font-weight: 500; margin: 0; letter-spacing: 0.05em; }
.tagline { color: var(--muted); margin: 0.4rem 0 0; font-size: 0.92rem; font-weight: 300; }

main { max-width: var(--max); margin: 0 auto; padding: 1.25rem 1.5rem 2rem; }

/* ---------- Landing: album grid (centered) ---------- */
.album-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, 340px);
  justify-content: center;
  gap: 0.75rem;
  animation: fadeIn 0.5s ease;
}
.album-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile);
}
.album-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.album-card:hover img { transform: scale(1.035); }
.album-card .cover-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 2.4rem; background: var(--tile);
}

/* Title overlay — centered over the photo.
   Desktop: fades in on hover. Touch (no hover): always visible. */
.album-overlay {
  position: absolute; inset: 0;
  display: grid; align-content: center; justify-items: center;
  background: var(--scrim);
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.album-overlay h2 { margin: 0; font-size: 1.2rem; font-weight: 500; color: #fff; letter-spacing: 0.02em; }
.album-overlay .album-meta { margin: 0.2rem 0 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.85); }

@media (hover: hover) {
  .album-overlay { opacity: 0; }
  .album-card:hover .album-overlay { opacity: 1; }
}

@media (max-width: 520px) {
  .album-list { grid-template-columns: repeat(auto-fit, 160px); gap: 0.4rem; }
  .album-overlay h2 { font-size: 0.95rem; }
  .album-overlay .album-meta { font-size: 0.7rem; }
}

/* ---------- Album page ---------- */
.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 1.25rem; font-size: 0.92rem; }
.back-link:hover { color: var(--text); }
.album-header h2 { margin: 0 0 0.1rem; font-size: 1.5rem; font-weight: 500; }
.album-header .album-meta { color: var(--muted); margin: 0 0 1.5rem; font-size: 0.9rem; }

/* ---------- Album page: justified rows (natural aspect ratios, edge-to-edge) ---------- */
.photo-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; align-content: flex-start; animation: fadeIn 0.5s ease; }
.photo-grid .item { flex: 0 0 auto; position: relative; cursor: zoom-in; overflow: hidden; }
.photo-grid img, .photo-grid video { width: 100%; height: 100%; display: block; object-fit: cover; background: var(--tile); }
.item .play-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 2.4rem; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); pointer-events: none;
}

/* ---------- Password gate ---------- */
.gate {
  max-width: 380px; margin: 4rem auto; text-align: center;
  background: var(--tile); padding: 2rem; border-radius: var(--radius); border: 1px solid #e4e2de;
}
.gate input {
  width: 100%; padding: 0.7rem 0.9rem; margin: 1rem 0; border-radius: 8px;
  border: 1px solid #d8d6d2; background: #fff; color: var(--text); font-size: 1rem;
}
.gate button {
  padding: 0.7rem 1.6rem; border-radius: 8px; border: 0; cursor: pointer;
  background: #171512; color: #fff; font-weight: 500;
}
.gate .gate-error { color: #b33a2e; font-size: 0.9rem; min-height: 1.2em; }

/* ---------- Lightbox (white, photos viewed on paper) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(255, 255, 255, 0.97);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.5s ease;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 94vw; max-height: 88vh; display: grid; place-items: center; }
.lightbox img, .lightbox video { max-width: 94vw; max-height: 88vh; object-fit: contain; animation: fadeIn 0.5s ease; }
.lb-close, .lb-prev, .lb-next {
  position: fixed; background: none; border: 0; color: #9b9891; cursor: pointer;
  font-size: 2.6rem; line-height: 1; padding: 0.5rem; z-index: 51;
}
.lb-close { top: 0.6rem; right: 1.2rem; }
.lb-prev { left: 0.8rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.8rem; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--text); }
.lb-caption { position: fixed; bottom: 1.1rem; width: 100%; text-align: center; color: var(--muted); font-size: 0.9rem; margin: 0; }

.site-footer { max-width: var(--max); margin: 2rem auto 0; padding: 1.5rem; color: var(--muted); font-size: 0.75rem; text-align: left; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }