Slider with viewport units under a navigation

Here is the codepen:

How can I add extra space to navbar before user click when not apply that >= rule in js?

I have literally know idea what is going on here. :astonished: