:root {
  --ink: #111;
  --page: #fff;
  --tile: #f2f2f2;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Futura", "Century Gothic", "Avenir Next", Arial, sans-serif;
  font-weight: 400;
}

a { color: inherit; }

.site-header {
  padding: 57px 24px 34px;
  text-align: center;
  background: var(--page);
}

.brand {
  margin: 0;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: .02em;
}

.navigation {
  display: flex;
  justify-content: center;
  gap: 46px;
  margin-top: 32px;
}

.navigation a {
  position: relative;
  padding: 7px 0;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-decoration: none;
  letter-spacing: .13em;
}

.navigation a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform .2s ease;
}

.navigation a:hover::after,
.navigation a.active::after { transform: scaleX(1); }

main { min-height: 68vh; }

.portfolio {
  width: min(960px, calc(100% - 48px));
  margin: 5px auto 72px;
}

.section-title {
  margin: 0 0 42px;
  text-align: center;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: .2em;
}

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

.gallery figure {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--tile);
}

.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, opacity .25s ease;
}

.gallery figure:hover img {
  transform: scale(1.025);
  opacity: .88;
}

.contact {
  width: min(900px, calc(100% - 48px));
  margin: 26px auto 90px;
  display: grid;
  grid-template-columns: 386px 1fr;
  align-items: center;
  gap: 82px;
}

.portrait {
  width: 386px;
  height: 386px;
  object-fit: cover;
}

.contact-details {
  text-align: center;
  font-family: "Avenir Next", Arial, sans-serif;
}

.contact-group + .contact-group { margin-top: 45px; }

.contact-label {
  margin: 0 0 13px;
  font-size: 28px;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.contact-value {
  margin: 0;
  font-size: 21px;
  line-height: 1.55;
  text-decoration: none;
}

a.contact-value:hover { text-decoration: underline; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f1f1ef;
    --page: #242424;
    --tile: #303030;
  }

  .gallery img,
  .portrait {
    filter: brightness(.9);
  }

  .gallery figure:hover img {
    opacity: .95;
  }
}

@media (max-width: 760px) {
  .site-header { padding-top: 38px; }
  .brand { font-size: 25px; }
  .navigation { margin-top: 22px; gap: 34px; }
  .portfolio { width: calc(100% - 24px); }
  .section-title { margin-bottom: 26px; font-size: 20px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .contact {
    width: min(480px, calc(100% - 36px));
    grid-template-columns: 1fr;
    gap: 44px;
    margin-top: 10px;
  }
  .portrait { width: 100%; height: auto; aspect-ratio: 1; }
}

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