.project-detail-page {
  overflow: clip;
}

.project-detail-shell {
  width: min(calc(100% - 56px), 1240px);
  margin: 0 auto;
}

.project-detail-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  background: var(--deep-graphite);
  color: var(--white);
}

.project-detail-hero > .project-detail-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: calc(100svh - var(--header-height));
  padding-bottom: clamp(46px, 5vw, 68px);
}

.project-detail-grid-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(90deg, transparent, black 62%, black);
}

.project-breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.project-breadcrumb a {
  transition: color 160ms ease;
}

.project-breadcrumb a:hover,
.project-breadcrumb a:focus-visible {
  color: var(--white);
}

.project-breadcrumb span:last-child {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  text-overflow: ellipsis;
}

.project-detail-hero-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
  align-self: center;
  padding: clamp(30px, 4vw, 58px) 0;
}

.project-detail-hero-copy {
  max-width: 590px;
}

.project-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-status.is-ongoing {
  border-color: var(--sarica-red);
  background: var(--sarica-red);
  color: var(--white);
}

.project-detail-location {
  margin: 27px 0 11px;
  color: var(--sarica-red);
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.project-detail-hero-copy h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(48px, 5.5vw, 74px);
  font-weight: 820;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.project-detail-hero-copy > p:not(.project-detail-location) {
  max-width: 570px;
  margin: 25px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 16px;
  font-weight: 470;
  line-height: 1.7;
}

.project-all-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 31px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--sarica-red);
  color: var(--white);
  font-size: 12px;
  font-weight: 790;
}

.project-all-link svg,
.project-cover-expand svg,
.project-gallery-item svg,
.project-lightbox-nav svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-all-link svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.project-all-link:hover svg,
.project-all-link:focus-visible svg {
  transform: translateX(-3px);
}

.project-detail-cover {
  position: relative;
  isolation: isolate;
  min-width: 0;
  aspect-ratio: 16 / 11;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: #171a1e;
  box-shadow: 0 30px 68px rgba(0, 0, 0, 0.3);
}

.project-detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 62%, rgba(16, 18, 21, 0.76));
  pointer-events: none;
}

