Brighton went back to the top of the Championship thanks to Tomer Hemed's winner against a determined Cardiff.