Geometry, topology and mechanics of soft filaments