/* Optional animations — remove the <link> to this file to disable all motion */

/* Diffusion-inspired animated gradient behind the header */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 25% 40%, rgba(56, 189, 168, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse at 75% 60%, rgba(59, 150, 246, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 25%, rgba(134, 239, 172, 0.08) 0%, transparent 50%);
    animation: diffusion 10s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}

@keyframes diffusion {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.75;
    }
    25% {
        transform: translate(3%, -2%) scale(1.03);
        opacity: 1;
    }
    50% {
        transform: translate(-2%, 3%) scale(0.97);
        opacity: 0.85;
    }
    75% {
        transform: translate(3%, 1%) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translate(-1%, -2%) scale(1.01);
        opacity: 0.8;
    }
}

/* Subtle noise texture overlay on hero — evokes denoising */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* Fade-in on scroll for sections */
.section {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Publication card hover lift */
.pub-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Profile image — no animation */

/* Link underline grow animation */
a.lnk {
    background-image: linear-gradient(rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.3));
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}

a.lnk:hover {
    background-size: 100% 1px;
}
