*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: #0a0a0a;
}

body {
  min-height: 100vh;
  background: #0a0a0a;
  color: #e8e8e8;
  -webkit-font-smoothing: antialiased;
}

/* JS packs figures into columns (shortest first) for masonry + LTR chronology. */
.gallery {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
}

@media (min-width: 640px) {
  .gallery {
    gap: 1rem;
    padding: 1rem;
  }
}

@media (min-width: 1024px) {
  .gallery {
    gap: 1.25rem;
    padding: 1.25rem;
  }
}

.gallery-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .gallery-col {
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .gallery-col {
    gap: 1.25rem;
  }
}

.gallery figure {
  margin: 0;
  line-height: 0;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  background: #141414;
}

/* Full-bleed view — image only, no chrome */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.94);
  cursor: zoom-out;
  padding: 0;
  border: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
}
