Man dies after falling 40 feet while attempting cliffside selfie