At the start of the 21st century, the Shanxi mountain village of Hougou seemed destined to waste away like so many rural hamlets on the mainland. It had few mineral resources to speak of, and farm harvests were usually poor because it lacked other water sources to supplement the region's scant rainfall. Villagers still lived in yaodong, the traditional cave dwellings common in northwest China, and the annual per capita income was just 400 yuan (HK$453). Not surprisingly, many young people, Zhang Zhifang among them, left to find a better life in the cities.
'At that time, our entire family of five earned about 2,000 yuan a year,' recalls Zhang, who went to work in the provincial capital, Taiyuan, eight years ago. 'I made that sum as a waitress in three months.'
Hougou's fortunes have now been revived thanks to a previously untapped resource: its rich cultural heritage. Although some yaodong are little more than hovels, Hougou has some of the mainland's most sophisticated cave dwellings.
'The architecture in this village is unique,' says TV producer Fan Yu, who first visited Hougou in 2004 to make a documentary about its cave dwellings. He was so captivated by Hougou that he spent four years working on a book about the village's cultural heritage, An Ancient Village Sealed Off by the Dust.
Fan says the village is at least 700 years old and its most splendid cave dwellings are the legacy of ancestors who made their fortunes by trading tea, silk and salt, and those who became important officials after passing imperial exams. 'When these wealthy forefathers returned home, they wanted to build grand homes with intricate brickwork and wooden carvings they had seen elsewhere. However, they still had a strong attachment to cave dwellings. The result was a combination of cave dwellings and traditional courtyard houses,' he says.
These affluent ancestors also left other architectural treasures. Besides a number of Buddhist, Taoist and Confucian temples, there is also a shrine honouring the Dragon King, the deity said to control rainfall, and an opera stage decorated with exquisite wooden carving and murals (above right). A cave temple dedicated to the Zhang clan points to the influence of the family, which is said to have first settled in Hougou. More than half of the 250 villagers share the family name.
But Fan says these and other historical structures in Hougou would probably have crumbled from neglect if it hadn't been for the efforts of one man: Feng Jicai, a prominent novelist known for his passion for folk art and history.
Feng stumbled on the village in 2002 and was so impressed by its beautiful architecture that he persuaded the authorities to include it on a register of restoration projects for cultural relics at risk. The government provided funds to pave Hougou's roads and restore its monuments, and the village was promoted as a tourist destination in 2005 under a programme to boost rural tourism.
Zhang returned to become one of her village's first tour guides. 'As a child, I only knew our village as poor and backward. We used to climb to the top of the temples to play and thought nothing of it. Now, I am rather proud of our village,' she says.
The 25-year-old now shares a modest yaodong with her new husband and parents-in-law.
A table and TV set occupy the front of her tidy bedroom and in the back, under an arched alcove that is characteristic of cave homes, is the kang, a hollow bed that can be heated in winter.
Their yaodong lacks running water and the toilet is a makeshift structure dug into the courtyard. Nevertheless, Zhang says she sleeps more soundly in her cave home than she ever did in the city. 'I don't know why, but I never feel comfortable living in an ordinary flat,' Zhang says.
Fan says there's more to her preference than habit or nostalgia. Well-insulated from the extreme climate on the loess plateau, cave dwellings are warm in the winter and cool in the summer. 'It makes sense,' the filmmaker says.
The soft loess is easy to dig into, so such homes are cheap and easy to build. That's why although urban Chinese aspire to stylish flats, about 40 million people still live in cave homes in the rural northwest, one of the poorest parts of the mainland.
Typically, arched openings are dug into a south-facing slope to form the rooms, before a brick building, sometimes featuring elaborate eaves and decoration, is erected to close the front.
Most homes feature a shrine to the earth deity, a brick altar decorated with carvings of lotus, chrysanthemum and auspicious animals such as bats. The central cave forms the living room and kitchen and side caves generally serve as sleeping quarters, with a traditional courtyard in the front formed by a wall built around the entire set-up.
'People always ask me how our village can stay so traditional and picturesque. I always give them one word - poverty,' says village chief Zhang Chungui. 'We didn't have money to build modern houses. It's as simple as that.'
Still, the village chief likes to remind visitors of an historic role for cave dwellings in the history of modern China: Mao Zedong built up his communist forces in a humble cave home nearby. But Mao is long dead, and the market economy rules people's lives.
To cash in on increasingly popular rustic tours, many villagers have opened their homes to visitors, offering food and accommodation. The idea - to experience village life, eat fresh country food and sleep on a warm kang - seems to appeal. According to the village ticket office, nearly 1 million people visited Hougou last year, bringing average annual income to more than 5,000 yuan.
Li Min is among the visitors from Taiyuan, a three-hour bus ride from the village. 'My life in the city is so busy and stressful,' he says. 'I came here to relax and enjoy the rural scenery and learn a bit [of] history.'
For the moment, most visitors are day trippers. Overnighters tend to be travellers from further afield or artists seeking inspiration. There's little to do after dark in Hougou, which lacks the karaoke parlours and bars popular with mainland visitors.
And that's the way Zhang Chungui intends to keep it. 'We can't have karaoke or modern hotels or houses,' he says. 'We have clear instructions: to develop tourism alongside folk culture.'
Fan expects more people will move out of cave dwellings as the mainland modernises and becomes more affluent, but in Hougou they are set to stay.