3D porous polymers for selective removal of CO2 and H2 storage: experimental and computational studies