/* Anima - Professional Animation System for Uliffe */

/* Custom Anima Variables */
:root {
  --anima-duration-fast: 0.3s;
  --anima-duration-normal: 0.6s;
  --anima-duration-slow: 1s;
  --anima-easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --anima-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --anima-easing-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base Animation Classes - Only animation properties */
.anima-fade-in {
  animation: animaFadeIn var(--anima-duration-normal) var(--anima-easing-smooth) forwards;
}

.anima-slide-up {
  animation: animaSlideUp var(--anima-duration-normal) var(--anima-easing-smooth) forwards;
}

.anima-slide-down {
  animation: animaSlideDown var(--anima-duration-normal) var(--anima-easing-smooth) forwards;
}

.anima-slide-left {
  animation: animaSlideLeft var(--anima-duration-normal) var(--anima-easing-smooth) forwards;
}

.anima-slide-right {
  animation: animaSlideRight var(--anima-duration-normal) var(--anima-easing-smooth) forwards;
}

.anima-scale-in {
  animation: animaScaleIn var(--anima-duration-normal) var(--anima-easing-spring) forwards;
}

.anima-rotate-in {
  animation: animaRotateIn var(--anima-duration-normal) var(--anima-easing-bounce) forwards;
}

.anima-bounce-in {
  animation: animaBounceIn var(--anima-duration-slow) var(--anima-easing-bounce) forwards;
}

/* Hover Animations */
.anima-hover-lift {
  transition: transform var(--anima-duration-fast) var(--anima-easing-smooth);
}

.anima-hover-lift:hover {
  transform: translateY(-5px);
}

.anima-hover-scale {
  transition: transform var(--anima-duration-fast) var(--anima-easing-smooth);
}

.anima-hover-scale:hover {
  transform: scale(1.05);
}

/* Combined hover effects */
.anima-hover-lift.anima-hover-scale:hover {
  transform: translateY(-5px) scale(1.05);
}

.anima-hover-glow {
  transition: box-shadow var(--anima-duration-fast) var(--anima-easing-smooth);
}

.anima-hover-glow:hover {
  box-shadow: 0 10px 30px rgba(255, 150, 0, 0.3);
}

/* Button Animations */
.anima-btn-pulse {
  animation: animaBtnPulse 2s infinite;
}

.anima-btn-ripple {
  position: relative;
  overflow: hidden;
}

.anima-btn-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.anima-btn-ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Loading Animations */
.anima-loading-spinner {
  animation: animaSpin 1s linear infinite;
}

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

.anima-loading-dots::after {
  content: '';
  animation: animaDots 1.5s infinite;
}

/* Text Animations */
.anima-text-reveal {
  overflow: hidden;
}

.anima-text-reveal span {
  display: inline-block;
  animation: animaTextReveal 0.8s var(--anima-easing-smooth) forwards;
  opacity: 0;
  transform: translateY(100%);
}


.anima-typewriter {
  overflow: hidden;
  border-right: 2px solid var(--bs-primary);
  white-space: nowrap;
  animation: animaTypewriter 3s steps(40, end), animaBlink 0.75s step-end infinite;
}

/* Card Animations */
.anima-card-flip {
  perspective: 1000px;
}

.anima-card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform var(--anima-duration-slow);
  transform-style: preserve-3d;
}

.anima-card-flip:hover .anima-card-flip-inner {
  transform: rotateY(180deg);
}

/* Simple card hover effect for direct application */
.anima-card-hover {
  transition: all var(--anima-duration-fast) var(--anima-easing-smooth);
}

.anima-card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Parallax Effects */
.anima-parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* Stagger Animations */
.anima-stagger > * {
  opacity: 0;
  animation: animaFadeIn var(--anima-duration-normal) var(--anima-easing-smooth) forwards;
}

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

/* Keyframe Animations */
@keyframes animaFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes animaSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes animaSlideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes animaSlideLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes animaSlideRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes animaScaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes animaRotateIn {
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes animaBounceIn {
  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);
  }
}

@keyframes animaBtnPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 150, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 150, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 150, 0, 0);
  }
}

@keyframes animaSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes animaDots {
  0%, 20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%, 100% {
    content: '...';
  }
}

@keyframes animaTextReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes animaTextRevealGradient {
  to {
    opacity: 1;
    transform: translateY(0);
    -webkit-text-fill-color: transparent;
  }
}

