High-energy nuclear collisions create a new state of hot and dense matter---the quark-gluon plasma (QGP), which then undergoes fast hydrodynamic-like expansion and eventually freezes out to hadrons. The presence of the QGP medium strongly modifies the production yield of quarkonia. Quarkonia, as bound states of heavy- and anti-heavy quark pairs under the strong force, are sensitive to the color screening effects of the QGP medium that induces quarkonia suppression. Furthermore, the dynamics of quarkonia are also intertwined with the transport of unbound heavy quarks, as they can be regenerated from a pair of unbound nearby quarks as the medium cools down. Combining the progress in potential non-relativistic QCD, open quantum system, and partonic transport theory, we developed a consistent theoretical and simulation framework to model the production and in-medium dynamics of heavy quark and quarkonia . The expansion of the QGP medium is described by a well-calibrated 2+1D viscous hydrodynamic model. Quarkonia dissociation and regeneration are coupled to the evolution of unbound heavy quarks, including both elastic collisions and radiative energy loss. We discuss the impact of this coupled evolution on the QGP modifications to the ground and excited states of bottomonia.