The dogs can smell Glenn Greenwald long before they see him. As we drive up the hill to his house, a cacophony of barking greets us. The chorus is so overwhelming it makes me think of the National Security Agency (NSA) chiefs who Greenwald has tormented over the past year."They don't bite," Greenwald says as we are engulfed by the pack of strays that he and his partner, David Miranda, have rescued. After a beat, he adds: "… as long as you don't show any fear." I'm not certain he's joking, which is awkward, given that there are 12 of them, ranging from an 80lb Burmese mountain dog to a rat-sized miniature pinscher.
The image of Greenwald and his dogs has been beamed around the world by news organisations since his first NSA revelations were published by the Guardian last year. A writer with a devoted following even before the revelations, he now enjoys more widespread exposure, particularly in the US where his brand of aggressive campaigning journalism has attracted both paeans and condemnation.
But the sight of him surrounded by the animals still comes as a shock. It underlines how dramatically the internet has revolutionised journalism and the nature of the newsroom.
Think of that legendary 1973 photograph of Bob Woodward and Carl Bernstein at the height of Watergate. They are sitting at manual typewriters under neon lights in the Washington Post newsroom. The photo speaks to the power of institutions – that of their newspaper just as much as the White House they were investigating.
Now think of where I'm standing in Glenn Greenwald's retreat, shrouded in jackfruit, banana and lemon trees, where monkeys call in daily and only yesterday a lethal spider the size of a fist was discovered in the bathroom. This is the newsroom of 2014, almost 5,000 miles from Washington DC, the jungle office of the journalist that the former NSA contractor Edward Snowden handpicked to be his conduit to the outside world.
As the anniversary approaches of Greenwald's first Guardian scoop on 5 June 2013, revealing that the NSA was collecting the telephone records of millions of Americans, his life appears to have calmed a bit. He's taking the time to get his fitness back after a stressful period, doing yoga by a stream in the garden and eating calorie-controlled ready meals in an attempt to shed the 12lbs he put on.
It would be rash, though, to describe his working day as ordinary. While I'm at the house he conducts interviews with news organisations in Hungary and Poland; records a video accepting a free-speech award from, incongruously, Hugh Hefner; and tapes a 45-minute address to the University of East London. Soon he will be embarking on a book tour that will take him to the US, then France, the Netherlands, Germany, Italy and Spain.
There's only one country that has been consciously excluded from the tour – in fact, only one country in the world that Greenwald says he absolutely will not visit. It is the UK. The wounds left by the detention under the Terrorism Act of his partner, Miranda, at Heathrow airport last August, are still open and deep.
Miranda was detained on his way back to Rio on a ticket paid by the Guardian from Berlin, where he had met the filmmaker Laura Poitras, who worked with Greenwald on the NSA files. Officials claimed he was carrying 58,000 classified UK documents on a hard drive.
"I don't trust them not to detain me, interrogate me and even arrest me. Their behaviour has been so extreme and offensive, and the political and media class was so supportive of it, that I feel uncomfortable with the entire atmosphere," says Greenwald.
He insists he has never had animosity towards Britain. "But the more I've learned, the more troubling it has become."
His new book, No Place to Hide, begins with Greenwald's account of how, together with Poitras and the Guardian, he broke what may well be the story of the decade. The funny thing, as he recalls, is how close it came to never happening. This seems a good place to start our conversation when we meet down at sea level in the bustling heart of Rio.
"You truly were crap at encryption," I say, referring to the digital tools that allow you to scramble messages to trusted correspondents to avoid detection, thinking that an adversarial journalist such as Greenwald will appreciate playing hardball.
"I've got a lot better at it, honestly!" he exclaims. He is so imploring in his response that I have immediately to reappraise the man. Such a dichotomy has often been observed about Greenwald: on his Twitter feed and blog, he is a bloody fighter, but in person he is charm itself. When I mention that later, he readily concurs: "People think I'm going to be this, like, monstrous, abusive, heinous asshole to deal with."
But it's true. He wasn't great at encryption. In common with most journalists working today, he had no clue about tools that would have allowed him to communicate with sources privately, without fear of NSA or any other snooping.
When Snowden first contacted Greenwald in December 2012, using the pseudonym Cincinnatus and exhorting him to employ PGP encryption channels through which they could talk securely, Greenwald read the email but failed to reply. "There was nothing in the email that I found sufficiently enticing," he writes.
Seven weeks went by – seven! – but Snowden kept coming back, pleading with him to set up basic systems so they could chat freely. Here was Greenwald being offered one of the biggest national-security leaks in US history, and for months he did nothing about it. "There must have been some surveillance or journalism god watching over me," he says, "because I did everything I could to blow it."
A large part of the book is devoted to Greenwald's exposition of why the NSA story matters. He writes cleanly and surprisingly fluently for a journalist known for the density of his prose about the threat of mass surveillance, and the need for privacy.
"It's not an easy argument to make," he says. "The privacy argument is pitted against the much more instinctive and visceral danger: that you and your children are going to be blown up by terrorists. Human beings are driven by fear, and you can't ignore that in pursuit of some abstract principle."
He tries in the book to make that principle concrete, showing how privacy is an essential feature of any free society, because it's where we experiment, take risks, do silly things, explore the boundaries of ourselves.
To his delight, one of the best examples of that phenomenon is displayed by the NSA itself. Greenwald reprints in the book an NSA slide from Snowden's documents that, when he first saw it, almost made him laugh because it is so surreal. Titled "New Collection Posture", it sets out the scale of the NSA's ambitions in astonishingly frank terms: "Sniff it all, Know it all, Collect it all, Process it all, Exploit it all, Partner it all."
"The NSA wrote that slide because they believed they were doing this in total secrecy – that nobody was watching them," Greenwald says, his face lighting up with excitement. "They were speaking in ways that no public official would ever speak if they thought they were being overheard. It's precisely why privacy is so important."
None of that answers, for me, a key puzzle about the NSA story: why him? Why is he the one to feel so passionately about a subject that until Snowden came along was considered by most people to be rather obscure, chipping away at it relentlessly since he started his blog in 2005?
There is nothing in his background to suggest he would turn into a scourge of overweening state power. The son of a housewife and a Republican-leaning accountant, brought up in nondescript central Florida, he might have been expected, as he puts it himself, to become a "corporate lawyer in a big city somewhere". So what happened?
"Honestly, the thing that saved me was being gay. My gayness made me very combative, assertive and an outsider. I'm always thankful for that."
As we're driving up the hill to his home, his voice drops. "I remember this constant struggle, from age eight to 12, feeling there was this thing inside me, like a sickness that was permeating my entire being, that I had to keep completely secret. It felt like something had gone wrong in the universe: it wasn't supposed to happen to me, it was supposed to happen to other people. It was this constant sense of alienation, that I had to hide my real self because it was bad or sick."
And then, he says: "You get to this point where you think that's fucked up, that there is a completely invalid judgment being imposed on you, and that's when you go to war about it."
The Greenwald that we know – that the NSA and GCHQ detest – was born.
I want to lighten the tone after that, so as the car winds its way up the hill giving us breathtaking views over the city, I decide on a whim to take a leaf out of MP Keith Vaz's notorious question to Guardian editor-in-chief Alan Rusbridger at the home affairs select committee meeting investigating the impact of the NSA revelations. "Mr Greenwald," I say. "Do you love America?"
He gets the joke, but still replies: "To me America is a set of political principles and values enshrined in the founding documents. I'm a huge admirer of those political values."
"Now you're sounding like a member of the Tea Party," I say.
"But I do. I do have really high regard for those values. I hate the way my government so frequently violates them."
For someone who refuses to be pigeon-holed with any label – left or right, progressive or conservative; the only description he remotely accepts is "civil libertarian" and even that grudgingly – his evocation of the US founding fathers is revealing. And not because of the Tea Party. It points to a central paradox of Greenwald – that the man lambasted by his detractors as an anti-American and traitor is actually as American as they come.
Part of his American-ness is that he puts his faith not in traditions or institutions, but in individuals and in himself. That's why the internet for him is so vital; it transfers power from that Washington Post newsroom to his own jungle office. You can see that thinking behind his decision to quit the Guardian and create his own journalistic enterprise, the Intercept.
The move was audacious and bold, but when I raise it with him he's in a surprisingly reflective mood. He's had some feelings, if not of regret, then perhaps of a little guilt at having left the Guardian at a time when the NSA disclosures were still blazing. "I don't want to say betrayal, that's too strong, but a lack of loyalty …"
The Intercept is being bankrolled by Pierre Omidyar, the eBay founder. Was it wise to leave the Guardian, an organ with no owner, run by a trust, in order to embrace a billionaire tech tycoon waving a $250m cheque? And was it, given his scathing critique of big business, true to his own values?
"Maybe my judgment was a bit impaired. I didn't predict how people would see it. Pierre's not just a funder. He's the 100th-richest person in the world. He has $9bn, which is an unfathomable sum, and he's from the very tech industry that is implicated in the NSA story. I probably paid insufficient attention to those perceptions."
Perceptions? Isn't there a problem also with independence?
No, says Greenwald firmly. "I know in my mind that the minute anybody tries to interfere with what I'm doing, that is the minute I will stop doing it."
There has been a groundswell of grumbling that the Intercept has failed to deliver on its promise of more NSA surprises. Why are things moving so slowly?
"Putting together a new media organisation is more difficult than I'd anticipated," he concedes. "Which makes sense, as I've never done it before. To me it was just: give me a fucking website and stand out the way."
It's clear that the road ahead for Greenwald following the NSA leaks is not entirely paved with gold. Sure, the benefits have been huge: worldwide fame, wall-to-wall TV interviews, accolades, soaring fees on the speaker circuit, not to mention the film rights currently being finalised with Sony (he won't discuss who he wants to play him in the movie, saying: "I completely don't give a shit, genuinely.")
Has there also been a toll, a price to pay, for what he has been through? You can't take on some of the world's most powerful intelligence agencies and not feel the pressure, even if you do live in a jungle paradise.
The moment his vulnerability hit home for him was when Miranda was being grilled that fateful day in Heathrow. Being Glenn Greenwald, his instinct was to scream and yell from the rooftops, but he was strongly advised to maintain his silence.
"I couldn't do anything about it. So I just went to the store and bought all this junk food, and I binged on Doritos. I gave myself permission to gorge myself. That's when you realise what power is. They had taken this person I love most in the world and had put him in a locked room, and could easily have arrested him and put him in a cage. The helplessness of that. That's the first time I felt vulnerable, because I felt like I had no control."
The person who supported him most that long and difficult day was Snowden. They spent all day in communication, Greenwald frantic at his desk in his jungle office, Snowden just two weeks into his new-found asylum in Russia. It was an extraordinary, and poignant, role reversal: the source comforting the journalist.
"When he heard David was detained, Snowden was so enraged and concerned, which shocked me," Greenwald says. "His own situation was very uncertain at the time – he's facing 30, 40 years in prison if he ever comes back to the US, and yet he was supportive of what I was going through. That's when I realised we were bonded in an eternal way to the same cause, which most journalists don't like to admit, but I have no trouble admitting – we work to the same ends. We have a bond, a human bond."
Bond or no bond, it strikes me as interesting that in the book, as in conversation, Greenwald only refers to his interlocutor as "Snowden", never by his first name. What's that about?
"It's the weirdest thing. I cannot call him Ed. For the longest time we referred to him as 'the source'. And then when I met him, I never used his name. It just rings false to call him Ed."
Greenwald is not Snowden's keeper, and nor is he responsible for the decision to leak the documents. But it's still stark, the diverging fortunes of these two men, given their shared objectives. Greenwald has been showered with riches and opportunities; Snowden faces years in exile or in custody.
"I am cognisant of that," Greenwald says, sounding uncharacteristically stilted. "He's the one who made the greatest sacrifice, and I've gotten all these material and visibility benefits. So I try every single day to think about how to use them in a way that fulfills and advances what he wanted to achieve. I recognize my debt to him."
Before I leave I ask one last question as the darkness is thickening over the jackfruit and the dogs are quietly slouched in heaps all over the veranda. What would victory, an endgame, look like to Glenn Greenwald?
"The inability of any one country to exert hegemony over the internet, as the US does now," he says. "But the bigger picture for me will be getting people to think about these issues in a different way. And not just surveillance and privacy. Myth and reality, propaganda, the role of journalism – these are questions that are being debated in a much more significant way. The change in public consciousness – that's going to be the biggest victory."
• No Place to Hide, by Glenn Greenwald is published on 13 May 2014 by Hamish Hamilton