/* monsterthedog — modern minimal photo gallery */
:root {
  --bg: #fafaf8;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --hairline: #e5e5e0;
  --gap: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.site-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.site-header .brand { font-weight: 600; font-size: 1.05rem; letter-spacing: 0.02em; }
.site-header nav a { color: var(--muted); font-size: 0.9rem; }
.site-header nav a:hover { color: var(--fg); }

main { padding: 28px 24px 64px; max-width: 1400px; margin: 0 auto; }

.site-footer {
  padding: 24px; border-top: 1px solid var(--hairline);
  color: var(--muted); font-size: 0.85rem; text-align: center;
}

/* Album index grid */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}
.album-card {
  display: flex; flex-direction: column; gap: 10px;
}
.album-card img, .album-cover-empty {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  background: #ddd; border-radius: 4px;
  transition: transform .25s ease, opacity .25s ease;
}
.album-card:hover img { transform: scale(1.01); opacity: .92; }
.album-meta h2 {
  margin: 0 0 2px; font-size: 0.95rem; font-weight: 500;
}
.album-meta .count { color: var(--muted); font-size: 0.8rem; }

/* Album page header */
.album-header {
  margin: 0 0 24px;
  display: flex; align-items: baseline; gap: 16px;
  border-bottom: 1px solid var(--hairline); padding-bottom: 16px;
}
.album-header h1 { margin: 0; font-size: 1.4rem; font-weight: 500; }
.album-header .count { color: var(--muted); font-size: 0.9rem; }

/* Photo grid (square thumbnails) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--gap);
}
.photo-grid figure {
  margin: 0; cursor: zoom-in; overflow: hidden; border-radius: 3px;
}
.photo-grid img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  transition: transform .3s ease, opacity .2s ease;
}
.photo-grid figure:hover img { transform: scale(1.04); opacity: .92; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox .lb-img {
  max-width: 100%; max-height: calc(100vh - 96px);
  object-fit: contain;
}
.lightbox .lb-caption {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.85); font-size: 0.9rem; max-width: 80%;
  text-align: center; line-height: 1.4;
}
.lightbox button {
  background: rgba(255,255,255,0.08); color: #fff; border: 0;
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.4rem; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lightbox button:hover { background: rgba(255,255,255,0.18); }
.lightbox .lb-close { position: absolute; top: 18px; right: 18px; }
.lightbox .lb-prev { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .site-header { padding: 14px 16px; }
  main { padding: 18px 12px 40px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .lightbox { padding: 8px; }
  .lightbox .lb-prev, .lightbox .lb-next { width: 38px; height: 38px; }
}
