First Things First: That Kid Sounds 100% Normal
He sounds like what he is: a millennial 12yo. I wouldn't worry too much about it. :)
- Argues all the time? Check.
- Dumps things where ever he sees fit? Check.
- Does not give a damn about anything? Check.
- Underuses his abilities? Check.
- Normal teenager? Check.
Action Plans
Gamify His Life
Him being a millennial 12yo also gives you the perfect key to his motivation: gamify his life.
It's simple but tried and tested. The only way it doesn't work is if you miss the mark and make it sound patronizing to him.
I'd recommend to go read this cute comic, which explains it better than me:

12yo may be a bit old for this particular tool, but I've been using Habitica with my 4yo and 7yo and it works pretty well:

I've setup their own campaigns and regular tasks to follow and they're pretty happy to do them now. And if they're not done when comes the time to count the points before going to bed, they quickly rush to do them (not ideal, but better than nothing). For their age groups, I use daily tasks for their music practice, brushing their teeth, cleaning up their rooms, negative points for bad habits (leaving things on the floor, not going to bed on time, etc...). I adjust the difficulty of the task for the age.
Sadly Habitica does not have a "parent" account to control the kids' tasks, which I find a bit too bad. It wasn't really intended for this use case, actually, but I use it for this and have recommended it to others who also find it neat to use with their kids.
Habitica may be too simplistic for your son, but that's the general idea anyway. Maybe he'll like it, maybe he'll even get friends to get on it.
Find a way to turn doing what he has to do into a game, or into something that's part of a game and where doing the tasks counts as stepping stones towards a goal.
You mention he's intelligent, but maybe not so interested in some topics. Maybe he needs to picks the topics.
Have you tried to get him to take a look at Khan Academy? He could look at topics he finds interesting in there, and also use the platform to improve in other topics where he as difficulties.
I've also been using this for 2 years now with my 7yo. For basic things, and he obviously needed a lot of chaperoning at first (especially when he didn't know how to read), but his interest hasn't waned and I expect it will last for quite some time.
He can have his own account, and you can also review his activities with a parent account.
By the way, Khan Academy also has a bunch of helpful resources, notably documentation on:
Your Long-Term Objectives
In the long-term, what you want to do is to improve on a few fronts (not necessarily on all of them at once):
Expand His Horizons
Maybe restrictions don't work and school work does not interest him because he has not found yet what really motivates him. Try to expand his horizons.
Drag him out of the house - possibly giving him a choice of different things to choose from, so he's part of the process and does not feel like he's being actually "dragged" - and actively try to discover stuff he's not used to.
Our interests change over time. Maybe he used to like something, but now seeks totally different things.
Entertainment, culture, travels, shopping... whatever works.
On Restrictions
What do you currently do to restrict the late-night activity and TV time?
I'm generally against timers and parental controls, actually, but surely if you unplug the TV and internet box (or at least shut down the wifi), and his smartphone does not have either data or even mobile network connectivity after 9 or 10pm (see with the carrier), and the computers are turned off, then he won't have much to do except for picking up a book.
Lead By Example
I don't know you so I'm not saying you don't. But I've often notice that parents expect their kids to do things they don't do themselves. And while the defense of "but I'm a grown up and have stuff to do, and I know better" might be valid, oftentimes it's only a justification.
Turn off your phone and computer. Do your chores. Go to bed on time. Maybe don't have the same limits, but be sure he sees you also have your limits and you stick by them.
On Social Aptitudes
Relationship to Authority
His habit of arguments and attitude toward leadership makes him seem aloof.
Arguing is a good thing, if you have reasons to do it. And generally we do have reasons, even if they are misguided ones. Knowing when to drop it is good as well though, but that's a lot to ask from someone if they feel misunderstood.
I'd recommend to take a step back and put yourself in his shoes: ask yourself whether he has a reason for arguing and challenging authority. More often than not, kids have a reason. We just don't see or don't want to see it.
A side note, and maybe I read too much into this and it's just a terminology thing: It's interesting that you use the word "leadership". I've not heard this term used often when dealing with kids actually ("authority", "parental figures", is more commonly used). At 12yo, I wouldn't expect that the kid needs "leadership". He needs a framework, some guidance, and a safe and comfortable support group. He does not need to be led. Again, maybe I read too much into this.
Relationship with Peers
He doesn't adjust in any group.
That's more problematic in my opinion. What groups has he tried to get involved with? Any sports? Any music groups? Friends?
Surely a 12yo has friends of sort. They can be friends at school, friends from another activity, friends he sees only on week-ends, neighbors he spends time with, or even online friends.
There must be at least some people he likes to interact with in one way or another, whether analog or digital. Find it and figure out why it works with that group and what appeals to him.
If he does not have any groups of friends, then it's time to find activities and try to get him to make some friends.
His things are scattered in home.
Several ways to approach this:
- His room, his rules. Common areas, common rules.
- Pick up your things or lose them - temporarily or permanently (extreme, but generally effective).
- Make him understand what it would feel like if everybody left their things everywhere, including his room.
On School Work and Marks
On questioning it's clear that he understands the topic.
Does he really, though?
It's really easy to:
- think you understood something when you didn't,
- have someone think you understood something when you didn't,
- think someone understood something when they didn't.
The best way to check that a topic is fully understood and mastered is to teach it to someone else.
I was a lousy kid at school. Wasn't stupid, was quite interested in most topics, and for all accounts all my teachers thought I was a serious student trying his best when I really wasn't (I apparently just manage to look very focused and serious when I'm in fact 2 light years away), and hard-working enough to bolt down and pass when needed. But I learned quickly that I was kidding myself when I was thinking that I understood the topics.
Starting having to teach others made me a lot more understanding of my lack of understanding.
Get him to do his homework with other groups of teens, and find a tutor, even if only to roll the ball with him. If a neighbor has a younger kid, have your son tutor him so he's in the other role as well.
Talk
Have a heartfelt one-to-one with him in a casual setup (say, over dinner, or after watching a movie, when the mood is light). Don't ambush him, don't patronize him, don't express concerns. Show genuine interest.
Ask him what he would like to be doing right now, and what he wants to be doing later.
Ask him why he thinks he's not doing well in school.
Ask him why he stays up late.
Ask him if he thinks he spends too much time in front of the TV or computer.
Ask him why he thinks he spends so much time on front of the TV.
Then work it out with him. While you can gamify some of his life and use hidden levers, it's better if it's his plan as much as yours.
Food for Thought
Your question actually gives us very little context and insight to answer properly and in a way adapted to you and your kid. We don't know:
- your social and financial situation,
- the context of your family circle,
- his grade,
- his current extra-curricular activities (sports, centers of interests, time spent with out per week...),
- your expectations and the current metrics, like these relating to:
- appropriate bed-time,
- appropriate screen-time,
- appropriate scores.
We can only assume from what you gave us. For all I know, he goes to bed at 10pm, scores decent B+, and plays 1 hour of video games per day. Nothing perfect, but nothing that'd be troublesome for my expectations. We need to know what's the context, what's happening, and what you expect.
Helpful References
Not sure whether any of these are "industry standards" or anything, but I found them interesting and worth reading to pick and choose bits you like: