Duality-invariant Einstein-Planck relation and the speed of light at very short wavelengths