/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Georgia", serif;
  background: #fdfbf9;
  color: #444;
  text-align: center;
  line-height: 1.6;
}

header {
  padding: 2rem 1rem 1rem;
}
header h1 {
  font-size: 2.5rem;
  color: #a36d6d;
  font-weight: 400;
}
.subtitle {
  font-style: italic;
  color: #777;
  margin-top: 0.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  padding: 1rem;
  max-width: 1200px;
  margin: auto;
}

/* Square thumbnails with blur-up lazy loading */
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  filter: blur(10px);
  transform: scale(1.05);
  opacity: 0.7;
  transition: filter 0.4s ease, transform 0.4s ease, opacity 0.3s ease;
}
.gallery img.loaded {
  filter: blur(0);
  transform: scale(1);
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: opacity 0.2s;
}
.lightbox .close {
  top: 20px;
  right: 30px;
}
.lightbox .prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox .next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}
.hidden {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}