/* ===== ANIMAÇÕES AVANÇADAS ===== */

/* Animações de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Animações de hover */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(187, 134, 252, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(187, 134, 252, 0.8);
  }
}

/* Animação de digitação */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  0%, 50% {
    border-color: transparent;
  }
  51%, 100% {
    border-color: var(--secondary-color);
  }
}

/* Animações de loading */
@keyframes loadingDots {
  0%, 20% {
    color: var(--secondary-color);
    transform: scale(1);
  }
  50% {
    color: var(--accent-color);
    transform: scale(1.2);
  }
  80%, 100% {
    color: var(--secondary-color);
    transform: scale(1);
  }
}

/* Animação de progresso */
@keyframes progressFill {
  from {
    width: 0%;
  }
  to {
    width: var(--progress-width);
  }
}

/* Animações de partículas */
@keyframes particle1 {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes particle2 {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(-360deg);
    opacity: 0;
  }
}

/* Animação de ondas */
@keyframes wave {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Classes de animação */
.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s ease-out;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
  animation: fadeInRight 0.6s ease-out;
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* Delays para animações em sequência */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Animações de hover para elementos específicos */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.hover-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.08);
}

.hover-rotate {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
  transform: rotate(5deg) scale(1.05);
}

/* Animação de texto digitando */
.typing-text {
  overflow: hidden;
  border-right: 2px solid var(--secondary-color);
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Loading dots */
.loading-dots::after {
  content: '...';
  animation: loadingDots 1.5s infinite;
}

/* Partículas flutuantes */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 50%;
  opacity: 0.7;
}

.particle:nth-child(odd) {
  animation: particle1 15s linear infinite;
}

.particle:nth-child(even) {
  animation: particle2 20s linear infinite;
}

/* Efeito de ondas */
.wave-effect {
  position: relative;
  overflow: hidden;
}

.wave-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: wave 2s infinite;
}

/* Animações de scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Animações de contador */
.counter {
  font-weight: bold;
  color: var(--secondary-color);
}

/* Efeito de máquina de escrever */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--secondary-color);
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.1em;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* Efeito de fade-out para preloader */
.fade-out {
  animation: fade-out 0.5s ease-out forwards;
}

@keyframes fade-out {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Efeito de show para elementos filtrados */
.show {
  animation: fadeInUp 0.5s ease-out;
}

.hidden {
  display: none !important;
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--secondary-color);
  }
}

//* Animação de progresso das habilidades */
.skill-progress-animated {
  animation: progressFill 2s ease-in-out;
}

/* Animação de progresso suave */
.skill-progress.animated {
  animation: progressFill 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Efeito de parallax */
.parallax {
  transform: translateZ(0);
  transition: transform 0.1s ease-out;
}

/* Animações de entrada para cards */
.card-entrance {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.5s ease;
}

.card-entrance.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Efeito de brilho em movimento */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ===== MICRO-INTERAÇÕES PROFISSIONAIS ===== */

/* Smooth transitions para todos os elementos interativos */
button, a, input, textarea, select {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efeito de ripple em botões */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

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

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Efeito de underline animado */
@keyframes underline {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.underline-hover {
  position: relative;
  text-decoration: none;
}

.underline-hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.underline-hover:hover::after {
  width: 100%;
}

/* Efeito de bounce suave */
@keyframes bounce-smooth {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.bounce-smooth {
  animation: bounce-smooth 2s ease-in-out infinite;
}

/* Efeito de fade-in suave com delay */
@keyframes fade-in-smooth {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-smooth {
  animation: fade-in-smooth 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Efeito de gradient shift */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-shift {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* Efeito de focus ring profissional */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1), 0 0 0 5px rgba(111, 66, 193, 0.3);
}

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

/* Animações específicas para mobile */
@media (max-width: 768px) {
  .floating-icon {
    animation-duration: 4s;
  }
  
  .particle {
    animation-duration: 20s;
  }
  
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    transform: none;
    opacity: 1;
  }
  
  /* Desabilitar animações complexas em mobile para melhor performance */
  .shimmer::before,
  .wave-effect::before {
    animation: none;
  }
}

/* Otimizações de performance */
.will-animate {
  will-change: transform, opacity;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

