Viewport camera acting weird

Hello, out of the blue my viewport camera started acting kind of insane when it comes to its rotation. I thought i might have accidentally pressed a hotkey i do not know about and this happened but i couldn’t find anything online to reverse this. Take a look please.

CrazyCam_Gif