:root {
  color-scheme: dark;
  --bg: #040404;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  overflow-x: hidden;
}

h1 {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.links {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100vw - 20px);
}

.links a,
.ca-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(4, 4, 4, 0.76);
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: lowercase;
  backdrop-filter: blur(12px);
  transition: color 120ms ease, background 120ms ease, filter 120ms ease;
}

.links a:hover,
.links a:focus-visible,
.ca-button:hover,
.ca-button:focus-visible {
  color: white;
  background: rgba(4, 4, 4, 0.9);
  filter: drop-shadow(0 0 14px rgba(255, 224, 98, 0.48));
  outline: none;
}

.ca-button {
  max-width: min(642px, calc(100vw - 20px));
  cursor: copy;
}

.ca-button span {
  color: rgba(255, 228, 102, 0.92);
}

.ca-button code {
  display: inline-block;
  max-width: min(520px, calc(100vw - 72px));
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.wall {
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  background: var(--bg);
}

.grid {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  gap: 0;
  line-height: 0;
  overflow: hidden;
}

.tile {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  background: #060606;
  cursor: default;
  transform: translate3d(0, 0, 0);
  transition: filter 120ms ease;
  animation: tile-pulse var(--pulse-speed, 5s) steps(2, end) infinite;
  animation-delay: var(--pulse-delay, 0s);
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(255, 255, 255, 0.18) 48% 49%, transparent 50%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.052) 0 1px, transparent 1px 7px);
  mix-blend-mode: overlay;
  opacity: var(--static, 0.05);
  transition: opacity 120ms ease;
}

.tile img,
.tile video {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: center;
  opacity: 0.94;
  filter: brightness(0.88) saturate(0.98) contrast(1.03) hue-rotate(var(--hue, 0deg));
  transition: opacity 120ms ease, filter 120ms ease;
}

.tile:hover,
.tile:focus-visible {
  z-index: 6;
  filter: brightness(1.08) saturate(1.18) drop-shadow(0 0 22px rgba(255, 228, 102, 0.62));
  outline: none;
}

.tile:hover::after,
.tile:focus-visible::after {
  opacity: 0.16;
}

.tile:hover img,
.tile:hover video,
.tile:focus-visible img,
.tile:focus-visible video {
  opacity: 1;
  filter: brightness(1.08) saturate(1.16) contrast(1.06);
}

.tile.is-moving {
  z-index: 8;
}

@keyframes tile-pulse {
  0%,
  88%,
  100% {
    filter: none;
  }

  91% {
    filter: saturate(1.25) contrast(1.08);
  }

  94% {
    filter: hue-rotate(8deg) saturate(1.1);
  }
}

@media (max-width: 700px) {
  .links {
    gap: 5px;
  }

  .links a {
    min-height: 28px;
    padding-inline: 8px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
