@font-face {
  font-family: "PG Display";
  src: local("Iowan Old Style"), local("Palatino");
  font-weight: 400 700;
}

@font-face {
  font-family: "PG Sans";
  src: local("Avenir Next"), local("Helvetica Neue");
  font-weight: 400 800;
}

:root {
  --page: #f4f6f4;
  --paper: #ffffff;
  --paper-soft: #fbfcfb;
  --ink: #1b2422;
  --muted: #63706d;
  --quiet: #88918e;
  --line: #dfe5e1;
  --accent: #0f6b63;
  --accent-soft: #dcefeb;
  --shadow: 0 18px 55px rgba(25, 35, 32, 0.09);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(15, 107, 99, 0.06), rgba(15, 107, 99, 0) 280px),
    var(--page);
  color: var(--ink);
  font-family: "PG Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: rgba(15, 107, 99, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 180ms ease, text-decoration-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: "PG Display", Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

p {
  line-height: 1.68;
  margin: 0 0 1.1rem;
  max-width: 70ch;
}

header,
footer {
  color: var(--ink);
}

body > header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-brand a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.site-brand__mark {
  width: 34px;
  height: auto;
  display: block;
  filter: saturate(0.85) contrast(1.08);
}

.site-brand__text {
  font-family: "PG Display", Georgia, serif;
  font-size: clamp(1.28rem, 1rem + 1vw, 1.85rem);
  font-weight: 600;
  line-height: 1;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav a {
  color: #46534f;
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
}

main {
  max-width: var(--max);
  margin: 12px auto 44px;
  padding: 0 28px;
}

main > section,
main > article,
.section-intro,
.section-gallery,
.content-page {
  background: var(--paper);
}

main > .section-intro:first-child,
.section-intro {
  padding: clamp(34px, 7vw, 86px) clamp(26px, 7vw, 82px) clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  gap: 38px;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(15, 107, 99, 0.08), rgba(15, 107, 99, 0) 40%),
    var(--paper-soft);
}

.section-intro::before {
  content: "";
  width: 72px;
  height: 4px;
  margin-bottom: 22px;
  background: var(--accent);
  display: block;
  grid-column: 1;
}

.section-intro h1 {
  grid-column: 1;
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3.1rem, 8vw, 6.9rem);
  line-height: 0.94;
  font-weight: 600;
}

.section-intro p {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  margin: 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: clamp(1rem, 0.85rem + 0.45vw, 1.25rem);
  line-height: 1.55;
}

.section-gallery {
  padding: clamp(26px, 4vw, 54px) clamp(22px, 5vw, 58px) clamp(38px, 6vw, 72px);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.section-intro + .section-gallery {
  box-shadow: var(--shadow);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 26px;
}

.gallery-tile {
  min-width: 0;
  overflow: visible;
}

.gallery-tile a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gallery-tile-inner {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 316 / 247;
  margin-bottom: 14px;
  background-color: #e7ece8;
  border: 1px solid var(--line);
}

.gallery-tile-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 10px solid rgba(255, 255, 255, 0.42);
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.gallery-tile-inner img,
.gallery-tile-inner picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-tile-inner img {
  transform: scale(1.01);
  transition: transform 220ms ease, filter 220ms ease;
}

.gallery-tile a:hover img {
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.03);
}

.gallery-tile a:hover .gallery-tile-inner::after {
  opacity: 1;
}

.gallery-thumb-img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-tile h2,
.section-card h2 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: clamp(1.32rem, 1rem + 0.75vw, 1.78rem);
  font-weight: 600;
  line-height: 1.14;
}

.section-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
  max-width: 34ch;
}

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

.section-card {
  background: var(--paper-soft);
  padding: 1rem;
  border: 1px solid var(--line);
}

.section-card a {
  color: inherit;
  text-decoration: none;
}

