First principles of atomic physics