A 3D molecular cantilever based on interfacial self-assembly and the cobra-like actuation of long-chain imidazolium ionic liquids.