Photo-and thermo-regulation by photonic crystals for extended longevity of C. elegans