Birth of a gas giant