.portfolio-image-trigger {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: manipulation;
}

.portfolio-image-trigger:focus-visible {
  outline: 3px solid var(--green, #59e63b);
  outline-offset: -4px;
}

html.portfolio-lightbox-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.portfolio-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 56px max(18px, env(safe-area-inset-right)) 56px max(18px, env(safe-area-inset-left));
  border: 0;
  background: transparent;
  color: #fff;
}

.portfolio-lightbox[open] {
  display: grid;
  place-items: center;
}

.portfolio-lightbox::backdrop {
  background: rgba(3, 6, 10, .94);
}

.portfolio-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 112px);
  max-height: calc(100dvh - 112px);
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .4);
}

.portfolio-lightbox-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(12, 15, 20, .8);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.portfolio-lightbox-close:hover,
.portfolio-lightbox-close:focus-visible {
  color: var(--green-soft, #a2f580);
  border-color: var(--green, #59e63b);
  outline: 2px solid var(--green, #59e63b);
  outline-offset: 3px;
}
