There are, in fact, three genders, masculine, feminine, and neutral. There are only two sexes, mail and female. Gender is a grammatical category. Sex is a genetic one. A person does not have gender. The word person does.
Finally someone who knows the difference!