It should be noted that the sun's output will gradually increase over the next 5 billion or so years. Earth will remain habitable for only another billion years at most before it is too hot - if nothing is done. In theory, a technique called star lifting could remove much of the helium ash from the sun, lowering its mass and luminosity and greatly extending its life.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Albert Einstein
Albert Einstein