Phenology and plant defenses: optimizing complex strategies in a dynamic world