Inflation, dark energy, and dark matter