.project-page {
  color: #1a1a1a;
  background: #fff;
  color-scheme: light;
}

.project-close {
  position: fixed;
  z-index: 5;
  inset: 10px auto auto 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 37px;
  padding: 8px 12px;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fff;
  color: #191919;
  font: 500 14px/20px "Rethink Sans", sans-serif;
  box-shadow: 0 2px 8px #0000000d;
}

.project-close:hover { background: #f0f0f0; }

.close-symbol {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
}

.close-symbol::before, .close-symbol::after {
  position: absolute;
  content: "";
  inset: 5px 0 auto;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
}

.close-symbol::after { transform: rotate(-45deg); }

.project-content {
  max-width: 1920px;
  margin-inline: auto;
  padding: 100px 25px 50px;
}

.project-overview {
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 25fr) minmax(0, 25fr);
  gap: 5%;
  align-items: start;
}

.project-heading h1 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.project-category {
  margin: 0;
  color: #555;
  font: 500 16px/24px "Inter Display", sans-serif;
}

.project-fact h2 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d5d5d5;
  font-size: 20px;
  font-weight: 500;
  line-height: 26px;
}

.project-fact p {
  margin: 0;
  font: 500 16px/24px "Inter Display", sans-serif;
  overflow-wrap: anywhere;
}

.project-fact .project-role {
  margin-bottom: 8px;
  color: #484848;
  font-size: 18px;
  line-height: 27px;
}

.project-fact .project-credit {
  margin-top: 8px;
  color: #555;
  font-size: 14px;
  line-height: 21px;
}

.project-hero {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 50px;
  border-radius: 10px;
  background: #f4f4f4;
}

.project-story {
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 55fr);
  gap: 5%;
  margin-block: 50px;
  padding: 25px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fafafa;
}

.project-story h2, .project-gallery h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.project-source {
  margin: 0;
  color: #666;
  font: 500 13px/20px "Inter Display", sans-serif;
}

.project-description p {
  margin: 0 0 16px;
  font: 500 16px/25px "Inter Display", sans-serif;
}

.project-description p:last-child { margin-bottom: 0; }

.project-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 35px 25px;
}

.project-gallery figure { margin: 0; }

.project-gallery .gallery-wide { grid-column: 1 / -1; }

.project-gallery a {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #f6f6f6;
}

.project-gallery a:focus-visible { outline-offset: 4px; }

.project-gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 1050px;
  object-fit: contain;
}

.project-gallery figcaption {
  margin-top: 9px;
  color: #555;
  font: 500 13px/20px "Inter Display", sans-serif;
}

.project-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 55px;
  padding-top: 25px;
  border-top: 1px solid #ddd;
  font-size: 14px;
}

.project-pagination a:hover { text-decoration: underline; }

.project-page .site-footer { background: #fff; }

@media (max-width: 809px) {
  .project-page .navigation {
    width: auto;
    inset: 0 0 auto 49px;
    padding-inline-start: 5px;
  }

  .project-close {
    inset: 5px auto auto 4px;
    min-height: 33px;
    padding: 8px;
  }

  .project-close-label { display: none; }

  .project-content { padding: 80px 15px 35px; }

  .project-overview, .project-story {
    grid-template-columns: minmax(0, 1fr);
    gap: 25px;
  }

  .project-heading h1 { font-size: 30px; }
  .project-hero { margin-top: 35px; border-radius: 6px; }

  .project-story {
    margin-block: 35px;
    padding: 15px;
  }

  .project-gallery-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .project-pagination { margin-top: 35px; }
}

@media (max-width: 350px) {
  .project-page .navigation a { font-size: 12px; }
}
