Solid-state graphene formation via a nickel carbide intermediate phase