:root {
  color-scheme: only dark;
  --ink: #e7e7e7;
  --muted: #b6b6b6;
  --bg-0: #0b0b0b;
  --bg-1: #151515;
  --bg-2: #202020;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: "Space Grotesk", "Archivo", sans-serif;
  background: var(--bg-0);
  color: var(--ink);
  overflow: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 20% 10%, #1f1f1f 0%, transparent 65%),
    radial-gradient(700px 500px at 80% 80%, #171717 0%, transparent 70%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
  z-index: 0;
}

#gl-bg,
#gl-fg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#gl-bg {
  z-index: 1;
  cursor: grab;
  transition: filter 760ms ease;
  will-change: filter;
}

body.is-cursor-idle:not(.is-dragging):not(.is-expanded) #gl-bg {
  cursor: pointer;
}

#gl-fg {
  z-index: 3;
  pointer-events: none;
}

body.is-dragging #gl-bg {
  cursor: grabbing;
}

body.is-expanded #gl-bg {
  filter: blur(8px) brightness(0.58);
  cursor: all-scroll;
}

body.is-expanded.is-zoomed #gl-bg {
  cursor: grab;
}

body.is-expanded.is-zoomed.is-dragging #gl-bg {
  cursor: grabbing;
}

.icon-scroll {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 35px;
  margin-left: -10px;
  margin-top: -17.5px;
  border-radius: 25px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  pointer-events: none;
  z-index: 8;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 160ms ease, transform 160ms ease;
}

.icon-scroll::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 2px;
  background: rgba(18, 18, 18, 0.92);
  animation: scroll 1.5s infinite;
}

.photo-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate3d(0, 0, 0);
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 8, 8, 0.84);
  color: rgba(244, 244, 244, 0.94);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 9;
  opacity: 0;
  transition: opacity 120ms ease;
}

.photo-tooltip.is-visible {
  opacity: 1;
}

.photo-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 240px;
  max-width: 320px;
}

.meta-chip {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  min-height: 18px;
  padding: 2px 5px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.meta-chip-wide {
  grid-column: span 3;
}

.meta-k {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.meta-v {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: 0.05em;
}

@keyframes scroll {
  0% {
    opacity: 0;
    transform: translateY(23px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  body.is-expanded:not(.is-zoomed) #gl-bg {
    cursor: none;
  }

  body.is-expanded:not(.is-zoomed) .icon-scroll {
    opacity: 0.8;
    transform: scale(1);
  }

  body.is-expanded.is-dragging .icon-scroll {
    opacity: 0;
    transform: scale(0.94);
  }
}

.ui {
  position: fixed;
  left: 32px;
  top: 28px;
  display: grid;
  gap: 6px;
  z-index: 4;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.top-controls {
  position: fixed;
  right: 24px;
  top: 24px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(12, 12, 12, 0.66);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.meta-toggle {
  height: 100%;
  padding: 0 4px 0 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(244, 244, 244, 0.96);
  font-family: "Space Grotesk", "Archivo", sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 180ms ease, color 180ms ease;
}

.meta-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.meta-toggle.is-off {
  background: rgba(12, 12, 12, 0.38);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(214, 214, 214, 0.76);
}

.meta-toggle .toggle-label {
  line-height: 1;
}

.meta-toggle .toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.26);
  transition: background 180ms ease, border-color 180ms ease;
}

.meta-toggle .toggle-thumb {
  position: absolute;
  left: 1px;
  top: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.36);
  transition: transform 180ms ease, background 180ms ease;
}

.meta-toggle.is-on .toggle-track {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.95);
}

.meta-toggle.is-on .toggle-thumb {
  transform: translateX(14px);
  background: rgba(16, 16, 16, 0.9);
}

.meta-toggle:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.84);
  outline-offset: 2px;
}

.social-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.social-link {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 245, 245, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.24);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.social-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.44);
}

.social-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.88);
  outline-offset: 2px;
}

.social-dot {
  font-size: 8px;
  letter-spacing: 0.1em;
  font-weight: 600;
  line-height: 1;
}

.social-ig {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}

.status {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 5;
  transition: opacity 350ms ease;
  pointer-events: none;
}

.popup-loader {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  margin-top: -21px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: opacity 220ms ease;
  animation: spin 900ms linear infinite;
  pointer-events: none;
  z-index: 6;
}

.popup-loader.is-visible {
  opacity: 1;
}

.status.is-hidden {
  opacity: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.veil {
  position: fixed;
  inset: 0;
  background: radial-gradient(600px 400px at 50% 45%, rgba(20, 20, 20, 0.2), rgba(5, 5, 5, 0.85));
  opacity: 0;
  z-index: 2;
  transition: opacity 760ms ease;
  pointer-events: none;
}

body.is-expanded .veil {
  opacity: 1;
}

@media (max-width: 700px) {
  .ui {
    left: 18px;
    top: 18px;
  }

  .meta-toggle {
    height: 32px;
    padding: 0 4px 0 6px;
    font-size: 9px;
  }

  .top-controls {
    right: 14px;
    top: 14px;
    height: 32px;
    padding: 0 7px;
  }

  .meta-toggle .toggle-track {
    width: 30px;
    height: 16px;
  }

  .meta-toggle .toggle-thumb {
    width: 12px;
    height: 12px;
  }

  .meta-toggle.is-on .toggle-thumb {
    transform: translateX(14px);
  }

  .social-links {
    gap: 6px;
    height: 22px;
    padding-left: 7px;
  }

  .social-link {
    width: 22px;
    height: 22px;
  }

  .social-dot {
    font-size: 8px;
  }

  .social-ig {
    width: 11px;
    height: 11px;
  }

  .title {
    font-size: 11px;
  }

  .hint {
    font-size: 9px;
  }
}
