Responsive polymeric nanoparticles for controlled drug delivery