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

:root {
  --bg: #0c0c0d;
  --fg: #e8e8e6;
  --dim: #8a8a88;
  --gap: 4px;
}

html, body { background: var(--bg); color: var(--fg); }
body {
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px 16px 14px;
}
h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.35em;
}
#filters { display: flex; gap: 6px; flex-wrap: wrap; }
#filters button {
  background: none;
  border: 1px solid #2c2c2e;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
}
#filters button.on { color: var(--fg); border-color: var(--fg); }

#grid { position: relative; margin: 0 var(--gap); }
.cell {
  position: absolute;
  overflow: hidden;
  background: #161617;
  cursor: pointer;
}
.cell img, .cell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cell .badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(0,0,0,.55);
  padding: 2px 6px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity .15s;
}
.cell:hover .badge { opacity: 1; }

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5,5,6,.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
#lightbox[hidden] { display: none; }
#lb-stage {
  max-width: 92vw;
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lb-stage img, #lb-stage video {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
}
#lb-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.05em;
}
#lb-meta a { color: var(--fg); }
#lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 16px;
}
#lightbox button:hover { color: var(--fg); }
#lb-close { top: 8px; right: 12px; }
#lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
#lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
