.nav-wrapper {
    text-align: center;
}

nav {
    display: inline-flex;
    justify-content: center;
    padding: 0.6em 1em 1.2em 1em;
    position: relative;
    background: rgba(233, 217, 255, 0.65);
    backdrop-filter: blur(2px);
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* ribbon tails */
nav::before,
nav::after {
    content: "";
    position: absolute;
    bottom: -10px;
    width: 28px;
    height: 10px;
    background: inherit;
    z-index: -1;
}

nav::before {
    left: 0;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

nav::after {
    right: 0;
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}

nav ul {
    max-width: 960px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding-left: 0;
    justify-content: space-evenly;
}

nav li a {
    display: inline-block;
    padding: 0.3em 1em;
    font-family: "AnimalCute", sans-serif;
    font-size: 1.4rem;
    text-decoration: none;
    color: #8134DF;
    text-shadow:
        -2px -2px 0 #fff,
         2px -2px 0 #fff,
        -2px  2px 0 #fff,
         2px  2px 0 #fff;
    transition: transform 200ms ease, color 200ms ease;
}

/* SPARKLES ON HOVER */
nav li a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

nav li a:hover::after {
    content: "✦";
    position: absolute;
    top: -0.4em;
    right: -0.6em;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
    opacity: 0;
    animation: sparkle-pop 600ms ease forwards;
}

@keyframes sparkle-pop {
    0% { transform: scale(0.4) rotate(0deg); opacity: 0; }
    40% { transform: scale(1.2) rotate(20deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
}
