Even if mankind is lucky with everything else, in 500-800 million years the sun's increased luminosity will render Earth uninhabitable for higher life forms (as we know them) [0].
[0]: https://en.wikipedia.org/wiki/Timeline_of_the_far_future