Observations of the cosmic microwave background (CMB) have played an essential role in shaping our understanding of the history, evolution, and contents of the universe. CMB surveys planned over the next decade, including those with Simons Observatory and CMB-S4, will map the microwave sky with unprecedented precision. I will discuss how these forthcoming observations will provide characteristically new insights into particle physics, cosmology, and astrophysics, focusing especially on probes of dark sector physics enabled by CMB observations. Maximizing the scientific value of future data will require new analysis tools and techniques. Using gravitational lensing as an example, I will show how subtle effects imprinted on the CMB by cosmic structure lead to new challenges and new opportunities for upcoming surveys. I will describe tools developed to address these challenges and to make the most of the exciting opportunities provided by future CMB observations.