Bandgap formation and tuning in stimuli-responsive hydrogel-based periodic structures