Ontogeny of energy allocation reveals selective pressure promoting risk-taking behaviour in young fish cohorts