:root {
  --paper: #F2F4EF;
  --ink: #1F2B24;
  --muted: #66755F;
  --accent: #2E6B45;
  --accent-ink: #F2F4EF;
  --line: #D6DCD0;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

img { display: block; }

a { color: var(--accent); }

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

/* ---------- home ---------- */

.home .hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(1.5rem, 4vw, 4rem);
  max-width: 82rem;
  margin: 0 auto;
}

.hero-text h1 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(3rem, 7.5vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 1.6rem;
}

.roles {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 420;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  color: var(--muted);
  margin: 0 0 3rem;
  max-width: 24ch;
}

.cta {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.7rem 2.2rem;
  border-radius: 999px;
  transition: transform 120ms ease, background 120ms ease;
}

.btn:hover { background: #265a3a; transform: translateY(-1px); }

.cta-note {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-photo {
  margin: 0;
  justify-self: center;
  width: min(100%, 26rem);
}

.hero-photo img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 24px 60px -30px rgba(31, 43, 36, 0.55);
}

.hero-photo figcaption {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.7rem;
}

@media (max-width: 880px) {
  .home .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: clamp(3rem, 12vw, 6rem);
  }
  .hero-photo { width: min(100%, 22rem); }
  .roles { margin-bottom: 2.2rem; }
}

/* ---------- gallery page ---------- */

.stickyhead {
  position: sticky;
  top: 0;
  z-index: 20;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(242, 244, 239, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.home-link {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.home-link:hover { color: var(--accent); }

.stats { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

.back-link {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.back-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- album index ---------- */

.album-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.6rem 1.3rem;
  padding: 2.8rem clamp(1rem, 4vw, 2.5rem) 4rem;
  max-width: 82rem;
  margin: 0 auto;
}

.album-card {
  text-decoration: none;
  color: var(--ink);
}

.album-card .cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: #E7EAE2;
  box-shadow: 0 10px 28px -18px rgba(31, 43, 36, 0.5);
}

.album-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 250ms ease;
}

.album-card:hover .cover img { transform: scale(1.035); }

.album-card h2 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 0.75rem 0 0.1rem;
}

.album-card .count {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- album page ---------- */

.album-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 3rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.album-nav a {
  font-family: var(--serif);
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  max-width: 46%;
}

.album-nav a:hover { color: var(--accent); }

.album-nav a span {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.album-nav a:last-child { text-align: right; }

.albums { padding: 0 clamp(1rem, 4vw, 2.5rem) 4rem; }

.album { padding-top: 3rem; }

.album-head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin: 0 0 1.1rem;
}

.album-head h2 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  margin: 0;
}

.album-head .count {
  font-size: 0.85rem;
  color: var(--muted);
}

.grid {
  columns: 260px 4;
  column-gap: 0.85rem;
}

.grid a {
  display: block;
  margin: 0 0 0.85rem;
  break-inside: avoid;
  border-radius: 4px;
  overflow: hidden;
  background: #E7EAE2;
}

.grid img { width: 100%; height: auto; }

.grid img.lazy { opacity: 0; transition: opacity 300ms ease; }
.grid img.loaded { opacity: 1; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: rgba(24, 33, 27, 0.94);
  color: #EDF0E8;
}

.lightbox[hidden] { display: none; }

.lb-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3.2rem 1rem 1rem;
  min-height: 0;
}

.lb-img {
  max-width: min(94vw, 1400px);
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.lb-info {
  text-align: center;
  max-width: 46rem;
  padding: 0 1rem 1.4rem;
}

.lb-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.4;
  margin: 0 0 0.45rem;
}

.lb-meta {
  font-size: 0.82rem;
  color: #A9B4A2;
  margin: 0;
}

.lb-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(237, 240, 232, 0.35);
  border-radius: 999px;
  background: rgba(237, 240, 232, 0.08);
  color: #EDF0E8;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 100ms ease;
}

.lb-btn:hover { background: rgba(237, 240, 232, 0.2); }

.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
  .lb-body { padding-top: 3.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
