Text this: Enhancing the optoelectronic and mechanical response of MgXCl3 (X = Rb, Cl) for advance energy conversion applications