:root {
  color-scheme: dark;
  --background: #06070b;
  --surface: rgba(12, 15, 24, 0.72);
  --surface-hover: rgba(18, 21, 33, 0.88);
  --text: #f7f8fc;
  --muted: #9aa2b3;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --violet: #8f7dff;
  --cyan: #67d7ff;
  --pointer-x: 50vw;
  --pointer-y: 35vh;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vh, 56px) 20px;
}

.cosmos {
  position: fixed;
  z-index: -3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(21, 24, 39, 0.5), transparent 38%),
    linear-gradient(150deg, #040508 0%, #090b13 48%, #05060b 100%);
}

.cosmos::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 84px 84px;
  content: "";
  mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
}

.pointer-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    480px circle at var(--pointer-x) var(--pointer-y),
    rgba(113, 94, 255, 0.12),
    transparent 68%
  );
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  opacity: 0.19;
  animation: nebula-breathe 12s ease-in-out infinite;
}

.nebula-violet {
  top: -18%;
  right: -8%;
  width: min(65vw, 920px);
  aspect-ratio: 1.4;
  background: radial-gradient(
    ellipse,
    rgba(102, 74, 246, 0.92),
    rgba(48, 36, 130, 0.18) 50%,
    transparent 72%
  );
  transform: rotate(-18deg);
}

.nebula-blue {
  bottom: -32%;
  left: -16%;
  width: min(72vw, 980px);
  aspect-ratio: 1.2;
  background: radial-gradient(
    ellipse,
    rgba(27, 150, 208, 0.72),
    rgba(20, 67, 110, 0.15) 48%,
    transparent 72%
  );
  animation-delay: -6s;
  transform: rotate(19deg);
}

@keyframes nebula-breathe {
  0%,
  100% {
    opacity: 0.16;
    transform: scale(1) rotate(-8deg);
  }

  50% {
    opacity: 0.24;
    transform: scale(1.08) rotate(2deg);
  }
}

.starfield {
  position: absolute;
  inset: -20%;
  background-repeat: repeat;
}

.starfield-near {
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.88) 0 1px,
    transparent 1.45px
  );
  background-size: 91px 103px;
  opacity: 0.45;
  transform: rotate(-11deg);
  animation: stars-drift 52s linear infinite;
}

.starfield-far {
  background-image: radial-gradient(
    circle,
    rgba(126, 203, 255, 0.72) 0 0.8px,
    transparent 1.3px
  );
  background-size: 137px 151px;
  opacity: 0.25;
  transform: rotate(14deg) translate(40px, 20px);
  animation: stars-drift 74s linear infinite reverse;
}

@keyframes stars-drift {
  from {
    translate: 0 0;
  }

  to {
    translate: 90px 103px;
  }
}

.cosmic-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(153, 159, 205, 0.09);
  border-radius: 50%;
  transform-origin: center;
}

.orbit-one {
  width: min(1120px, 90vw);
  height: min(420px, 36vw);
  transform: translate(-50%, -50%) rotate(-12deg);
}

.orbit-two {
  width: min(870px, 75vw);
  height: min(730px, 67vw);
  border-color: rgba(93, 181, 223, 0.07);
  transform: translate(-50%, -50%) rotate(38deg);
}

.cosmic-body {
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: clamp(330px, 38vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 31%, rgba(255, 255, 255, 0.2), transparent 4%),
    radial-gradient(circle at 38% 35%, rgba(106, 92, 214, 0.34), transparent 35%),
    linear-gradient(145deg, rgba(72, 75, 113, 0.34), rgba(7, 9, 17, 0.1) 58%);
  box-shadow:
    inset 60px 25px 90px rgba(121, 94, 240, 0.07),
    inset -65px -75px 100px rgba(0, 0, 0, 0.8),
    0 0 110px rgba(78, 63, 180, 0.09);
  opacity: 0.72;
}

