/* animations.css — futuristic visual layer */

/* ── Hero overlay sits above particle canvas ────────────────────── */
.hero-overlay {
    position: relative;
    z-index: 1;
}

/* ── Animated gradient on hero name ─────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 35%, #8b5cf6 60%, var(--primary) 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 8s ease infinite;
}
@keyframes gradient-shift {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

/* ── Typewriter cursor ───────────────────────────────────────────── */
.tw-cursor {
    display: inline-block;
    color: var(--primary);
    font-weight: 300;
    margin-left: 1px;
    animation: tw-blink 0.65s step-end infinite;
    transition: opacity 0.3s;
}
@keyframes tw-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── Timeline dot ripple ─────────────────────────────────────────── */
.anim-timeline-ripple {
    animation: timeline-ripple 2.8s ease-out infinite;
}
@keyframes timeline-ripple {
    0%   { box-shadow: 0 0 0 4px rgba(79,70,229,0.18), 0 0 0 0   rgba(79,70,229,0.08); }
    60%  { box-shadow: 0 0 0 4px rgba(79,70,229,0.08), 0 0 0 14px rgba(79,70,229,0);   }
    100% { box-shadow: 0 0 0 4px rgba(79,70,229,0.18), 0 0 0 0   rgba(79,70,229,0.08); }
}

/* ── Cursor glow ─────────────────────────────────────────────────── */
#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle, rgba(79,70,229,0.08) 0%, transparent 65%);
    will-change: transform;
}

/* ── Floating geometry ───────────────────────────────────────────── */
.anim-float-geo {
    position: absolute;
    border: 1.5px solid rgba(79,70,229,0.14);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    pointer-events: none;
    z-index: 0;
    animation: float-geo linear infinite;
}
@keyframes float-geo {
    0%   { transform: translateY(0px)   rotate(0deg);   opacity: 0.30; }
    33%  { transform: translateY(-20px) rotate(120deg); opacity: 0.12; }
    66%  { transform: translateY(-10px) rotate(240deg); opacity: 0.22; }
    100% { transform: translateY(0px)   rotate(360deg); opacity: 0.30; }
}

/* ── Skill icon neon glow pulse ──────────────────────────────────── */
#skills .w-16 {
    animation: skill-glow 3.5s ease-in-out infinite;
}
@keyframes skill-glow {
    0%, 100% { box-shadow: 0 0 0   0   rgba(79,70,229,0);    }
    50%       { box-shadow: 0 0 22px 6px rgba(79,70,229,0.18); }
}

/* ── Holographic shimmer on card hover ───────────────────────────── */
.glass-card {
    position: relative;
    overflow: hidden;
}
.glass-card::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -65%;
    width: 45%;
    height: 220%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255,255,255,0.48) 50%,
        transparent 80%
    );
    transform: skewX(-15deg);
    pointer-events: none;
    opacity: 0;
}
.glass-card:hover::after {
    opacity: 1;
    animation: holo-sweep 0.55s ease forwards;
}
@keyframes holo-sweep {
    from { left: -65%; }
    to   { left: 170%; }
}

/* ── Cyber-grid on white sections ────────────────────────────────── */
#skills, #certifications {
    background-image:
        linear-gradient(rgba(79,70,229,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,70,229,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ── Scan line sweeping cert viewer ──────────────────────────────── */
#cert-viewer {
    position: relative;
}
#cert-viewer::before {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(79,70,229,0.45) 50%, transparent 100%);
    z-index: 2;
    pointer-events: none;
    animation: scan-line 3.5s linear infinite;
}
@keyframes scan-line {
    0%   { top: 0%;    opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: 100%;  opacity: 0; }
}

/* ── Footer heading neon pulse ───────────────────────────────────── */
footer h2 .text-indigo-600 {
    display: inline-block;
    animation: neon-text-pulse 4s ease-in-out infinite;
}
@keyframes neon-text-pulse {
    0%,100% { text-shadow: none; }
    50%      { text-shadow: 0 0 24px rgba(79,70,229,0.45), 0 0 50px rgba(79,70,229,0.18); }
}

/* ── Neon glow on Connect button ─────────────────────────────────── */
nav a[href*="linkedin"]:hover {
    box-shadow: 0 0 24px rgba(79,70,229,0.55), 0 0 50px rgba(79,70,229,0.2) !important;
    transition: box-shadow 0.3s ease, background-color 0.3s ease !important;
}

/* ── CTA button light sweep on hover ─────────────────────────────── */
button.cta-btn {
    position: relative;
    overflow: hidden;
}
button.cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
button.cta-btn:hover::before {
    transform: translateX(100%);
}

/* ── Nav underline neon shadow ───────────────────────────────────── */
.nav-btn:hover::after,
.nav-btn:focus::after {
    box-shadow: 0 2px 8px rgba(79,70,229,0.4);
}

/* ── Loading screen enhanced pulse ──────────────────────────────── */
#loading-screen .section-tag {
    animation: cyber-pulse 1s ease-in-out infinite !important;
}
@keyframes cyber-pulse {
    0%,100% { opacity: 1;   letter-spacing: 0.2em;  }
    50%      { opacity: 0.4; letter-spacing: 0.32em; }
}
