@media only screen and (max-width:766px) {
    nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        clear: left;
        align-items: center;
    }

    ul#navlinks {
        font-size: 2em;
        display: block;
        text-align: center;
    }

    nav li {
        display: block;
        margin-top: 20px;
        margin-bottom: 20px;
    }
}