I actually believe it is a Potassium (K) deficiency - leaf tips and margins begin to yellow and then to suffer chlorosis, appears more severe on the bottom of the plant and spreads to the top (you can also look up pictures online "Cannabis Potassium deficiency).
Treat it by increasing or adding a concentrated Potassium fertilizer (usually the "Bloom" or "Grow" fertilizer, high K in the N-P-K ratios). Increase by about 20-30% or add about 1/4 of recommended dosage of the correct fertilizer.
As for the fungus gnats
@The8thChevron mentioned most of the ways to deal with them but also remember to remove any dead/dry/decomposing leaves or any other plant material as soon as possible because that's what mostly attracts fungus gnats, also try adding a few yellow stickers to assess the severity of the gnat situation (personally I'd avoid washing the buds post harvest unless you have noticeable amount of dead gnats on your buds).
Hope this helps! Good luck and happy growing :)