* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 6em;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.1);
    background: #333;
    text-transform: uppercase;
}

section:nth-child(even) {
    background: #444;
}

header {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000000;
    width: 400px;
    height: 60px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.5));
}

header nav {
    display: flex;
    width: 350px;
}

header nav a {
    position: relative;
    list-style: none;
    width: 70px;
    height: 60px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    text-align: center;
    font-weight: 500;
}

header nav a .icon {
    position: relative;
    display: block;
    line-height: 65px;
    font-size: 1.5em;
    text-align: center;
    transition: 0.5s;
    color: #666;
}

header nav a.active .icon {
    transform: translateY(-32px);
    color: var(--clr);
}

header nav a .text {
    position: absolute;
    color: #fff;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 400;
    font-size: 0.75em;
    letter-spacing: 0.05em;
    transition: 0.5s;
    transform: translateY(15px);
}

header nav a.active .text {
    transform: translateY(-4px);
    background: var(--clr);
    opacity: 1;
}

.indicator {
    position: absolute;
    top: -35px;
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    transition: 0.5s;
    z-index: 1;
}

.indicator:before {
    content: '';
    position: absolute;
    top: 5px;
    left: -28px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 15px 18px #fff;
}

.indicator:after {
    content: '';
    position: absolute;
    top: 5px;
    right: -28px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    box-shadow: -15px 18px #fff;
}

header nav a:nth-child(1).active ~ .indicator {
    transform: translateX(calc(70px * 0));
}

header nav a:nth-child(2).active~.indicator {
    transform: translateX(calc(70px * 1));
}

header nav a:nth-child(3).active~.indicator {
    transform: translateX(calc(70px * 2));
}

header nav a:nth-child(4).active~.indicator {
    transform: translateX(calc(70px * 3));
}

header nav a:nth-child(5).active~.indicator {
    transform: translateX(calc(70px * 4));
}
