Vietnamese merchants (Yuon) in Angkor. Chinese writers, Song Hao, Fan Chengda and Zhou Qufei, both reported that the inhabitants of Đại Việt "tattooed their foreheads, crossed feet, black teeth, bare feet and blacken clothing." The early 11th century Cham inscription of Chiên Đàn, My Son, erected by king of Champa Harivarman IV (r. 1074–1080), mentions that he had offered Khmer (Kmīra/Kmir) and Viet (Yvan) prisoners as slaves to various local gods and temples of the citadel of Tralauṅ Svon. Successive Vietnamese royal families from the Đinh, Early Lê, Lý dynasties and (Hoa)/Chinese ancestry Trần and Hồ dynasties ruled the kingdom peacefully from 968 to 1407. Emperor Lý Thái Tổ (r. 1009–1028) relocated the Vietnamese capital from Hoa Lư to Đại La, the center of the Red River Delta in 1010. They practiced elitist marriage alliances between clans and nobles in the country. Mahayana Buddhism became state religion, Vietnamese music instruments, dancing and religious worshipping were influenced by both Cham, Indian and Chinese styles, while Confucianism slowly gained attention and influence. The earliest surviving corpus and text in Vietnamese language dated early 12th century, and surviving Chữ Nôm script inscriptions dated early 13th century, showcasing enormous influences of Chinese culture among the early Vietnamese elites. The Mongol Yuan dynasty unsuccessfully invaded Đại Việt in the 1250s and 1280s, though they sacked Hanoi. The Ming dynasty of China conquered Đại Việt in 1406, brought the Vietnamese under Chinese rule for 20 years, before they were driven out by Vietnamese leader Lê Lợi. The fourth grandson of Lê Lợi, Emperor Lê Thánh Tông (r. 1460–1497), is considered one of the greatest monarchs in Vietnamese history. His reign is recognized for the extensive administrative, military, education, and fiscal reforms he instituted, and a cultural revolution that replaced the old traditional aristocracy with a generation of literati scholars, adopted Confucianism, and transformed a Đại Việt from a Southeast Asian style polity to a bureaucratic state, and flourished. Thánh Tông's forces, armed with gunpowder weapons, overwhelmed the long-term rival Champa in 1471, then launched an unsuccessful invasion against the Laotian and Lan Na kingdoms in the 1480s. 16th century – Modern period With the death of Thánh Tông in 1497, the Đại Việt kingdom swiftly declined. Climate extremes, failing crops, regionalism and factionism tore the Vietnamese apart. From 1533 to 1790s, four powerful Vietnamese families: Mạc, Lê, Trịnh and Nguyễn, each ruled on their own domains.