Sex and gender are two different aspects of humanity. Sex, what is between ones legs, is determined by chromosomes in the first trimester. Gender, what the brain knows, develops in the late second and third trimester and is determined by hormone levels in the mother’s body. Usually they mesh but sometimes they do not. When they don’t the result is a non-binary person. And this is nothing new. There are records from thousands of years ago that mention gender variant people.  Some native cultures had 5 or more gender classifications. It took the rise of western “culture” to cause our marginalization, mainly due to religious beliefs.