A Bottom-Up Theory of Public Opinion about Foreign Policy