@keyframes animaTypewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes animaBlink {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--bs-primary);
  }
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
  .anima-fade-in,
  .anima-slide-up,
  .anima-slide-down,
  .anima-slide-left,
  .anima-slide-right,
  .anima-scale-in,
  .anima-rotate-in,
  .anima-bounce-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .anima-hover-lift:hover,
  .anima-hover-scale:hover {
    transform: none;
  }
  
  .anima-loading-spinner {
    animation: none;
  }
}

/* Performance Optimizations */
.anima-fade-in,
.anima-slide-up,
.anima-slide-down,
.anima-slide-left,
.anima-slide-right,
.anima-scale-in,
.anima-rotate-in,
.anima-bounce-in {
  will-change: transform, opacity;
}

/* Custom Animation Utilities */
.anima-delay-1 { animation-delay: 0.1s; }
.anima-delay-2 { animation-delay: 0.2s; }
.anima-delay-3 { animation-delay: 0.3s; }
.anima-delay-4 { animation-delay: 0.4s; }
.anima-delay-5 { animation-delay: 0.5s; }

.anima-duration-fast { animation-duration: var(--anima-duration-fast); }
.anima-duration-normal { animation-duration: var(--anima-duration-normal); }
.anima-duration-slow { animation-duration: var(--anima-duration-slow); }

/* Special Effects */
.anima-gradient-text {
  background: linear-gradient(45deg, var(--bs-primary), var(--bs-secondary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: animaGradientShift 3s ease infinite;
}

@keyframes animaGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Scroll-triggered animations */
.anima-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all var(--anima-duration-normal) var(--anima-easing-smooth);
}

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

/* Varied scroll animations for different elements */
.anima-on-scroll.anima-delay-1 {
  transition-delay: 0.1s;
}

.anima-on-scroll.anima-delay-2 {
  transition-delay: 0.2s;
}

.anima-on-scroll.anima-delay-4 {
  transition-delay: 0.4s;
}

/* Special animations for specific elements */
.profile.anima-on-scroll {
  transform: translateY(50px) scale(0.8);
}

.profile.anima-on-scroll.anima-visible {
  transform: translateY(0) scale(1);
}

/* Quote icon special animation */
.fas.fa-quote-left.anima-on-scroll {
  transform: translateY(50px) rotate(-180deg) scale(0.3);
}

.fas.fa-quote-left.anima-on-scroll.anima-visible {
  transform: translateY(0) rotate(0deg) scale(1);
}

/* Floating animation for elements */
.anima-float {
  animation: animaFloat 3s ease-in-out infinite;
}

/* Special case for profile images that need to maintain horizontal centering */
.profile .profile-img.anima-float {
  animation: animaFloatProfile 3s ease-in-out infinite;
}

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

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

/* Shake animation for attention */
.anima-shake {
  animation: animaShake 0.5s ease-in-out;
}

@keyframes animaShake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* SVG-specific animations */
.anima-svg-pulse {
  animation: animaSvgPulse 2s ease-in-out infinite;
}

.anima-svg-rotate {
  animation: animaSvgRotate 8s linear infinite;
}

.anima-svg-bounce {
  animation: animaSvgBounce 1.5s ease-in-out infinite;
}

.anima-svg-wave {
  animation: animaSvgWave 3s ease-in-out infinite;
}

/* SVG path animations */
.anima-svg-path-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: animaSvgPathDraw 2s ease-in-out forwards;
}

/* Keyframes for SVG animations */
@keyframes animaSvgPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes animaSvgRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes animaSvgWave {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(5deg);
  }
  50% {
    transform: translateY(-5px) rotate(0deg);
  }
  75% {
    transform: translateY(-10px) rotate(-5deg);
  }
}

@keyframes animaSvgPathDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Staggered SVG animations for dots */
.dots-1 svg {
  animation-delay: 0s;
}

.dots-2 svg {
  animation-delay: 0.5s;
}

.dots-3 svg {
  animation-delay: 1s;
}

.dots-4 svg {
  animation-delay: 1.5s;
}

/* Enhanced floating animation for SVG elements */
.anima-float.anima-svg-enhanced {
  animation: animaFloatEnhanced 4s ease-in-out infinite;
}

@keyframes animaFloatEnhanced {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(2deg);
  }
  50% {
    transform: translateY(-12px) rotate(0deg);
  }
  75% {
    transform: translateY(-8px) rotate(-2deg);
  }
} 