.project-reference-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.project-card {
  border-top: 4px solid var(--green);
  overflow: hidden;
}
.project-cover {
  display: block;
  width: 100%;
  height: 285px;
  object-fit: cover;
  cursor: zoom-in;
}
.project-video {
  display: block;
  width: calc(100% - 46px);
  aspect-ratio: 16 / 9;
  margin: 0 23px 22px;
  background: var(--anth-2);
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 0 23px 24px;
}
.project-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  background: var(--soft);
  transition: transform .2s, opacity .2s;
  cursor: zoom-in;
}
.project-cover:focus-visible,
.project-gallery img:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}
.project-gallery img:hover {
  transform: scale(1.035);
  opacity: .9;
}
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(52px, 1fr) minmax(0, 1120px) minmax(52px, 1fr);
  align-items: center;
  padding: 72px 18px 24px;
  background: rgba(14, 20, 24, .96);
}
.lightbox-open { overflow: hidden; }
.lightbox-figure {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: calc(100vh - 96px);
  margin: 0;
}
.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .38);
}
.lightbox figcaption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding-top: 13px;
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
}
.lightbox-counter { white-space: nowrap; color: #b9c800; }
.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 50%;
  background: rgba(20, 29, 34, .8);
  color: #fff;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  border-color: var(--green);
  background: var(--green);
  color: var(--anth-2);
  outline: none;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  font-size: 32px;
  line-height: 1;
}
.lightbox-nav {
  width: 52px;
  height: 52px;
  font-size: 40px;
  line-height: 1;
}
.lightbox-prev { grid-column: 1; justify-self: center; }
.lightbox-next { grid-column: 3; justify-self: center; }
@media (max-width: 1080px) {
  .project-cover { height: 240px; }
  .project-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .project-reference-grid { grid-template-columns: 1fr; }
  .project-cover { height: 215px; }
  .project-video { width: calc(100% - 32px); margin: 0 16px 18px; }
  .project-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 18px; }
  .lightbox {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    padding: 66px 8px 18px;
  }
  .lightbox-nav { width: 44px; height: 44px; font-size: 34px; }
  .lightbox-close { top: 12px; right: 12px; width: 42px; height: 42px; }
  .lightbox figcaption { font-size: 13px; gap: 12px; }
}
