Carbon precipitation from heavy hydrocarbon fluid in deep planetary interiors