@ktemkin Well, please don't give up. What you describe is somebody being a jerk. There's nothing else to say. Sorry for that.
I find it always very strange when people make an argument that women are avoiding STEM professions for some biological reasons as if it always used to be the case. That is certainly BS. Let me tell a story.
In some parts of Europe (at least some communist countries I have a 1st hand experience with) around the end of 60s and 70s, actually the majority of students of electrotechnics were women. Why that was the case, I don't know exactly, but that's how it was. Only much later in 80s and 90s the balance went more to male students and finally this is the generation which is "running the show" today. The generation of those women who were back then in majority studying CS and related fields is now retiring, so the are becoming invisible. But until recently, those who stayed in the field, they often held relatively senior positions, as far as I noticed mostly in government institutions. So they were not the captains of businesses, yet many of them were quite visible. You can still walk into mathematics/physics/cs departments of some major universities there and find a non-trivial number of women professors - although by now they are outnumbered by the younger generation of men. Just anecdotally, in mid-90s the head of the University sysadmin team who boldly gave me my first e-mail account (I was not a student there back then, but was bold enough to ask for it) was a lady.
So it's not true that women were historically always out of STEM professions or are not "suited" for it. That's all BS. It just happened to be so in the last few decades, but there's not reason for it not to eventually flip once again.
Good luck there!