system
Given the following post, respond as if you're commenting on Reddit:
human
How did the early solar system sort itself out?

Why did the lightest gas, hydrogen, migrate to the center of the “dust cloud?”  Why are the rocky planets and the asteroids next, then more gases to form the gas giant planets?  It seems the original disc/cloud was complex, so how did it sort?  Was it homogeneous initially?
gpt
Yes, you start with basically a homogeneous cloud, which is mostly hydrogen, followed by helium, and then a sprinkling of everything else.  

This composition is what you then get for the Sun, in the center.  This composition is also what you start with everywhere else in the cloud.

The cloud has heated up as it has collapsed into a disk, and the center will collapse all the way into making a star, so that will become very hot indeed, but the farther out you look from the center, the more things will be cooling down.  Heavier more refractory substances (rocks and metals) will be the first things to be able to coalesce and freeze out--if you're in the inner solar system, the temperature will drop below the vaporization point of, say, iron oxide, while still being above the vaporization point of, say, ice, so you can get solid particles of rocky stuff forming, but not of ices.

At any given point of time, you can draw a line in the disk and say "inside this line, it is too hot for anything solid to form, but outside this line, it is cold enough for rocks and metals to solidify," and call this the rock/metal line.  Similarly, you can draw another line farther out and say "inside this line it is too hot for ices to form, but outside this line, they can," and call this the frost line.  Between these two lines, solid planets can form.  Outside this line, not only can solid planets form, they will be much bigger, because they can form from not only the rarer rocks but the much more plentiful ices.

Now, at all of these places, you still have the full mix of elements--about 75% hydrogen by mass, 25% helium by mass, a sprinkling of heavier atoms--but in the very center they're all gases, in the middle zone, the rocks are solid, and in the outer zone the rocks and ices are solid while hydrogen and helium are still gases.  The planets grab onto atmospheres made of whatever gases are nearby; the bigger they are, the more atmosphere, so the outer ones grab much bigger atmospheres.

Now the Sun kicks in with an early phase of intense solar wind and blasts all the loose gases out of the solar system.  The inner rocky planets are too small to hold on to anything and are stripped down to bare rock.  The outer rock+ice planets are big enough and far away enough that they hold on to their atmospheres, which are huge, so that rocks and ice are hidden deep away inside and all we see are those atmospheres. Jupiter is still basically the same mix of elements as the Sun and the original cloud, but Earth is now very different.