/* ═══════════════════════════════════════════════════════
   ANIMATIONS — Emerald Motion System
   ═══════════════════════════════════════════════════════ */

@keyframes shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(82, 242, 177, 0.12), 0 0 12px rgba(82, 242, 177, 0.1);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(82, 242, 177, 0.18), 0 0 26px rgba(82, 242, 177, 0.18), 0 0 48px rgba(127, 248, 225, 0.06);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -14px, 0); }
}

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes softDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -10px, 0) scale(1.02); }
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes lineSweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

.marquee-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 1.05rem 0;
  border-top: 1px solid rgba(186, 255, 224, 0.06);
  border-bottom: 1px solid rgba(186, 255, 224, 0.06);
  position: relative;
  background: linear-gradient(180deg, rgba(3, 9, 6, 0.4), rgba(3, 9, 6, 0.78));
}

.marquee-wrapper::before,
.marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-void), transparent);
}

.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-void), transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
  gap: 2.6rem;
  will-change: transform;
}

.marquee-track:hover { animation-play-state: paused; }

.marquee-item {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.25s ease, transform 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.marquee-item:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
  opacity: 0.7;
  box-shadow: 0 0 10px rgba(82, 242, 177, 0.2);
}

.sparkle-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid rgba(82, 242, 177, 0.22);
  border-radius: 999px;
  background: rgba(82, 242, 177, 0.06);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sparkle-btn:hover {
  background: rgba(82, 242, 177, 0.12);
  border-color: rgba(82, 242, 177, 0.38);
  box-shadow: 0 0 22px rgba(82, 242, 177, 0.14);
  transform: translateY(-1px);
}

.sparkle-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(82, 242, 177, 0.18), transparent);
  transition: left 0.55s ease;
}

.sparkle-btn:hover::after { left: 150%; }

html { scroll-behavior: smooth; }

@media print {
  #hero,
  .hero-scanlines,
  #sparkle-canvas,
  .floating-dock,
  #loading-screen,
  .marquee-wrapper {
    display: none !important;
  }
}

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

  .marquee-track { animation: none; }
  .floating-dock,
  .arsenal-card,
  .project-card,
  .avatar-frame {
    transform: none !important;
  }
}
