/* ============================================
   Gooey Nav — Particle Burst Navigation
   Vanilla CSS port of the React GooeyNav component
   ============================================ */

/* --- Color palette for particles --- */
.gooey-nav {
    --color-1: #06b6d4;
    /* cyan */
    --color-2: #8b5cf6;
    /* purple */
    --color-3: #3b82f6;
    /* blue */
    --color-4: #22d3ee;
    /* light cyan */
    position: relative;
    display: flex;
    align-items: center;
}

/* --- Nav list --- */
.gooey-nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2;
}

.gooey-nav li {
    position: relative;
}

.gooey-nav li a {
    display: block;
    padding: 0.5rem 0.9rem;
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-medium, 500);
    color: var(--color-slate-400, #94a3b8);
    text-decoration: none;
    border-radius: var(--radius-lg, 0.75rem);
    transition: color 0.2s ease;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

html:not(.dark) .gooey-nav li a {
    color: var(--color-slate-500, #64748b);
}

.gooey-nav li a:hover {
    color: var(--color-slate-200, #e2e8f0);
}

html:not(.dark) .gooey-nav li a:hover {
    color: var(--color-slate-800, #1e293b);
}

.gooey-nav li.active a {
    color: white;
    font-weight: var(--font-semibold, 600);
}

html:not(.dark) .gooey-nav li.active a {
    color: var(--color-slate-900, #0f172a);
}

/* --- The sliding pill background --- */
.gooey-pill {
    position: absolute;
    z-index: 1;
    border-radius: var(--radius-lg, 0.75rem);
    pointer-events: none;
    opacity: 0;
    overflow: visible;
    filter: url('#goo-filter');
    will-change: transform;

    /* Background */
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.22);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.08);
}

html:not(.dark) .gooey-pill {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.18);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.06);
}

/* Pop animation when clicked */
.gooey-pill.pop {
    animation: pill-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pill-pop {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 8px rgba(6, 182, 212, 0.1);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 25px rgba(6, 182, 212, 0.35);
        border-color: rgba(6, 182, 212, 0.5);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 12px rgba(6, 182, 212, 0.08);
        border-color: rgba(6, 182, 212, 0.22);
    }
}

/* --- Particle animation --- */
.gooey-nav .particle {
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
    animation: gooey-particle-move var(--time, 800ms) ease-out forwards;
}

.gooey-nav .particle .point {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color, white);
    transform: scale(var(--scale, 1)) rotate(var(--rotate, 0deg));
    animation: gooey-particle-fade var(--time, 800ms) ease-out forwards;
}

/* Particle moving from start to end */
@keyframes gooey-particle-move {
    0% {
        transform: translate(var(--start-x, 0px), var(--start-y, 0px));
    }

    100% {
        transform: translate(var(--end-x, 0px), var(--end-y, 0px));
    }
}

/* Particle fading out */
@keyframes gooey-particle-fade {
    0% {
        opacity: 1;
        transform: scale(var(--scale, 1));
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* --- Responsive: hide on small screens --- */
@media (max-width: 768px) {
    .gooey-nav {
        display: none;
    }
}