Effects of fluctuating temperature and food availability on reproduction and lifespan