.project-photo,
.award-image {
  cursor: zoom-in;
}

.project-photo:focus-visible,
.award-image:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.media-expand {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff9c;
  border-radius: 50%;
  background: #152b3ad9;
  color: #fff;
  font: 20px/1 var(--sans);
  cursor: zoom-in;
  opacity: .78;
  transition: opacity .2s ease, transform .2s ease;
}

.media-expand:hover,
.media-expand:focus-visible {
  opacity: 1;
  transform: scale(1.06);
}

.media-lightbox {
  position: fixed;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(94vw, 1200px);
  height: min(90dvh, 900px);
  max-width: none;
  max-height: 90dvh;
  padding: 0;
  border: 1px solid #ffffff24;
  background: #101512;
  color: #f4f2ec;
  overflow: hidden;
  box-shadow: 0 24px 90px #0009;
}

.media-lightbox::backdrop {
  background: rgba(8, 13, 13, .88);
  backdrop-filter: blur(5px);
}

.lightbox-stage {
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox-stage img,
.lightbox-stage video,
.lightbox-stage iframe {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-stage img,
.lightbox-stage video {
  min-width: 0;
  min-height: 0;
}

.lightbox-stage iframe { width: min(100%, 1100px); height: min(100%, 620px); aspect-ratio: 16 / 9; border: 0; }

.lightbox-caption {
  margin: 0;
  padding: 0 24px 18px;
  color: #e5e9e2;
  text-align: center;
  font: 500 13px var(--display);
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: #152b3ae8;
  color: #fff;
  font: 28px/1 var(--sans);
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--green);
}

.lightbox-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 58px;
  padding: 0 0 5px;
  border: 1px solid #ffffff55;
  border-radius: 8px;
  background: #152b3ae8;
  color: #fff;
  font: 42px/1 var(--sans);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .2s ease, transform .2s ease;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: var(--green);
  transform: translateY(-50%) scale(1.06);
}

.lightbox-nav[hidden] { display: none; }

@media (max-width: 600px) {
  .lightbox-stage {
    padding: 12px;
  }
  .media-lightbox {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
  }
  .lightbox-caption { font-size: 11px; }
  .lightbox-nav { width: 38px; height: 48px; font-size: 34px; }
  .lightbox-prev { left: 7px; }
  .lightbox-next { right: 7px; }
}

@media (max-height: 520px) {
  .media-lightbox {
    height: 94dvh;
    max-height: 94dvh;
  }
  .lightbox-stage { padding: 12px 48px 12px 12px; }
  .lightbox-caption { padding-bottom: 10px; }
}
