How much do grades matter for a future academia position?
In the US, at least, and in most fields, no one will look at your grades or care much about them. If they were good enough for your institution to give you a doctorate, they will be good enough for everyone. 

I'm not sure this is universal, and would love to hear of exceptions. Such exceptions might occur in situations that have rigid regulations. Of course, if you are specifically hired to do X and you got terrible grades in X as a student, people might have some problems that need answers.