* { box-sizing: border-box; margin: 0; }

body {
  isolation: isolate;
  font-family: Georgia, serif;
  background-color: black;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("background.JPG");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: lightgreen;
  padding: 2rem 1rem;
}

#bug-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.background-bug {
  position: absolute;
  top: 0;
  left: 0;
  height: auto;
  pointer-events: none;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  #bug-background { display: none; }
}

h1 {
  text-align: center;
  font-weight: normal;
  margin-bottom: 2rem;
}

#gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

#gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

#gallery .featured-photo {
  grid-column: 1 / -1;
  overflow: hidden;
}

#gallery .featured-photo img {
  aspect-ratio: auto;
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox[hidden] { display: none; }

#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
}

#lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  padding: 1rem;
}

#close { top: 0; right: 0; }
#prev { left: 0; }
#next { right: 0; }
