@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

* {

  font-family: "Caveat", cursive;

  /* neon vibe */
  text-shadow:
    0 0 0.5rem #fff,
    0 0 1.25rem #fff,
    0 0 2rem #fff,
    0 0 4rem #0fa,
    0 0 5rem #0fa,
    0 0 6rem #0fa,
    0 0 8rem #0fa,
    0 0 10rem #0fa;
}

body {

  /* colours */
  background: #111;
  color: #fff;

  /* layout & spacing */
  box-sizing: border-box;
  height: 100vh;
  margin: 0;

  /* font */
  font-style: normal;
  font-optical-sizing: auto;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 3rem;
  text-align: left;
}

h1 {

  /* colours */
  color: white;

  /* layout & spacing */
  padding: 2rem 0.5rem 2.2rem 0.5rem;
  margin: 0;

  /* font */
  font-size: 4rem;
}

.gallery-container {
  /* padding: 1rem; */
  max-width: 2400px;
  margin: 0 auto;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1600px) {
  .gallery {
    grid-template-columns: repeat(8, 1fr);
  }
}

.thumbnail {
  position: relative;
  overflow: hidden;
  border: 4px solid black;
  background: #000;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.2s ease, filter 0.2s ease, border 0.2s ease;
}

.thumbnail:focus {
  outline: none; /* Removes the default focus outline */
  border: 4px solid #0FA; /* Optional: keeps a solid border */

  box-shadow:
  0 0 0.5rem #fff,
  0 0 1.25rem #fff,
  0 0 2rem #fff,
  0 0 4rem #0fa,
  0 0 5rem #0fa,
  0 0 6rem #0fa,
  0 0 8rem #0fa,
  0 0 10rem #0fa;

  transform: scale(1.03);
  filter: brightness(1.1);
  z-index: 1;
  animation: shimmer-border 1.5s linear infinite;
}

@keyframes shimmer-border {
  0% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 0px rgba(255, 255, 255, 0.5);
  }
}

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

.caption {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 1.5rem;
  text-align: left;
  position: absolute;
  top: 1rem;
  width: auto;
  padding: 0.25rem 0.8rem 0.25rem 0.2rem;
}

@media (min-width: 1200px) {
  .caption {
    font-size: 1.3rem;
  }
}

@media (min-width: 1600px) {
  .caption {
    font-size: 1.5rem;
  }
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  /* transform: scale(0.98); */
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.lightbox-content {
  text-align: center;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 80vw;
  max-height: 80vh;
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.lightbox-content img.open {
  opacity: 1;
}

.lightbox-caption {
  color: #fff;
  font-size: 2.5rem;
  margin-top: 0rem;
  max-width: 80vw;
}
