“Oh my God, I can’t believe you’re doing it again, you’re insane! I love it! But you’re insane!” Mindy Kaling cackles when she spots me waiting for her in a central London hallway and points to my large pregnant stomach.

Kaling and I first met when I interviewed her for her first very funny book, Is Everyone Hanging Out Without Me? in 2011. We then bumped into one another again in 2015 at the Cannes film festival, where she was promoting the Pixar film, Inside Out, and I was doing some interviews while pregnant.

Whereas most celebrities have forgotten the face of the journalist who interviewed them before they have even left the room, let alone four years later, Kaling, to my astonishment, gave me an excited, congratulatory hug. Since then, she has had a daughter, Katherine, known as Kit, born in 2017, whom she is raising on her own. And now here we are again, with me waddling around and Kaling happily embracing me.

“I’m so excited for you! Can you walk OK or is it like: ‘Oh right, there is a human head pressing against my cervix?’ I could talk about this stuff forever,” she says, sitting on a sofa and taking off her heels, settling in for some cervix chat.

As usual, she looks impressively but not impossibly glamorous, in a long floral dress. On social media she regularly posts photos of herself in high-fashion clothes with excitable emoji-filled captions underneath. Online and in real life, Kaling, 39, gives the simultaneous impression of being someone who is enjoying the fruits of unimaginable success but is somehow also your totally relatable best friend.

Yet she is also not entirely how I suspect her 4m Instagram followers imagine. There is a quiet seriousness to her, especially when she talks about her work, that is far removed from the narcissistic chatterboxes she has played. These include Kelly Kapoor on The Office: An American Workplace, which she co-starred on and co-wrote for eight years, and the similarly over the top Dr Mindy Lahiri, on The Mindy Project, the sitcom she created and starred in, and which ran in the US for six seasons.

Since we last met, she has starred in big-budget movies including Ocean’s 8 and A Wrinkle in Time; remade Four Weddings and a Funeral as a miniseries that will premiere this summer and is writing a coming-of-age miniseries for Netflix. To those of us who confuse her fictional selves with the reality, it is apparently a shock to discover that she is actually an extremely focused and productive adult rather than a shrieking shopaholic. While doing press for her new film Late Night, she has been asked repeatedly if she is “surprised” she has written a movie.

Kaling with Emma Thompson in Late Night. Photograph: Emily Aragones/EOne

“And of course, it does feel amazing to have done this, but I’ve worked so hard to get here, so it’s not a big surprise. A journalist asked me if I have impostor syndrome and I said: ‘I actually don’t, because I’ve really put in the time.’ And I could tell he thought I was kind of cocky,” she says. A 39-year-old man would never be asked if he felt like an “impostor” for writing a movie, I say. “Do you think? Yes, I think you’re right,” she says in a measured tone that strongly suggests she long ago had that same thought.

We are meeting today to discuss Late Night, her very fun new movie that is both exactly what you would expect from Kaling, but also a little bit not. She plays Molly, a young woman hired as a writer on a nightly talkshow hosted by Katherine Newbury (played by an enjoyably imperious Emma Thompson). The other (all male, all white) writers on the show eagerly tell her that she is only there as “a diversity hire” and that is true: it is why she was hired over another white man. “I wish I was a woman of colour so I could get any job I wanted,” moans one of the writers.

Kaling herself was a “diversity hire”, having been part of NBC’s diversity writing programme. “And for a long time I was really embarrassed about that. No one [on The Office] said anything to me about it, but they all knew and I was acutely aware of that. It took me a while to realise that I was just getting the access other people had because of who they knew,” she says.

One of the strongest strands of Late Night comes from Kaling pretty much stating that diversity hiring is the inverse of, and beneficial corrective to, the longstanding tradition in the US corporate world of hiring only white male ivy league graduates. “One hundred per cent,” she says. “When we started on the film, I thought, OK, things are different now. But then I met the first African American female writer on a late-night talkshow and she was only hired in, I think, 2016. And these shows are mainly made in New York City! I mean, not having an African American woman until 2016 in New York, that’s hard to do.”

So why is it that way?

“I think there’s such pressure when you’re creating a show to keep it on the air that people only hire those who they feel comfortable with, and for a lot of people that’s people who look exactly like them,” she says. (Somewhat annoyingly for Kaling, her own brother, Vijay Chokalingam, has argued against diversity hiring. In 2015, he claimed that he had posed as an African American to get into medical school and prove his point that affirmative action is “hypocritical”. When I ask her about this she – for the first time since I’ve known her – shuts down, saying politely, “I don’t think I want to talk about that. It’s just too personal.”)

Mindy with Ed Weeks, Adam Pally and Chris Messina in The Mindy Project. Photograph: FOX/FOX via Getty Images

Late Night ticks off talking points (intersectionality, the gender pay gap, etc) that might surprise those who judge Kaling by her Instagram and don’t associate her with politics. But anyone who has vaguely followed her career will know that they come from her personal experience, having bulldozed her way through seemingly insurmountable prejudices in the entertainment business. She initially had to write her own roles, because, as a woman with a body shape that suggests she occasionally eats, she refused to be pigeonholed into “sassy best friend” parts. Once studios (and audiences) got used to seeing her as the star in her own work, she was cast in mainstream Hollywood movies. She always makes sure her writers’ rooms are ethnically diverse, even though that means she has to spend extra time training people up, because they haven’t been given opportunities before. Similarly, her version of Four Weddings is far more racially mixed than Richard Curtis’s vanilla original; because it stars a British-Pakistani character, Kaling sought out British-Pakistani writers, despite the extra palaver that entailed in sorting out their US work visas.

