/* 
 * PORTFOLIO WEBSITE - CUSTOM ANIMATIONS
 * =====================================
 * 
 * This file contains all custom CSS animations and keyframes for the portfolio website.
 * Animations are designed to be performant, accessible, and enhance user experience.
 * 
 * ANIMATION PERFORMANCE GUIDELINES:
 * - Use transform and opacity for GPU-accelerated animations
 * - Avoid animating layout properties (width, height, margin, padding)
 * - Use will-change sparingly to prevent memory issues
 * - Implement reduced motion support for accessibility
 * - Optimize animation timing for smooth 60fps performance
 * 
 * ACCESSIBILITY CONSIDERATIONS:
 * - Respect user's motion preferences (@media (prefers-reduced-motion))
 * - Provide alternative states for users with vestibular disorders
 * - Ensure animations don't interfere with screen readers
 * - Use appropriate animation durations (not too fast or slow)
 * 
 * ANIMATION CATEGORIES:
 * 1. Fade-in animations (scroll-triggered)
 * 2. Typing effects (hero section)
 * 3. Progress bar animations (skills section)
 * 4. Hover effects (cards, buttons)
 * 5. Gradient shifts (backgrounds)
 * 6. Slide-in animations (various directions)
 * 7. Scale and rotation effects
 * 8. Loading states and transitions
 */

/* ===== NAVIGATION ANIMATIONS ===== */
/* 
 * Navigation-specific animations for smooth interactions
 * Used for: Header, navigation links, mobile menu
 * Performance: GPU-accelerated using transform and opacity
 */

/* Navigation Link Hover Effect */
@keyframes navLinkHover {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

.nav-link:hover {
  animation: navLinkHover 0.3s ease-in-out;
}

/* Active Navigation Link Pulse */
@keyframes activeNavPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.nav-link.active {
  animation: activeNavPulse 2s infinite;
}

/* Mobile Menu Slide In */
@keyframes slideInTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in-top {
  animation: slideInTop 0.3s ease-out forwards;
}

/* Navigation Item Stagger Animation */
@keyframes navItemStagger {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-item {
  animation: navItemStagger 0.5s ease-out forwards;
  opacity: 0;
}

/* Mobile Menu Item Slide In */
@keyframes mobileMenuItemSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-nav-link {
  animation: mobileMenuItemSlide 0.3s ease-out forwards;
  opacity: 0;
}

/* Header Scroll Animation */
@keyframes headerSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes headerSlideUp {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}

.header-slide-down {
  animation: headerSlideDown 0.3s ease-out forwards;
}

.header-slide-up {
  animation: headerSlideUp 0.3s ease-out forwards;
}

/* ===== FADE-IN ANIMATIONS ===== */
/* 
 * Fade-in animations are triggered when elements come into view.
 * Used for: Sections, cards, text blocks, images
 * Performance: GPU-accelerated using opacity and transform
 */

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

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Fade In Down */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}

/* Fade In Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

/* Fade In Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* Staggered Fade In */
@keyframes staggeredFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.staggered-fade-in > * {
  opacity: 0;
  animation: staggeredFadeIn 0.6s ease-out forwards;
}

.staggered-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.staggered-fade-in > *:nth-child(2) { animation-delay: 0.2s; }
.staggered-fade-in > *:nth-child(3) { animation-delay: 0.3s; }
.staggered-fade-in > *:nth-child(4) { animation-delay: 0.4s; }
.staggered-fade-in > *:nth-child(5) { animation-delay: 0.5s; }
.staggered-fade-in > *:nth-child(6) { animation-delay: 0.6s; }

/* ===== TYPING ANIMATION ===== */

/* Typewriter Effect */
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  0%, 50% {
    border-color: transparent;
  }
  51%, 100% {
    border-color: var(--primary-500);
  }
}

.typing-animation {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--primary-500);
  animation: 
    typewriter 3s steps(40, end) forwards,
    blink 0.75s step-end infinite;
}

/* Typing with multiple lines */
.typing-multi {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--primary-500);
}

.typing-multi::after {
  content: '';
  animation: blink 0.75s step-end infinite;
}

/* ===== PROGRESS BAR ANIMATIONS ===== */

