Move an element depending on which section is in view

In my fixed Navbar, I have a div with each sections’ title in it. I would like this to be responsive where depending on which section is in view, the section title element within the navbar will correspond.

I have it successfully moving into view but I cannot get it to move back and forth as the user moves between sections


Here is my public share link:
https://updated-portfolio-d9fd97.webflow.io/

https://preview.webflow.com/preview/updated-portfolio-d9fd97?utm_medium=preview_link&utm_source=designer&utm_content=updated-portfolio-d9fd97&preview=f31c9cc7501f16ef2eaf7c1323dede33&workflow=preview