/* Animations CSS */

/* 1. Global Fade In */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* 2. Decrypted Text Effect (Cursor) */
.decrypted-text {
    font-family: 'JetBrains Mono', monospace;
    /* Monospace is crucial for this effect */
    display: inline-block;
    min-height: 1.2em;
}

/* 3. Star Border Button (Pure CSS) */
.star-border-btn {
    position: relative;
    display: inline-block;
    padding: 14px 35px;
    background: #111;
    color: white;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    border-radius: 30px;
    overflow: hidden;
    z-index: 1;
    border: none;
}

.star-border-btn span {
    position: relative;
    z-index: 10;
}

/* The "Stars" traversing the border */
.star-1,
.star-2,
.star-3,
.star-4,
.star-5,
.star-6 {
    position: absolute;
    width: 20px;
    /* Length of the star trail */
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, white, transparent);
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
    z-index: 2;
}

/* Using CSS clip-path or simple border hacks for the "Border" effect is tricky. 
   Better approach for "Star Border": Gradient border animation */

.star-border-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    padding: 2px;
    /* Border width */
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 200% 100%;
    animation: border-flow 3s linear infinite;
}

@keyframes border-flow {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* 4. Blob Cursor & Noise */
.blob-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: width 0.5s, height 0.5s, opacity 0.3s;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 5. Spotlight Card Effect */
.spotlight-card {
    /* Variables set by JS */
    --mouse-x: 0px;
    --mouse-y: 0px;
    --spotlight-color: rgba(255, 255, 255, 0.08);
}

.spotlight-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 40%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    /* Hidden by default, shown on hover */
    transition: opacity 0.5s;
}

.spotlight-card:hover::before {
    opacity: 1;
}

/* 6. Shape Blur / Glow behind profile */
.card-border-glow {
    position: relative;
    padding: 2px;
    background: linear-gradient(var(--accent), #444);
    border-radius: 12px;
    z-index: 10;
}

.card-border-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent);
    filter: blur(40px);
    opacity: 0.4;
    z-index: -1;
}

/* 7. Scroll Velocity / Marquee (if needed) */
/* (Not currently used in HTML but good to have) */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Space Animations */
@keyframes shoot {
    0% {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(300px) translateY(300px) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(10px, -20px) scale(1.05);
    }
    50% {
        transform: translate(-15px, -10px) scale(0.95);
    }
    75% {
        transform: translate(20px, 15px) scale(1.02);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}
/* Background Animation Elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-40px) translateX(-10px);
    }
    75% {
        transform: translateY(-20px) translateX(10px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

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

/* Background Blobs */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.2), transparent 70%);
    top: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite;
}

.bg-blob-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.15), transparent 70%);
    bottom: -50px;
    right: -50px;
    animation: float 20s ease-in-out infinite reverse;
}

.bg-blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.12), transparent 70%);
    top: 50%;
    right: -100px;
    animation: float 25s ease-in-out infinite;
}