Moving in complex environments: a biomechanical analysis of locomotion on inclined and narrow substrates