Like millions of Americans, Barack Obama was struggling to explain the results of last week's election, a New Yorker profile on the president revealed.
Obama campaigned furiously for Hillary Clinton throughout the presidential campaign, and repeatedly painted Republican Donald Trump as bigoted and xenophobic. Much of his legacy depended on a Clinton victory.
But when Trump won the election in a shocking upset, Obama still had some comforting words to say to his daughters.
See photos of Malia and Sasha Obama over the years:
"What I say to them is that people are complicated," Obama told The New Yorker's David Remnick:
"Societies and cultures are really complicated. ... This is not mathematics; this is biology and chemistry. These are living organisms, and it's messy. And your job as a citizen and as a decent human being is to constantly affirm and lift up and fight for treating people with kindness and respect and understanding.
"And you should anticipate that at any given moment there's going to be flare-ups of bigotry that you may have to confront, or may be inside you and you have to vanquish. And it doesn't stop. ... You don't get into a fetal position about it. You don't start worrying about apocalypse. You say, O.K., where are the places where I can push to keep it moving forward."
Trump and Obama seem to have struck a conciliatory tone since Trump's election, at least publicly. The two met privately last week, and Obama said he will continue to counsel Trump throughout the transition of power.
RELATED: Poll - Does Donald Trump appeal to bigotry?
Read the full New Yorker profile here.