Pore-scale mechanism for selective permeability reduction by polymer injection