/* Animations CSS - Keyframes and animation utilities */

/* Floating animations with rhythm - subtle and cute */
@keyframes float1 {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes float2 {
  0%, 100% {
    transform: translateY(0px);
  }
  33% {
    transform: translateY(-4px);
  }
  66% {
    transform: translateY(-2px);
  }
}

@keyframes float3 {
  0%, 100% {
    transform: translateY(0px);
  }
  25% {
    transform: translateY(-2px);
  }
  75% {
    transform: translateY(-4px);
  }
}

@keyframes float4 {
  0%, 100% {
    transform: translateY(0px);
  }
  40% {
    transform: translateY(-3px);
  }
  80% {
    transform: translateY(-1px);
  }
}

@keyframes float5 {
  0%, 100% {
    transform: translateY(0px);
  }
  20% {
    transform: translateY(-2px);
  }
  60% {
    transform: translateY(-4px);
  }
}

@keyframes float6 {
  0%, 100% {
    transform: translateY(0px);
  }
  30% {
    transform: translateY(-2px);
  }
  70% {
    transform: translateY(-4px);
  }
}

/* Project card zoom-in animation */
@keyframes projectZoomIn {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  50% {
    transform: scale(1.05) translateY(-2px);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.1) translateY(-4px);
    opacity: 0.8;
  }
}

@keyframes projectZoomOut {
  0% {
    transform: scale(1.1) translateY(-4px);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05) translateY(-2px);
    opacity: 0.9;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Immersive project world expansion - faster and cleaner */
@keyframes projectWorldExpand {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
    border-radius: 0.5rem;
  }
  50% {
    transform: scale(1.4) translateY(-12px);
    opacity: 0.95;
    border-radius: 1rem;
  }
  100% {
    transform: scale(1.8) translateY(-20px);
    opacity: 0.9;
    border-radius: 1.25rem;
  }
}

@keyframes projectWorldFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.3;
    transform: scale(0.95);
  }
}

@keyframes projectWorldReveal {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Page transition animation */
@keyframes pageSlideIn {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Immersive page entrance - faster and cleaner */
@keyframes worldEntrance {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(15px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Heart animation */
@keyframes heartFloat {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-30px) scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-60px) scale(1.3);
    opacity: 0;
  }
}

@keyframes heartRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(15deg);
  }
}

/* Music player animations */
@keyframes musicPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes musicWave {
  0%, 100% {
    height: 0.5rem;
  }
  50% {
    height: 1rem;
  }
}

/* Drawing canvas animations */
@keyframes drawingBrush {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Kudos note animations */
@keyframes noteAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes noteDisappear {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) rotate(5deg);
  }
}

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

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Animation utility classes */
.animate-pageSlideIn {
  animation: pageSlideIn 0.4s ease-out;
}

.animate-worldEntrance {
  animation: worldEntrance 0.3s ease-out;
}

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

.animate-float2 {
  animation: float2 7s ease-in-out infinite;
}

.animate-float3 {
  animation: float3 8s ease-in-out infinite;
}

.animate-float4 {
  animation: float4 6.5s ease-in-out infinite;
}

.animate-float5 {
  animation: float5 7.5s ease-in-out infinite;
}

.animate-float6 {
  animation: float6 6.8s ease-in-out infinite;
}

.animate-heartFloat {
  animation: heartFloat 0.9s ease-out forwards;
}

.animate-heartRotate {
  animation: heartRotate 0.9s ease-out forwards;
}

.animate-musicPulse {
  animation: musicPulse 1s ease-in-out infinite;
}

.animate-musicWave {
  animation: musicWave 0.5s ease-in-out infinite;
}

.animate-drawingBrush {
  animation: drawingBrush 0.3s ease-out;
}

.animate-noteAppear {
  animation: noteAppear 0.3s ease-out;
}

.animate-noteDisappear {
  animation: noteDisappear 0.3s ease-out;
}

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

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

/* Project card animations */
.project-card {
  transition: all 0.3s ease-out;
}

.project-world-expanding {
  animation: projectWorldExpand 0.25s ease-out forwards;
  z-index: 1000;
  position: relative;
}

.project-world-fading {
  animation: projectWorldFade 0.2s ease-out forwards;
}

/* Smooth transitions */
.transition-all {
  transition: all 0.3s ease-out;
}

.transition-colors {
  transition: color 0.2s ease-out, background-color 0.2s ease-out, border-color 0.2s ease-out;
}

.transition-transform {
  transition: transform 0.3s ease-out;
}

.transition-opacity {
  transition: opacity 0.3s ease-out;
}

/* Hover effects */
.hover\:scale-105:hover {
  transform: scale(1.05);
}

.hover\:scale-110:hover {
  transform: scale(1.1);
}

.hover\:translateY-1:hover {
  transform: translateY(-0.25rem);
}

.hover\:translateY-2:hover {
  transform: translateY(-0.5rem);
}

.hover\:opacity-90:hover {
  opacity: 0.9;
}

.hover\:opacity-95:hover {
  opacity: 0.95;
}

/* Focus effects */
.focus\:outline-none:focus {
  outline: none;
}

.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px rgba(83, 102, 255, 0.5);
}

.focus\:ring-brand:focus {
  box-shadow: 0 0 0 2px rgba(83, 102, 255, 0.5);
}

/* Active states */
.active\:scale-105:active {
  transform: scale(1.05);
}

.active\:bg-brand-600:active {
  background-color: #3a49db;
}

/* Disabled states */
.disabled\:opacity-50:disabled {
  opacity: 0.5;
}

.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}

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

/* Animation delays */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.delay-1000 {
  animation-delay: 1s;
}

