Andrew Ibrahim allegedly listened to radical preachers on the internet
A student who converted to Islam grew a beard and described the UK as a "dirty toilet" before police found a home-made suicide vest at his home, a jury heard.
Andrew Ibrahim, 20, from Bristol, denies making explosives with intent, and preparing terrorist acts in April 2008, but admits making an explosive.
Prosecutors say he developed a "mindset of martyrdom" after listening to radical Muslim clerics on the internet.
And Winchester Crown Court heard he had said he admired the 7/7 London bombers.
The jury was told that Mr Ibrahim had made a tour of the Broadmead shopping centre in Bristol shortly before he was arrested.
He was observed making notes on his mobile phone about the location of shops, lifts, escalators and exits.
Prosecutor Mark Ellison QC told the jury that Mr Ibrahim was arrested in April 2008, as he walked to Bristol city centre.
When police searched his one-bedroom flat in the outskirts of the city they found a quantity of home-made high explosive known as HMTD [hexamethylene triperoxide diamine] packed into a biscuit box in his fridge.
In a cupboard under the kitchen sink police found ingredients to make an explosive device, plus a "crudely made" electrical circuit which, at the push of a red button, could detonate the explosive, the court heard.
Mr Ellison said: "Hanging from the back of the bedroom door was a home-made white cotton vest consisting of a central panel at the front and back with straps going over the shoulder.
"That is the sort of vest which is used sometimes by what are known as suicide bombers - people who blow themselves up at the same time as the target. Explosives go in the pocket."
The science student from Comb Paddock, Westbury-on-Trym in Bristol, had allegedly told friends that the 9/11 attack on the World Trade Centre was a "justified response" for Western aggression
He displayed a poster of the 9/11 attacks on his bedroom wall, sympathised with suicide bombers and told friends nuclear weapons were "cool", Mr Ellison said.
Mr Ibrahim also allegedly asked a visiting biology lecturer to his college about the "best" biological weapons, and how they could be found.
The jury heard he changed his name by deed poll from Andrew to Isa in February 2007, as a result of his conversion to the Islamic faith the previous year.
He also began to dress in a more "Islamic" style and started to quote radical preachers, including jailed Muslim cleric Abu Hamza al-Masri, currently serving a seven-year jail term for soliciting murder and inciting racial hatred.
The jury was told that Mr Ibrahim sympathised with suicide bombers and felt living in the UK was like "living in a dirty toilet with a minefield outside it" - a view similar to one expressed by Abu Hamza.
Mr Ellison said the "mindset of martyrdom" was that suicide bombing was "one of the highest acts of faith and one that brings the greatest reward in heaven for the person that does it"
In the months before his arrest Mr Ibrahim allegedly looked at websites featuring cleric Omar Bakri, former leader of the banned Al-Muhajiroun organisation.
The court heard Ibrahim started searching the internet for information on how to make plastic explosives using bleach.
On one occasion, the jury heard, he boasted to a classmate he could make bombs from hair dye and nail polish remover.
He also asked another classmate if anyone would "notice" if some hydrogen peroxide went missing.
Mr Ellison said the classmate did not think Ibrahim had actually taken any of the substance.
Mr Ibrahim had previously been "disowned" by his parents because of his history of drug-taking, the court heard.
"At times he reverted to Western dress and ideas and that was usually coincidental with drug use, " Mr Ellison said.
"He appeared to be waxing and waning the degree to which he was observing his new religion."
The jury heard that Mr Ibrahim had pleaded not guilty to two counts of making an explosive with intent, between 8 and 17 April 2008, with intent to endanger life or cause serious injury to property in the United Kingdom.
He is also charged with preparation of terrorist acts between the same dates, by purchasing material to make an explosive, making that explosive, buying material to detonate the explosive, carrying out "reconnaissance" before the act and "making an improvised suicide vest in which to then detonate an explosive substance."
The jury heard he had pleaded guilty to making an explosive substance between April 8 and 17 2008.