.theme-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: var(--transition);
}

.theme-icon.sun {
  opacity: 1;
  transform: scale(1);
}

.theme-icon.moon {
  opacity: 0;
  transform: scale(0);
}

[data-theme="dark"] .theme-icon.sun {
  opacity: 0;
  transform: scale(0);
}

[data-theme="dark"] .theme-icon.moon {
  opacity: 1;
  transform: scale(1);
}

.floating-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-gradient {
  position: absolute;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 40%, var(--accent-glass) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, color-mix(in srgb, var(--accent-secondary) 10%, transparent) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
  opacity: 0.4;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  50%      { transform: translate(-52%, -48%) rotate(180deg); }
}

.floating-geo {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  filter: blur(3px);
  animation: geoDrift 20s linear infinite;
}

.floating-geo.geo-triangle {
  width: 0;
  height: 0;
  border-left: 35px solid transparent;
  border-right: 35px solid transparent;
  border-bottom: 60px solid var(--accent);
  top: 20%;
  right: 15%;
  animation-duration: 25s;
  animation-delay: -5s;
}

.floating-geo.geo-square {
  width: 55px;
  height: 55px;
  background: var(--accent);
  border-radius: 8px;
  bottom: 25%;
  left: 12%;
  animation-duration: 22s;
  animation-delay: -8s;
  transform: rotate(45deg);
}

.floating-geo.geo-circle {
  width: 45px;
  height: 45px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  top: 50%;
  left: 20%;
  animation-duration: 18s;
  animation-delay: -12s;
}

@keyframes geoDrift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  33%  { transform: translate(60px, -40px) rotate(120deg) scale(1.2); }
  66%  { transform: translate(-30px, -80px) rotate(240deg) scale(0.85); }
  100% { transform: translate(0, 0) rotate(360deg) scale(1);  }
}

.footer-wave-container {
  width: 100%;
  height: 80px;
  line-height: 0;
  background: var(--surface-2);
  transform: rotate(180deg);
  margin-bottom: -1px;
}

.waves {
  width: 100%;
  height: 80px;
  display: block;
}

.parallax > use {
  animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax > use:nth-child(1) {
  fill: color-mix(in srgb, var(--bg) 30%, transparent);
  animation-delay: -2s;
  animation-duration: 7s;
}

.parallax > use:nth-child(2) {
  fill: color-mix(in srgb, var(--bg) 50%, transparent);
  animation-delay: -3s;
  animation-duration: 10s;
}

.parallax > use:nth-child(3) {
  fill: color-mix(in srgb, var(--bg) 70%, transparent);
  animation-delay: -4s;
  animation-duration: 13s;
}

.parallax > use:nth-child(4) {
  fill: var(--bg);
  animation-delay: -5s;
  animation-duration: 20s;
}

@keyframes move-forever {
  0%   { transform: translate3d(-90px, 0, 0); }
  100% { transform: translate3d(90px, 0, 0);  }
}

@keyframes pageLoad {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0);    }
}

@keyframes heroGradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}

@keyframes heroSubtitleFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0);   }
}

@keyframes heroStatsFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);   }
}

@keyframes patternMove {
  0%   { transform: translate(0, 0);     }
  100% { transform: translate(60px, 60px); }
}

.float-shape {
  position: absolute;
  background: var(--accent-glass);
  border-radius: 50%;
  animation: shapeFloat 25s ease-in-out infinite;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@keyframes shapeFloat {
  0%, 100% { transform: translateY(0px) translateX(0px) scale(1) rotate(0deg); opacity: 0.4; }
  25%      { transform: translateY(-30px) translateX(20px) scale(1.2) rotate(90deg); opacity: 0.7; }
  50%      { transform: translateY(-60px) translateX(-10px) scale(0.8) rotate(180deg); opacity: 0.3; }
  75%      { transform: translateY(-20px) translateX(-30px) scale(1.1) rotate(270deg); opacity: 0.6; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loadingDot {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40%           { transform: scale(1); opacity: 1;   }
}

.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 1s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }
.reveal:nth-child(6) { transition-delay: 0.6s; }

.hero-title .typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-right: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.8s step-end infinite;
  margin-bottom: 10px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}