* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
}

body {
  font-family: sans-serif;
  padding-top: var(--header-height, 6rem);
}

.list {
  list-style: none;
}

a {
  text-decoration: none;
  color: #fff;
}

.site-header {
  min-height: 6rem;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  z-index: 50;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header-hover-zone {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height, 6rem);
  z-index: 49;
}

.logo a {
  font-size: 2.5rem;
  text-transform: uppercase;
  color: #1a1a1a;
}

.nav-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90vw;
  margin: 0 auto;
  padding: 1rem 0;
}

/* Hamburger Button */

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 2.8rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger-line {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #1a1a1a;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line {
  background-color: #fff;
}

/* Navigation list */

.nav-list {
  display: none;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
  padding: 12rem 2rem;
  position: absolute;
  top: 100%;
  left: 0;
}

.nav-list[data-open="true"] {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  justify-content: flex-start;
  z-index: 100;
}

.nav-container:has(.nav-list[data-open="true"]) .logo a {
  color: #fff;
}

.nav-list a {
  font-size: 2rem;
  font-weight: 300;
}

.logo,
.hamburger {
  position: relative;
  z-index: 101;
}

/* desktop and up: inline nav, no hamburger */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .logo a {
    font-size: 3.2rem;
  }

  .nav-container {
    width: 90vw;
  }

  .nav-list {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 3rem;
    width: auto;
    padding: 0;
  }

  .nav-list a {
    font-size: 2.2rem;
    font-weight: 400;
    color: #1a1a1a;
    transition: opacity 0.2s ease;
  }

  .nav-list a:hover {
    opacity: 0.6;
  }
}

/* Grid */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 90vw;
  margin: 3rem auto 2rem;
}

.grid-item {
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1200 / 1500; /* keeps the 4:5 proportion at any size */
  width: 100%;
}

.grid-item a {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s ease;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    margin-bottom: 0;
  }

  .grid a:hover {
    opacity: 0.9;
  }
}

.site-footer {
  width: 90vw;
  margin: 4rem auto;
  padding: 2rem 0;
  text-align: center;
  font-size: 1.4rem;
  color: #1a1a1a;
}

/* About page: two columns, text left, image right */

.about-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  width: 90vw;
  margin: 3rem auto;
}

.about-text h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 2rem;
  color: #1a1a1a;
  text-align: center;
}

.about-text p {
  font-size: 1.6rem;
  line-height: 1.6;
  color: #1a1a1a;
  font-weight: 400;
}

.about-text p + p {
  margin-top: 1.5rem;
}

.about-image {
  max-width: 420px;
  transition: transform 0.3s ease-out;
}

.about-image img {
  width: 100%;
  aspect-ratio: 1200 / 1500;
  object-fit: cover;
  display: block;
}

.contact-info {
  margin-top: 3rem;
  font-weight: 100;
}

@media (min-width: 768px) {
  .about-section {
    flex-direction: row;
    align-items: flex-start;
  }

  .about-text {
    flex: 1;
  }

  .about-text h1 {
    text-align: left;
  }

  .about-image {
    flex: none;
  }

  .contact-info {
    position: absolute;
    left: 0;
    bottom: 0;
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  .about-text {
    margin-top: 13.125rem;
  }
}

.contact-info p + p {
  margin-top: 0.3rem;
}

.contact-info a {
  color: #1a1a1a;
}

.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;
}

.gallery-title-heading {
  width: 90vw;
  margin: 6rem auto;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 200;
  color: #1a1a1a;
}

@media (min-width: 768px) {
  .gallery-title-heading {
    font-size: 3.2rem;
  }
}

/* Photo gallery: centered single images by default, with occasional pairs
   sitting side by side at different heights */

.photo-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90vw;
  max-width: 1400px;
  margin: 6rem auto 4rem;
  gap: 8rem;
}

.gallery-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8rem;
  width: 100%;
}

.gallery-row img {
  width: 100%;
  height: auto;
  min-width: 0;
  display: block;
}

.gallery-row.single img {
  max-width: min(46vw, 780px);
}

.gallery-row.single img.size-small {
  max-width: min(37vw, 620px);
}

.gallery-row.pair img {
  max-width: min(34vw, 580px);
}

.gallery-row.pair img.size-large {
  max-width: min(39vw, 660px);
}

.gallery-row img {
  cursor: pointer;
}

@media (max-width: 767px) {
  .gallery-row.pair {
    flex-direction: column;
    align-items: center;
  }

  .gallery-row.single img,
  .gallery-row.single img.size-small,
  .gallery-row.pair img,
  .gallery-row.pair img.size-large {
    max-width: 500px;
  }
}

/* Lightbox */

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

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  padding: 1rem;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

body.lightbox-open {
  overflow: hidden;
}
