:root {
  --paper: #f6f3ec;
  --ink: #1a1a17;
  --muted: #8a8578;
  --line: #d9d3c5;
  --accent: #3a5a40;
  --shadow: rgba(26, 26, 23, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---- Masthead ---- */
header.masthead {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}

.eyebrow {
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.eyebrow a { text-decoration: none; color: var(--muted); transition: color 0.2s ease; }
.eyebrow a:hover { color: var(--accent); }

h1.title {
  font-size: clamp(2.6rem, 9vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.lede {
  margin-top: 1.4rem;
  max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  color: #4a463d;
}

.rule { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.rule hr { border: 0; border-top: 1px solid var(--line); }

.meta-line {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem) 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

main { max-width: 1200px; margin: 0 auto; padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 3rem; }

/* ---- Album index (homepage) ---- */
.albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}

.album-card {
  display: block;
  text-decoration: none;
  group: album;
}

.album-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ece7dc;
  overflow: hidden;
  border-radius: 2px;
}
.album-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
  filter: saturate(0.96);
}
.album-card:hover .album-thumb img { transform: scale(1.05); filter: saturate(1.06); }

.album-thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase;
}

.album-info { padding: 0.85rem 0.1rem 0; }
.album-name {
  font-size: 1.35rem;
  line-height: 1.15;
  transition: color 0.2s ease;
}
.album-card:hover .album-name { color: var(--accent); }
.album-date {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
}
.album-count {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ---- Photo grid (album page) ---- */
.grid { columns: 3 260px; column-gap: 1.1rem; }

figure {
  break-inside: avoid;
  margin: 0 0 1.1rem;
  position: relative;
  cursor: zoom-in;
  background: #ece7dc;
  overflow: hidden;
  border-radius: 2px;
}
figure img {
  display: block; width: 100%; height: auto;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease;
  filter: saturate(0.96);
}
figure:hover img { transform: scale(1.04); filter: saturate(1.05); }

/* ---- Back link ---- */
.back {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  margin-bottom: 1.1rem;
  transition: color 0.2s ease;
}
.back:hover { color: var(--accent); }

/* ---- Empty state ---- */
.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty code { background: #ece7dc; padding: 0.15em 0.45em; border-radius: 3px; font-size: 0.9em; }

/* ---- Footer ---- */
footer {
  max-width: 1200px; margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---- Lightbox ---- */
.lb {
  position: fixed; inset: 0;
  background: rgba(20, 20, 17, 0.94);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: clamp(1rem, 4vw, 3rem);
}
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 2px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }

.lb-bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(1rem, 3vw, 1.75rem);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem; letter-spacing: 0.05em; color: rgba(255,255,255,0.85);
}
.lb-actions { display: flex; gap: 0.5rem; }
.lb-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; text-decoration: none; font: inherit; cursor: pointer;
  padding: 0.5rem 0.9rem; border-radius: 999px; transition: background 0.2s ease;
}
.lb-btn:hover { background: rgba(255,255,255,0.22); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.7);
  font-size: 2.5rem; cursor: pointer; padding: 1rem; line-height: 1;
  transition: color 0.2s ease; user-select: none;
}
.lb-nav:hover { color: #fff; }
.lb-prev { left: 0; } .lb-next { right: 0; }

@media (max-width: 560px) {
  .grid { columns: 2 140px; column-gap: 0.6rem; }
  figure { margin-bottom: 0.6rem; }
  .albums { grid-template-columns: 1fr; }
  .lb-nav { font-size: 1.8rem; padding: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  figure img, figure:hover img, .album-thumb img, .album-card:hover .album-thumb img {
    transition: none; transform: none;
  }
}
