An astrophysical perspective of life. The growth of complexity