Text this: Nonsmooth analysis and geometric methods in deterministic optimal control