Spontaneous fire originating under hood - unknown cause - possibly related to electrical or starting system as vehicle had difficulty starting a few minutes prior to the fire. Smoke began coming out from under hood while at stop light with engine running. Service auto stop start light was on, so was not active. Smoke then began coming into the cabin through air vents as vehicle left intersection, then flames started coming out from hood as vehicle pulled over. Driver egressed as flames spread. Fire department extinguished fire after it had damaged much of the vehicle and completely consumed the front end.