/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(14, 14, 14, 0.9);
  backdrop-filter: blur(10px);
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding: 18px clamp(14px, 2.2vw, 28px);
}
.brand {
  font: 600 13px "Geist", sans-serif;
  letter-spacing: 0.14em;
}
.filters {
  display: flex;
  gap: 4px;
  font: 500 12px "Geist", sans-serif;
  overflow-x: auto;
  max-width: 100%;
}
.filters button {
  flex: none;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  height: 32px;
  cursor: pointer;
  font: inherit;
  background: transparent;
  color: var(--muted);
}
.filters button.active {
  background: var(--ink);
  color: var(--bg);
}
.status {
  font: 400 11px "Geist Mono", monospace;
  color: var(--muted);
  text-align: right;
}
.progress-track {
  height: 1px;
  background: #222;
}
.progress-fill {
  height: 1px;
  width: 0%;
  background: var(--ink);
  opacity: 1;
  transition: width 0.3s ease, opacity 0.6s;
}

@media (max-width: 760px) {
  .filters {
    order: 3;
    flex-basis: 100%;
  }
}

/* Grid */
main {
  position: relative;
  z-index: 0;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 20px clamp(14px, 2.2vw, 28px);
}
.tile {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--tile-bg);
  cursor: progress;
}
.tile.is-ready {
  cursor: zoom-in;
}
.tile .skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #181818 0%, #242424 50%, #181818 100%);
  background-size: 200% 100%;
  animation: obShimmer 1.5s linear infinite;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease, filter 0.2s ease;
}
.tile:hover img {
  filter: brightness(1.15);
}
.tile.is-loaded img {
  opacity: 1;
}
.tile.is-leaving {
  z-index: 0;
  pointer-events: none;
}
.tile-media {
  position: absolute;
  inset: 0;
}
.tile .num {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font: 500 10px "Geist Mono", monospace;
  color: rgba(230, 230, 227, 0.65);
}
.grid-filler {
  flex: 100 1 0;
  height: 0;
}
.empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: var(--muted);
  font: 400 13px "Geist Mono", monospace;
  text-align: center;
}

/* Footer */
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding: 40px clamp(14px, 2.2vw, 28px) 44px;
  font: 400 11px/1.7 "Geist Mono", monospace;
  color: var(--muted);
}
footer .legal {
  max-width: 700px;
  text-wrap: pretty;
}
