/* Project Layout */
.project-page {
  padding-bottom: 50px;
}

/* Back Navigation */
.project-back-row {
  position: sticky;
  top: 100px;
  z-index: 15;
  height: 50px;
  margin-top: 20px;
  margin-bottom: 75px;
  display: flex;
  align-items: center;
  color: #fff;
  background: transparent;
  mix-blend-mode: difference;
}

.project-back-row[hidden] {
  display: none;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1.4px;
  opacity: 0.35;
  transition: opacity 180ms ease;
}

.project-back img {
  display: block;
  width: 14px;
  height: 13px;
}

.project-back:focus-visible {
  opacity: 1;
}

.project-back-row .project-back,
.project-pagination .project-back {
  opacity: 1;
}

.project-back-row .project-back img,
.project-pagination .project-back img {
  filter: invert(1);
}

@media (hover: hover) and (pointer: fine) {
  .project-back:hover {
    opacity: 1;
  }
}

/* Project Hero */
.project-hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 0;
  align-items: start;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.2;
}

.project-hero-title {
  justify-self: start;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.2;
  text-align: left;
}

.project-hero-context,
.project-hero-services {
  justify-self: center;
  text-align: center;
}

.project-hero-year {
  justify-self: end;
  text-align: right;
}

.project-hero-media {
  width: 100%;
  aspect-ratio: 19 / 9;
  overflow: hidden;
  background: #d8d8d8;
}

.project-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Project About */
.project-about {
  display: grid;
  grid-template-columns: 39.4% 26.85% 26.85%;
  gap: 20px;
  min-height: 227px;
  margin-top: 250px;
  font-size: 13px;
  line-height: 1.2;
}

.project-about h2 {
  grid-column: 1;
  grid-row: 1;
  width: fit-content;
  align-self: start;
  color: var(--paper);
  background: var(--ink);
  font-size: 19px;
}

.project-about h2::selection {
  color: var(--ink);
  background: var(--paper);
}

.project-description-column {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}

.project-description-primary {
  grid-column: 2;
}

.project-description-secondary {
  grid-column: 3;
}

/* Project Gallery */
.project-gallery {
  display: grid;
  gap: var(--gutter);
  margin-top: 250px;
}

.project-gallery figure {
  width: 100%;
  aspect-ratio: 19 / 9;
  margin: 0;
  overflow: hidden;
  background: #d8d8d8;
}

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

/* Project Navigation */
.project-pagination-slot {
  height: 165px;
  padding-top: 75px;
  padding-bottom: 40px;
  display: flex;
  align-items: center;
}

.project-pagination-slot[hidden],
.project-pagination[hidden] {
  display: none;
}

.project-pagination {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  mix-blend-mode: difference;
}

.project-pagination.is-floating {
  position: fixed;
  right: max(var(--gutter), calc((100vw - 1920px) / 2 + var(--gutter)));
  bottom: 50px;
  left: max(var(--gutter), calc((100vw - 1920px) / 2 + var(--gutter)));
  width: auto;
  z-index: 15;
  background: transparent;
}

/* Utility Bar */
.project-utility {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  z-index: 10;
}

/* Footer / Inquiries */
.project-footer {
  margin-top: 150px;
}

/* Responsive Layouts */
@media (max-width: 1200px) {
  .project-back-row {
    top: 80px;
    margin-top: 15px;
    margin-bottom: 55px;
  }

  .project-pagination-slot {
    height: 135px;
    padding-top: 55px;
    padding-bottom: 30px;
  }

  .project-pagination.is-floating {
    bottom: 40px;
  }

  .project-about {
    grid-template-columns: 35% 1fr 1fr;
    margin-top: 130px;
  }

  .project-gallery {
    margin-top: 130px;
  }

  .project-footer {
    margin-top: 100px;
  }
}

@media (max-width: 700px) {
  .project-back-row {
    top: 70px;
    margin-top: 10px;
    margin-bottom: 35px;
  }

  .project-pagination-slot {
    height: 105px;
    padding-top: 35px;
    padding-bottom: 20px;
  }

  .project-hero-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
  }

  .project-hero-services {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    text-align: left;
  }

  .project-hero-context {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    text-align: left;
  }

  .project-about {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 90px;
  }

  .project-about h2,
  .project-description-column {
    grid-column: 1;
  }

  .project-about h2 {
    grid-row: 1;
  }

  .project-description-primary {
    grid-row: 2;
  }

  .project-description-secondary {
    grid-row: 3;
  }

  .project-gallery {
    margin-top: 90px;
  }

  .project-footer {
    margin-top: 80px;
  }
}
