I'm a fairly advanced guitarist/musician and love improvising, as most of us do. However, when a progression goes out of the main key, such as borrowing or substituting, I tend to get lost in my head. It still sounds good because I'll follow the change with my ear well or I'll use some chromatics or figure out the chord structure to fill the change. But theory-wise and thoughtfully I'm lost if it's not within the main key or a modulation of it (I.e. C Major & C Mixolydian).
So my question is: Can I get some examples with chords, progressions, scales and theory to help me thoughtfully bridge the gap? And don't be afraid to go deep because I have a strong understanding of theory as well as playing skill, it's just the application of both together in certain areas that needs work.