:root {
  --bg: #f8f8f6;
  --text: #171717;
  --muted: #757575;
  --line: #e7e7e2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 28px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.back { color: var(--muted); font-size: .9rem; }

main { max-width: 1400px; margin: 0 auto; padding: 40px 28px 60px; }
.intro, .album-head { margin-bottom: 34px; }
h1 { font-size: clamp(2rem, 4vw, 4rem); margin: 0 0 8px; font-weight: 500; letter-spacing: -.03em; }
.intro p, .album-head p, .empty { margin: 0; color: var(--muted); }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.album-card { display: block; }
.album-cover {
  aspect-ratio: 4 / 3;
  background: #ecece8;
  overflow: hidden;
}
.album-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s ease;
}
.album-card:hover .album-cover img { transform: scale(1.015); }
.album-meta { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-top: 10px; }
.album-meta h2 { font-size: 1rem; margin: 0; font-weight: 500; }
.album-meta span { color: var(--muted); font-size: .85rem; white-space: nowrap; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.photo {
  appearance: none; border: 0; padding: 0; margin: 0; background: #ecece8;
  cursor: zoom-in; overflow: hidden; aspect-ratio: 4 / 3;
}
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.photo:hover img { transform: scale(1.01); }

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,10,10,.95);
  display: grid; place-items: center;
  padding: 40px 70px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; }
.close, .nav {
  position: absolute; border: 0; background: transparent; color: white; cursor: pointer;
  font: inherit;
}
.close { top: 14px; right: 22px; font-size: 2.2rem; }
.nav { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 18px; }
.prev { left: 4px; }
.next { right: 4px; }

code { background: #efefeb; padding: .1rem .3rem; border-radius: 3px; }

@media (max-width: 700px) {
  .site-header { padding: 20px 18px 4px; }
  main { padding: 28px 18px 40px; }
  .album-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .album-meta { display: block; }
  .album-meta span { display: block; margin-top: 2px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .lightbox { padding: 40px 20px; }
  .nav { font-size: 2.4rem; padding: 8px; }
}

@media (max-width: 430px) {
  .album-grid { grid-template-columns: 1fr; }
}
