:root {
  --bg: #0f0f1a;
  --text: #ffffff;
  --glass: rgba(255, 255, 255, 0.1);
  --blur: 12px;
  --accent: #4ea1ff;
}

body[data-theme="light"] {
  --bg: #f4f4f4;
  --text: #111;
  --glass: rgba(255, 255, 255, 0.85);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
}

/* Subtle glitch overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: difference;
  opacity: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.02) 2px,
    rgba(255, 255, 255, 0.02) 4px
  );
  animation: glitchLayer 8s infinite;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.typewriter-wrapper {
  min-height: 1.4em;
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 1.1rem;
}

main.glass-card {
  max-width: 850px;
  margin: 10vh auto;
  background: var(--glass);
  padding: 2rem;
  border-radius: 20px;
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
  z-index: 2;
  position: relative;
  animation: fadeInUp 1.5s ease both;
}

/* Neon border effect */
main.glass-card::before {
  content: '';
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px;
  background: linear-gradient(45deg, #4ea1ff, #ff4ecd, #7928ca, #4ea1ff);
  background-size: 400% 400%;
  animation: neonBorder 8s ease infinite;
  border-radius: 22px;
  z-index: -1;
  filter: blur(6px);
}

.badges img {
  margin: 5px;
}

.features {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.feature {
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: 12px;
  font-size: 1rem;
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.feature:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

a.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  margin-top: 2rem;
  transition: 0.3s ease;
  box-shadow: 0 0 15px var(--accent);
  animation: glowPulse 2.5s infinite ease-in-out;
}
a.cta:hover {
  filter: brightness(1.15);
}

.github-icon {
  fill: white;
}

footer {
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(10px);
}

.blobs {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.2;
  filter: blur(90px);
  mix-blend-mode: screen;
  animation: float 12s ease-in-out infinite;
}

.blob.pink {
  background: #ff4ecd;
  width: 300px;
  height: 300px;
  top: -100px;
  left: -80px;
  animation-delay: 0s;
  animation-duration: 10s;
}

.blob.blue {
  background: #007bff;
  width: 250px;
  height: 250px;
  bottom: -80px;
  right: -60px;
  animation-delay: 2s;
  animation-duration: 14s;
}

.blob.purple {
  background: #7928ca;
  width: 200px;
  height: 200px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 1s;
  animation-duration: 12s;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -52%) scale(1.05);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px var(--accent);
  }
  50% {
    box-shadow: 0 0 25px var(--accent);
  }
}

@keyframes glitchLayer {
  0%, 100% {
    opacity: 0;
    transform: none;
  }
  45% {
    opacity: 0;
  }
  46%, 48% {
    opacity: 0.25;
    transform: translate(-1px, 1px);
  }
  49% {
    transform: translate(1px, -1px);
  }
  50% {
    opacity: 0.2;
    transform: translate(0, 0);
  }
  51%, 55% {
    opacity: 0.05;
    transform: translateY(1px);
  }
  56% {
    opacity: 0;
  }
}

@keyframes neonBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes cursorBlink {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(0.4); opacity: 0.4; }
}

/* Cursor trail dot */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.8;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
  animation: cursorBlink 1.2s infinite ease-in-out alternate;
}

.fade-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

.fade-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
