The issue is that they are not clickable. This is because on HTML line 208 I have my project cards. These project cards are images with a element overlay. When the user hovers over the image, the overlay appears.
The issue now is that changing the display from none to flex on hover is not a linear transition. It instantly changed from 0 opacity to 0.8, ignoring my hover animation duration.
How can I fix this issue? Can I still keep the desc just below the card before hover and create a smooth transition?
If I understand you correctly it sounds like the overlay should just be positioned relative to their parent container element (i.e. set .project-card to have position: relative ).
As lasjorg said, you need a relative position on the parent. Check this guide from MDN Positioning - Learn web development | MDN
It helped me a lot to understand positioning.
Static positioning is the default that every element gets. It just means “put the element into its normal position in the document flow — nothing special to see here.”
Linked MDN article
So defining the project-card as a relative container takes it out of the normal flow but still keeps its position. This turns the project card into the new containing block, instead of the html as the initial containing block. Since is relative, its out of the normal flow but still keeps its same position.
A absolute value on the overlay sends the overlay to the top of the containing block, out of normal document flow. The html was the initial containing block, but this was replaced with the project card container. As a result, the overlay then goes to the top of the project card container. This overlaps it within the normal flow image, creating a image overlay.