/* Progress Fill Animation */
@keyframes progressFill {
  from {
    width: 0%;
  }
  to {
    width: var(--progress-width, 100%);
  }
}

.progress-animate {
  animation: progressFill 1.5s ease-out forwards;
}

/* Shimmer Effect for Progress Bars */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* Pulse Animation for Progress Indicators */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.pulse-animate {
  animation: pulse 2s infinite;
}

/* ===== HOVER EFFECTS ===== */

/* Card Hover Lift */
@keyframes hoverLift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  animation: hoverLift 0.3s ease forwards;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Button Hover Scale */
@keyframes buttonScale {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

.btn-hover-scale {
  transition: all 0.3s ease;
}

.btn-hover-scale:hover {
  animation: buttonScale 0.3s ease forwards;
}

/* Glow Effect */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
  }
  100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
  }
}

.glow-hover {
  transition: all 0.3s ease;
}

.glow-hover:hover {
  animation: glow 2s ease-in-out infinite;
}

/* Rotate on Hover */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hover-rotate {
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  animation: rotate 0.6s ease-in-out;
}

/* Bounce on Hover */
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-10px);
  }
  70% {
    transform: translateY(-5px);
  }
  90% {
    transform: translateY(-2px);
  }
}

.hover-bounce:hover {
  animation: bounce 1s ease;
}

/* ===== GRADIENT SHIFT ANIMATIONS ===== */

/* Gradient Background Shift */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-shift {
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* Gradient Text Animation */
@keyframes gradientText {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-text-animate {
  background: linear-gradient(-45deg, var(--primary-500), var(--secondary-500), var(--primary-600), var(--secondary-600));
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 3s ease infinite;
}

/* ===== SLIDE-IN ANIMATIONS ===== */

/* Slide In From Left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

/* Slide In From Right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

/* Slide In From Top */
@keyframes slideInTop {
  from {
    opacity: 0;
    transform: translateY(-100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-top {
  animation: slideInTop 0.8s ease-out forwards;
}

/* Slide In From Bottom */
@keyframes slideInBottom {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-bottom {
  animation: slideInBottom 0.8s ease-out forwards;
}

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

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

/* Scale Out */
@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

.scale-out {
  animation: scaleOut 0.6s ease-out forwards;
}

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

/* Rotate In */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-200deg);
  }
  to {
    opacity: 1;
    transform: rotate(0deg);
  }
}

.rotate-in {
  animation: rotateIn 0.8s ease-out forwards;
}

/* Spin Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}

.spin-slow {
  animation: spin 3s linear infinite;
}

/* ===== BUTTON ANIMATIONS ===== */
@keyframes buttonBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes buttonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.hero-btn:hover {
  animation: buttonPulse 2s infinite;
}

/* ===== ABOUT SECTION ANIMATIONS ===== */
@keyframes aboutCardFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes aboutSkillGlow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
  }
}

@keyframes aboutStatPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.about-stat-card {
  animation: aboutCardFloat 6s ease-in-out infinite;
}

.about-stat-card:nth-child(2) {
  animation-delay: 2s;
}

.about-skill-tag:hover {
  animation: aboutSkillGlow 2s ease-in-out infinite;
}

.stat-number {
  animation: aboutStatPulse 3s ease-in-out infinite;
}

/* ===== SECTION TITLE ANIMATIONS ===== */
.section-title-heading {
  animation: fadeInDown 1s ease-out 0.2s both;
  position: relative;
}

.section-title-heading::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  animation: titleLineExpand 1s ease-out 0.8s forwards;
}

@keyframes titleLineExpand {
  to {
    width: 100px;
  }
}

.section-title-subtitle {
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* Section entrance animations */
.education-section {
  animation: fadeInUp 1s ease-out;
}

.skills-section {
  animation: fadeInUp 1s ease-out;
}

#certifications {
  animation: fadeInUp 1s ease-out;
}

#projects {
  animation: fadeInUp 1s ease-out;
}

/* ===== CONTACT SECTION ANIMATIONS ===== */
.contact-section {
  animation: fadeInUp 1s ease-out;
}

.contact-card {
  animation: fadeInUp 0.8s ease-out;
  animation-fill-mode: both;
}

