Recent advances on the recovery of oil and gas from shale and tight reservoirs have put in focus the need for a better understanding of the behavior of fluids under confinement. Confinement effects must be considered when the pore size is on the order of a few nanometers. Pores of such a small scale are abundant in shale and tight reservoirs, justifying the unique properties and characteristics observed in fluids of such reservoirs. Furthermore, the development of techniques for geological carbon reinjection and storage makes the understanding essential of how CO2 interacts with the reservoir medium and its fluids. In this work, we use molecular dynamics simulations to predict the behavior of n-alkanes and CO2 mixtures confined by calcite slit nanopores. We observe that CO2 displaces the hydrocarbons adsorbed on the calcite surface, while the number of calcium sites controls the amount of CO2 adsorbed on the pore surface. This suggests that the reinjection of CO2 in tight oil and gas reservoirs may help e...