/* Base & layout */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fafafa;
  --fg: #222;
  --muted: #666;
  --card: rgba(255,255,255,0.85);
  --shadow: 0 2px 10px rgba(0,0,0,.12);
  --radius: 12px;
}
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  padding: 24px;
}
header { text-align: center; margin-bottom: 40px; }
header h1 { font-size: 2rem; margin-bottom: 8px; }
nav a {
  display: inline-block;
  margin: 0 12px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}
nav a:hover { color: var(--fg); }

/* Category container as card (with subtle hover) */
.category {
  margin: 0 auto 48px;
  max-width: 1200px;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  transition: transform .2s ease, box-shadow .2s ease;
}
.category:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.category h2 {
  text-align: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
  color: var(--fg);
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

/* Uniform tiles without wrappers: crop via aspect-ratio */
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;   /* consistent tile shape */
  object-fit: cover;     /* crop but don't distort */
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  background: #eee;
  transition: transform .25s ease, box-shadow .25s ease;
}
.gallery img:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

/* Smaller phones: tighter grid */
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* stack image + caption vertically */
  padding: 24px;
  z-index: 9999;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1600px);
  max-height: 75vh; /* leave room for caption */
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,.5);
}
.lb-caption {
  margin-top: 16px;
  color: #eee;
  text-align: center;
  font-size: 0.95rem;
  max-width: 92vw;
  line-height: 1.4;
  word-break: break-word;
}

/* Lightbox controls */
.lb-btn {
  position: absolute;
  background: rgba(255,255,255,.08);
  border: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  backdrop-filter: blur(2px);
  transition: background .2s ease, transform .1s ease;
  user-select: none;
}
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-btn:active { transform: scale(.96); }
.lb-close { top: 24px; right: 24px; font-size: 30px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

.email { text-align: center; }

img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: auto; /* keeps lightbox clickable */
}

/* Footer */
footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: .9rem;
}