:root {
  color-scheme: dark;
  --ink: #0d0e0e;
  --charcoal: #171817;
  --charcoal-soft: #20211f;
  --paper: #eee8da;
  --paper-muted: #bdb6a8;
  --brass: #c0a66a;
  --brass-bright: #dbc58e;
  --line: rgba(238, 232, 218, 0.15);
  --shadow: rgba(0, 0, 0, 0.45);
  --shell: 78rem;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 18rem;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 18% 0%, rgba(192, 166, 106, 0.07), transparent 28rem),
    repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.009) 0 1px, transparent 1px 4px),
    var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: 20;
  inset: 0;
  border: 0.5rem solid rgba(0, 0, 0, 0.24);
  pointer-events: none;
  content: "";
}

a {
  color: inherit;
  text-decoration-color: var(--brass);
  text-underline-offset: 0.2em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 0.16rem solid var(--brass-bright);
  outline-offset: 0.25rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-180%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--brass-bright);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-header {
  position: relative;
  min-height: clamp(25rem, 68vh, 42rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #101111;
  isolation: isolate;
}

.site-header__backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 11, 11, 0.94) 0%, rgba(10, 11, 11, 0.68) 48%, rgba(10, 11, 11, 0.34) 100%),
    linear-gradient(0deg, rgba(10, 11, 11, 0.88), transparent 55%),
    url("../folderimage.jpg") center 46% / cover no-repeat;
  filter: saturate(0.62) sepia(0.12) contrast(1.04);
  transform: scale(1.015);
}

.site-header__backdrop::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 8%, rgba(238, 232, 218, 0.025) 8% 8.1%);
  content: "";
}

.site-header__inner,
.album-header__inner,
.page-shell,
.site-footer {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
}

.site-header__inner {
  padding-block: clamp(3rem, 8vw, 6.5rem);
}

.site-header h1,
.album-header h1,
.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.site-header h1 {
  max-width: 9ch;
  font-size: clamp(3.5rem, 11vw, 8.5rem);
}

.intro {
  max-width: 34rem;
  margin: 1.25rem 0 2rem;
  color: var(--paper-muted);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-style: italic;
}

.share-button {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  color: var(--paper);
  border: 1px solid rgba(219, 197, 142, 0.5);
  border-radius: 999px;
  background: rgba(13, 14, 14, 0.62);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.share-button:hover {
  color: var(--brass-bright);
  border-color: var(--brass-bright);
  background: rgba(13, 14, 14, 0.86);
}

.share-status {
  min-height: 1.5em;
  margin: 0.55rem 0 0;
  color: var(--paper-muted);
  font-size: 0.82rem;
}

.page-shell {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.section-heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: clamp(2.4rem, 5vw, 4.25rem);
}

.section-heading > p {
  margin: 0 0 0.3rem;
  color: var(--paper-muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-top: clamp(2rem, 5vw, 4rem);
}

.album-card {
  grid-column: span 4;
  min-width: 0;
}

.album-card:nth-child(5n + 1),
.album-card:nth-child(5n + 4) {
  grid-column: span 5;
}

.album-card:nth-child(5n + 2),
.album-card:nth-child(5n + 3) {
  grid-column: span 7;
}

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

.album-card__image-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 0.4rem solid #292a28;
  background: #080909;
  box-shadow: 0 1rem 2.8rem var(--shadow);
}

.album-card__image-wrap::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(238, 232, 218, 0.12);
  box-shadow: inset 0 0 2.25rem rgba(0, 0, 0, 0.36);
  pointer-events: none;
  content: "";
}

.album-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.76) contrast(1.03);
  transition: transform 350ms ease, filter 350ms ease;
}

.album-card__link:hover img {
  filter: saturate(0.94) contrast(1.03);
  transform: scale(1.025);
}

.album-card__copy {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.9rem 0.2rem 0;
}

