/* ============================================================
   XENELASIA CONSULTANCY — DIGITAL BUSINESS CARD
   Animations Stylesheet · animations.css
   ============================================================ */

/* ─── Keyframe Definitions ──────────────────────────────────── */

/* Page entrance */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Ripple effect on click */
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* Aurora blobs floating */
@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -60px) scale(1.08); }
  66%       { transform: translate(-30px, 30px) scale(0.95); }
}

@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-50px, 40px) scale(1.05); }
  66%       { transform: translate(30px, -50px) scale(1.1); }
}

@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(60px, -40px) scale(1.06); }
}

@keyframes blobFloat4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-40px, 50px) scale(0.95); }
}

/* Gradient text shimmer */
@keyframes gradientShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Rotating gradient border */
@keyframes rotateBorder {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Glow pulse */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(214,58,249,0.2), 0 0 40px rgba(59,130,246,0.1); }
  50%       { box-shadow: 0 0 40px rgba(214,58,249,0.4), 0 0 80px rgba(59,130,246,0.2); }
}

/* Profile ring spin */
@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Float up */
@keyframes floatUp {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* Skill chip pop */
@keyframes chipPop {
  from { opacity: 0; transform: scale(0.8) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hero card entrance */
@keyframes heroEntrance {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Profile image bounce in */
@keyframes profileBounce {
  0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(1.08) rotate(3deg); opacity: 1; }
  80%  { transform: scale(0.97) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Dot pulse loader */
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%       { transform: scale(1.3); opacity: 1; }
}

/* Slide in from bottom */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Gradient border rotate */
@keyframes borderSpin {
  to { --angle: 360deg; }
}

/* Shine sweep */
@keyframes shine {
  0%   { left: -100%; }
  100% { left: 200%; }
}

/* ─── Animation Utility Classes ─────────────────────────────── */

.animate-blob-1 {
  animation: blobFloat1 18s ease-in-out infinite;
}
.animate-blob-2 {
  animation: blobFloat2 24s ease-in-out infinite;
}
.animate-blob-3 {
  animation: blobFloat3 20s ease-in-out infinite;
}
.animate-blob-4 {
  animation: blobFloat4 15s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShimmer 5s ease infinite;
}

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

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

/* Hero card entrance on load */
.hero-card {
  animation: heroEntrance 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

/* Profile image pop */
.profile-image-wrapper {
  animation: profileBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

/* Name entrance */
.hero-name {
  animation: slideInUp 0.7s ease 0.8s both;
}

.hero-designation {
  animation: slideInUp 0.7s ease 0.9s both;
}

.hero-company {
  animation: slideInUp 0.7s ease 1.0s both;
}

.hero-bio {
  animation: slideInUp 0.7s ease 1.1s both;
}

.hero-cta-row {
  animation: slideInUp 0.7s ease 1.2s both;
}

/* Staggered skill chips */
.skill-chip:nth-child(1)  { animation-delay: 0.05s; }
.skill-chip:nth-child(2)  { animation-delay: 0.10s; }
.skill-chip:nth-child(3)  { animation-delay: 0.15s; }
.skill-chip:nth-child(4)  { animation-delay: 0.20s; }
.skill-chip:nth-child(5)  { animation-delay: 0.25s; }
.skill-chip:nth-child(6)  { animation-delay: 0.30s; }
.skill-chip:nth-child(7)  { animation-delay: 0.35s; }
.skill-chip:nth-child(8)  { animation-delay: 0.40s; }

/* Reveal class animation for IntersectionObserver */
.reveal {
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1), transform 0.65s cubic-bezier(0.4,0,0.2,1);
}

/* Shine overlay on glass cards */
.glass-card .shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.04),
    transparent
  );
  transform: skewX(-20deg);
  pointer-events: none;
}

.glass-card:hover .shine {
  animation: shine 0.7s ease forwards;
}

/* QR code appearance */
.qr-wrapper {
  animation: heroEntrance 0.6s ease both;
}

/* Topbar fade in */
.topbar {
  animation: fadeIn 0.5s ease 0.1s both;
}

/* Animated gradient border for hero card */
.hero-card::after {
  background-size: 300% 300%;
  animation: gradientShimmer 6s ease infinite;
}

/* Floating profile ring */
.profile-image-ring {
  animation: ringRotate 8s linear infinite;
}

/* Service card hover tilt */
.service-card {
  transform-style: preserve-3d;
  perspective: 800px;
}

/* Social button entrance with stagger */
.social-btn:nth-child(1) { animation: slideInUp 0.5s ease 0.1s both; }
.social-btn:nth-child(2) { animation: slideInUp 0.5s ease 0.15s both; }
.social-btn:nth-child(3) { animation: slideInUp 0.5s ease 0.20s both; }
.social-btn:nth-child(4) { animation: slideInUp 0.5s ease 0.25s both; }
.social-btn:nth-child(5) { animation: slideInUp 0.5s ease 0.30s both; }
.social-btn:nth-child(6) { animation: slideInUp 0.5s ease 0.35s both; }

/* Contact item shimmer on hover */
.contact-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transform: skewX(-15deg);
  transition: none;
  pointer-events: none;
}

.contact-item:hover::after {
  animation: shine 0.5s ease forwards;
}

/* ─── Page-level entrance ───────────────────────────────────── */
body.loaded .page-wrapper {
  animation: fadeIn 0.4s ease;
}
