Early civilizations developed along major river valleys, where surplus food allowed for other occupations. Mesopotamia, Egypt, India, and China saw advances in irrigation, farming tools, and trade. Egyptian society stratified into social classes led by pharaohs and nobles. Hammurabi established one of the first legal codes, influencing modern law. Egyptians excelled at architecture, art, and trade under Queen Hatshepsut and Ramses the Great. The Kush civilization in Nubia influenced and was influenced by Egypt over centuries.