nav {
    position: sticky;
    z-index: 5;
}