We use fossil fuels because they are dispatchable. To make solar (average generation 12 hours per day, and peak a lot less due to sun angle)and wind (only when it blows) work you need cheap and EFFICIENT storage, plus you have to overbuild the renewable generation for excess to pump the storage.
I wish I could remember the author, to give credit, but he/she suggested a billion dollar prize for the developer of a storage method that would meet a number of criteria safe, efficient,etc. That will make renewables replace fossil. Then we can use the coal, petroleum and natural gas for chemical feedstocks. By the way I am a retired Petroleum Engineer and even I do not think that fossil is a good idea for electric generation, I think that the thorium reactors are the way to go, until someone can make fusion or storage work. I tried to get my Mechanical Engineer son to go into this field, but he wanted to build subs for the Navy. Oh well, I tried.