/* Clean white photo wall */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --shadow: 0 14px 32px -18px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --gap: 16px;
  --overlay: rgba(0, 0, 0, 0.88);
  font-family: "Space Grotesk", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

.gallery {
  max-width: 1400px;
  margin: 32px auto 48px;
  padding: 0 18px;
  column-count: 3;
  column-gap: var(--gap);
}

.tile {
  margin: 0 0 var(--gap);
  break-inside: avoid;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #f8f8f8;
}

.tile img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 180ms ease;
  cursor: zoom-in;
}

.tile:hover img {
  transform: scale(1.02);
}

#lightbox {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 10;
}

#lightbox.show {
  opacity: 1;
  pointer-events: auto;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

#lightbox .close {
  position: fixed;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 1100px) {
  .gallery {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  :root {
    --gap: 12px;
    --radius: 6px;
  }

  .gallery {
    margin: 20px auto 32px;
    column-count: 1;
  }
}
