Resilience buffers the effects of sleep problems on the trajectory of suicidal ideation from adolescence through young adulthood.