Early Japan consisted of isolated farming villages along the coasts. The Yayoi culture introduced rice farming and metalworking between 300 BC and AD 300. Society was organized into clans led by warrior chiefs. In AD 500, the Yamato clan brought Japan under its rule, establishing an imperial line. Prince Shotoku introduced reforms in AD 600 based on Chinese Confucian ideals, including a constitution and bureaucracy. Japan developed its own unique culture and the Shinto religion, believing natural spirits called kami inhabited all things.