How wellbeing shapes academic success