Mechanically adaptive nanocomposites for neural interfacing