Css animation after closing menu issue

Hi everyone,
I’m trying to create a small menu opening animation for my portfolio, it works when opening the menu but I want it to also happen when I click the close icon.

I googled for this but i couldn’t understand how I can get it to work yet.


Thank you