Theoretical and experimental study of foam stability mechanism by nanoparticles: Interfacial, bulk, and porous media behavior