:root {
  --page: #ffffff;
  --ink: #111111;
  --muted: #777777;
  --line: #dedede;
  --soft-line: #eeeeee;
  --max: 1200px;
  --font: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: #666666;
}

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

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 40px 28px;
  text-align: center;
}

.brand {
  display: inline-block;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 42px;
  margin-top: 11px;
  color: #999999;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: lowercase;
}

.nav a {
  text-decoration: none;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: #111111;
}

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 40px 84px;
}

.works-layout {
  display: grid;
  grid-template-columns: minmax(230px, 28%) 1fr;
  gap: 48px;
  align-items: start;
}

.works-list h1,
.works-list h2,
.page-title,
.work-title {
  margin: 0 0 11px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

.works-list h2 {
  margin-top: 34px;
}

.works-list ol {
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.works-list li {
  margin: 0 0 5px;
}

.work-link {
  display: inline-block;
}

.home-feature {
  margin: 0;
}

.home-feature img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.caption {
  margin-top: 11px;
  color: #666666;
  font-size: 14px;
}

.caption strong {
  color: #111111;
}

.work-header {
  margin-bottom: 38px;
  max-width: 760px;
}

.work-header p {
  margin: 0 0 8px;
  color: #666666;
  font-weight: 600;
}

.content-fragment {
  max-width: 820px;
  margin: 0 0 28px;
}

.content-fragment h1,
.content-fragment h2,
.content-fragment h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.content-fragment p {
  margin: 0 0 12px;
}

.content-fragment ul {
  margin: 0 0 22px;
  padding-left: 20px;
}

.content-fragment li {
  margin-bottom: 8px;
}

.gallery {
  display: grid;
  gap: 44px;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  width: auto;
  max-height: min(82vh, 980px);
  object-fit: contain;
}

.gallery .wide img {
  width: 100%;
  max-height: none;
}

.image-note {
  margin-top: 9px;
  color: #777777;
  font-size: 13px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(240px, 36%) 1fr;
  gap: 48px;
  align-items: start;
}

.about-image img {
  width: 100%;
}

.next-prev {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--soft-line);
  color: #777777;
}

.next-prev a {
  color: #111111;
}

.not-found {
  max-width: 620px;
}

@media (max-width: 900px) {
  .site-header {
    padding: 38px 28px 20px;
  }

  .main {
    padding: 22px 28px 64px;
  }

  .works-layout,
  .about-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .home-feature {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 20px 24px 18px;
  }

  .brand {
    font-size: 21px;
    letter-spacing: 1px;
  }

  .nav {
    gap: 28px;
    font-size: 14px;
  }

  .main {
    padding: 26px 24px 56px;
  }

  .gallery {
    gap: 32px;
  }

  .next-prev {
    flex-direction: column;
  }
}
