/* Animation Keyframes */

/* Slide Animations */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale Animations */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Classes */
.animate-header {
  animation: slideInDown 0.8s ease 0.2s both;
}

.animate-logo-mark {
  animation: bounceIn 0.8s ease 0.4s both;
}

.animate-logo-text {
  animation: fadeInLeft 0.8s ease 0.6s both;
}

.animate-badge {
  animation: fadeInRight 0.8s ease 0.8s both;
}

.animate-name {
  animation: fadeInUp 1s ease 1s both;
}

.animate-portrait {
  animation: scaleIn 1s ease 1.2s both;
}

.animate-cta {
  animation: fadeInUp 1s ease 1.4s both;
}

.animate-footer {
  animation: fadeIn 1s ease 2.2s both;
}

/* Link Card Animations */
.animate-link-card {
  animation: slideInUp 0.6s ease forwards;
}

.animate-link-card:nth-child(1) { 
  animation-delay: 1.6s; 
}

.animate-link-card:nth-child(2) { 
  animation-delay: 1.8s; 
}

.animate-link-card:nth-child(3) { 
  animation-delay: 2s; 
}

.animate-link-card:nth-child(4) { 
  animation-delay: 2.2s; 
}

.animate-link-card:nth-child(5) { 
  animation-delay: 2.4s; 
}

/* Apply Animations */
header {
  animation: slideInDown 0.8s ease 0.2s both;
}

.logo .mark {
  animation: bounceIn 0.8s ease 0.4s both;
}

.logo .text {
  animation: fadeInLeft 0.8s ease 0.6s both;
}

.badge {
  animation: fadeInRight 0.8s ease 0.8s both;
}

.name-wrap {
  animation: fadeInUp 1s ease 1s both;
}

.portrait {
  animation: scaleIn 1s ease 1.2s both;
}

.cta {
  animation: fadeInUp 1s ease 1.4s both;
}

footer {
  animation: fadeIn 1s ease 2.2s both;
}

.link-card {
  animation: slideInUp 0.6s ease forwards;
}

/* Hover Animations */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

.hover-scale {
  transition: transform 0.2s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(255, 107, 43, 0.3);
}

/* Micro Animations */
.micro-bounce {
  animation: micro-bounce 2s ease-in-out infinite;
}

@keyframes micro-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.micro-pulse {
  animation: micro-pulse 2s ease-in-out infinite;
}

@keyframes micro-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Loading State Animations */
.loading-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.02) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Stagger Animation Utility */
.stagger-children > * {
  animation-delay: calc(var(--stagger-delay, 0.1s) * var(--index, 0));
}

/* 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;
  }
  
  .micro-bounce,
  .micro-pulse {
    animation: none;
  }
}

/* High Performance Mode */
.performance-mode .animate-header,
.performance-mode .animate-logo-mark,
.performance-mode .animate-logo-text,
.performance-mode .animate-badge,
.performance-mode .animate-name,
.performance-mode .animate-portrait,
.performance-mode .animate-cta,
.performance-mode .animate-footer,
.performance-mode .animate-link-card {
  animation: none;
  opacity: 1;
  transform: none;
}