.project-detail-cover img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.project-detail-cover figcaption {
  position: absolute;
  right: 72px;
  bottom: 18px;
  left: 20px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.project-cover-expand {
  position: absolute;
  right: 15px;
  bottom: 15px;
  z-index: 3;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(26, 29, 33, 0.72);
  color: var(--white);
  backdrop-filter: blur(8px);
  cursor: zoom-in;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.project-cover-expand svg {
  width: 18px;
  height: 18px;
}

.project-cover-expand:hover,
.project-cover-expand:focus-visible {
  border-color: var(--white);
  background: rgba(26, 29, 33, 0.9);
  transform: scale(1.06);
}

.project-cover-expand:focus-visible {
  outline: 3px solid var(--sarica-red);
  outline-offset: 3px;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.project-facts div {
  min-width: 0;
  min-height: 104px;
  padding: 24px 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.project-facts dt {
  color: rgba(255, 255, 255, 0.43);
  font-size: 9px;
  font-weight: 810;
  line-height: 1;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 12px 0 0;
  color: var(--white);
  font-size: 15px;
  font-weight: 730;
  line-height: 1.3;
}

.project-gallery-heading h2 {
  margin: 0;
  color: var(--deep-graphite);
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 810;
  line-height: 1.04;
  letter-spacing: -0.033em;
}

.project-gallery {
  padding: clamp(76px, 8vw, 112px) 0;
  border-top: 1px solid var(--border-gray);
  background: var(--soft-concrete);
}

.project-gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 38px;
}

.project-gallery-heading > span {
  padding-bottom: 6px;
  color: var(--steel-gray);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

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

.project-gallery-item {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #dfe2e5;
  color: var(--white);
  cursor: zoom-in;
}

.project-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 43%;
  transition: transform 420ms ease;
}

.project-gallery-item > span {
  position: absolute;
  right: 15px;
  bottom: 15px;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(26, 29, 33, 0.72);
  backdrop-filter: blur(8px);
}

.project-gallery-item svg {
  width: 17px;
  height: 17px;
}

.project-gallery-item:hover img,
.project-gallery-item:focus-visible img {
  transform: scale(1.025);
}

.project-gallery-item:focus-visible {
  outline: 3px solid var(--sarica-red);
  outline-offset: 3px;
}

.project-pagination {
  background: var(--white);
}

.project-pagination-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-pagination a {
  display: grid;
  min-height: 190px;
  align-content: center;
  padding: 36px 42px;
  border-left: 1px solid var(--border-gray);
  transition: background-color 170ms ease;
}

.project-pagination a:last-child {
  border-right: 1px solid var(--border-gray);
}

.project-pagination a:hover,
.project-pagination a:focus-visible {
  background: var(--soft-concrete);
}

.project-pagination a.is-next {
  text-align: right;
}

.project-pagination span {
  color: var(--sarica-red);
  font-size: 10px;
  font-weight: 810;
  text-transform: uppercase;
}

.project-pagination strong {
  margin-top: 12px;
  color: var(--deep-graphite);
  font-size: 23px;
  font-weight: 790;
  line-height: 1.18;
}

.project-pagination small {
  margin-top: 7px;
  color: var(--steel-gray);
  font-size: 11px;
  font-weight: 630;
}

.project-detail-cta {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  align-items: center;
  padding: 40px;
  background: rgba(12, 14, 17, 0.96);
  color: var(--white);
  opacity: 0;
  transition: opacity 180ms ease;
}

.project-lightbox.is-open {
  opacity: 1;
}

.project-lightbox[data-count="1"] figure {
  grid-column: 1 / -1;
}

.project-lightbox[data-count="1"] .project-lightbox-nav {
  display: none;
}

.project-lightbox figure {
  display: grid;
  gap: 15px;
  justify-items: center;
  margin: 0;
}

.project-lightbox figure img {
  display: block;
  max-width: min(1120px, 100%);
  max-height: calc(100svh - 120px);
  object-fit: contain;
}

.project-lightbox figcaption {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 680;
}

.project-lightbox-close,
.project-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
}

.project-lightbox-close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}

.project-lightbox-nav {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.project-lightbox-nav.is-next {
  justify-self: end;
}

.project-lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.project-lightbox-close:hover,
.project-lightbox-close:focus-visible,
.project-lightbox-nav:hover,
.project-lightbox-nav:focus-visible {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.project-not-found {
  display: grid;
  min-height: 68svh;
  align-items: center;
  padding: 90px 0;
  background: var(--warm-white);
}

.project-not-found h1 {
  max-width: 760px;
  margin: 0;
  color: var(--deep-graphite);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 820;
  line-height: 1;
  letter-spacing: -0.04em;
}

.project-not-found > div > p:not(.section-kicker) {
  max-width: 610px;
  margin: 25px 0 0;
  color: var(--steel-gray);
  font-size: 17px;
  line-height: 1.65;
}

.project-back-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  margin-top: 31px;
  padding: 0 20px;
  border-radius: 6px;
  background: var(--deep-graphite);
  color: var(--white);
  font-size: 13px;
  font-weight: 790;
}

@media (min-width: 861px) {
  .project-detail-hero {
    height: calc(100svh - var(--header-height));
    min-height: 0;
  }

  .project-detail-hero > .project-detail-shell {
    height: 100%;
    min-height: 0;
    padding-bottom: 24px;
  }

  .project-detail-hero-layout {
    min-height: 0;
    padding: clamp(16px, 2.5svh, 30px) 0;
    transform: translateY(-20px);
  }

  .project-detail-cover {
    height: min(52svh, 520px);
    aspect-ratio: auto;
  }
}

@media (max-width: 1020px) {
  .project-detail-hero-layout {
    grid-template-columns: minmax(280px, 0.78fr) minmax(430px, 1.22fr);
    gap: 42px;
  }
}

@media (max-width: 860px) {
  .project-detail-shell {
    width: min(calc(100% - 28px), 620px);
  }

  .project-detail-hero-layout {
    grid-template-columns: 1fr;
  }

  .project-detail-hero-layout {
    gap: 46px;
    padding-top: 46px;
  }

  .project-detail-hero-copy h1 {
    font-size: 54px;
  }

  .project-detail-cover {
    aspect-ratio: 4 / 3;
  }

  .project-lightbox {
    grid-template-columns: 54px minmax(0, 1fr) 54px;
    padding: 28px 18px;
  }
}

@media (max-width: 640px) {
  .project-detail-hero > .project-detail-shell {
    padding-bottom: 44px;
  }

  .project-breadcrumb {
    min-height: 52px;
  }

  .project-detail-hero-layout {
    gap: 34px;
    padding: 33px 0 45px;
  }

  .project-detail-location {
    margin-top: 22px;
  }

  .project-detail-hero-copy h1 {
    font-size: 42px;
  }

  .project-detail-hero-copy > p:not(.project-detail-location) {
    margin-top: 20px;
    font-size: 15px;
  }

  .project-detail-cover {
    aspect-ratio: 1 / 1;
  }

  .project-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-facts div {
    min-height: 96px;
    padding: 21px 17px;
  }

  .project-gallery-heading h2 {
    font-size: 34px;
  }

  .project-gallery-heading {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

  .project-gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-gallery-item {
    aspect-ratio: 4 / 3;
  }

  .project-pagination-grid {
    grid-template-columns: 1fr;
  }

  .project-pagination a {
    min-height: 150px;
    padding: 30px 22px;
    border-right: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
  }

  .project-pagination a.is-next {
    text-align: left;
  }

  .project-lightbox {
    grid-template-columns: repeat(2, 1fr);
    align-content: center;
    gap: 20px;
    padding: 72px 16px 24px;
  }

  .project-lightbox figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .project-lightbox-nav {
    grid-row: 2;
  }

  .project-lightbox-nav.is-next {
    justify-self: end;
  }
}

@media (max-width: 420px) {
  .project-detail-shell {
    width: min(calc(100% - 24px), 380px);
  }

  .project-detail-hero-copy h1 {
    font-size: 37px;
  }

  .project-facts dd {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-all-link svg,
  .project-cover-expand,
  .project-gallery-item img,
  .project-lightbox {
    transition: none;
  }

  .project-gallery-item:hover img,
  .project-gallery-item:focus-visible img {
    transform: none;
  }
}
