@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&display=swap");

:root {
  color-scheme: light;
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  color: #171715;
  background: #fff;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;

  --page-gutter: clamp(20px, 5.2vw, 84px);
  --muted: #7b7a76;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--page-gutter);
}

.site-header {
  height: 82px;
}

.wordmark {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -1.2px;
}

.header-nav,
.footer-links {
  display: flex;
  gap: 26px;
}

.header-nav,
.intro-caption,
.section-heading,
.site-footer {
  font-size: 11px;
  letter-spacing: 0.025em;
}

.header-nav a,
.footer-links a {
  color: #55544f;
  transition: color 200ms;
}

.header-nav a:hover,
.footer-links a:hover {
  color: #171715;
}

.intro {
  display: flex;
  min-height: calc(100svh - 82px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px var(--page-gutter) 48px;
}

.image-button {
  display: block;
  padding: 0;
  border: 0;
  background: #f2f0ec;
  cursor: zoom-in;
}

.image-button img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-image {
  height: min(78svh, 900px);
  aspect-ratio: 2000 / 2868;
  max-width: 100%;
}

.hero-image img {
  height: 100%;
  object-fit: cover;
}

.intro-caption {
  display: flex;
  width: min(100%, calc(min(78svh, 900px) * 0.697));
  justify-content: space-between;
  margin-top: 13px;
  color: var(--muted);
}

.portfolio {
  padding: 42px var(--page-gutter) 108px;
}

.section-heading {
  margin-bottom: 20px;
  color: var(--muted);
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(14px, 2.4vw, 38px);
}

.gallery-item {
  flex: 1 1 320px;
  min-width: 0;
  margin: 0;
}

.gallery-item {
  max-width: 760px;
}

.gallery-item .image-button {
  width: 100%;
}

.site-footer {
  min-height: 92px;
  border-top: 1px solid #eeedea;
  color: var(--muted);
}

.site-footer .wordmark {
  color: #171715;
}

.lightbox {
  position: fixed;
  width: min(94vw, 1440px);
  max-width: none;
  max-height: 92svh;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgb(255 255 255 / 95%);
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 88svh;
  margin: auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #171715;
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 720px) {
  :root {
    --page-gutter: 20px;
  }

  .site-header {
    height: 68px;
  }

  .header-nav {
    gap: 18px;
  }

  .intro {
    min-height: calc(100svh - 68px);
    padding-top: 12px;
  }

  .hero-image {
    height: auto;
    width: 100%;
  }

  .intro-caption {
    width: 100%;
    font-size: 10px;
  }

  .portfolio {
    padding-top: 30px;
    padding-bottom: 72px;
  }

  .gallery-item {
    flex: 1 1 100%;
    max-width: none;
  }

  .site-footer {
    min-height: 78px;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
