html {
    scroll-behavior: smooth;
    scrollbar-color: #64748b #020617;
    scrollbar-width: auto;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #020617;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

::-webkit-scrollbar-thumb {
    min-height: 56px;
    border: 3px solid #020617;
    border-radius: 999px;
    background: #64748b;
}

::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
}

.grid-surface {
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}

main section[id] {
    scroll-margin-top: 88px;
}

.nav-link {
    position: relative;
    transition: color 0.25s ease, background-color 0.25s ease;
}

#desktopNav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1.15rem;
    width: 1.5rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #2dd4bf);
    opacity: 0;
    transform: translateX(-50%) scaleX(0.45);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

#desktopNav .nav-link.is-active {
    color: #7dd3fc;
}

#desktopNav .nav-link.is-active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

#mobileNav .nav-link {
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
}

#mobileNav .nav-link.is-active {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.1);
}

@keyframes flow-dash {
    to {
        stroke-dashoffset: -28;
    }
}

@keyframes signal-pulse {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.flow-line {
    animation: flow-dash 2.8s linear infinite;
}

.signal-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: signal-pulse 2.4s ease-in-out infinite;
}

@media (min-width: 1024px) {
    .screen-section {
        display: flex;
        min-height: calc(100vh - 73px);
        align-items: center;
    }

    .screen-section > :first-child {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flow-line,
    .signal-dot {
        animation: none;
    }

    .flow-particle {
        display: none;
    }
}