.section-thumb img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.content-page {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.content-hero {
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: #eef2ef;
}

.content-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.content-hero figcaption {
  margin: 0;
  padding: 10px clamp(26px, 7vw, 82px) 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

.content-layout {
  padding: clamp(30px, 5vw, 64px) clamp(26px, 7vw, 82px);
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 42px;
}

.content-header {
  margin: 0;
}

.content-header h1,
.content-page > h1 {
  margin: 0;
  font-size: clamp(2.45rem, 4.7vw, 4.55rem);
  line-height: 1.08;
  font-weight: 600;
}

.content-subtitle,
.content-header .subtitle {
  margin: 18px 0 0;
  max-width: 28ch;
  color: var(--muted);
  font-family: "PG Display", Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.45;
}

.content-meta,
.content-header .meta {
  margin: 18px 0 0;
  color: var(--quiet);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.content-body {
  margin: 0;
  font-size: 1.03rem;
}

.content-body p {
  max-width: 68ch;
}

.content-body > p:first-child::first-letter {
  float: left;
  padding: 0.24rem 0.42rem 0.08rem 0;
  color: var(--accent);
  font-family: "PG Display", Georgia, serif;
  font-size: 4.65rem;
  line-height: 0.62;
  font-weight: 600;
}

.content-body h2,
.content-body h3 {
  margin: 2rem 0 0.8rem;
  max-width: 68ch;
  line-height: 1.12;
}

.content-body h2 {
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

.content-body h3 {
  font-size: 1.4rem;
}

.content-body blockquote,
.download-line,
.content-body p:has(a[href*="drive.google.com/open"]) {
  margin: 1.5rem 0;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: #20302d;
  font-size: 0.96rem;
}

.content-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
}

.content-body figure.content-image {
  margin: 2rem auto;
  max-width: 100%;
  text-align: center;
}

.content-body figure.content-image img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.content-body figure.content-image figcaption,
.content-grid-item figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.content-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 2rem;
}

.content-grid-item {
  margin: 0;
}

.content-grid-item img {
  display: block;
  width: 100%;
  height: auto;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0 clamp(26px, 7vw, 82px) clamp(38px, 6vw, 72px);
}

.content-layout + .thumb-grid {
  border-top: 1px solid var(--line);
  padding-top: clamp(26px, 4vw, 54px);
}

.thumb-grid__item {
  position: relative;
  margin: 0;
}

.thumb-grid__item a {
  display: block;
  text-decoration: none;
}

.thumb-grid__frame {
  position: relative;
  overflow: hidden;
  background-color: #000;
}

.thumb-grid__frame::before {
  content: "";
  display: block;
  padding-bottom: 78%;
}

.thumb-grid__frame img,
.thumb-grid__frame picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-grid__caption-hover {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.3;
  pointer-events: none;
  opacity: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: opacity 0.25s ease-in-out;
}

.thumb-grid__item:hover .thumb-grid__caption-hover {
  opacity: 1;
}

.thumb-grid .thumb-grid__caption {
  display: none;
}

.content-footer {
  margin: 0 clamp(26px, 7vw, 82px);
  padding: 1rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

body > footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px 36px;
  color: var(--quiet);
  font-size: 0.88rem;
}

body > footer p {
  margin: 0;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__dialog {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__image {
  display: block;
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  max-height: 80vh;
  margin: 0 auto;
  object-fit: contain;
}

.lightbox__caption {
  max-width: 70ch;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  color: #f0f0f0;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  opacity: 0.9;
}

.lightbox__close,
.lightbox__nav {
  position: relative;
  border: none;
  background: transparent;
  color: #fff;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox__close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  font-size: 2rem;
}

.lightbox__nav {
  user-select: none;
}

.lightbox__nav--prev,
.lightbox__nav--next {
  font-size: 2.2rem;
}

.pswp-caption-custom {
  position: absolute;
  bottom: 20px;
  left: 50%;
  max-width: 90%;
  padding: 10px 20px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-family: "PG Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

@media (max-width: 860px) {
  body > header,
  .section-intro,
  .content-layout {
    display: block;
  }

  nav {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .section-intro p,
  .content-subtitle,
  .content-header .subtitle {
    margin-top: 22px;
  }

  .section-intro::before {
    margin-bottom: 22px;
  }

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

@media (max-width: 640px) {
  .lightbox__dialog {
    max-width: 100vw;
    max-height: 100vh;
  }

  .lightbox__image {
    max-height: 70vh;
  }

  .lightbox__nav--prev,
  .lightbox__nav--next {
    font-size: 2.6rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  main,
  body > header,
  body > footer {
    padding-inline: 16px;
  }

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