Text this: Topological foundations of electromagnetism