Dynamic pH control for selective CO2 carbonation and tunable CaCO3 formation from multi-ion solutions