* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body { margin: 0; }

img { display: block; max-width: 100%; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(4, 12, 15, .92);
  backdrop-filter: blur(12px);
}

.lightbox.is-open { display: grid; }

.lightbox img {
  width: auto;
  max-width: min(1120px, 92vw);
  max-height: 82vh;
  border-radius: 3px;
  box-shadow: 0 30px 100px rgba(0,0,0,.5);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  color: white;
  background: rgba(0,0,0,.3);
  font: 300 26px/1 system-ui, sans-serif;
  cursor: pointer;
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 24px;
  right: 24px;
  color: rgba(255,255,255,.75);
  text-align: center;
  font: 500 12px/1.4 system-ui, sans-serif;
  letter-spacing: .08em;
}

.gallery-item { cursor: zoom-in; }

.gallery-item:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

@media (max-width: 680px) {
  .lightbox { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
