Efficient synthetic approach for nanoporous adsorbents capable of pre- and post-combustion CO2 capture and selective gas separation