The literary genius who challenged apartheid