/* Modern Staggered Animations */

/* Keyframe Definitions */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes picEntrance {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes textEntrance {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes footerEntrance {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.8;
  }
}

/* Base Animation Settings */
.profile-card {
  opacity: 0;
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
}

.profile-pic {
  opacity: 0;
  animation: picEntrance 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 0.3s;
}

.profile-header h1 {
  opacity: 0;
  animation: textEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.45s;
}

.profile-header .role,
.profile-header .institution {
  opacity: 0;
  animation: textEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.profile-header .role {
  animation-delay: 0.52s;
}

.profile-header .institution {
  animation-delay: 0.58s;
}

/* Staggered Link Buttons */
.link-btn {
  opacity: 0;
  animation: textEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.link-btn:nth-child(1) {
  animation-delay: 0.66s;
}

.link-btn:nth-child(2) {
  animation-delay: 0.74s;
}

.link-btn:nth-child(3) {
  animation-delay: 0.82s;
}

.link-btn:nth-child(4) {
  animation-delay: 0.9s;
}

/* Footer Animation */
.page-footer {
  opacity: 0;
  animation: footerEntrance 1s ease forwards;
  animation-delay: 1.05s;
}

/* Accessibility: Support Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .profile-card,
  .profile-pic,
  .profile-header h1,
  .profile-header .role,
  .profile-header .institution,
  .link-btn,
  .page-footer {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  
  .link-btn {
    transition: none !important;
  }
  
  .link-btn .icon,
  .link-btn .arrow {
    transition: none !important;
    transform: none !important;
  }
}