.background-title {
  position: fixed;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: max-content;
  margin: 0;
  background: linear-gradient(
    105deg,
    rgba(246, 248, 255, 0.18),
    rgba(141, 123, 255, 0.17) 58%,
    rgba(90, 202, 255, 0.13)
  );
  background-clip: text;
  color: transparent;
  font-size: clamp(8rem, 24vw, 28rem);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.72;
  opacity: 0.62;
  pointer-events: none;
  text-shadow: 0 28px 90px rgba(67, 52, 168, 0.1);
  transform: translate(-50%, -50%);
  user-select: none;
  white-space: nowrap;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.055);
}

.link-hub {
  position: relative;
  z-index: 2;
  width: min(100%, 620px);
}

.language-switch {
  display: grid;
  grid-template-columns: 40px 1px 40px;
  align-items: center;
  width: max-content;
  margin: 0 0 13px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 10, 16, 0.62);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

.language-switch > span {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.language-switch button {
  display: grid;
  height: 31px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.language-switch button:hover {
  color: var(--text);
}

.language-switch button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.link-card {
  --accent: #8f7dff;
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 8px 14px 8px 10px;
  background:
    linear-gradient(
      100deg,
      color-mix(in srgb, var(--accent) 5%, transparent),
      transparent 28%
    ),
    var(--surface);
  box-shadow:
    0 18px 50px -32px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px) saturate(1.15);
  transition:
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
}

.link-card::before {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent);
  content: "";
  opacity: 0.64;
  transition:
    opacity 220ms ease,
    top 220ms ease,
    bottom 220ms ease;
}

.link-card::after {
  position: absolute;
  top: -80%;
  left: -15%;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  filter: blur(52px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.link-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background-color: var(--surface-hover);
  box-shadow:
    0 22px 60px -32px color-mix(in srgb, var(--accent) 32%, black),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transform: translateX(5px);
}

.link-card:hover::before {
  top: 9%;
  bottom: 9%;
  opacity: 1;
}

.link-card:hover::after {
  opacity: 0.1;
}

.link-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--accent) 6%, transparent);
}

.link-icon img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.94;
}

.link-label {
  position: relative;
  z-index: 1;
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.018em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  position: relative;
  z-index: 1;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    transform 220ms ease;
}

.link-card:hover .link-arrow {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--accent);
  color: #07080d;
  transform: rotate(8deg);
}

.link-card-disabled {
  cursor: not-allowed;
  filter: saturate(0.2);
  opacity: 0.55;
}

.link-card-disabled:hover {
  border-color: var(--line);
  background-color: transparent;
  box-shadow: 0 18px 50px -32px rgba(0, 0, 0, 0.9);
  transform: none;
}

.link-card-disabled:hover::after {
  opacity: 0;
}

.language-switch button:focus-visible,
.link-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.noscript {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 680px) {
  .site-shell {
    place-items: start center;
    padding: 22px 14px 34px;
  }

  .background-title {
    top: 43%;
    font-size: clamp(6.4rem, 34vw, 11.5rem);
    opacity: 0.5;
    transform: translate(-50%, -50%) rotate(-90deg);
  }

  .cosmic-body {
    right: -175px;
    bottom: -105px;
    width: 390px;
    opacity: 0.55;
  }

  .orbit-one {
    width: 150vw;
    height: 58vw;
  }

  .orbit-two {
    width: 126vw;
    height: 96vw;
  }

  .link-hub {
    margin: auto 0;
    padding: 8px 0;
  }

  .language-switch {
    margin-bottom: 11px;
  }

  .link-list {
    gap: 8px;
  }

  .link-card {
    grid-template-columns: 44px minmax(0, 1fr) 28px;
    gap: 12px;
    min-height: 61px;
    border-radius: 15px;
    padding: 7px 12px 7px 8px;
  }

  .link-card:hover {
    transform: translateX(3px);
  }

  .link-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .link-icon img {
    width: 21px;
    height: 21px;
  }

  .link-label {
    font-size: 14px;
  }

  .link-arrow {
    width: 27px;
    height: 27px;
  }
}

@media (max-height: 690px) and (min-width: 681px) {
  .site-shell {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .link-list {
    gap: 7px;
  }

  .link-card {
    min-height: 59px;
  }

  .link-icon {
    width: 43px;
    height: 43px;
  }
}

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