Easy answer is to give some kind of max-width to .card
The reason this is happening is because of the fact that you've absolutely positioned your element at 50% of it's parent, this will effectively force the .card to be 50% of the parent's width (in this case the parent is the window because the root is NOT a positioned element) because by default it would be 100% (div's are block elements) and so it "natively" wants to take up the remaining 50% of the space... so as you expand the parent that also grows the .card because it will remain as 50% of it's parent width...