.project-page {
  padding-bottom: 96px;
}

.project-hero {
  padding: 68px 0 76px;
  text-align: center;
}

.project-hero h1 {
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -1.4px;
}

.project-hero p {
  margin: 0;
  font-family: "Libre Franklin", sans-serif;
  font-size: clamp(21px, 2.4vw, 29px);
  font-weight: 700;
  line-height: 1.15;
}

.project-content {
  width: min(1000px, calc(100% - 48px));
  margin-inline: auto;
}

.project-figure {
  margin: 0;
}

.project-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

@media (min-width: 721px) {
  .project-figure--main {
    width: 82%;
    margin-inline: auto;
  }
}

.project-intro {
  margin: 64px 0 104px;
}

.project-intro h2 {
  margin-bottom: 12px;
  font-size: 32px;
  font-weight: 600;
}

.project-category,
.project-description,
.project-details {
  margin: 0;
}

.project-category {
  font-weight: 500;
}

.project-description {
  margin-top: 4px;
  font-style: italic;
}

.project-details {
  margin-top: 20px;
  font-size: 14px;
}

.project-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  width: min(1180px, calc(100% - 48px));
  margin: 116px auto 0;
}

.project-navigation__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: "Libre Franklin", sans-serif;
  font-weight: 600;
}

.project-navigation__item {
  display: contents;
}

.project-navigation__item--next {
  grid-column: 3;
}

.project-navigation__item--next .project-navigation__link {
  grid-column: 3;
}

.project-navigation__back {
  grid-column: 2;
}

.project-navigation__card {
  display: none;
}

.project-navigation__link--next {
  align-items: flex-end;
  text-align: right;
}

.project-navigation__direction {
  font-size: 16px;
}

.project-navigation__title {
  margin-top: 4px;
  font-size: 32px;
  line-height: 1.12;
}

.project-navigation__link:focus-visible,
.project-navigation__back:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

@media (max-width: 1023px) {
  .project-hero {
    padding: 54px 0 62px;
  }

  .project-navigation__title {
    font-size: 25px;
  }
}

@media (max-width: 720px) {
  .project-page {
    padding-bottom: 70px;
  }

  .project-hero {
    padding: 28px 0 20px;
  }

  .project-hero h1 {
    margin-bottom: 10px;
    font-size: 44px;
    letter-spacing: -.8px;
  }

  .project-hero p {
    font-size: 20px;
  }

  .project-content {
    width: min(100% - 32px, 520px);
  }

  .project-figure img {
    border-radius: 18px;
  }

  .project-intro {
    margin: 54px 0 58px;
  }

  .project-intro h2 {
    margin-bottom: 12px;
    font-size: 32px;
    font-weight: 600;
  }

  .project-category {
    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-weight: 500;
  }

  .project-description {
    width: 100%;
    margin-top: 7px;
    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-style: italic;
  }

  .project-details {
    margin-top: 18px;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 400;
  }

  .project-navigation {
    display: flex;
    width: min(100% - 32px, 520px);
    margin-top: 78px;
    flex-direction: column;
    align-items: stretch;
    gap: 72px;
  }

  .project-navigation__item {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .project-navigation__link--next {
    align-items: center;
    text-align: center;
  }

  .project-navigation__link {
    align-items: center;
    text-align: center;
  }

  .project-navigation__direction {
    font-size: 16px;
  }

  .project-navigation__title {
    margin-top: 8px;
    font-size: 24px;
  }

  .project-navigation__link .project-navigation__title {
    display: none;
  }

  .project-navigation__card {
    display: block;
    overflow: hidden;
    width: 100%;
    background: var(--card);
    border-radius: 18px;
    font-family: "Libre Franklin", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    transition: transform .25s ease, box-shadow .25s ease;
  }

  .project-navigation__card img {
    display: block;
    width: 100%;
    height: auto;
  }

  .project-navigation__card span {
    display: block;
    padding: 18px 20px 22px;
  }

  .project-navigation__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.08);
  }

  .project-navigation__card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
  }

  .project-navigation__back {
    order: 3;
    align-self: center;
    margin-top: 0;
  }
}

@media (max-width: 720px) and (hover: none),
       (max-width: 720px) and (pointer: coarse) {
  .project-navigation__card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Project lightbox */

.project-content .project-figure img {
  cursor: pointer;
}

html.lightbox-open,
body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  overflow: hidden;
  background: #000;
}

.lightbox.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__content {
  display: flex;
  width: min(1000px, calc(100% - 160px));
  height: calc(100vh - 160px);
  align-items: center;
  justify-content: center;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}

.lightbox__close {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 3;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #F2F0EB;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  border-radius: 30%;
  transition: background-color .2s ease;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 30%;
  background: transparent;
  color: #F2F0EB;
  font-family: Arial, sans-serif;
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .25s ease;
}

.lightbox__arrow--prev {
  left: 24px;
}

.lightbox__arrow--next {
  right: 24px;
}

.lightbox__content:hover .lightbox__arrow {
  opacity: 1;
}

.lightbox__arrow::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 56px;
  height: 56px;
  border-radius: 30%;
  background-color: transparent;
  transform: translateY(4px);
  transition: background-color .2s ease;
}

@media (hover: hover) {
  .lightbox__arrow:hover::before {
    background-color: #0D1073;
  }
}

.lightbox__play {
  position: absolute;
  top: 29px;
  right: 82px;
  z-index: 2;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #F2F0EB;
  font-size: 24px;
  cursor: pointer;
  border-radius: 30%;
  transition: background-color .2s ease;
}

@media (hover: hover) {
  .lightbox__play:hover,
  .lightbox__close:hover {
    background-color: #0D1073;
  }
}

.lightbox__play.is-playing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0;
}

.lightbox__play.is-playing::before,
.lightbox__play.is-playing::after {
  content: "";
  display: block;
  width: 3px;
  height: 16px;
  background: #fff;
  border-radius: 1px;
}

@media (max-width: 720px) {
  .lightbox__content {
    width: 100%;
    height: calc(100vh - 140px);
    transform: translateY(-60px);
}

  .lightbox__image {
    max-width: 100%;
    max-height: 100%;
  }

  .lightbox__close {
    top: 20px;
    right: 20px;
    font-size: 40px;
    background: rgba(0, 0, 0, .65);
  }

  .lightbox__arrow {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 50%;
    color: #fff;
    font-size: 40px;
    opacity: 1;
    line-height: 1;
  }

  .lightbox.is-playing .lightbox__arrow {
    opacity: 0;
    pointer-events: none;
  }

  .lightbox__arrow--prev {
    left: 12px;
    padding-bottom: 6px;
  }

  .lightbox__arrow--next {
    right: 12px;
    padding-bottom: 6px;
  }

  .lightbox__play {
  top: 20px;
  right: 72px;
  font-size: 24px;
  background: rgba(0, 0, 0, .65);
}
  }
