Landlord Served Notice To Vacate After Water Leak. What Are My Options? (md)

It's rather complicated... aren't they all?
So, I've lived in a basement apartment, my landlord lives in the main portion of the house above me, for 5 years. Generally a good relationship; I keep to myself, not loud, etc. In December there was a leak in the bathroom causing me to leave for a week while it was repaired. I hadn't seen any leaks, it was all underground but annual inspection a licensed inspector found some signs. I work from home so instead of my landlord putting me up in a hotel I agreed to discounted rent the following month and stayed at a friend's place with dedicated internet access.
Fast forward to now. Last week they did some work on their kitchen upstairs, I could hear a pipe snake being used... unmistakable sound if you've heard it. Few days later I noticed a musty smell but it's a basement and we had rain not long before so I didn't think much of it. Tuesday of this week, I noticed some dampness on my carpet. This was around 2am... figured I'd text around 9am to let him know. Around 8:15am I get a text asking if I had noticed any water leaks as he was in another part of the basement and noticed water damage. Told him I had noticed at 2am and was planning to text at normal business hours.
Today he served a notice of termination of lease for breaking a clause about keeping the apartment in tidy, sanitary condition. I believe hes using the December stuff as his notice to fix it as he mentioned it when we were face to face talking. Now, I know I can be messy. Throw in some medical issues and yeah, it's not always the best but it's basically a bunch of stuff stored against the walls, not like food sloppily thrown around lol. He's saying the stuff made it so I wasn't aware of the water making it worse than it had to be. Yeah... that's probably right but this was still a leak caused by him. He gave me 7 days to vacate. I've looked it up and state law seems to be 30 or 14 days depending on the interpretation of the reasoning/severity. The notice also said he was keeping my security deposit due to the damage but this was a leak caused my him.
So I guess I want to know a few things. I need to vacate at the least for the leak to be repaired and water damage cleaned up. Ideally I wouldn't have to deal with eviction but leaving for the leak and coming back seems like it would be too awkward at this point. If I fight the eviction, is it worth it to add the extra few days of the notice when I'll be leaving anyway due to the leak? I paid rent for July, can I get the remainder of rent back? Can I fight him keeping the security deposit since the leak is his fault? What's my best course of action here?????
[link] [comments]