Image copyright Maggie's Centres Image caption Charles Jencks pictured with his late wife Maggie - both founders of Maggie's Centres

Two minutes after Charles Jencks and his wife, Maggie, were told her cancer had returned and she had months to live, the couple found themselves in a dark hospital corridor.

They were both remarkable people, highly intellectual and had travelled the world lecturing on architecture and history.

But neither could comprehend why, in 1993, they were trapped on a busy thoroughfare while they sifted through insurmountable grief.

The experience prompted Maggie to draw up plans for a new form of cancer care centre - a facility where patients could rest and be comforted in beautiful surroundings, which Charles went on to establish and grow in his wife's memory.

On Sunday, Charles died, aged 80, at his London home - 24 years after the first Maggie's Centre opened in Scotland.

Image copyright Getty Images Image caption Charles Jencks was a leading thinker in post-modern architecture

Born in Baltimore, Maryland, Charles studied English literature and architecture at Harvard University.

He published more than 30 books, lectured at over 40 universities around the world and was a leading thinker in post-modern architecture.

But the course of his career changed the day he crossed paths with Dumfries-born student Maggie Keswick at the Architectural Association in London.

Image copyright Maggie's Centres Image caption Maggie Keswick laid out plans for the charity before her death in 1995

They formed a "highly creative partnership", writes Marcia Blakenham - a founding trustee of Maggie's Centres.

She said: "They travelled exhaustively, looking at buildings old and new, meeting architects, academics and friends, giving lectures, going to conferences and always, everywhere, talking and discussing, arguing and laughing."

After they married, they developed one of the most notable landscape projects in Scotland in their own back garden in Holywood, near Dumfries - they called it the Garden of Cosmic Speculation.

Image copyright John Jencks Image caption The design of the garden breaks with English tradition - and looks very deliberately man-made

Open to the public once a year through Scotland's Gardens Scheme, the work includes an intricate system of lakes and causeways designed by Maggie and a 55ft double-helix shaped mountain of grass designed by Charles.

Ms Blakenham noted: "In a complete break with the English tradition of romantic landscape, these shapes are uncompromisingly man-made, closer in spirit to Neolithic tumuli than to Capability Brown or Repton."

It was this human touch that Charles ensured permeated the unique design of every Maggie's facility, after the couple founded the charity in 1995 - the same year Maggie died.

'The architecture lifts you up'

Each one was a distinctive work of art, filled with natural light and comfortable furnishings.

Charles selected some of the most notable architects in the world to design his buildings, the first of which opened in Edinburgh.

On one occasion he told the BBC: "People said it was like getting an Oscar, getting a commission from Maggie's."

Image copyright Getty Images Image caption Maggie's Dundee, designed by world-famous architect Frank Gehry

Image copyright Getty Images Image caption Built in 2013, Maggie's Aberdeen takes on the calming shape of a pebble

Image copyright Getty Images Image caption The gardens are currently being developed at Maggie's Inverness, which opened in 2005

During the construction of the Maggie's Centre in Manchester, Charles called it a "flying, wooden aeroplane trellis".

He said: "The way the diamond lights come in, it spills views and light everywhere. Light is inspiring and you need uplift because Monday, Wednesday and Friday you're depressed - we lift you up Tuesday, Thursday and Saturday.

"It's a hybrid building by nature - it's a church that's not religious, it's got art in it but it's not a museum, a house but it's not a home.

"When you have cancer your ego is bashed, your body is bashed, you are enervated, you have no energy, you are suffering, you are crushed and the architecture lifts you up."

There are now 26 Maggie's Centres in Scotland, England and Wales and a further three in Barcelona, Hong Kong and Tokyo.

Many have won awards for their designs and have been collectively called the "architecture of hope" by a leading design charity.

Every Maggie's runs support programmes from nutrition and wig-fitting to bereavement counselling and tai chi.

Image copyright Getty Images Image caption The Duchess of Cornwall was given a lesson in scarf-tying at a Maggie's Centre

Their function was to meet the needs of patients and their families that the NHS could not.

Speaking about the NHS in 2015, Charles said: "Their primary role is primary therapy.

"But they aren't good with all the other things - like where you get a loan, how you face your boss if you have cancer, where you buy a wig, how you look good and feel better.

"Our role is all the secondary things - that's why we're a world movement, that's why we're so successful."

He added: "Architecture is a utopian profession, rather like the medical profession - it's to make things better in the future."

'I mean to keep on marching'

While his intellect and talent was undeniable, Charles has been remembered as a compassionate and dedicated man by those who knew him best.

Chief executive of Maggie's Centres Dame Laura Lee said: "Charles' commitment to Maggie's was really remarkable on many fronts. He was committed to making sure that our buildings were architecturally excellent and the best.

"But on top of that he was always pushing for the care to be the best that it possibly could be in every single centre that Maggie's operates from.

"I think he's left a remarkable legacy that I hope his family will see endure."

Media playback is unsupported on your device Media caption Charles Jencks says his wife's cancer diagnosis, in a bleak hospital, was the inspiration to help others in Maggie's Centres

Survived by his four children and third wife, Louisa Lane Fox, Charles was working on improvements to the garden at Maggie's Inverness just two weeks before his death.

Both he and his wife's legacies live on in their remarkable buildings and written works.

After receiving her final cancer diagnosis in 1995, Maggie herself wrote a piece about her experience entitled A View From The Front Line - which is published on the charity's website.

Her final line in the piece reads: "I mean to keep on marching, down the tail of the statistical curve and on, into the sunset, and then, when eventually I must die, to die as well as possible."

All pictures subject to copyright