Light-enabled reversible self-assembly and tunable optical properties of stable hairy nanoparticles