Building Planetary Systems: From Star Formation to Exoplanet Demographics