/* ============ Gallery — album index ============ */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.album-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.album-card:hover, .album-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 14px 28px -16px rgba(0,0,0,0.7);
  text-decoration: none;
  outline: none;
}
.album-card__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-1);
  overflow: hidden;
}
.album-card__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s var(--ease);
}
.album-card:hover .album-card__cover img { transform: scale(1.04); }
.album-card__placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 3rem;
  color: var(--text-muted);
  opacity: 0.4;
}
.album-card__body {
  padding: 0.85rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  flex: 1;
}
.album-card__title {
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  color: var(--gold-bright);
  margin: 0;
  line-height: 1.2;
}
.album-card__meta {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.album-card__meta > * + *::before {
  content: "·";
  margin-right: 0.45rem;
  color: var(--text-muted);
}
.album-card__desc {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.breadcrumb {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}
.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.breadcrumb a:hover { color: var(--gold-bright); }

.album-header { align-items: flex-start; }
.album-header__meta {
  margin: 0.1rem 0 0;
  display: flex; flex-wrap: wrap;
  font-size: 0.88rem;
}
.album-header__desc {
  margin: 0.5rem 0 0;
  max-width: 56ch;
  color: var(--text-dim);
}

/* ============ Gallery — album view ============ */

/* CSS-columns masonry: respects each image's natural aspect ratio. */
.gallery-grid {
  columns: 3 240px;
  column-gap: 0.75rem;
}
.gallery-grid > * { break-inside: avoid; margin: 0 0 0.75rem; }

.gallery-card {
  position: relative;
  display: block;
  padding: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.gallery-card:hover, .gallery-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 10px 20px -10px rgba(0,0,0,0.6);
  outline: none;
}
.gallery-card img {
  width: 100%; height: auto;
  display: block;
}
.gallery-card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.6rem 0.75rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 100%);
  text-align: left;
  color: var(--text);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  pointer-events: none;
}
.gallery-card:hover .gallery-card__overlay,
.gallery-card:focus-visible .gallery-card__overlay {
  opacity: 1;
  transform: translateY(0);
}
.gallery-card__title { font-family: 'EB Garamond', serif; font-size: 0.98rem; }
.gallery-card__caption { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.15rem; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.92);
  padding: 2rem;
}
.lightbox.hidden { display: none; }
.lightbox__content { margin: 0; max-width: 90vw; max-height: 88vh; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.lightbox__content img {
  max-width: 100%; max-height: 80vh;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  box-shadow: 0 25px 60px -20px rgba(0,0,0,0.8);
}
.lightbox__content figcaption {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  font-family: 'EB Garamond', serif;
  font-style: italic;
}
.lightbox__close, .lightbox__nav {
  position: absolute;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: rgba(200,170,110,0.1);
}
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }

