/**
 * Cinapsis Studio - Micro-interaction Animations (useanimations style)
 * Clean, lightweight, 60fps CSS animations for vector SVG icons & UI elements.
 */

/* 1. Core Keyframes */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.35), inset 0 0 15px rgba(0, 242, 254, 0.1);
  }
  50% {
    box-shadow: 0 0 35px rgba(138, 43, 226, 0.6), inset 0 0 25px rgba(138, 43, 226, 0.25);
  }
}

@keyframes synapsePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
    filter: drop-shadow(0 0 8px #00f2fe);
  }
}

@keyframes orbitSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes orbitReverse {
  0% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes antennaWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

@keyframes scanLine {
  0% { transform: translateY(-10px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

@keyframes circuitDash {
  to {
    stroke-dashoffset: -40;
  }
}

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

@keyframes badgeBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

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

/* 2. Micro-Interaction Classes for Animated SVG Icons */
.anim-icon-wrap {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  max-width: 38px;
  max-height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.anim-icon-wrap svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0;
  display: block;
  transition: transform var(--transition-normal);
}

/* Hover effects triggering intense animations */
.philosophy-card:hover .anim-icon-wrap,
.capability-card:hover .anim-icon-wrap,
.project-card:hover .anim-icon-wrap {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
  background: rgba(0, 242, 254, 0.08);
}

.philosophy-card:hover .anim-icon-wrap svg,
.capability-card:hover .anim-icon-wrap svg,
.project-card:hover .anim-icon-wrap svg {
  transform: scale(1.12);
}

/* Synapse Animated Icon */
.icon-synapse .core-node {
  animation: synapsePulse 3s infinite ease-in-out;
  transform-origin: center;
}

.icon-synapse .orbit-ring {
  animation: orbitSpin 12s infinite linear;
  transform-origin: center;
}

.icon-synapse .orbit-ring-rev {
  animation: orbitReverse 16s infinite linear;
  transform-origin: center;
}

/* Android Animated Icon */
.icon-android .antenna-left {
  transform-origin: 8px 6px;
  animation: antennaWiggle 4s infinite ease-in-out;
}

.icon-android .antenna-right {
  transform-origin: 16px 6px;
  animation: antennaWiggle 4s infinite ease-in-out reverse;
}

.icon-android .eye {
  animation: badgeBlink 3.5s infinite ease-in-out;
}

/* Globe Animated Icon */
.icon-globe .globe-axis {
  animation: orbitSpin 14s infinite linear;
  transform-origin: center;
}

.icon-globe .globe-signal {
  animation: synapsePulse 2.5s infinite ease-in-out;
  transform-origin: center;
}

/* Security Shield Animated Icon */
.icon-shield .scan-laser {
  animation: scanLine 2.5s infinite linear;
}

.icon-shield .lock-shackle {
  transition: transform 0.3s ease;
}

.capability-card:hover .icon-shield .lock-shackle {
  transform: translateY(-2px);
}

/* AI Neural Processor Animated Icon */
.icon-ai .chip-core {
  animation: synapsePulse 2.5s infinite ease-in-out;
  transform-origin: center;
}

.icon-ai .circuit-trace {
  stroke-dasharray: 6 4;
  animation: circuitDash 2s infinite linear;
}

/* Founder Card Cyber Glow */
.founder-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.founder-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-hover);
}

.founder-avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}

.founder-avatar-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-synapse);
  background-size: 200% 200%;
  animation: shimmerGradient 4s ease infinite;
  z-index: 1;
}

.founder-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  z-index: 2;
  border: 4px solid var(--bg-surface);
  background: linear-gradient(135deg, #111827 0%, #1e1b4b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  color: var(--accent-cyan);
}

.founder-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.founder-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.founder-bio {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

/* Social Icon Pills */
.social-links-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-pill svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.social-pill:hover {
  transform: translateY(-2px);
  color: var(--text-primary);
}

.social-pill.linkedin:hover {
  border-color: #0077b5;
  background: rgba(0, 119, 181, 0.2);
  color: #38bdf8;
  box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
}

.social-pill.github:hover {
  border-color: #f8fafc;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.social-pill.facebook:hover {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.2);
  color: #60a5fa;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

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