:root {
  --bg: #0f0f10;
  --surface: #18181b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #e4e4e7;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
}

.site-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--accent);
}

.crumb {
  font-size: 0.875rem;
  color: var(--muted);
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--text);
  text-decoration: underline;
}

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

.page-intro {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.page-intro h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.page-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.album-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
}

.album-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.album-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.album-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.album-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.album-card__thumb {
  aspect-ratio: 4 / 3;
  background: #27272a;
  overflow: hidden;
}

.album-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-card__meta {
  padding: 0.85rem 1rem 1rem;
}

.album-card__title {
  font-weight: 600;
  font-size: 1rem;
  display: block;
}

.album-card__count {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.empty-state {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--muted);
  font-size: 0.95rem;
}

.empty-state code {
  font-size: 0.85em;
  color: var(--accent);
}

.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.65rem;
  }
}

.gallery-item {
  margin: 0;
}

.gallery-item button {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  aspect-ratio: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-item button:hover {
  opacity: 0.92;
  transform: scale(1.01);
}

.gallery-item button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__inner {
  position: relative;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
}

.lightbox__inner img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  z-index: 2;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__close {
  top: -3rem;
  right: 0;
}

.lightbox__prev {
  left: -3rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: -3rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 900px) {
  .lightbox__prev {
    left: 0.5rem;
    transform: translateY(-50%);
  }

  .lightbox__next {
    right: 0.5rem;
    transform: translateY(-50%);
  }

  .lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

.lightbox__caption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 100%;
}

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--muted);
}
