/* page */

body {
  margin: 0;
  background: #fff;
  font-family: sans-serif;
    overflow-x: hidden;
}

main {
  padding: 4px;
    overflow-x: hidden;
}

/* masonry container */

#gallery {
  position: relative;
}

/* image items */

.gallery-item {
  position: absolute;
  overflow: hidden;
  background: #f0f0f0;

  opacity: 0;
  transition: opacity .35s ease;
  will-change: opacity;
}

.gallery-item.visible {
  opacity: 1;
}

/* images */

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* lightbox */

#lightbox {
  position: fixed;
  inset: 0;

  background: rgba(0,0,0,.94);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity .2s ease;

  z-index: 9999;
}

#lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}

/* sentinel */

#scroll-sentinel {
  height: 1px;
  visibility: hidden;
}