*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #555;
  --max: 1100px;
  --gutter: clamp(16px, 4vw, 40px);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.site-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ig {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}

.ig svg {
  width: 16px;
  height: 16px;
}

.site-nav .ig:hover {
  opacity: 0.75;
  text-decoration: none;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2.5vw, 28px);
  padding-bottom: 80px;
}

.gallery figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f2f2f2;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery button {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.gallery button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  padding-bottom: 80px;
}

.about p {
  margin: 0 0 1.2em;
  max-width: 34em;
}

.about a {
  text-underline-offset: 3px;
}

/* Footer */
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 56px;
  border-top: 1px solid #e5e5e5;
  font-size: 14px;
  color: var(--muted);
}

.site-footer img {
  width: 44px;
}

.site-footer a {
  color: var(--ink);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.97);
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 760px) {
  .site-header .wrap {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .site-title {
    font-size: 13px;
  }

  .site-nav {
    gap: 14px;
  }

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

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

  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}