.contact-card:nth-child(1) { animation-delay: 0.2s; }
.contact-card:nth-child(2) { animation-delay: 0.4s; }
.contact-card:nth-child(3) { animation-delay: 0.6s; }
.contact-card:nth-child(4) { animation-delay: 0.8s; }

.location-card {
  animation: fadeInUp 1s ease-out 1s both;
}

.contact-form-card {
  animation: fadeInUp 1s ease-out 0.5s both;
}

.modern-input,
.modern-textarea {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.modern-input:nth-child(1) { animation-delay: 1.2s; }
.modern-input:nth-child(2) { animation-delay: 1.4s; }
.modern-input:nth-child(3) { animation-delay: 1.6s; }
.modern-textarea { animation-delay: 1.8s; }

.modern-submit-btn {
  animation: fadeInUp 0.8s ease-out 2s both;
}

/* Contact card hover animations */
@keyframes contactCardGlow {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3); }
  70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.contact-card:hover {
  animation: contactCardGlow 1s ease-out;
}

/* ===== PROJECT FILTER ANIMATIONS ===== */
@keyframes filterSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes filterBtnSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes filterBtnPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes filterBtnGlow {
  0% { box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6); }
  100% { box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); }
}

.filter-btn.active {
  animation: filterBtnGlow 2s ease-in-out infinite;
}

/* Filter button click animation */
@keyframes filterBtnClick {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.filter-btn:active {
  animation: filterBtnClick 0.2s ease-out;
}

.filter-btn.clicking {
  transform: scale(0.95);
  transition: transform 0.2s ease-out;
}

/* Form input focus animations */
@keyframes inputFocus {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.modern-input:focus,
.modern-textarea:focus {
  animation: inputFocus 0.3s ease-out;
}

#contact {
  animation: fadeInUp 1s ease-out;
}

/* About section entrance animation (legacy) */
.about-section {
  animation: fadeInUp 1s ease-out;
}

.about-title {
  animation: fadeInDown 1s ease-out 0.2s both;
}

.about-subtitle {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.about-stat-card {
  animation: fadeInLeft 1s ease-out 0.6s both;
}

.about-stat-card:nth-child(2) {
  animation: fadeInRight 1s ease-out 0.8s both;
}

.about-description {
  animation: fadeInUp 1s ease-out 1s both;
}

.about-skills-title {
  animation: fadeInLeft 1s ease-out 1.2s both;
}

.about-skill-tag {
  animation: fadeInUp 0.8s ease-out both;
}

.about-skill-tag:nth-child(1) { animation-delay: 1.4s; }
.about-skill-tag:nth-child(2) { animation-delay: 1.5s; }
.about-skill-tag:nth-child(3) { animation-delay: 1.6s; }
.about-skill-tag:nth-child(4) { animation-delay: 1.7s; }
.about-skill-tag:nth-child(5) { animation-delay: 1.8s; }
.about-skill-tag:nth-child(6) { animation-delay: 1.9s; }
.about-skill-tag:nth-child(7) { animation-delay: 2.0s; }

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

/* Float Up and Down */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

.float-fast {
  animation: float 3s ease-in-out infinite;
}

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

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

/* Bounce In */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.bounce-in {
  animation: bounceIn 0.8s ease-out forwards;
}

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

/* Flash Effect */
@keyframes flash {
  0%, 50%, 100% {
    opacity: 1;
  }
  25%, 75% {
    opacity: 0;
  }
}

.flash {
  animation: flash 1s ease-in-out;
}

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

/* Shake Effect */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.8s ease-in-out;
}

/* ===== INTERSECTION OBSERVER ANIMATIONS ===== */

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered scroll animations */
.stagger-on-scroll > * {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.stagger-on-scroll.animate > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger-on-scroll.animate > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-on-scroll.animate > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-on-scroll.animate > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-on-scroll.animate > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-on-scroll.animate > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-on-scroll.animate > *:nth-child(6) { transition-delay: 0.6s; }

/* ===== PARALLAX EFFECTS ===== */

/* Parallax Background */
@keyframes parallax {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-20px);
  }
}

.parallax-bg {
  animation: parallax 20s ease-in-out infinite alternate;
}

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

/* Loading Spinner */
@keyframes loadingSpinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary-500);
  border-radius: 50%;
  animation: loadingSpinner 1s linear infinite;
}

