Tulip Siddiq was elected less than two years ago, and is only 34. She is not, however, a novice. The Labour MP comes from a political dynasty: the granddaughter of Bangladesh’s founding father, who was assassinated along with 19 members of the family in 1975. The only survivors were Siddiq’s aunt, now prime minister of Bangladesh, and her mother. As a child she met Nelson Mandela and was a guest at the White House, by 24 she was working for a Labour MP, and in 2015 she fought and won the most marginal three-way seat in the country, Hampstead and Kilburn.

When Siddiq quit the shadow front bench this week, her resignation was executed with professional aplomb. We meet hours after she has given an unflappable account of herself to the Today programme and 5 Live, the day after defying her party’s three-line whip and voting against the bill to trigger article 50. She arrives at the Jewish centre near her constituency home looking composed, remains thoughtful throughout, and is in no way responsible for the fact that I come away as unsure where her duty as a politician lies as I had been when I arrived. It’s hard to recall a time when so many politicians have invoked democracy to justify wildly conflicting decisions, but the double earthquake of Brexit and Donald Trump has cast us all into such constitutional confusion that the rules of how to be democratic are now anybody’s guess.

According to the online trolls bombarding her with abuse, Siddiq has definitely broken them. Her Twitter feed this week has been, she half laughs, “Horrific. A lot of abuse. A lot of abuse. And don’t get me wrong, I’m a tough middle child, I can handle it. But the main theme of the abuse is that I’m not British.

“I was born here, I went to school here in this constituency, my parents are both British, they got married here, I’m married to someone called Chris, my daughter is called Azalea Percy, I serve in the British parliament. But because of my name, and because of my ethnicity, I am somehow not British. As soon as I said I would vote against article 50, someone rang my office and said: ‘You know Tulip should be careful, because you know what happened to Jo Cox when she didn’t back the Leave side.’”

Siddiq felt compelled to vote against article 50, she explains, because her constituents had voted 75% to remain. During the general election campaign, Europe had been the one issue that unfailingly cropped up at every hustings, “the one question you couldn’t escape,” and she believes she owes her seat to her constituents’ conclusion that her opponents “were not as passionately pro-EU as me”. To have voted for article 50 would therefore have been an unconscionable betrayal of democracy.

But I can’t fail to notice the parallels between her position and Trump’s defence of his Muslim travel ban. The US president is criticised for referencing his election campaign to justify contentious policies; he says he’s simply doing what the people who elected him voted for, and isn’t Siddiq doing exactly the same? “Well, this is the first time I’ve been compared to Donald Trump, I should probably say,” she laughs a little uneasily. But if Trump is guilty of representing his base rather than the country, surely so is any MP who voted to block Britain’s democratic decision to leave the EU.

Siddiq at the general election in 2015. Photograph: Romer/Cartel/REX/Shutterstock

“But for me, it would have felt like a massive betrayal.” She and neighbouring Labour MP Keir Starmer, she points out, rebelled when parliament voted on HS2, which runs through their constituencies, “because it would have betrayed our constituents. I have always been pretty clear about the fact that I am first and foremost a constituency MP, and I reflect the will of my people.”

But just because Brexit, like the HS2 railway, is unpopular in Hampstead and Kilburn, what about her duty to reflect the national, and not just local, vote? “The only reason I can make the decisions I make in parliament is because these people voted for me. What’s the point of being an MP if you don’t listen to your constituents? People talked about ‘taking back control’ in the referendum. Well, I’m giving them that control.”

But the logic becomes muddier when she concedes that she cast her vote for something she would not have wanted the rest of the house to support. “I can’t be a hypocrite,” she smiles. “I voted for the democratic will of my people, the local people, and if we added up everyone who voted with the democratic will of their people, then the bill would have had to go through, because more MPs represented leave constituencies. So I can’t be a hypocrite.” But it’s a curious anomaly to care enough about a vote to lose one’s job over it, while being unable to wish for its success.

In theory, of course, MPs are meant to vote according not to the wishes of their constituents, but their party whip. That is how our parliamentary democracy works. But as Siddiq sees it, “How silly would it be to go back to your constituents and say, ‘I really didn’t want to trigger article 50, but it was a three-line whip so I should.’ If someone here said to me, Did you really want to trigger article 50?’, how could I say, ‘Oh no, I didn’t. And I know my constituency didn’t.’ So why did you? ‘Oh, because Jeremy Corbyn said we have a three-line whip.’ Seriously? No. I just think it’s a matter of conscience.”

Was the imposition of the whip a legitimate act of parliamentary party leadership? “If I were leader – and I really hope I never am, I have no aspirations to be leader – in my personal view, no. I would not have imposed a three-line whip on this one. I think a free vote would have been easier. I really think MPs have to make a personal choice on this.”

