/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade-in animation for the whole page (fallback if GSAP not available) */
body {
  opacity: 0;
  transition: opacity 1s ease;
}

body.loaded {
  opacity: 1;
}

/* GSAP will handle the fade-in if available, this is just a fallback */
body.gsap-loaded {
  opacity: 1;
}

/* Content fade-in from bottom */
.content {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(.68, -0.55, .27, 1.55), transform 1.2s cubic-bezier(.68, -0.55, .27, 1.55);
}

body.loaded .content {
  opacity: 1;
  transform: translateY(0);
}


/* Typing text animation */
#typed-text,
.typed-cursor {
  font-family: 'Roboto', Arial, sans-serif;
}

.typed-cursor {
  display: inline-block;
  width: 1ch;
  animation: blink 1s steps(1) infinite;
  color: #1a1aff;
  font-weight: bold;
}

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

/* Button hover animation */
.button1,
.button2 {
  transition: transform 0.2s cubic-bezier(.68, -0.55, .27, 1.55), box-shadow 0.2s;
}

.button1:hover,
.button2:hover {
  box-shadow: 0 4px 24px rgba(26, 26, 255, 0.15);
  transition: ease-in-out 0.3s;
}

/* Name bounce on hover + glow effect */
.main span {
  display: inline-block;
  transform: translateY(0);
}

.main span:hover {
  color: #1a1aff;
  text-shadow: 0 4px 12px #ffffff, 0 0 18px #4e4eff;
  transition: ease-in-out 0.3s;
}

/* Social icon hover animation */
.socials img {
  transition: transform 0.3s cubic-bezier(.68, -0.55, .27, 1.55), box-shadow 0.3s;
  will-change: transform;
}

.socials img:hover {
  transform: scale(1.18) rotate(-4deg);
  box-shadow: 0 4px 24px #1a1aff33;
}

/* Spin animation for loader */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* FlipUp animation */
@keyframes flipUp {
  0% {
    opacity: 0;
    margin-top: -10px;
  }
  13.2% {
    opacity: 1;
    margin-top: 0;
    transform: rotateX(0deg);
  }
  33%, 100% {
    opacity: 0;
    margin-top: 0;
    transform: rotateX(90deg);
  }
}

/* Floating animation for 404 page */
@keyframes floating {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* FadeIn animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse shadow animation for skills */
@keyframes pulse-shadow {
  0%, 100% {
    box-shadow: 0 0 32px 8px #1a1aff66, 0 0 64px 16px #1a1aff33;
    opacity: 0.7;
  }
  50% {
    box-shadow: 0 0 48px 18px #1a1affbb, 0 0 96px 32px #1a1aff44;
    opacity: 1;
  }
}

