/* Kinetic Animations - Micro-interactions and Entrance Effects */

/* Hero morphing shapes */
@keyframes morphShape {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 40% 60% 30% 70%;
  }
}

@keyframes morphShape2 {
  0%, 100% {
    border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
  }
  50% {
    border-radius: 70% 30% 40% 60% / 30% 40% 60% 70%;
  }
}

@keyframes morphShape3 {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 40% 60% 70% 30%;
  }
  50% {
    border-radius: 40% 70% 60% 30% / 70% 40% 30% 60%;
  }
}

/* Glow effect */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4), inset 0 0 20px rgba(0, 217, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.6), inset 0 0 30px rgba(0, 217, 255, 0.2);
  }
}

/* Entrance animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Hover micro-interactions */

/* Button hover - elegant lift with glow */
.btn:hover,
button:hover,
.interactive-element:hover {
  animation: none;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

/* Card hover - subtle scale and glow */
.card,
.work-item,
.portfolio-item {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.card:hover,
.work-item:hover,
.portfolio-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 217, 255, 0.25);
}

/* Link hover - color shift and underline */
a.link-interactive {
  position: relative;
  overflow: hidden;
}

a.link-interactive::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.4s ease;
}

a.link-interactive:hover::after {
  width: 100%;
}

/* Icon hover - rotation and color shift */
.icon-interactive {
  transition: all 0.3s ease;
}

.icon-interactive:hover {
  color: var(--color-accent);
  transform: rotate(5deg) scale(1.1);
}

/* Text hover - color shift */
.text-interactive {
  transition: color 0.3s ease;
}

.text-interactive:hover {
  color: var(--color-accent);
}

/* Accent underline animation */
.accent-underline {
  position: relative;
  display: inline-block;
}

.accent-underline::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.accent-underline:hover::before {
  opacity: 1;
}

/* Glow text on hover */
.glow-text:hover {
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.6), 0 0 20px rgba(0, 217, 255, 0.4);
}

/* Morph shape animation */
.morph-shape {
  animation: morphShape 8s ease-in-out infinite;
}

.morph-shape.shape-2 {
  animation: morphShape2 7s ease-in-out infinite;
}

.morph-shape.shape-3 {
  animation: morphShape3 9s ease-in-out infinite;
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

.float {
  animation: float 4s ease-in-out infinite;
}

/* Subtle rotation */
@keyframes subtleRotate {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

.subtle-rotate {
  animation: subtleRotate 6s ease-in-out infinite;
}

/* Text reveal on scroll (handled by GSAP) */
.text-reveal {
  opacity: 0;
  transform: translateY(20px);
}

/* Character stagger animation */
.char {
  display: inline-block;
  opacity: 0;
}

/* Smooth scroll anchor links */
html {
  scroll-behavior: smooth;
}

/* Remove default focus outline, use custom */
:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Prevent layout shift on focus */
input:focus,
button:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-dark), 0 0 0 4px var(--color-accent);
}

/* Smooth transitions */
* {
  transition-property: color, background-color, border-color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Exclude certain elements from transitions */
*:not(.btn):not(button):not(input):not(a) {
  transition: none;
}

/* Specific transitions for interactive elements only */
.interactive-element,
.btn,
button,
a,
.card,
.work-item,
.portfolio-item {
  transition-property: color, background-color, border-color, box-shadow, transform;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
