how does the brightness/luminosity change throughout the cycle of a massive star?​