First-principles study of ultrafast bandgap dynamics in laser-excited $$\alpha$$ α -quartz