The vertices of triangle $ABC$ lie on the sides of equilateral triangle $DEF$, as shown. If $CD = 5$, $CE = BD = 3$, and $\angle ACB = 90^\circ$, then find $AE$.