Facing steep US tariffs and rising Chinese assertiveness, Hanoi has responded with a careful balancing act