Sex is the hardware; gender is the software. Generally, sexual attraction is based on the hardware and generally the hardware and software match. But not always. There are terms for people who are attracted to things other than sex. There is also pansexual.
There are also intersex individuals that don't fall squarely between male/female.
Give it time. You know, Cybill identified as twenty-three different people. Maybe she had 15-23 different genders. Since you can't prove it impossible, it must be true.