:root {
  --bg: #070b16;
  --text: #dfe7f2;
  --accent: #5eead4;
  --logo: #3cf2ff;
  --slogan: #7bb7ff;
  --particle: rgba(94,234,212,0.45);
  --debug-bg: rgba(0,0,0,0.6);
}

[data-theme="light"] {
  --bg: #f4f6f9;
  --text: #111827;
  --accent: #4b5563;
  --logo: #374151;
  --slogan: #6b7280;
  --particle: rgba(55,65,81,0.18);
  --debug-bg: rgba(255,255,255,0.75);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

canvas {
  position: absolute;
  inset: 0;
}

.container {
  z-index: 10;
  text-align: center;
  max-width: 650px;
  padding: 20px;
}

h1 {
  color: var(--logo);
  font-size: clamp(32px, 7vw, 64px);
  margin-bottom: 10px;
}

.slogan {
  color: var(--slogan);
  margin-bottom: 20px;
}

.typewriter {
  color: var(--accent);
  min-height: 60px;
  line-height: 1.5;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  animation: blink .7s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

footer {
  margin-top: 20px;
  opacity: .6;
  font-size: .85rem;
}

#floatingQuotes {
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: 260px;
  font-size: .8rem;
  line-height: 1.4;
  opacity: .8;
  pointer-events: none;
  transition: all 1.2s ease;
}

#floatingQuotes.right {
  left: auto;
  right: 20px;
}

.dust-in {
  animation: dustIn 1s ease forwards;
}

.dust-out {
  animation: dustOut .8s ease forwards;
}

@keyframes dustIn {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(10px);
  }

  100% {
    opacity: .8;
    filter: blur(0);
  }
}

@keyframes dustOut {
  0% {
    opacity: .8;
  }

  100% {
    opacity: 0;
    filter: blur(10px);
    transform: translateX(40px);
  }
}

#themeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  cursor: pointer;
  font-size: 20px;
  user-select: none;
}

#languageSwitcher {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

#languageButton {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

#languageButton:hover {
  transform: scale(1.08);
}

#languageMenu {
  display: none;
  position: absolute;
  top: 36px;
  left: 0;
  min-width: 150px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
}

#languageSwitcher.open #languageMenu {
  display: flex;
  flex-direction: column;
}

#languageMenu button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 7px 9px;
  text-align: left;
  border-radius: 5px;
  cursor: pointer;
}

#languageMenu button:hover,
#languageMenu button.active {
  background: var(--accent);
  color: var(--bg);
}

#debugBar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 2000;
  padding: 8px 14px;
  background: var(--debug-bg);
  border-radius: 0 0 8px 8px;
  font-size: .8rem;
  transition: transform .3s ease;
  pointer-events: none;
}

#debugBar.show {
  transform: translate(-50%, 0);
}

#themeWipe {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
  background: var(--bg);
  transform: scale(0);
  border-radius: 50%;
  transition: transform .6s ease;
}

#themeWipe.active {
  transform: scale(2);
}

#sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.icon {
  position: absolute;
  font-size: 42px;
  opacity: 0;
}

#sun {
  right: 10%;
  top: 10%;
}

#moon {
  left: 10%;
  top: 10%;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes set {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

@media (max-width: 600px) {
  #floatingQuotes {
    left: 12px;
    bottom: 12px;
    max-width: 220px;
  }

  #floatingQuotes.right {
    right: 12px;
    left: auto;
  }
}