sibert Awesome!
I would appreciate a CodePen or JSFiddle with all the code. Not just HTML and CSS.
When it comes to closing the dropdowns, you code it in an old way so I don't really understand it.
I feel like you complicated yourself a lot by doing that. There are much simpler ways of doing it.
I would suggest you get a look at data-type. Here I build the tabs using that. With this, I also build my portfolio. the mobile version you can check that out here.
The only difference is that I used
portfolioButtons.forEach(button => {
button.addEventListener('click', ()=> {
const targetContent = document.querySelector(button.dataset.contentTarget);
targetContent.classList.toggle('containers-active');
});
});
To understand this concept better I will leave you a tutorial here.