Friday 24th June was one of the worst days of my life. I had feared a vote to leave in the UK referendum on EU membership, but clung optimistically to the uptick in the polls in the days immediately beforehand. Even so, I was taken by surprise at the strength of feeling that the result unleashed. My immediate reaction was shock and grief. David Cameron’s perfunctory resignation as prime minister underscored the embittered sense of a self-inflicted wound, of a divided country collapsing in on itself. I went to work at my university stunned and disorientated; in committee meetings I was in no mood for small-talk. Throughout the day I fought back tears and filled my Twitter timeline with fury.

The intensity of the anger subsided over the following days but the shock of the blow remained. I spoke to my children, all on the threshold of making their ways in the world, and could find little comfort to offer them. Their job prospects here and abroad seemed to have shrunk overnight. This felt like the hand of history, folded into a fist. And it kept punching, as reports came in of xenophobic attacks, given release by campaign elements that had played hard on tribal sentiment, and of Brexit leaders walking airily away from promises and responsibility.

Since the result, the hot iron of the EU referendum has been plunged into the cold waters of reality. But, instead of an influx of cool reason, we remain shrouded in clouds of uncertainty. The Labour party has descended into a vicious bout of self-strangulation that seems at once endless and terminal. The Conservative party has been quicker to regroup. After a leadership contest that was shockingly bloody even by their standards (for those who remember Margaret Thatcher’s speedy dispatch in 1991), Theresa May has stepped carefully over the wounded bodies of her rivals and into No. 10 Downing Street. “Brexit means Brexit,” the new prime minister has pronounced, but nobody is sure what that means. If you are not confused by what is happening in UK politics right now, you haven’t been paying close enough attention.

May’s arrival as prime minister has saved us from a summer of floundering without a leader but brings new uncertainties. Her appointment of the three Brexiteers – Boris Johnson, David Davis and Liam Fox – to posts that will require them to figure out how Brexit works deals astutely with the tensions within her own party, but it is by no means clear that these men have the capacity for what is likely to be a job of unprecedented complexity.

As far as science goes, May’s new government offers a little more reassurance. Greg Clark, who has previous experience of the science brief, takes over as Secretary of State in the newly reconfigured Department for Business, Energy and Industrial Strategy, which will have oversight of the research budget. Responsibility for universities, however, has been transferred to Justine Greening’s Department of Education.

Jo Johnson stays on as minister for Universities and Science but now has to report to two bosses. This may be sensible in the short term for the sake of stability, but it is an unusual arrangement and one that insiders say he may to find difficult to manage. The move poses new challenges for universities, now sharing a budget with schools, which are always higher on the political agenda. It also raises new questions about the ongoing process of properly integrating of policies on education, research and innovation. There may be new opportunities here, as in any shake up, but will take time for the true impact of the government re-configuration to emerge.

An immediate challenge for Jo Johnson will be to steady the UK research base, which will suffer significant damage by extracting itself from the EU. In the longer term much will depend on the nature of Britain’s re-negotiated relationship, but ill effects are already bubbling to the surface. Reports are coming in of a blight on applications by UK-based researchers to the EU funding under the Horizon 2020 program, simply because European collaborators cannot be confident that their UK counterparts will remain eligible for funding over the lifetime of new projects. This may be mitigated if the Minister can step in to underwrite the funding of any UK-based partner in joint applications, but he needs to act promptly.

The referendum campaign and result has also unsettled EU nationals working in the UK. Those who have been here for at least five years have a protected right of residency but more than one of my senior colleagues has spoken of sensing a colder mood towards foreigners. The smartest universities around the world will have seen an opportunity and are already drawing up shortlists of star researchers for a recruitment drive in what now looks like a buyer’s market for UK-based talent.

Early career researchers from Europe who are currently working in the UK but have not yet to accrued five years of residency face more insecurity. Many are in short-term postdoctoral research positions, and those near the end of their contracts will be scanning the job-market for their next position. Given the mood change and present uncertainty, how many will gamble on the UK?

The UK research base has long drawn tremendous competitive vigour from an open-door policy for overseas researchers. That is one of the open secrets of the success that ministers like to boast about. It seems highly unlikely that our openness to foreign scientists will change radically, but amid the present uncertainties all bets are off. A former home secretary who was openly hostile to the interests of UK universities is now installed as PM. Jo Johnson has made encouraging noises to EU nationals currently working in our universities and research institutes, but warm words are no substitute for clear policy commitments. Without these, the reputational damage wrought by Brexit could lead to a flight of talent. Researchers can help convince the Minister of the need for such policies by making sure that all instances of clear negative impact are reported promptly to him through Scientists for EU.

As well as the shocks, there are broader lessons from the EU referendum that need to be absorbed by the scientific community. For one thing, we would do well to redouble our efforts to promote science as a respecter of truth and evidence – a feature sorely lacking from much of the referendum campaign. This needs to be done humbly since we have work to do to put our own house in order. We mustn’t be afraid to point out that we are human too, or to discuss openly the systemic problems in the research ecosystem.

That humility need not stop us from pushing back against Michael Gove’s claim that “the people of this country have had enough of experts.” We might take some small consolation from the observation that the people of this country seem for now to have had enough of Michael Gove, but the fact that he felt able to make such a claim has to be addressed. I make no apology for the elitism that is inevitably bound up in my expertise as a scientist. That expertise was hard won and I am proud of it. But I never intended it to be exclusionary, and the referendum has provided a pointed reminder that I need to be more cognizant of the privileges of colour, class, gender and economic status that lubricated my career.

It may not be the fault of scientists or academics that our society is divided and unequal – the roots of these problems are deep and wide. However, it is our responsibility to play a part in healing that divide. We might justifiably challenge claims that the academy remains walled up in an ivory tower, especially given the growth in public engagement and outreach activities (such as the recent initiative by the British Science Association to embed science more deeply in our national culture) – but that job is far from complete. Progress on this front will be difficult. University academics are already working flat out to maintain research and teaching portfolios and those duties are set to become more onerous as economic pressures exacerbated by Brexit come to bear on the UK research budget, and the government ploughs ahead with ill-conceived plans for teaching assessment. For academics to take on the necessary additional work of reaching out to make a real progress on equality, diversity and social mobility, those efforts need to be properly recognized.

For good or ill, Britain has steered itself away from the EU into an uncertain future. I’m not going to apologise for being upset, or for still being unable to see the “sunlit uplands” that some Panglossian Brexiters have discerned on the horizon. And I’m not going to shut up about the benefits of being enmeshed scientifically in the EU. But nor am I going to give in to despair, despite the challenges and the mountains of work ahead. Instead, I will recommit to the shared scientific values of community, internationalism, and open enquiry that drew me to this business in the first place. On all sides now we need to make the best of it and the scientific community has a positive role to play. In a fractured nation and a fractured Europe, we can be a real force for good.