Amid hugs, Modi and Obama hammer out deal on nukes—and scold Pakistan