.album-card__title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.album-card__count {
  flex: 0 0 auto;
  color: var(--paper-muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.album-header {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(105deg, rgba(192, 166, 106, 0.08), transparent 36rem),
    var(--charcoal);
}

.album-header__inner {
  padding-block: clamp(2rem, 6vw, 4.75rem);
}

.back-link {
  display: inline-block;
  margin-bottom: clamp(3.5rem, 9vw, 7.5rem);
  color: var(--paper-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--brass-bright);
}

.album-header h1 {
  font-size: clamp(3.2rem, 10vw, 8rem);
}

.album-header__meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.album-header__meta p {
  margin: 0;
  color: var(--paper-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-shell--album {
  width: min(100% - 1.25rem, 92rem);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 6.2rem);
  gap: clamp(0.65rem, 1.5vw, 1rem);
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.photo-card {
  min-width: 0;
}

.photo-card a {
  position: relative;
  display: block;
  overflow: hidden;
  width: 6.2rem;
  height: 6.2rem;
  border: 0.28rem solid #292a28;
  background: var(--charcoal-soft);
  box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.24);
}

.photo-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.82);
  transition: filter 180ms ease;
}

.photo-card a:hover img,
.photo-card a:focus-visible img {
  filter: saturate(1);
}

.photo-number {
  position: absolute;
  right: 0.2rem;
  bottom: 0.2rem;
  min-width: 1.5rem;
  padding: 0.1rem 0.2rem;
  color: var(--paper);
  background: rgba(13, 14, 14, 0.75);
  font-family: var(--serif);
  font-size: 0.62rem;
  text-align: center;
}

.site-footer {
  padding-block: 1.75rem 3rem;
  color: var(--paper-muted);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 0;
  color: var(--paper);
  border: 0;
  background: rgba(7, 8, 8, 0.97);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.lightbox__frame {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(3.25rem, 7vw) minmax(0, 1fr) minmax(3.25rem, 7vw);
  align-items: center;
}

.lightbox__figure {
  min-width: 0;
  max-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 1rem;
  padding-block: 1rem;
  margin: 0;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100dvh - 5rem);
  display: block;
  object-fit: contain;
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.62);
}

.lightbox__figure figcaption {
  min-height: 1.3rem;
  color: var(--paper-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox__close,
.lightbox__nav {
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(32, 33, 31, 0.84);
  cursor: pointer;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  color: var(--brass-bright);
  border-color: var(--brass);
}

.lightbox__close {
  position: absolute;
  z-index: 2;
  top: 1rem;
  right: 1rem;
  font-size: 1.65rem;
  line-height: 1;
}

.lightbox__nav {
  justify-self: center;
  font-size: 1.2rem;
}

@media (max-width: 48rem) {
  body::before {
    border-width: 0.25rem;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .album-card,
  .album-card:nth-child(5n + 1),
  .album-card:nth-child(5n + 2),
  .album-card:nth-child(5n + 3),
  .album-card:nth-child(5n + 4) {
    grid-column: span 6;
  }

  .album-card__copy {
    align-items: start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .lightbox__frame {
    grid-template-columns: 3.25rem minmax(0, 1fr) 3.25rem;
  }
}

@media (max-width: 32rem) {
  .site-header__inner,
  .album-header__inner,
  .page-shell,
  .site-footer {
    width: min(100% - 1.25rem, var(--shell));
  }

  .album-card,
  .album-card:nth-child(5n + 1),
  .album-card:nth-child(5n + 2),
  .album-card:nth-child(5n + 3),
  .album-card:nth-child(5n + 4) {
    grid-column: 1 / -1;
  }

  .album-header__meta {
    align-items: start;
    flex-direction: column;
  }

  .lightbox__frame {
    grid-template-columns: 1fr;
  }

  .lightbox__nav {
    position: absolute;
    z-index: 2;
    bottom: 1rem;
  }

  .lightbox__nav--previous {
    left: 1rem;
  }

  .lightbox__nav--next {
    right: 1rem;
  }

  .lightbox__figure {
    grid-column: 1;
    grid-row: 1;
    padding: 3.75rem 0.75rem 4.25rem;
  }

  .lightbox__figure img {
    max-height: calc(100dvh - 9rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
