Some very sound advice here so far. My two-penneth worth is that that you should have at least 2 bikes…
My theory is around the classic 80/20 rule, in that you can ride 80% of stuff with 20% of capability/kit etc. etc. I know people will say you can ride anything on anything, but we don’t all have the necessary skill/confidence and so on, besides it is fun to get out on the old skills compensator now and again for some full on hooning.
Anyway, my point is, get a nice bike taking in the advice here as well as thinking about what appeals to you and what your aspirational riding style is, but only use it when you *need* it – big days out, trail centres etc. Try avoid using it through the winter when it’s going to get the most wear.
Secondly, get a basic (not cheap, they end up expensive) hardtail bike with fewer parts. Stuff that’s proven to last but might not be the lightest/latest/blingest. I’m thinking a second hand pair of Hope mini’s or maybe BB7’s. Simplify the drive train – e.g. singlespeed or if that doesn’t take your fancy 1×9 (maybe 1×8) so at least you can run a good stainless front ring. I like Hope hubs for their servicability, others will recommend Shimano XT etc, but as long as it’s well built kit that you can service easily/cheaply then you’re on to a winnner. Think about running some rigid forks, or maybe some lower end Rock Shox, and learn to do the interim servicing yourself. Get a square taper crank set with a Shimano UN54 BB – it’ll last an age. Use this bike most of the time, all through the winter and any time you don’t *need* your ‘proper’ bike. Make sure you get it set up right for you so it’s a nice bike in itself. Maintain it well, clean it, learn to do stuff yourself and get the appropriate tools.
The best bit of it all is, when you do decide to take your best bike out, you’ll really appreciate it!