“Kim has done a pivot where he’s doing a maximum engagement,” Pak said.

Although Moon’s overtures to North Korea and Trump’s pressure campaign have been credited with Kim’s apparently new willingness to talk to the world, it’s also true that the North Korean leader finds himself in a comfortable position. For one, his regime claims North Korea is now a nuclear power, and has written that status into the country’s constitution. Second, though, the statement Kim himself signed onto Friday jointly with the South repeats Kim’s earlier calls for a “nuclear-free Korean peninsula,” which is a significantly more complicated concept than simply the North giving up its nuclear weapons—it also implies limitations on U.S. nuclear-capable forces in South Korea. (The South does not currently have such weapons, but the U.S. has in the past kept tactical nuclear weapons there as a deterrent.) Kim’s reported comments on Sunday, in which he was quoted as asking for “nonaggression” in exchange for denuclearization, leaves similar room for demands the U.S. may find unacceptable, such as abandoning its alliance with South Korea.

Then there is the situation within North Korea itself—as well as its relationship with its neighbors. The country’s human-rights record remains wretched and has not noticeably improved since the younger Kim took power. Kim has cemented his authority by surrounding himself with his loyalists and ordering his rivals killed or assassinated—sometimes, reportedly, by exceptionally gruesome means including with a nerve agent and with an anti-aircraft gun. North Korea continues to evade international sanctions.

Kim says North Korea has developed an intercontinental ballistic missile that could be fitted with a nuclear warhead capable of reaching the contiguous United States. He continues to carry out cyberattacks around the world, possesses chemical and biological weapons, and has vowed to mass produce weapons of mass destruction. Until recently he regularly threatened South Korea, Japan, and the United States while pointedly ignoring China, whose protection has helped ensure his regime’s survival. For all these actions, his country has been subject to increasingly harsh international sanctions.

But he is now getting rewarded, in PR terms if not yet in terms of sanctions, for signaling a willingness to talk. “I think probably that the lesson that he’s learning is that he doesn’t have to give up anything and yet people will be scrambling for summits with him,” Pak said.

As part of his approach, Kim successfully identified fissures between Trump, who has favored a tough approach on North Korea, and Moon, who was elected on a pledge of closer relations with Pyongyang. Additionally, he’s dealing with two relatively new presidents: Trump, who has either three or seven years in office left, and Moon, who has four more years in office.