:root {
  --bg: #f6f8fc;
  --fg: #101828;
  --dot-color: #3e4a63;
  --line-color: rgba(62, 74, 99, 0.16);
  --sun-inner: #ff7a1e;
  --sun-outer: #ffc08d;
  --sun-glow: rgba(255, 122, 30, 0.35);
  --wave-color: rgba(0, 87, 255, 0.2);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-border: rgba(16, 24, 40, 0.13);
}

:root.light-theme {
  --bg: #090e17;
  --fg: #edf2ff;
  --dot-color: #d6e0ff;
  --line-color: rgba(214, 224, 255, 0.16);
  --sun-inner: #ff9c4e;
  --sun-outer: #ffd8b8;
  --sun-glow: rgba(255, 156, 78, 0.5);
  --wave-color: rgba(126, 161, 255, 0.28);
  --panel: rgba(20, 27, 42, 0.74);
  --panel-border: rgba(214, 224, 255, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 600px at 70% 0%, rgba(91, 125, 255, 0.1), transparent 60%), var(--bg);
  padding: 12px;
}

.rec {
  position: relative;
  width: 100%;
  height: calc(100dvh - 24px);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.rec:hover {
  box-shadow: 0 30px 70px -48px rgba(16, 24, 40, 0.45);
}

.entry-topbar {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 92px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.entry-brand {
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-nav {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.entry-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  color: var(--fg);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
  border-bottom: 1px solid transparent;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.entry-nav a:hover {
  opacity: 1;
  border-color: var(--fg);
  transform: translateY(-2px);
}

.nav-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.3rem;
  padding: 0 0.28rem;
  border: 1px solid color-mix(in srgb, var(--fg) 26%, transparent);
  border-radius: 999px;
  font-size: 0.56rem;
}

.herobg {
  width: 100%;
  height: 100%;
  position: relative;
}

.cluster {
  position: absolute;
  width: 360px;
  height: 360px;
  left: 68%;
  top: 39%;
  transform: translate(-50%, -50%);
  transition: transform 0.4s ease;
}

.herobg:hover .cluster {
  transform: translate(-50%, -50%) scale(1.05);
}

#dotCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.sun-container {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  pointer-events: none;
}

.sun {
  width: 98px;
  height: 98px;
  background: radial-gradient(circle, var(--sun-inner), var(--sun-outer));
  border-radius: 50%;
  box-shadow: 0 0 56px var(--sun-glow);
}

.wave {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--wave-color), transparent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: wave-animation 4s infinite ease-in-out;
}

.wave1 {
  width: 250px;
  height: 250px;
  animation-delay: 0s;
}

.wave2 {
  width: 300px;
  height: 300px;
  animation-delay: 1s;
}

.wave3 {
  width: 350px;
  height: 350px;
  animation-delay: 2s;
}

@keyframes wave-animation {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.con {
  position: absolute;
  left: 43%;
  top: 53%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
}

.herobg h1 {
  font-size: clamp(3.2rem, 10vw, 7.2rem);
  line-height: 0.9;
  font-weight: 800;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  white-space: pre-line;
}

.entry-actions {
  margin-top: 1.4rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.entry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  color: #ffffff;
  background: #ff6a00;
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.entry-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 34px -16px rgba(255, 106, 0, 0.7);
}

.entry-btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: color-mix(in srgb, var(--fg) 26%, transparent);
}

.entry-btn-secondary:hover {
  box-shadow: none;
  border-color: color-mix(in srgb, var(--fg) 58%, transparent);
}

.entry-btn-icon {
  font-size: 0.8rem;
  line-height: 1;
}

.theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  border: 1px solid color-mix(in srgb, var(--fg) 24%, transparent);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  color: var(--fg);
  border-radius: 12px;
  cursor: pointer;
  min-width: 84px;
  min-height: 44px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--fg) 45%, transparent);
}

.theme-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--fg);
  border-radius: 50%;
}

.theme-label {
  position: absolute;
  right: 12px;
  top: 11px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-label::after {
  content: "\2197";
  font-size: 0.92rem;
  margin-left: 3px;
}

@media (max-width: 1024px) {
  .cluster {
    width: 290px;
    height: 290px;
    left: 67%;
    top: 35%;
  }

  .con {
    left: 45%;
    top: 56%;
  }

  .sun {
    width: 82px;
    height: 82px;
  }

  .wave1 {
    width: 200px;
    height: 200px;
  }

  .wave2 {
    width: 245px;
    height: 245px;
  }

  .wave3 {
    width: 290px;
    height: 290px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 8px;
  }

  .rec {
    height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  .entry-topbar {
    top: 12px;
    left: 12px;
    right: 72px;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .entry-brand {
    font-size: 0.76rem;
  }

  .entry-nav {
    gap: 0.42rem 0.6rem;
  }

  .entry-nav a {
    font-size: 0.63rem;
  }

  .nav-link-icon {
    min-width: 1.2rem;
    height: 1.1rem;
    font-size: 0.48rem;
  }

  .cluster {
    width: 210px;
    height: 210px;
    left: 64%;
    top: 31%;
  }

  .sun {
    width: 66px;
    height: 66px;
  }

  .wave1 {
    width: 130px;
    height: 130px;
  }

  .wave2 {
    width: 165px;
    height: 165px;
  }

  .wave3 {
    width: 200px;
    height: 200px;
  }

  .con {
    left: 50%;
    top: 52%;
    width: 92%;
  }

  .herobg h1 {
    font-size: clamp(2.5rem, 14.8vw, 4.7rem);
    line-height: 0.95;
  }

  .theme-toggle {
    top: 12px;
    right: 12px;
    min-width: 60px;
    min-height: 38px;
    border-radius: 10px;
  }

  .theme-dot {
    width: 7px;
    height: 7px;
  }

  .theme-label {
    right: 11px;
    top: 10px;
    font-size: 0.65rem;
  }

  .theme-label::after {
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .entry-btn {
    font-size: 0.66rem;
    padding: 0.62rem 0.86rem;
  }

  .cluster {
    width: 180px;
    height: 180px;
    left: 66%;
    top: 34%;
  }

  .sun {
    width: 56px;
    height: 56px;
  }

  .wave1 {
    width: 110px;
    height: 110px;
  }

  .wave2 {
    width: 140px;
    height: 140px;
  }

  .wave3 {
    width: 170px;
    height: 170px;
  }
}
