>>280614351iirc(it's been a while though) he's presented very early on as being a student at the anime equivalent of the University of Tokyo, which is the top school in Japan and generally considered an elite school globally.
For additional anime context, it's the same anime school that Light and L go to in Death Note.
It's a quick and easy way for a writer to present a character as 'smart' at the very least.
And while he obviously acts like a goofy idiot most of the time, Kurisu(who is apparently supposed to be the most intelligent, or at least the most accomplished with her publication(s?)) seems to quickly but begrudgingly accept the fact that he is not just some random idiot, but a peer who understands things on a sufficient level to where she can actually treat him as such.
That seems to be the way it is it written. Perhaps they missed the mark in communicating his character given all the confusion.