/*
* Prophetic Ilm Theme - Animations
* Subtle, elegant animations inspired by Islamic art
*/

/* ========================================
   Fade in on page load
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes gentlePulse {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.06; }
}

@keyframes floatGlow {
  0%, 100% {
    box-shadow: 
      0 0 0 4px #111111,
      0 0 20px rgba(201, 168, 76, 0.25),
      0 0 40px rgba(29, 90, 61, 0.15);
  }
  50% {
    box-shadow: 
      0 0 0 4px #111111,
      0 0 25px rgba(201, 168, 76, 0.35),
      0 0 50px rgba(29, 90, 61, 0.2);
  }
}

/* ========================================
   Apply animations
   ======================================== */

/* Avatar gentle glow pulse */
#avatar-url {
  animation: floatGlow 4s ease-in-out infinite;
}

/* Profile elements fade in */
#profile-title,
.profile-title {
  animation: fadeInUp 0.6s ease-out both;
}

#profile-description,
.profile-description {
  animation: fadeInUp 0.6s ease-out 0.15s both;
}

/* Staggered button entrance */
.button,
a.button,
#button-default {
  animation: fadeInUp 0.5s ease-out both;
}

.button:nth-child(1) { animation-delay: 0.2s; }
.button:nth-child(2) { animation-delay: 0.3s; }
.button:nth-child(3) { animation-delay: 0.4s; }
.button:nth-child(4) { animation-delay: 0.5s; }
.button:nth-child(5) { animation-delay: 0.6s; }
.button:nth-child(6) { animation-delay: 0.7s; }
.button:nth-child(7) { animation-delay: 0.8s; }
.button:nth-child(8) { animation-delay: 0.9s; }
.button:nth-child(9) { animation-delay: 1.0s; }
.button:nth-child(10) { animation-delay: 1.1s; }

/* Background pattern gentle pulse */
body::after {
  animation: gentlePulse 8s ease-in-out infinite;
}

/* Social icons */
.social-icons a,
#social-icons a {
  animation: fadeIn 0.5s ease-out both;
}

.social-icons a:nth-child(1) { animation-delay: 0.3s; }
.social-icons a:nth-child(2) { animation-delay: 0.4s; }
.social-icons a:nth-child(3) { animation-delay: 0.5s; }
.social-icons a:nth-child(4) { animation-delay: 0.6s; }
.social-icons a:nth-child(5) { animation-delay: 0.7s; }

/* Footer */
footer, .footer {
  animation: fadeIn 0.8s ease-out 1s both;
}

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