Animation doesn't work well when coming back to main page

Hello everyone,

I’ve been rebuilding my portfolio recently and I’m now almost done :slight_smile:
I still have a little issue when navigating from the project page to the main page.
When I click on " About " or " Works " it redirects me to the section as I want, but the navbar color is supposed to be black, but when I arrive there it is white.
I know it’s a conflict due to the fact I have an animation on the navbar because when it’s on the Hero Section it turns white. But the problem is that I dunno how to solve it at all :confused:

Here is a link to the portfolio:

If anyone has some insight on this, it’ll be really helpful.
By the way, be sure to check the website on the published link as it won’t behave the good way in the editor :

Thanks in advance whoever can help :smiley: