Simultaneous coherence enhancement of optical and microwave transitions in solid-state electronic spins