:root {
  --paper: #f4efe4;
  --paper-deep: #e9dfcc;
  --ink: #201b18;
  --muted: #6b5d53;
  --line: #c9baa5;
  --red: #b5203d;
  --orange: #e45c2b;
  --blue: #176f83;
  --shadow: 0 18px 50px rgb(66 44 25 / 14%);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgb(228 92 43 / 12%), transparent 23rem),
    radial-gradient(circle at 88% 25%, rgb(23 111 131 / 10%), transparent 28rem),
    var(--paper);
  font-family: Georgia, "Times New Roman", serif;
}

a { color: inherit; }

a:hover { color: var(--red); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: white;
  background: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1460px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.brand img {
  display: block;
  width: 180px;
  height: auto;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  font: 700 0.76rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.site-header nav a { text-decoration-thickness: 1px; text-underline-offset: 0.3rem; }

main {
  width: min(1460px, calc(100% - 3rem));
  margin: 0 auto;
}

.gallery-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 0.8fr);
  gap: 1rem 5rem;
  padding: clamp(4.5rem, 10vw, 10rem) 0 clamp(3rem, 7vw, 6rem);
}

.eyebrow {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--red);
  font: 700 0.8rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(3.1rem, 8vw, 8rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--orange);
  font-weight: 400;
}

.dek {
  align-self: end;
  margin: 0 0 1.5rem;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.38;
}

.archive-note {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font: 0.86rem/1.55 Arial, Helvetica, sans-serif;
}

.year-index {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.8rem 0;
  background: rgb(244 239 228 / 92%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.year-index a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
  font: 700 0.82rem/1 Arial, Helvetica, sans-serif;
}

.year-index a:hover,
.year-index a:focus-visible {
  color: white;
  background: var(--red);
  outline: none;
}

.year-index span {
  color: var(--muted);
  font-size: 0.64rem;
}

.year-index a:hover span,
.year-index a:focus-visible span { color: white; }

.year-section {
  scroll-margin-top: 4rem;
  padding: clamp(3.5rem, 7vw, 7rem) 0;
  border-bottom: 1px solid var(--line);
}

.year-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.year-heading h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.year-heading p {
  color: var(--muted);
  font: 700 0.75rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2.6rem);
  align-items: start;
}

.photo-card {
  overflow: hidden;
  background: #fffaf1;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 rgb(0 0 0 / 0%);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.photo-link {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #171513;
}

.photo-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 350ms ease, opacity 250ms ease;
}

.photo-link:hover img { transform: scale(1.025); opacity: 0.86; }

.expand-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.45rem 0.55rem;
  color: white;
  background: rgb(0 0 0 / 72%);
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 180ms ease, transform 180ms ease;
  font: 700 0.65rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-link:hover .expand-hint,
.photo-link:focus-visible .expand-hint { opacity: 1; transform: translateY(0); }

.photo-caption { padding: 1.1rem 1.2rem 1.3rem; }

.photo-caption time {
  color: var(--orange);
  font: 700 0.7rem/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-caption h3 {
  margin: 0.45rem 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
}

.description {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.48;
}

.credit,
.license {
  margin: 0.25rem 0;
  color: var(--muted);
  font: 0.74rem/1.45 Arial, Helvetica, sans-serif;
}

.credit a,
.license a { text-underline-offset: 0.18rem; }

footer {
  width: min(1460px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 4rem 0 6rem;
  color: var(--muted);
  font: 0.82rem/1.6 Arial, Helvetica, sans-serif;
}

.lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 3vh 2vw;
  color: white;
  background: rgb(16 12 10 / 94%);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] { display: none; }

body.lightbox-open { overflow: hidden; }

.lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(96vw, 1500px);
  height: min(94vh, 1000px);
  margin: auto;
  background: #11100f;
  box-shadow: 0 30px 100px rgb(0 0 0 / 55%);
}

.lightbox figure > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.lightbox figcaption {
  padding: 1rem clamp(4rem, 8vw, 8rem) 1.2rem;
  background: #1d1a18;
}

.lightbox h2 { margin: 0.2rem 0; font-size: 1.25rem; font-weight: 500; }

.lightbox-count,
.lightbox-description,
.lightbox-meta {
  margin: 0.15rem 0;
  color: #d0c6ba;
  font: 0.76rem/1.45 Arial, Helvetica, sans-serif;
}

.lightbox-description {
  margin-block: 0.45rem;
  color: white;
  font-size: 0.9rem;
}

.lightbox a { color: #ffb198; }

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  color: white;
  background: rgb(0 0 0 / 58%);
  border: 1px solid rgb(255 255 255 / 30%);
  cursor: pointer;
}

.lightbox-close {
  top: 0.8rem;
  right: 0.8rem;
  width: 2.7rem;
  height: 2.7rem;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  top: 45%;
  width: 3.2rem;
  height: 4.5rem;
  font-size: 3rem;
  line-height: 1;
}

.lightbox-prev { left: 0.8rem; }
.lightbox-next { right: 0.8rem; }

@media (max-width: 900px) {
  .gallery-intro { grid-template-columns: 1fr; }
  .archive-note { grid-column: 1; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header,
  main,
  footer { width: min(100% - 1.5rem, 1460px); }
  .site-header { align-items: flex-start; }
  .brand img { width: 120px; }
  .site-header nav { justify-content: flex-end; max-width: 13rem; font-size: 0.66rem; }
  .gallery-intro { padding-top: 4rem; }
  h1 { font-size: clamp(3rem, 17vw, 5rem); }
  .photo-grid { grid-template-columns: 1fr; }
  .year-heading { align-items: end; }
  .lightbox { padding: 0; }
  .lightbox figure { width: 100vw; height: 100dvh; }
  .lightbox figcaption { padding-inline: 1rem; }
  .lightbox-nav { top: 42%; width: 2.7rem; height: 3.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
