
:root {
  color-scheme: dark;
  --night: #05071d;
  --cyan: #00e5ff;
  --pink: #ff58c6;
  --violet: #a56cff;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 5%, rgba(0,229,255,.12), transparent 28%),
    radial-gradient(circle at 88% 35%, rgba(255,88,198,.10), transparent 24%),
    var(--night);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(0px, 1vw, 14px);
}

.art-stage {
  position: relative;
  width: min(100%, 1920px);
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  background: #080b27;
  box-shadow: 0 28px 100px rgba(0,0,0,.48);
}

.threshold-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.portal-hotspot {
  position: absolute;
  display: block;
  border-radius: 44% 44% 16% 16%;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    filter .22s ease,
    box-shadow .22s ease,
    transform .22s ease,
    background .22s ease;
}

.portal-hotspot::before {
  content: "";
  position: absolute;
  inset: 3.8%;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.08), transparent 61%);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.22),
    0 0 34px var(--portal-glow),
    inset 0 0 46px var(--portal-glow);
  transition: opacity .22s ease;
  transform: translateX(var(--glow-shift-x, 0%));
}

.portal-hotspot:hover,
.portal-hotspot:focus-visible {
  transform: translateY(-0.45%) scale(1.012);
  filter: brightness(1.12) saturate(1.08);
}

.portal-hotspot:hover::before,
.portal-hotspot:focus-visible::before {
  opacity: 1;
}

.portal-hotspot:active {
  transform: scale(.985);
}

.portal-hotspot.is-activating::before {
  opacity: 1;
  animation: portalPulse .42s ease both;
}

.portal-tag {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%) translateY(8px) scale(.96);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.92);
  background: linear-gradient(135deg, rgba(12,21,66,.94), rgba(34,19,84,.94));
  color: #fff;
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 14px 26px rgba(0,0,0,.28), 0 0 22px rgba(255,255,255,.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .22s ease;
}
.portal-tag::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 16px;
  height: 16px;
  background: inherit;
  border-right: 2px solid rgba(255,255,255,.92);
  border-bottom: 2px solid rgba(255,255,255,.92);
  transform: translateX(-50%) rotate(45deg);
  box-sizing: border-box;
}
.portal-tag-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  font-size: 1rem;
}
.portal-hotspot:hover .portal-tag,
.portal-hotspot:focus-visible .portal-tag,
.portal-hotspot.is-activating .portal-tag {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.portal-7-9 .portal-tag {
  background: linear-gradient(135deg, rgba(255,95,196,.95), rgba(156,92,255,.95));
}
.portal-10-12 .portal-tag {
  background: linear-gradient(135deg, rgba(0,196,255,.95), rgba(74,141,255,.95));
}
.portal-13-15 .portal-tag {
  background: linear-gradient(135deg, rgba(165,108,255,.95), rgba(255,88,198,.95));
}

.portal-7-9 {
  left: 15.2%;
  top: 29.8%;
  width: 18.3%;
  height: 51.3%;
  --portal-glow: rgba(255,88,198,.62);
  --glow-shift-x: -5%;
}

.portal-10-12 {
  left: 36.7%;
  top: 28.4%;
  width: 21.6%;
  height: 53.6%;
  --portal-glow: rgba(0,229,255,.62);
  --glow-shift-x: -8%;
}

.portal-13-15 {
  left: 66.2%;
  top: 28.9%;
  width: 22.1%;
  height: 53.3%;
  --portal-glow: rgba(197,79,255,.66);
  --glow-shift-x: 0%;
}


.back-to-universia {
  position: absolute;
  left: 2.1%;
  bottom: 2.4%;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: rgba(255,255,255,.88);
  background: rgba(5,8,34,.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.05);
  font-size: clamp(.68rem, .82vw, .88rem);
  font-weight: 750;
  letter-spacing: .01em;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.back-to-universia > span:first-child {
  font-size: 1.05em;
  transition: transform .2s ease;
}

.back-to-universia:hover,
.back-to-universia:focus-visible {
  color: #fff;
  background: rgba(9,15,56,.78);
  border-color: rgba(0,229,255,.48);
  box-shadow: 0 12px 32px rgba(0,0,0,.3), 0 0 24px rgba(0,229,255,.12);
  transform: translateY(-2px);
  outline: none;
}

.back-to-universia:hover > span:first-child,
.back-to-universia:focus-visible > span:first-child {
  transform: translateX(-2px);
}

@keyframes portalPulse {
  0% { transform: scale(.96); opacity: .15; }
  55% { transform: scale(1.035); opacity: 1; }
  100% { transform: scale(1); opacity: .4; }
}

@media (max-width: 900px) {
  .page-shell {
    min-height: auto;
    place-items: start center;
    padding: 0;
  }

  .art-stage {
    width: 100%;
  }

  .portal-hotspot::before {
    inset: 1%;
  }
}

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

@media (max-width: 900px) {
  .portal-tag { font-size: .84rem; min-height: 38px; padding: 7px 12px; }
  .portal-tag-icon { width: 22px; height: 22px; }
}

@media (max-width: 700px) {
  .back-to-universia {
    left: 2%;
    bottom: 2%;
    min-height: 32px;
    padding: 6px 10px;
    gap: 6px;
    font-size: .64rem;
  }
}
