I programmed and played video games in high school. I prioritized academics over everything. I sometimes ruined the curve (in some classes because I was actually gifted, in some classes in spite of the fact that I was terrible).
I drank on weekends. I played -- and enjoyed playing -- sports. I hung out with kids who wore football uniforms, with kids who had disgustingly massive gauges, with kids who wore fedoras.
Am I a nerd? I thought so. Other people thought so.
The definition that I like is a nerd is someone who is good at something but lacks social skills. This is in contrast to a geek (excels at something and has social skills), a dork (doesn't excel and has no social skills) and a normie (doesn't excel but has social skills.)
Sometimes I think I am the only nerd who never had a traumatic high school experience. Sure, I never got along with the jocks, but I never really wanted to either. I was perfectly happy hanging out with my nerd friends.