/* ============================================================
   Service: animations.css
   All keyframes and transition helpers
   ============================================================ */

@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

@keyframes holographic-shimmer {
    0%, 100% { background-position: -200% center; }
    50%       { background-position: 200% center; }
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px color-mix(in srgb, var(--accent-color) 40%, transparent); }
    50%       { transform: scale(1.05); box-shadow: 0 0 30px color-mix(in srgb, var(--accent-color) 70%, transparent); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.7); }
}

@keyframes card-entrance {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(10px); }
}

@keyframes typing-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%           { transform: translateY(-6px); }
}

@keyframes icon-gradient {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

@keyframes rainbow-border {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* ── Staggered project card entrance ───────────────────────── */
.project-card {
    opacity: 0;
    transform: translateY(30px);
    animation: card-entrance 0.6s ease forwards;
}
.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.12s; }
.project-card:nth-child(3) { animation-delay: 0.19s; }
.project-card:nth-child(4) { animation-delay: 0.26s; }
.project-card:nth-child(5) { animation-delay: 0.33s; }
.project-card:nth-child(6) { animation-delay: 0.40s; }
.project-card:nth-child(7) { animation-delay: 0.47s; }
.project-card:nth-child(8) { animation-delay: 0.54s; }

/* ── Cert card stagger ──────────────────────────────────────── */
.cert-card {
    opacity: 0;
    transform: translateY(24px);
    animation: card-entrance 0.5s ease forwards;
}
.cert-card:nth-child(1) { animation-delay: 0.1s; }
.cert-card:nth-child(2) { animation-delay: 0.18s; }
.cert-card:nth-child(3) { animation-delay: 0.26s; }
.cert-card:nth-child(4) { animation-delay: 0.34s; }
.cert-card:nth-child(5) { animation-delay: 0.42s; }

/* ── Podcast button animations ──────────────────────────────── */
.podcast-btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: 1rem;
    padding: 0.85rem 1.4rem 0.85rem 0.85rem;
    background: rgba(20, 20, 30, 0.8);
    border: 1.5px solid rgba(139, 92, 246, 0.35);
    border-radius: 70px; cursor: pointer; text-align: left;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: gradient-flow 4s ease infinite;
    background-size: 200% 200%;
    -webkit-tap-highlight-color: transparent;
}
.podcast-btn::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 110%; height: 130%;
    background: radial-gradient(circle, rgba(139,92,246,0.4) 0%, rgba(6,182,212,0.3) 40%, transparent 70%);
    opacity: 0; transition: opacity 0.5s ease;
    pointer-events: none; z-index: -1; filter: blur(20px);
}
.podcast-btn::after {
    content: ''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 70px;
    background: linear-gradient(90deg, #f97316, #ec4899, #8B5CF6, #06B6D4, #10b981, #f97316);
    background-size: 300% 300%;
    opacity: 0; animation: rainbow-border 4s linear infinite;
    transition: opacity 0.4s ease; pointer-events: none; z-index: -1;
}
.podcast-btn:hover::before { opacity: 1; }
.podcast-btn:hover::after { opacity: 1; }
.podcast-btn:hover { transform: translateY(-4px) scale(1.02); }
.podcast-btn.playing::before { opacity: 0.8; }
.podcast-btn.playing::after { opacity: 0.7; }
.podcast-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #8B5CF6 100%);
    background-size: 200% 200%;
    border-radius: 50%; color: #fff; font-size: 1.1rem; flex-shrink: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(139,92,246,0.6), 0 0 40px rgba(6,182,212,0.3), inset 0 2px 4px rgba(255,255,255,0.3);
    position: relative; animation: icon-gradient 4s ease infinite;
    border: 2px solid rgba(255,255,255,0.2);
}
.podcast-lang-badge {
    position: absolute; bottom: -4px; right: -4px;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; background: var(--card-bg); border: 1.5px solid var(--border-color);
}
.podcast-content { display: flex; flex-direction: column; gap: 0.25rem; }
.podcast-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.podcast-subtitle { font-size: 0.72rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.3rem; }
.notebooklm-badge { color: var(--accent-secondary-color); font-weight: 600; font-size: 0.7rem; }
.podcast-wave { display: flex; gap: 3px; align-items: center; height: 16px; }
.podcast-wave span { width: 3px; border-radius: 2px; background: var(--accent-secondary-color); animation: none; }
.podcast-btn.playing .podcast-wave span { animation: podcast-wave-anim 0.8s ease-in-out infinite; }
.podcast-wave span:nth-child(1) { animation-delay: 0s; height: 8px; }
.podcast-wave span:nth-child(2) { animation-delay: 0.15s; height: 14px; }
.podcast-wave span:nth-child(3) { animation-delay: 0.3s; height: 8px; }
@keyframes podcast-wave-anim {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.3); }
}
.podcast-language-toggle {
    background: rgba(255,255,255,0.08); border: 1px solid var(--border-color);
    border-radius: 9999px; padding: 0.3rem 0.6rem;
    cursor: pointer; color: var(--text-secondary); font-size: 0.75rem;
    display: flex; align-items: center; gap: 0.3rem;
    transition: background 0.2s; flex-shrink: 0;
}
.podcast-language-toggle:hover { background: rgba(255,255,255,0.14); }
.podcast-language-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 0.75rem; overflow: hidden;
    backdrop-filter: blur(16px); z-index: 50;
    display: none; min-width: 130px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.podcast-language-dropdown.show { display: block; }
.podcast-language-option {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 0.9rem; cursor: pointer; font-size: 0.82rem;
    transition: background 0.2s; color: var(--text-secondary);
}
.podcast-language-option.active { color: var(--accent-color); background: rgba(0,191,255,0.08); }
.podcast-language-option:hover { background: rgba(255,255,255,0.08); }