As it turns out, they may in effect have been allowed to. Since the vote, the shadow chancellor John McDonnell has intimated that junior shadow ministers who rebelled will not be sacked.

Siddiq with her daughter, born in 2016 … she went back to work nine weeks after an emergency caesarean because parliament has no maternity leave provisions. Photograph: Nicola Tree/Getty Images

Siddiq says that, had she known this she would still have resigned, because as a member of the shadow government she would have been unable to speak against the bill in the debate. Nor could she have signed the amendment tabled last week by Heidi Alexander, calling for the article 50 bill to be thrown out on the grounds that the government has failed to “safeguard British interests in the single market”. These things were “very important to me. So it’s not so much the vote that’s the reason why I resigned. The vote was a means to the end of expressing myself.”

I ask if she is happy that other rebels will keep their jobs, and she smiles. “It would certainly be unprecedented. And I suppose it begs the question, ‘What is the point of having a three-line whip if you’re allowed to disobey it?’” She pauses. “It’s just such a conflicted situation. I’m not very fond of the whipping system. For me, it just doesn’t really fly. I can’t reconcile myself to being told to vote a certain way when your heart doesn’t tell you to do that.” Early in her parliamentary career, she reminds me, she voted against the welfare reform bill. “And I got into a lot of trouble for it. But I had to stick to my principles. What’s the point of being in politics if you can’t stick to what you believe in?”

One might equally ask what was the point of making a stand on something she knew would be defeated, and by her own admission would have contravened the democratic will of the country if it had succeeded. Siddiq strikes me as so manifestly principled that I apologise if this sounds unfair, but one could argue that the only thing her resignation helped was her prospect of getting re-elected in 2020. Serving one’s constituents sounds democratically high-minded, but can look like caring only about holding on to one’s seat.

“Well, in all honesty, re-election seems like a very long way away. It wasn’t about re-election. Not everything you do is geared towards winning the next election, because that would be a really horrible life to lead. That would be a miserable life to lead.” She has, she says, adopted positions “my constituency would not feel particularly pleased about”. She is a governor of a faith school, for example, “and a lot of people here do not believe in faith schools. I’ve had a lot of criticism for not denouncing faith schools. So things make you unpopular. I’m not here to be popular.”

I’m not sure how to square “I reflect the will of my people” with “I’m not here to be popular”. But in the age of social media, unpopularity has become the default status of all politicians, regardless of what they do. There was “never a golden age”, she says, when politicians were widely loved; she used to open parcels of street rubbish when she worked in the Labour MP Harry Cohen’s office.

“But you know, after Jo, you have to be quite careful. Why do you think I hold my surgeries here?”

She gestures out of the window to the Jewish centre’s gates and guards. “Because they’ve got police out there.” She gave birth to a daughter nine months ago, but when she happens to mention the childcare facility she uses, she looks suddenly anxious and quickly asks me not to name it.

Amazingly, parliament has no maternity leave policy for MPs, so Siddiq went back to work nine weeks after an emergency caesarean. She is troubled that her voting record for two months was simply marked “absent”, and worries about how it will look. “But can you imagine me campaigning on this? People would just be like, ‘Who cares about you MPs?’ If I said there is no maternity leave, it would be: ‘Boo hoo, we don’t care.’ It would be considered a Westminster bubble campaign.”

Her own leader’s popularity among his supporters is in large part down to his image as a riposte to the Westminster bubble, and like Brexit and Trump, he poses another challenge to the protocols of parliamentary democracy. Siddiq was one of the 35 MPS who nominated Corbyn in the 2015 leadership election, but “if I could turn back the clock, I probably wouldn’t,” because it’s impossible to see how serving her conscience or her constituents is compatible with loyalty to a leader who believes his democratic duty is to the members who elected him, not the MPs he leads.

Has it struck Siddiq, I ask, that on practically every big issue since her election, she finds herself out of step with the public mood? “If we’d had an 80% leave [vote] I would have seriously thought, ‘Oh my God, what kind of world are we living in?’ That would have been a different story. But I do agree that there is a big job for politicians to do in terms of reconnecting with the electorate. There is a lot of public mistrust. We need to speak like human beings.”

How Siddiq is supposed to reconnect with the public when so much of what they say to her is so staggeringly idiotic I do not know. The single biggest cause for complaint in her digital mailbag is her gender, followed by her religion and her ethnicity.

“Then, believe it or not, I get a lot of abuse about my name and my height. I got so many comments yesterday: ‘You shouldn’t be a politician because you have a silly name.’ And, ‘Why do you look so small on TV?’ I keep getting asked that.” Her eyes widen. “I’m five foot. And there’s nothing I can do about it.”