“I think it’s going to be good – is that OK to say?” she says of her updated version, and then stops just before she apologises for being proud of herself. “Wait, no. It’s going to be good, she said definitively!”

When it came to making Late Night, she hired the Canadian-Indian female director Nisha Gantra. She wrote the lead role for Thompson, a pointed rebuttal, she says, to the rule that women over 40 “are generally only cast as widows in dramas and shut out of comedies”. Yet the one plot point in Late Night that really stretches credulity is the idea that a fiftysomething woman would have her own late-night talkshow, as that is a patch of US entertainment that firmly remains an all boys’ club. Kaling shrugs: “At this point in my career, I just wasn’t interested in writing this part for a 58-year-old white man.”

The film is also unapologetic in its celebration of ambitious women. The Sexless Bitch Boss is now an exhausted trope, epitomised by Meryl Streep in The Devil Wears Prada, as if women have to choose between professional and romantic fulfilment. But Thompson’s character in Late Night, while undeniably tough, is granted not just a happy marriage (to John Lithgow, in a somewhat thankless part) but a sex life. Kaling says that is because she took inspiration not from movies made in the past 20 years, but ones made decades earlier

“I love those 80s movies like Broadcast News and Working Girl, which featured grown-up women who are ambitious and celebrated for it. So many comedies today have a kind of improvisational, sloppy feeling, and they’re wild and fun and enjoyable. But that’s really different from the movies I was raised liking, in which everyone looks professional and is working hard, and I still think that’s sexy. In my writers’ rooms, there are no slobs,” she says. As proof of how much she loves ambitious female characters, she gave her daughter the same name as Thompson’s character in the movie.

Kaling proudly describes herself as “so ambitious”, someone whose favourite question is: “So what are you doing next?” She wrote Late Night while she was pregnant and simultaneously shooting A Wrinkle in Time, as well as her shortlived US sitcom Champions. She then shot Late Night while still breastfeeding her baby. I ask if there wasn’t a part of her that wanted to take more than two weeks off after giving birth and she looks surprised at the thought: “Maternity leave is so great for writing because you have these pockets of time while the baby is sleeping. Working four times a day at an hour and a half is not a bad day’s work,” she says, making early motherhood sound like a peaceful writers’ retreat.

Kaling, whose real name is Mindy Chokalingam, was born and raised in Massachusetts, the oldest child of Indian immigrants. Her father was an architect and her mother an obstetrician/gynaecologist, but they perhaps inadvertently set their daughter on the path to comedy when they named her after the female character in the Robin Williams sitcom, Mork and Mindy. When I ask where her drive comes from, she instantly cites her parents:

“Obviously they’re in completely different fields, but both my mother and father work this way. And when my mom passed away [in 2012, from pancreatic cancer], I became acutely aware of how little time I have. I have so many ideas, so many things I want to talk about. I feel uncomfortable when I’m not doing anything.”

Kaling with BJ Novak in The Office, 2005. Photograph: Kerry Hayes/Nbc-Tv/Kobal/REX/Shutterstock

Kaling was very close to her mother and made her character in The Mindy Project an ob/gyn in homage to her. One of the more poignant moments in Late Night comes when Katherine talks about not having a child for the sake of her career. I ask Kaling if she ever thought she would have to make that choice.

“I’m not a very maternal person, but I didn’t see a world in which I didn’t have kids. It was always a priority for me. And as much as I love being a mother, I haven’t changed at all since I had a kid,” she says.

Kaling has never said who Kit’s father is, but when her pregnancy was announced, there was much hopeful speculation among her fans that it might be her former Office co-writer and co-star BJ Novak. The two had a long on-again, off-again romance and are still best friends. Given how often Kaling has talked about her love of romcoms, it’s very difficult not to see the two as a real-life Harry and Sally. I tell her that Reid Scott – who plays her love interest in Late Night – is very reminiscent of Novak.

“What a compliment to BJ! You think that? I can’t wait to tell him!” she hoots. “I guess they both are very precise in the way they talk, it’s true.”

I say that I saw the two of them at the Vanity Fair Oscars party earlier this year and they looked so happy together I wanted to go over and demand they just give us the last scene of this romcom already. “Ha! That makes me feel really cool, hearing people see us that way. But I promise you, it’s not a thing where we’re not seeing something and everyone else is – we’re not blind to anything,” she says.

So what is the thing between them? “BJ just feels like part of my family. He’s the godfather to my daughter and he comes over once a week to see her. She gets so excited and runs to the door going: ‘B! B! B!’ He came over on Mother’s Day,” she says, then stops, perhaps realising that the more she talks about them, the more Ephron-esque their relationship sounds. “I don’t know, maybe analysing makes it worse.”

Kaling long ago disproved cliches about what leading women look like (white, skinny), and since having Kit she has disproved another: that having a child ruins a woman’s career. If anything, she is even more successful since becoming a mother, and she says there is a simple reason for that: “You can’t be busy when you’re young and waiting for people to give you opportunities. I’m reaping the benefits of all the hard work I’ve put in,” she says in all seriousness, and then allows herself a winningly satisfied smile.

Late Night is released in the UK on 7 June. It also opened Sundance London yesterday