/* =============================================
   NAVIGATION MODULE
   Top nav with enhanced liquid glass distortion.
   Stronger blur, saturation, and frosted tint
   so blog text below is unreadable through it.
   ============================================= */

.nav-filter {
    width: 0;
    height: 0;
    position: absolute;
    pointer-events: none;
}

/* --- Nav Wrapper --- */
.blog-nav {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    opacity: 0;
    animation: navSlideIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes navSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.97);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
        filter: blur(0px);
    }
}

/*
    ENHANCED: Stronger glass on nav container.
    Added frosted dark tint, higher blur/saturate,
    and more prominent displacement distortion.
*/
.blog-nav .glass-container {
    border-radius: calc(var(--nav-radius, 50) * 1px);

    /* Heavy frosted tint so text beneath is unreadable */
    background: hsla(0, 0%, 100%, 0.046);

    border: 1px solid rgba(255, 255, 255, 0.977);
    box-shadow:
        0 0 1px 0.5px color-mix(in oklch, canvasText, #0000 70%) inset,
        0 0 10px 3px color-mix(in oklch, canvasText, #0000 85%) inset,
        0px 6px 24px rgba(0, 0, 0, 0.12),
        0px 12px 48px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

/* Extra-heavy blur on the filter layer inside nav */
.blog-nav .glass-filter {
    backdrop-filter: blur(52px) saturate(220%) brightness(1.1);
    -webkit-backdrop-filter: blur(52px) saturate(220%) brightness(1.1);
}

/* Distortion layer uses the displacement filter with more opacity */
.blog-nav .glass-overlay {
    filter: url(#displacementFilter);
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.059);
}

.blog-nav__wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.blog-nav__inner {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.blog-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;

    color: var(--text-secondary);
    background: rgba(255,255,255,0);

    border-radius: 40px;

    transform: scale(1);
    transition:
        transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.4s ease,
        color 0.3s ease;
}
.blog-nav__link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 255, 255, 0.187),
        transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
      filter: url(#liquidFilter); 
}

.blog-nav__link:hover::before {
    opacity: 1;
}

    

        .blog-nav__link::before {
            content: '';
            position: absolute;
            inset: -1px;
            border-radius: 80px;
            box-shadow: inset 6px 6px 0px -6px rgba(255, 255, 255, 0.7),
                        inset 0 0 8px 1px rgba(255, 255, 255, 0.7);
        }

.blog-nav__link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.blog-nav__divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 2px;
    flex-shrink: 0;
}

.blog-nav__title {
    flex: 1;
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

.blog-nav__toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 40px;
    transition: all var(--transition-smooth);
    margin-left: auto;
    flex-shrink: 0;
}

.blog-nav__toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
           position: absolute;
            height: calc(100% - 8px);
            background: rgba(255, 255, 255, 0.379);
            border-radius: 30px;
            transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
            top: 4px;
            z-index: 30;
            filter: url(#liquidFilter);
            pointer-events: none;
}

.blog-nav__toggle-icon {
    width: 16px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.blog-nav__toggle-icon span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
    transition: all var(--transition-smooth);
}

.nav-displacement-debug {
    pointer-events: none;
    height: 100%;
    width: 100%;
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .blog-nav__toggle {
        display: flex;
    }

    .blog-nav .glass-container {
        width: calc(var(--nav-width-mobile, 320) * 1px);
    }
}

@media (max-width: 480px) {
    .blog-nav {
        top: 20px;
    }

    .blog-nav .glass-container {
        width: calc(100vw - 32px);
        max-width: 380px;
    }

    .blog-nav__title {
        display: none;
    }
}
