Virat Kohli scored an unbeaten 100 in 143 balls, which was just his third Test century in the last five years.