India captain Virat Kohli blazed a magnificent century, but South Africa hold the upper hand after reaching 90/2 in their second innings on a difficult wicket on day three of the second test on Monday.