/* HomeWork Pros — project gallery lightbox (Home + Projects) */

[data-gallery] [data-gallery-item] {
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

[data-gallery] [data-gallery-item] img,
.hwp-lb__protected {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none; /* clicks land on figure / shield — blocks casual save-as on img */
}

[data-gallery] [data-gallery-item]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

.hwp-lb {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(0.85rem, env(safe-area-inset-top)) max(0.85rem, env(safe-area-inset-right)) max(0.85rem, env(safe-area-inset-bottom)) max(0.85rem, env(safe-area-inset-left));
  background: rgba(8, 11, 9, 0.92);
  -webkit-tap-highlight-color: transparent;
}

.hwp-lb.is-open {
  display: flex;
}

.hwp-lb__stage {
  position: relative;
  width: min(100%, 920px);
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hwp-lb__frame-wrap {
  position: relative;
  width: 100%;
  height: min(64vh, 560px);
  display: grid;
  place-items: center;
  background: #0F140F;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* Preview via background — no <img> Save-as target */
.hwp-lb__frame {
  width: 100%;
  height: 100%;
  background-color: #0F140F;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.hwp-lb__shield {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  cursor: default;
}

.hwp-lb__caption {
  margin: 0;
  max-width: 36rem;
  text-align: center;
  font-family: "Archivo", "Helvetica Neue", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.hwp-lb__count {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
}

.hwp-lb__btn {
  position: absolute;
  z-index: 3;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}

.hwp-lb__btn:hover,
.hwp-lb__btn:focus-visible {
  background: #1B7F3B;
  color: #fff;
  outline: none;
}

.hwp-lb__close {
  top: max(0.65rem, env(safe-area-inset-top));
  right: max(0.65rem, env(safe-area-inset-right));
  font-size: 1.7rem;
}

.hwp-lb__prev {
  left: max(0.35rem, env(safe-area-inset-left));
  top: 50%;
  transform: translateY(-50%);
}

.hwp-lb__next {
  right: max(0.35rem, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
}

body.hwp-lb-lock {
  overflow: hidden;
}

@media (max-width: 700px) {
  .hwp-lb__stage {
    width: 100%;
    max-height: min(78vh, 720px);
  }
  .hwp-lb__frame-wrap {
    height: min(58vh, 480px);
  }
  .hwp-lb__btn {
    width: 44px;
    height: 44px;
  }
}
