Structure and dynamics conspire in the evolution of affinity between intrinsically disordered proteins