Help with personal port (hiding menu with css transitions & JS)

Hello all, I am trying to implement a hide-on-scroll navigation menu with some JS and css transitions. I cannot figure out where I am going wrong exactly. Nav is currently offscreen and does not respond to scroll event. Any point in the right direction would be awesome.

Works fine for me. Navbar hides when scrolling down and shows when scrolling up