body {
  margin: 0;
  font-family: "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  background: #f6f0e4;
  color: #171809;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem clamp(1rem, 5vw, 5.75rem);
  font-weight: 700;
}

main {
  padding: clamp(1.25rem, 5vw, 5.75rem);
  padding-top: clamp(1rem, 3vw, 3rem);
}

.home-page {
  min-height: 100vh;
  background: #f6f0e4;
}

.home-page .site-nav {
  position: relative;
  z-index: 2;
  color: #171809;
  text-shadow: none;
}

.home-page .site-nav-links a {
  background: rgb(159 227 200 / 0.9);
  color: #171809;
  text-shadow: none;
}

.home-page main {
  padding: 0 0 clamp(1rem, 5vw, 5.75rem);
}

.home-hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: start center;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgb(0 0 0 / 0.32),
    rgb(0 0 0 / 0.08) 35%,
    rgb(0 0 0 / 0.18)
  );
}

.home-hero img {
  width: 100vw;
  height: auto;
  max-width: 100vw;
  display: block;
}

.content-frame {
  max-width: 1180px;
  margin: 0 auto;
}

.site-title {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-title img {
  display: block;
  width: clamp(5rem, 12vw, 12rem);
  height: auto;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav-links a {
  border: 1px solid currentColor;
  background: #9fe3c8;
  padding: 0.25rem 0.45rem 0.3rem;
  text-decoration: none;
}

.page-heading,
.album-heading {
  margin: clamp(1.75rem, 5vw, 5rem) 0 clamp(1.75rem, 4vw, 3.5rem);
}

.page-heading h1,
.album-heading h1 {
  margin: 0;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", ui-rounded, sans-serif;
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  border: 1px solid currentColor;
  background: #9fe3c8;
  padding: 0.25rem 0.45rem 0.3rem;
  font-weight: 700;
}

.album-description {
  max-width: 48rem;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.meta {
  color: #6d675b;
  font-size: 0.95rem;
}

.back-link,
.download-link,
.button-link {
  font-weight: 700;
}

.button-link {
  display: inline-block;
  border: 1px solid currentColor;
  background: #9fe3c8;
  padding: 0.45rem 0.65rem 0.5rem;
  text-decoration: none;
}

.auth-card {
  max-width: 34rem;
  margin: clamp(2rem, 8vw, 7rem) auto;
}

.auth-card h1 {
  margin: 0 0 1.25rem;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", ui-rounded, sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1;
}

.auth-card form p {
  display: grid;
  gap: 0.35rem;
}

.auth-card input {
  border: 1px solid currentColor;
  background: #fffaf0;
  color: inherit;
  font: inherit;
  padding: 0.5rem 0.6rem;
}

.auth-card .helptext {
  color: #6d675b;
  font-size: 0.9rem;
}

.auth-card ul {
  color: #6d675b;
  padding-left: 1.25rem;
}

.form-error {
  color: #8d1f12;
  font-weight: 700;
}

.album-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 360px));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  justify-content: center;
}

.album-card {
  break-inside: avoid;
}

.album-card-image {
  display: block;
  margin-bottom: 0.8rem;
}

.album-card img {
  display: block;
  width: 100%;
  height: auto;
}

.album-card h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.18;
}

.album-card p {
  line-height: 1.45;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.gallery-masonry {
  max-width: 1320px;
  margin: 0 auto;
  column-width: 210px;
  column-gap: clamp(0.75rem, 1.6vw, 1.35rem);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.35rem);
  margin: 0 auto;
  max-width: 1320px;
  align-items: start;
}

.photo-tile {
  display: inline-block;
  width: 100%;
  margin: 0 0 clamp(0.75rem, 1.6vw, 1.35rem);
  break-inside: avoid;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-tile figcaption,
.photo-detail-figure figcaption {
  margin-top: 0.55rem;
  color: #4f4a40;
  font-size: 0.95rem;
  line-height: 1.4;
}

.photo-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto clamp(1.25rem, 3vw, 2.5rem);
  max-width: 1320px;
}

.photo-filters div {
  display: grid;
  gap: 0.25rem;
}

.photo-filters label {
  color: #6d675b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.photo-filters input,
.photo-filters select {
  border: 1px solid currentColor;
  background: #fffaf0;
  color: inherit;
  font: inherit;
  min-height: 2.2rem;
  padding: 0.35rem 0.45rem;
}

.clear-filters {
  font-weight: 700;
  line-height: 2.2rem;
}

.photo-view {
  max-width: 1380px;
  margin: 0 auto;
}

.photo-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.photo-nav .disabled,
.photo-side-nav .disabled {
  color: #918a7c;
}

.photo-stage {
  display: grid;
  grid-template-columns: minmax(7rem, 0.5fr) minmax(0, auto) minmax(7rem, 0.5fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}

.photo-side-nav {
  font-weight: 700;
}

.photo-side-nav-left {
  justify-self: end;
}

.photo-side-nav-right {
  justify-self: start;
}

.photo-detail-figure {
  margin: 0;
  text-align: center;
}

.photo-detail-figure img.fit {
  max-width: 100%;
  max-height: 78vh;
  cursor: zoom-in;
}

.photo-detail-figure img.zoom {
  max-width: 100%;
  max-height: none;
  cursor: zoom-out;
}

.exif-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(7rem, 1fr));
  gap: 1.1rem 1.5rem;
  margin: 1.5rem 0 1rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
  text-align: center;
}

.exif-list div {
  min-width: 0;
}

.exif-list .exif-half {
  grid-column: span 2;
  text-align: center;
}

.exif-list dt {
  color: #6d675b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.exif-list dd {
  margin: 0.15rem 0 0;
}

.download-link {
  display: block;
  margin-top: 1.25rem;
  text-align: center;
}

@media (max-width: 720px) {
  .site-nav,
  .photo-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav-links {
    flex-wrap: wrap;
  }

  .photo-stage {
    grid-template-columns: 1fr 1fr;
  }

  .photo-detail-figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .photo-side-nav-left {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .photo-side-nav-right {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .exif-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
