:root {
  --bg: #0f1115;
  --card: #151822;
  --text: #e7e9ee;
  --muted: #a5adba;
  --accent: #7aa2f7;
  --shadow: rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #1a1e2b, transparent), var(--bg);
}

main { padding: 16px; max-width: 1200px; margin: 0 auto; }

.gallery { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; 
}

.tile {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 6px 18px var(--shadow);
  transform: translateZ(0);
}
.tile img { 
  width: 100%; height: 220px; object-fit: cover; display: block; 
  transition: transform .3s ease;
}
.tile:hover img { transform: scale(1.04); }



/* Lightbox */
.lightbox {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85); z-index: 50; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.lightbox__close { 
  position: absolute; top: 12px; right: 12px; 
  width: 44px; height: 44px; border-radius: 999px;
  border: none; background: rgba(255,255,255,0.08); color: #fff; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,0.18); }
/* Create a visual X without text */
.lightbox__close::before, .lightbox__close::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 24px; height: 2px; background: #fff;
  transform-origin: center;
}
.lightbox__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.lightbox__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* Indicate that clicking will go to next image */
.lightbox { cursor: pointer; }
.lightbox__close { cursor: default; }

@media (min-width: 1200px) {
  .tile img { height: 250px; }
}
