:root {
  --navy: #162a4a;
  --navy-light: #234170;
  --purple: #4a2159;
  --gold: #d4af37;
  --gold-pale: #f3e5ab;
  --paper: #f7f6f2;
  --white: #ffffff;
  --ink: #1f2937;
  --muted: #667085;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.photo-header {
  padding: 22px 18px 48px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--purple));
  border-bottom: 4px solid var(--gold);
  text-align: center;
}

.photo-header__bar {
  width: min(1080px, 100%);
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.photo-header__brand {
  font-weight: 800;
  letter-spacing: 0.05em;
}

.back-link,
.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

.photo-header h1 {
  max-width: 760px;
  margin: 0 auto 8px;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.1;
}

.photo-header p { color: #e5e7eb; }

.gallery-shell {
  width: min(1120px, calc(100% - 28px));
  margin: -24px auto 60px;
  position: relative;
}

.gallery-toolbar,
.album-section {
  padding: 22px;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(22, 42, 74, .08);
}

.gallery-toolbar {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.gallery-toolbar h2,
.album-section h2 { margin: 0; color: var(--navy); }

.gallery-toolbar p { margin: 4px 0 0; color: var(--muted); }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.album-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 5px 18px rgba(0,0,0,.06);
  text-decoration: none;
}

.album-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: #e9edf3;
}

.album-card__body { padding: 15px; }
.album-card__body h3 { margin: 0 0 4px; color: var(--navy); }
.album-card__meta { color: var(--muted); font-size: .9rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.photo-tile {
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: #e9edf3;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

.photo-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  transition: transform .2s ease;
}

.photo-tile:hover img { transform: scale(1.025); }

.empty-state {
  padding: 42px 22px;
  border: 2px dashed #cbd5e1;
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
}

.load-more {
  display: none;
  margin: 24px auto 0;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--navy);
  font-weight: 800;
  cursor: pointer;
}

.load-more.is-visible { display: block; }

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 20px;
  border: 0;
  color: var(--white);
  background: rgba(4, 11, 24, .94);
}

.lightbox::backdrop { background: rgba(4, 11, 24, .94); }

.lightbox__close {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  color: var(--white);
  background: rgba(0,0,0,.35);
  font-size: 1.4rem;
  cursor: pointer;
}

.lightbox__content {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
}

.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 82vh;
  object-fit: contain;
}

.lightbox p { margin: 0; color: #e5e7eb; }

@media (max-width: 620px) {
  .photo-header__bar { align-items: flex-start; }
  .gallery-toolbar { align-items: flex-start; flex-direction: column; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .album-section, .gallery-toolbar { padding: 17px; }
}

