.image-lightbox-trigger {
  display: block;
  cursor: zoom-in;
}

.image-lightbox-trigger img {
  transition: filter .2s ease;
}

.image-lightbox-trigger:hover img {
  filter: brightness(.9);
}

body.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 44px);
  background: rgba(2, 8, 12, .9);
  backdrop-filter: blur(8px);
}

.image-lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
}

.image-lightbox-image {
  display: block;
  max-width: min(94vw, 1600px);
  max-height: calc(100vh - 130px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #07131b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

.image-lightbox-caption {
  max-width: min(94vw, 1000px);
  margin-top: 14px;
  color: #eef4f4;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.image-lightbox-close {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  transform: translate(45%, -45%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: #101f28;
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}

.image-lightbox-close span {
  font-size: 32px;
  font-weight: 200;
  line-height: 1;
  transform: translateY(-1px);
}

.image-lightbox-close:hover {
  background: var(--accent);
  color: var(--ink);
}

@media (max-width: 700px) {
  .image-lightbox {
    padding: 16px;
  }

  .image-lightbox-image {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 112px);
  }

  .image-lightbox-caption {
    font-size: 12px;
  }

  .image-lightbox-close {
    top: 8px;
    right: 8px;
    transform: none;
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-lightbox-trigger img {
    transition: none;
  }
}
