Why did Sega go belly up in the console market?

I love Nintendo, but in a weird Stockholm Syndrome kind of way. My affection for Nintendo exists because I have no vessel in which to pour my adoration for Sega. I grew up a Genesis kid. Mario and his cutesy cohorts didn't entice my edgy 90s kid patronage back in the day. The Sega Genesis felt like the cooler console while admittedly the owner of a weaker soundcard. Sega understood the 90s zeitgeist so perfectly that their mascot eventually became the blueprint- no pun intended- for other anthropomorphic product pushers of the era. Sega seemed untouchable. 

Well, it turns out that Sega was actually quite touchable. By the mid-2000s, Sega's dominance evaporated, and the company capsized on the console front. Now Sega is a third-party developer for(drumroll, please) Nintendo. In the embedded video, Business Insider's YouTube channel explains how Sega went from wining and dining with kings and queens to sleeping in an alley and dining on pork and beans