Principles of planetary climate