I guess the interesting point of discussion here is "personal inclination". A lot of my female friends have stories about how their parents encouraged their brothers to fix things around the house, get their hands dirty, read manuals, and set up new appliances. They tell me how they were, conversely, encouraged to make friends, maintain relationships, and steered toward more aesthetic pursuits like art, drama, or music.
My sister, at an age when she had no strong interests of her own, was given paintbrushes and nice paper as gifts by our parents but not Legos because they felt like girls were more likely to enjoy aesthetic things than mechanical things. Funny enough, as an adult she has neither mechanical nor aesthetic interests. The question I guess is how much of "personal inclination" is driven by these small decisions of what options we give to kids.
I will say my experiences are colored by the fact that my family is a low-income immigrant family in the US from a culture with definite gender discrimination and so they hold stronger gender prejudices than probably a high-income Scandinavian family. My guess is also that younger generations have grown up with a much better idea of gender equality and will raise their kids with less of this prejudice.
I also observed in my school that a lot of women felt more comfortable in the math department than CS (though CS had much less prestige compared to now), so thanks for your story and background.
The math vs CS dept thing is concerning because at the foundations they're very similar fields. It's such a strange phenomenon that my graph theory elective in the math dept was 30 or 40% female, yet algorithms was 5% female. Definitely at my institution there were structural issues in the CS dept that didn't exist in the math dept.