Depth distribution of light elements in heavy matrices with charged-particle-induced reactions