How can I mentor her? Specifically?
This depends on your role at the university. If you are a faculty member then one natural avenue for future mentoring is to offer to supervise this student in the event that she pursues a higher-degree program. It is also possible to offer informal mentoring outside of this, and some academics do so, but it is unusual primarily due to time constraints from busy academics. There is an enormous literature on effective mentoring and it is a frequent topic in business and management literature; to get you started, see e.g., Johannessen et al (2010), Nick et al (2012), Carmel et al (2015) (or for some shorter recent non-academic articles see here, here, here).
As an aside, when mentoring a student, one should always avoid assuming that the student necessarily wants the type of career that you want. Thus, rather than telling this student that she should consider a math major and then postgrad studies, it would be better to just let her know that you feel that she has the capabilities for this pathway if it is something that she is interested in, and let her know that you are happy to discuss this avenue with her if she wants to.
And should I be worried about how individual mentoring might be, by its very nature, biased against the individuals who don't get mentored.
Of course not. Any limited opportunity like dating, mentoring, friendship, playing on a football team, a job, a speaking role at a conference, etc., it necessarily going to be provided to a delimited set of people who are suitable for that opportunity. The fact that others are not offered the opportunity is an inevitable consequence of limited roles and different levels of suitability of candidates; such constraints are not synonymous with "bias".
And (I know this might sound weird) would your suggestion be the same no matter the gender of the student and instructor?
It's not a weird question, and actually, it's quite prudent. One thing you want to be conscious of is that an informal offer of mentoring occurring outside ordinary channels at the university (e.g., formal supervision of a higher-degree student) could potentially look like romantic interest and such interest might be unwanted (or it might not be). Given that the student is female, if you are a heterosexual male then obviously that inference is going to be a possible one, so yes, the gender of the student and instructor could potentially be relevant to how you should act. Here you should just be conscious of the fact that you shouldn't press the mentoring offer too much if the student is not interested, in order to ensure that it does not come across as something else.**
** Or alternatively, if you are romantically interested in this student, just wait until you're no longer her instructor and are not under any other institutional constraints, and then ask her out Romeo.