Ancient light illuminates matter that fuels galaxy formation