/* ============================================
   ANIMATIONS.CSS
============================================ */

/* ============================================
   KEYFRAMES
============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(126, 184, 247, 0.2); }
  50% { box-shadow: 0 0 40px rgba(126, 184, 247, 0.4); }
}

@keyframes progressFill {
  from { width: 0; }
  to { width: var(--target-width); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-5deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes borderSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orb {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -40px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* ============================================
   HERO ANIMATIONS
============================================ */
.hero-eyebrow {
  animation: fadeDown 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.hero-title {
  animation: fadeUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

.hero-subtitle {
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.7s both;
}

.hero-tagline {
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.85s both;
}

.hero-actions {
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1s both;
}

.hero-stats {
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.15s both;
}

.hero-socials {
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.3s both;
}

.hero-image-wrap {
  animation: scaleIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* ============================================
   FLOAT EFFECTS
============================================ */
.float-element {
  animation: float 4s ease-in-out infinite;
}

.float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

/* ============================================
   BACKGROUND ORBS
============================================ */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}

.bg-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(126, 184, 247, 0.08) 0%, transparent 70%);
  animation: orb 12s ease-in-out infinite;
}

.bg-orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(232, 201, 154, 0.05) 0%, transparent 70%);
  animation: orb 16s ease-in-out infinite reverse;
}

/* ============================================
   SHIMMER TEXT
============================================ */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--text-primary) 0%,
    var(--accent-blue) 40%,
    var(--text-primary) 80%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ============================================
   SKILL PROGRESS ANIMATION
============================================ */
.skill-progress-bar {
  height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1rem;
}

.skill-progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 2px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PAGE TRANSITION
============================================ */
.page-transition {
  animation: fadeIn 0.5s ease both;
}

/* ============================================
   HOVER LIFT
============================================ */
.hover-lift {
  transition: transform var(--transition-smooth);
}

.hover-lift:hover {
  transform: translateY(-6px);
}

/* ============================================
   SCROLL INDICATOR
============================================ */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
  animation: fadeIn 1s ease 2s both;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 3px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: float 1.8s ease-in-out infinite;
}

.scroll-text {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
}

/* ============================================
   READING PROGRESS BAR
============================================ */
.reading-progress {
  position: fixed;
  top: 70px;
  left: 0;
  height: 2px;
  background: var(--accent-warm);
  z-index: 999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ============================================
   STAGGER CHILDREN
============================================ */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.triggered > *:nth-child(1) { animation: fadeUp 0.6s ease 0.0s forwards; }
.stagger-children.triggered > *:nth-child(2) { animation: fadeUp 0.6s ease 0.1s forwards; }
.stagger-children.triggered > *:nth-child(3) { animation: fadeUp 0.6s ease 0.2s forwards; }
.stagger-children.triggered > *:nth-child(4) { animation: fadeUp 0.6s ease 0.3s forwards; }
.stagger-children.triggered > *:nth-child(5) { animation: fadeUp 0.6s ease 0.4s forwards; }
.stagger-children.triggered > *:nth-child(6) { animation: fadeUp 0.6s ease 0.5s forwards; }
.stagger-children.triggered > *:nth-child(7) { animation: fadeUp 0.6s ease 0.6s forwards; }
.stagger-children.triggered > *:nth-child(8) { animation: fadeUp 0.6s ease 0.7s forwards; }
.stagger-children.triggered > *:nth-child(9) { animation: fadeUp 0.6s ease 0.8s forwards; }

/* ============================================
   CURSOR BLINK
============================================ */
.cursor-blink::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--accent-blue);
  margin-left: 2px;
}

/* ============================================
   GLOW ANIMATION
============================================ */
.glow-pulse {
  animation: glow 3s ease-in-out infinite;
}

/* ============================================
   NOTIFICATION / BADGE PULSE
============================================ */
.pulse-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid #4ade80;
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   REDUCE MOTION SUPPORT
============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
