.scroll-nav {
    --scroll-nav-dot: 14px;
    --scroll-nav-gap: 3.5rem;
    position: fixed;
    top: 50%;
    left: 1.75rem;
    z-index: 8;
    opacity: 0;
    visibility: hidden;
    transform: translate(-8px, -50%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.scroll-nav.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}

/* Vertical rail */

.scroll-nav-track {
    position: absolute;
    top: calc(var(--scroll-nav-dot) / 2);
    bottom: calc(var(--scroll-nav-dot) / 2);
    left: calc(var(--scroll-nav-dot) / 2 - 1.5px);
    width: 3px;
    overflow: hidden;
    border-radius: 3px;
    background-color: #D5D8DE;
}

.scroll-nav-fill {
    width: 100%;
    height: 100%;
    background-color: var(--hover-animation-title);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.15s linear;
}

/* Dots */

.scroll-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--scroll-nav-gap);
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.scroll-nav-link {
    display: flex;
    align-items: center;
    position: relative;
    height: var(--scroll-nav-dot);
    color: #3A3F47;
    text-decoration: none;
}

.scroll-nav-dot {
    flex: none;
    width: var(--scroll-nav-dot);
    height: var(--scroll-nav-dot);
    box-sizing: border-box;
    border: 3px solid #D5D8DE;
    border-radius: 50%;
    background-color: var(--body);
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.scroll-nav-link.is-passed .scroll-nav-dot {
    border-color: var(--hover-animation-title);
}

.scroll-nav-link.is-active .scroll-nav-dot {
    background-color: var(--hover-animation-title);
    transform: scale(1.25);
}

/* Labels */

.scroll-nav-label {
    position: absolute;
    left: calc(var(--scroll-nav-dot) + 0.75rem);
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    background-color: var(--header-footer);
    color: #FFF;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.scroll-nav:hover .scroll-nav-label,
.scroll-nav:focus-within .scroll-nav-label {
    opacity: 1;
    transform: translateX(0);
}

.scroll-nav-link.is-active .scroll-nav-label {
    background-color: var(--hover-animation-title);
}

.scroll-nav-link:hover .scroll-nav-dot {
    border-color: var(--hover-animation-title);
}

.scroll-nav-link:focus-visible {
    outline: none;
}

.scroll-nav-link:focus-visible .scroll-nav-dot {
    outline: 2px solid var(--hover-animation-title);
    outline-offset: 3px;
}

/* Mobile */

@media only screen and (max-width: 1024px) {
    .scroll-nav {
        display: none;
    }
}