Smart optical nanocomposites enabled by refractive index engineering | Synapse