/* Loading Dots */
@keyframes loadingDots {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-500);
  animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-500);
  animation: loadingDots 1.4s ease-in-out infinite both;
  animation-delay: -0.32s;
  margin-right: 8px;
}

.loading-dots::after {
  margin-left: 8px;
  animation-delay: -0.16s;
}

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

/* Text Reveal */
@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0% 0 0);
  }
}

.text-reveal {
  animation: textReveal 1s ease-out forwards;
}

/* Character by Character Animation */
@keyframes charReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.char-animate {
  display: inline-block;
  opacity: 0;
  animation: charReveal 0.5s ease-out forwards;
}

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

/* Image Zoom on Hover */
@keyframes imageZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

.image-zoom {
  overflow: hidden;
}

.image-zoom img {
  transition: transform 0.3s ease;
}

.image-zoom:hover img {
  animation: imageZoom 0.3s ease forwards;
}

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

/* Button Click Effect */
@keyframes buttonClick {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.btn-click:active {
  animation: buttonClick 0.1s ease;
}

/* ===== PAGE TRANSITION ANIMATIONS ===== */

/* Page Fade In */
@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-transition {
  animation: pageFadeIn 0.8s ease-out;
}

/* ===== RESPONSIVE ANIMATION ADJUSTMENTS ===== */

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) {
  .float,
  .float-fast,
  .float-slow {
    animation: none;
  }
  
  .parallax-bg {
    animation: none;
  }
  
  .gradient-shift {
    animation-duration: 30s;
  }
}

/* ===== REDUCED MOTION SUPPORT ===== */

@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;
  }
  
  .typing-animation,
  .typing-multi {
    animation: none;
    border-right: none;
  }
  
  .progress-animate {
    animation: none;
  }
  
  .gradient-shift,
  .gradient-text-animate {
    animation: none;
  }
  
  .float,
  .float-fast,
  .float-slow {
    animation: none;
  }
  
  .spin,
  .spin-slow {
    animation: none;
  }
}

/* ===== TAILWIND ANIMATION UTILITIES ===== */

/* Custom Tailwind animation classes */
@layer utilities {
  .animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
  }
  
  .animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
  }
  
  .animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
  }
  
  .animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
  }
  
  .animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
  }
  
  .animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
  }
  
  .animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
  }
  
  .animate-slide-in-top {
    animation: slideInTop 0.8s ease-out forwards;
  }
  
  .animate-slide-in-bottom {
    animation: slideInBottom 0.8s ease-out forwards;
  }
  
  .animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
  }
  
  .animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
  }
  
  .animate-bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
  }
  
  .animate-float {
    animation: float 6s ease-in-out infinite;
  }
  
  .animate-glow {
    animation: glow 2s ease-in-out infinite;
  }
  
  .animate-shimmer {
    animation: shimmer 2s infinite;
  }
  
  .animate-pulse-custom {
    animation: pulse 2s infinite;
  }
  
  .animate-gradient-shift {
    animation: gradientShift 15s ease infinite;
  }
  
  .animate-gradient-text {
    animation: gradientText 3s ease infinite;
  }
  
  .animate-typing {
    animation: 
      typewriter 3s steps(40, end) forwards,
      blink 0.75s step-end infinite;
  }
  
  .animate-progress {
    animation: progressFill 1.5s ease-out forwards;
  }
  
  .animate-stagger > * {
    animation: staggeredFadeIn 0.6s ease-out forwards;
  }
  
  .animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
  .animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
  .animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
  .animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
  .animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
  .animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }
}

/* ===== ANIMATION DELAY UTILITIES ===== */

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* ===== ANIMATION DURATION UTILITIES ===== */

.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.6s; }
.duration-slow { animation-duration: 1s; }
.duration-slower { animation-duration: 1.5s; }
.duration-slowest { animation-duration: 2s; }

/* ===== ANIMATION EASING UTILITIES ===== */

.ease-linear { animation-timing-function: linear; }
.ease-in { animation-timing-function: ease-in; }
.ease-out { animation-timing-function: ease-out; }
.ease-in-out { animation-timing-function: ease-in-out; }
.ease-bounce { animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.ease-elastic { animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); }
