/* ============================================
   CONTINUOUS ANIMATIONS & EFFECTS
   Subtle ongoing animations for every element
   ============================================ */

/* Prevent FOUC — GSAP sets opacity:0 via JS, but CSS ensures
   elements start hidden before JS runs */
#avatar, #name, #tagline, #typed-section, #divider, #social-title,
.social-icon-btn, .hire-cta, #footer {
  opacity: 0;
}

/* ============================================
   2. TAGLINE — Underline Reveal on Hover
   ============================================ */
.tagline {
  position: relative;
}

.tagline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 500ms ease;
}

.tagline:hover::after {
  transform: scaleX(1);
}

.tagline .highlight {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    #f43f5e 25%,
    var(--accent) 50%,
    #fb7185 75%,
    var(--accent) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================
   3. SOCIAL SECTION TITLE
   Already has shimmer-text in components.css
   Adding hover scale enhancement
   ============================================ */
.social-section-title {
  transition: transform 300ms ease, letter-spacing 300ms ease;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.social-section-title:hover {
  transform: scale(1.05);
  letter-spacing: 0.16em;
}

/* ============================================
   4. SOCIAL ICONS — Enhanced Hover
   ============================================ */
.social-icon-btn {
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 250ms ease,
              border-color 250ms ease,
              box-shadow 250ms ease;
}

.social-icon-btn:hover {
  transform: translateY(-5px) scale(1.08);
}

.social-icon-btn:active {
  transform: translateY(-2px) scale(0.96);
}

/* Tooltip enhancement — uses CSS variables for dark mode support */
.social-icon-btn .tooltip {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 6px 20px var(--shadow);
  border: 1px solid var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ============================================
   8. HIRE CTA — Pulse + Rocket + Progress Bar
   ============================================ */
.hire-cta {
  position: relative;
  overflow: hidden;
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 300ms ease,
              background-color 300ms ease;
}

.hire-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}

.hire-cta:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 12px 32px var(--shadow);
}

.hire-cta:hover::before {
  opacity: 1;
}

.hire-cta:hover i {
  animation: rocket-hover 0.6s ease-in-out infinite;
}

@keyframes rocket-hover {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25%      { transform: translateX(3px) rotate(-5deg); }
  75%      { transform: translateX(-1px) rotate(3deg); }
}

/* ============================================
   HIRE CTA — Progress Bar (injected via JS)
   Left-to-right loading indicator on click
   ============================================ */
.hire-cta-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.9) 40%,
    rgba(255, 255, 255, 0.9) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 5;
  transform-origin: left center;
  transform: scaleX(0);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Loading state — button pulse */
.hire-cta.is-loading {
  animation: cta-loading-pulse 1.2s ease-in-out;
  cursor: default;
}

@keyframes cta-loading-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
  50%  { box-shadow: 0 0 20px 4px rgba(225, 29, 72, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

/* Prevent continuous animations on reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ambient-glow { animation: none; }
  .footer .star { animation: none; }
  .tagline::after { display: none; }
  .hire-cta-progress { display: none; }
  .hire-cta.is-loading { animation: none; }
  .theme-wave { display: none !important; }
}

/* ============================================
   THEME TOGGLE — Entrance animation
   ============================================ */
.theme-toggle {
  opacity: 0;
  animation: theme-toggle-in 0.5s ease-out 0.3s forwards;
}

@keyframes theme-toggle-in {
  0%   { opacity: 0; transform: scale(0.6) rotate(-90deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle {
    opacity: 1;
    animation: none;
  }
}

/* ============================================
   9. FOOTER — Star Twinkle
   ============================================ */
.footer .star {
  display: inline-block;
  animation: twinkle-star 2s ease-in-out infinite;
}

@keyframes twinkle-star {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.3); }
}

.footer .brand {
  transition: color 300ms ease;
}

.footer:hover .brand {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================
   10. AMBIENT GLOW — Pulse
   ============================================ */
.ambient-glow {
  animation: ambient-pulse 5s ease-in-out infinite;
}

@keyframes ambient-pulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateX(-50%) scale(1.15);
    opacity: 0.8;
  }
}
