Electronic structure, optical and thermoelectric properties of CaMgSi1−xCx (x = 0, 0.5): an ab-initio study