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

:root {
  --bg: #1a1a1a;
  --surface: #2a2a2a;
  --text: #ffffff;
  --gap: 4px;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--surface);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
}

.header {
  background: var(--bg);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: flex;
  gap: 0.625rem;
}

.logo {
  color: var(--text);
  flex-shrink: 0;
  height: 1.5rem;
  width: 1.5rem;
}

.title {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.main {
  padding: 0 4px 4rem;
}

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .cell,
  .skeleton {
    aspect-ratio: auto;
  }

  .cell img {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .skeleton {
    aspect-ratio: 4 / 3;
  }
}

.cell {
  aspect-ratio: 1;
  background: var(--surface);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.cell img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.skeleton {
  aspect-ratio: 1;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.skeleton::after {
  animation: shimmer 1.4s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.08) 55%,
    transparent 100%
  );
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.sentinel {
  height: 1px;
  pointer-events: none;
  width: 100%;
}
