Porphyrin encapsulation in nanostructured hydrogels