As a boy, I was fascinated by science fiction stories called The Foundation Series, written by the late Isaac Asimov, which, in a way, celebrated the spirit of human endeavour.
Set in the far future, they tell of the collapse of an interstellar empire, whose planetary capital was Planet Trantor. But mathematician and social scientist Hari Seldon saw the crash coming, thanks to his study of psychohistory. He set up a Foundation on the remote Terminus planetary system capable of rebuilding civilisation from the ashes of the old. But this First Foundation was overrun by a barbarian invasion.