Optimisation of photosynthetic carbon gain and within-canopy gradients of associated foliar traits for Amazon forest trees