Just before 1am on Tuesday, July 24, as hurricane-force winds from Typhoon Vicente cut a swathe of destruction through Hong Kong, Chan Yun-cheung's mobile phone rang.
He jolted awake to answer the call. It was the Hong Kong Observatory - which had hoisted typhoon signal No 10 at 12.45am - updating Chan, 59, on the tropical storm's path and the rainfall predictions.
Moments later, Chan made a decision that would affect every person living in the city.
Chan, as head of the Geotechnical Engineering Office (GEO) based in Ho Man Tin, decides if a landslide warning will be issued. And at 1am that evening, he raised the alarm.
As torrential rains battered the city - marking the first time the No 10 signal was hoisted since Typhoon York in 1999 and the 14th since 1946 - dozens of people were injured, hundreds of flights were cancelled or delayed, thousands of trees were uprooted and land transport was brought to a standstill.
In ensuing days, as the city cleaned up, many complained about having to sleep in the MTR overnight after trees had fallen over tracks, among other horror stories.
But as the rain and winds subsided and people returned to work, one fact remained: no one had died.
This is thanks in part to the efforts of the GEO, which has reduced the risk of deadly landslides like those brought by typhoons and heavy rainstorms in previous decades.
Chan says that once the landslide warning is activated, a team of eight to 10 staff monitor the situation at an emergency control centre.
'They are ready to go out to inspect landslides with the highways, water supplies, lands or drainage departments - whoever it might be - and see what needs to be done, and to stop people from getting hurt.'
Having detailed and accurate data from the Observatory has made Chan's job much easier, he says, compared to when the warning was first introduced in 1984. 'In those days, we didn't have the radar or satellite pictures. Now it's much easier to discuss the warning.'
The alarm is activated when the number of possible landslides hits 15. This is calculated by the rain that has already fallen, the predicted rainfall and the number of man-made slopes covered by the rainfall.
During the most recent typhoon, geotechnical engineers predicted 100 landslides. Just 27 occurred with no fatalities.
The number of deaths from landslides has been 20 times lower over the past 30 years, as the population grew by 40 per cent.
This dramatic drop has been credited to the work of the GEO, which was established as a unit of the Civil Engineering and Development Department in 1977, five years after a series of fatal landslides that were triggered by rainstorms, and a year after Tropical Storm Ellen left scores of people dead.
Since its founding, the office has spent HK$15.5 billion on slope stabilisation works and it now has about 750 staff, of which 200 are engineers.
The office's first priority was to upgrade high-risk man-made slopes in developed areas and near major transport corridors. Many slopes near hospitals, schools and public housing areas were fixed.
Between 1979 and 1985, every piece of land in Hong Kong underwent a geotechnical area study which resulted in a ranking of how suitable each area was for development.
Today, every slope in Hong Kong is checked each year, with a professional assessment every five years.
A turning point for the GEO was in 1994, when a tragic landslide at Kwun Lung Lau in Kennedy Town killed five people and prompted a Legislative Council inquiry.
The investigation found that a retaining wall which was meant to be four metres thick was just 75cm thick, causing the wall to collapse during the downpour and leaving five victims buried under tonnes of mud.
'This was a hard lesson learned because as we conducted the investigation, we realised there were ample signs of a potential landslide,' such as water seepage and slope degradation, Chan said.
'People were not aware of the danger. And when the rainfall intensity subsided a little bit, people started walking out to eat and it was then that the landslide occurred, and it really hurt.'
The same year of the Kennedy Town tragedy, work began on a comprehensive catalogue of the city's slopes and by 1998, the database was complete with about 50,000 slopes in its register. Currently, it holds information about the city's 60,000 man-made slopes, of which one third are privately owned, while the remainder belong to various government departments.
The office's work includes preventing landslide risk in new developments, reducing risk in existing developments and educating the public. Between 1977 and 2010, about 4,600 man-made slopes were upgraded under the landslip prevention and mitigation programme, with substandard inclines stabilised with soil nails or retaining walls.
Jim Chi-yung, a professor of geography at the University of Hong Kong, said such use of synthetic materials meant more accurate risk assessments.
'Our city is so close to nature that if something happens in nature, it affects people and property. Some people may not be happy about the transformation of greenery into concrete but it's difficult to calculate the strength of tree roots gripping soil,' he said.
During the wet season, which typically runs from May to September, the risk of landslides increases, especially if a rainstorm or typhoon happens over areas with man-made slopes or natural hillsides.
But since there have been fewer and fewer major landslides in recent years, Chan says Hongkongers have become less vigilant. Even with strong fortifications in the city, there are still some risks.
'There are fewer eye-catching landslides - that is to say they are not happening so much over roads or causing buildings to be evacuated,' the GEO chief said.
'But with climate change, we have evidence that the rainfall has been increasing and is more erratic. There may be dry periods for longer [periods], but then the rain that falls can be so excessive that it can give you a nasty time. So we've got to prepare people for this.
'We should not let people think the system is perfectly safe because there will always be landslides. And especially when we are dealing with Mother Nature, there is immense room for surprises, so the last thing we want is for people to be complacent.'
Chan links this sense of complacency to the fact that landslide risk from existing slopes has dropped to one-quarter of what it was in 1977, when the GEO stepped in.
'We have somehow established a name in this profession and people dealing with slope safety issues,' he said. Government engineers from Taiwan, Malaysia and South Korea visit the office to learn about the city's slope management system.
'But we are not doing things for the sake of being at the forefront. We are doing things to make the best use of the resources available,' Chan added.
Chi-yung, the professor, mirrored Chan's concerns about complacency. 'With the most recent [typhoon], there were a few injuries but no casualties, so we have done a lot to prevent disasters affecting people.
'Compared with many other cities, where the impact of natural disasters causes fatalities, we manage to keep it very low in Hong Kong.'
However, he adds: 'We have to remind people that some decades ago, people were very worried about rainstorms and typhoons. Those worries have now been alleviated ... but landslides can kill a lot of people if it happens in the wrong place, especially in Hong Kong where it's high density [in terms of population].'
The year of the Sichuan quake, which caused 15,000 landslides that killed over 20,000 people, according to the US Geological Survey