Theory and application of complex geometric optics in inhomogeneous magnetized plasmas