Diffraction-limited optical focusing with arbitrarily oriented magnetic field