Speaking as a regular diver, not an instructor or tech diver of any sort, a couple of things stood out to me.
10 minutes after water entry, the DM gives the descend sign. SPG at 180/ 190 bars for everyone
I'm not going to go into detailed discussions about gas usage, 12 liters at 210 bar (with a buddy) is clearly enough for a trip to 40m and back safely in good conditions. However, that's assuming you get to that depth with nearly all your gas. I would never leave for 40m just to look around after 10 minutes at 20m.
You always need to be willing to modify your plan to accommodate the realities of the dive. With 180 bar left, this would have become a 30m max dive for me.
...I am surprised when my computer alerts me that I am approaching 40 meters
This is frightening and should have you second guessing the entire dive if not your entire training.
Never rely on computer alerts for vital information, you'll be surprised how often you miss them. You should know your approximate depth at all times, and you should be checking religiously when playing with the limits of depth, NDL time, and gas remaining.
No Nitrogen narcosis
Yes there was. It's physiologically impossible for there not to have been. Nitrogen narcosis for most people doesn't equal euphoria, much more common is a narrowing of perception and a general decrease in mental skills.
40 is the saint barrier. The ultimate psychological goal.
This is just silly. 40 is just a number. Look at in in my local number to see how silly this is: 131.234 feet.
There might be a legitimate reason to go there, but fixating on the number itself is irrational. I am using the term "fixating" deliberately, because of the decision to go there instead of something more shallow after the overly long initial descent.
computers start beeping: 1 minutes to NDL. WTF!
Again, the only WTF here is why you weren't monitoring your NDL time at this depth. You are quite lucky that narcosis didn't interfere with your ability to understand that the alarm meant you needed to look at your watch.
I'm not going to address the ascent, it was more or less reasonable given the conditions you encountered. But IMO, you really need to spend time (in shallower water) practicing estimating and confirming your current depth, NDL and gas remaining. And you need to realize the danger of target fixation. These are rec dives, you need to be willing to modify your plan (or fall back on a secondary plan) if conditions aren't exactly what you foresaw.