Margot Robbie has excelled at playing real people on screen.

In 2019, she played Sharon Tate in Quentin Tarantino’s “Once Upon a Time in Hollywood,” and the year before, she took on Queen Elizabeth I in “Mary Queen of Scots.” In a career-making performance — for which she was nominated for a Golden Globe, a Screen Actors Guild Award and an Oscar — Robbie portrayed disgraced figure skater Tonya Harding in 2017’s “I, Tonya.”

Tackling the role of Kayla Pospisil — an ambitious young Fox News producer who falls prey to Roger Ailes (John Lithgow) — in “Bombshell” presented a much different challenge. Unlike Charlize Theron’s Megyn Kelly and Nicole Kidman’s Gretchen Carlson, Robbie’s character is fictional, a composite created by screenwriter Charles Randolph to illustrate Ailes’ late-stage sexual harassment and abuse — just before his Shakespearean downfall in the summer of 2016.

“I didn’t understand her to begin with,” Robbie says. “But my process is to do a ton of research, consider every single option, know every single situation, scenario, thought and motivation inside and out, so I can step onto set and then let it all go.”

She set about figuring Kayla out, using a methodology “Bombshell” director Jay Roach calls “a nerdy desire to get it all down.” She watched the Fox News shows Kayla would have liked, and created a fake Twitter account so she could observe the performative opinionating of “young millennial conservative girls.” (Robbie wouldn’t specify whom she followed, but picture the Tomi Lahrens of the world.)

And she perfected Kayla’s speaking voice, twisting her Australian drawl into a perky Floridian lilt. Roach urged Robbie to watch footage of Katherine Harris, Florida’s former secretary of state, who became famous during the aftermath of the Bush v. Gore presidential election of 2000 and was played by Laura Dern in Roach’s 2008 HBO movie “Recount.” Harris grew up privileged and evangelical in Florida, as did Kayla. “I just love the sounds of her vowels — they’re incredible,” Robbie says. But Harris wasn’t her sole touchpoint: “Every day, I’d do the monologue from ‘Legally Blonde,’” she says, citing Reese Witherspoon’s Elle Woods as the type of character who is “incredibly smart” but “underestimated because of their looks.”

Robbie’s hard work in “Bombshell,” which was released by Lionsgate, has paid off. She will compete in the supporting actress category this week at the Golden Globes, as well as for outstanding performance by a female actor in a supporting role at the Screen Actors Guild Awards on Jan. 19. She is a front-runner for an Oscar nomination.

The awards recognition capped off a year in which Robbie created a stir with her affectionate portrayal of Tate in “Once Upon a Time” and filmed “Birds of Prey: And the Fantabulous Emancipation of One Harley Quinn,” a spinoff from the 2016 film “Suicide Squad” that she conceived more than four years ago. The movie, which Robbie stars in and produced, hits theaters on Feb. 7. She is currently shooting James Gunn’s “The Suicide Squad,” a sequel to the original film, in Atlanta. It’s slated for release Aug. 6, 2021.

Plenty of female actors — Theron, Witherspoon, Viola Davis — start companies to produce their own movies. What’s unusual is that Robbie was just 24 when she founded hers.

Only seven years earlier she had moved from the Gold Coast in Queensland, Australia — where she’d grown up as the third of four children raised by their mother — to Melbourne in hopes of acting professionally. Despite having no money and knowing no one, she was quickly cast in “Neighbours,” the iconic soap opera that also launched the careers of Liam Hemsworth and Kylie Minogue. “I didn’t think there was higher than that for me,” she recalls. When her contract was up, she moved to Los Angeles, and was again cast right away: this time playing a stewardess on ABC’s stylish but short-lived “Pan Am.” From there, she worked steadily, but broke out definitively in 2013 in the attention-getting role of Naomi in Martin Scorsese’s “The Wolf of Wall Street,” in which she had Leonardo DiCaprio’s Jordan Belfort wrapped around her finger.

Now 29, Robbie runs LuckyChap Entertainment, which she founded in 2014 with now-husband Tom Ackerley and their friends Josey McNamara and Sophia Kerr, out of an airy, farmhouse-style office in Los Angeles.

She had met Ackerley and McNamara when they were assistant directors on the romantic drama “Suite Française” the year before, and after getting drunk together after the London premiere of “The Wolf of Wall Street,” they all decided to share a house in the Clapham neighborhood of London. (Kerr, Robbie’s childhood friend, was a fourth roommate.) The company was born at their kitchen table out of Robbie’s desire to create her own work. She would read scripts and say, “I want to play that character, but it’s a guy — how do I self-generate?” McNamara says. “But also, she was at a place in her career where she had the ability to set up a company, and wanted to support other female creatives and give them the platform she was getting herself.”

Robbie is intensely involved, sometimes too involved. “She reads every script — we tell her not to watch every single daily,” Ackerley says. “Ultimately, she does probably far too much.”

Notes producer and co-star Theron, “Margot just impresses the bloody weasels out of me.” She laughs at the turn of phrase. “At this age taking control of her career, and just being so proactive in what she wants to make, what she wants to put out there — I’m a little intimidated by her.”

The events of “Bombshell” take place before the post-Harvey Weinstein #MeToo movement, but its lessons infuse every frame. #MeToo, which resulted in seismic changes in how women’s stories are told on screen, and who gets to tell them — specifically, the battle cry for more women writers and directors — caused Robbie and LuckyChap to look inward. The company had done its first three films with male directors. “At the start of 2018, we made a conscious decision to shift to try to find more women behind the camera,” Ackerley says.

“We were looking at our own work in a different way,” Robbie says. “Some of our projects felt extremely relevant and more urgent to tell. And other ones felt irrelevant.”

“Birds of Prey” felt urgent. It features Mary Elizabeth Winstead as Huntress, Jurnee Smollett-Bell as Black Canary and Rosie Perez as Renee Montoya. It’s written by a woman (Christina Hodson), directed by a woman (Cathy Yan) and has women producers (Robbie and Sue Kroll). The movie is an ambitious leap forward for LuckyChap — a $75 million, R-rated, Warner Bros./DC Entertainment production.

“Margot just impresses the bloody weasels out of me. At this age taking control of her career, and just being so proactive in what she wants to make — I’m a little intimidated by her.”

Charlize Theron

During “Suicide Squad,” Robbie says she “fell in love with” Harley Quinn, though she didn’t understand why the wildly brilliant, unstable character would stay in a relationship with the Joker (played by Jared Leto), who “wants to kill her most of the time.”

She dove into research: She read the Sam Shepard play “Fool for Love,” about a destructive relationship, and listened to TED Talks by women with schizophrenia who were also accomplished professionals. She immersed herself in the world of DC Comics, which she adores. “Harley has this unpredictable nature that means she could react in any way to any situation, which as an actor is just a gift,” Robbie says.

A year before “Suicide Squad” came out, with the go-ahead from Warner Bros. and DC to explore a Harley spinoff, Robbie met with British screenwriter Hodson, with whom she shares an agent. Over brunch, which turned into pizza and mimosas, they bonded.

“An hour and a half later, we were drunk on a Wednesday morning, and we’ve been friends ever since,” Robbie says. “The ideas started flowing.” In person at the Four Seasons Hotel in Beverly Hills, Robbie exudes enthusiasm, speaking effusively about subjects such as the “Harry Potter” novels (“I read them on repeat”), Kayla’s Sapphic chemistry with Kate McKinnon’s “Bombshell” character, Jess Carr (“I secretly want a spinoff movie where Kayla and Jess go on a road trip with their opposing political views and blossoming romance”) and LuckyChap’s office (“It just feels like a nice house!”) — it’s easy to picture that drunken, brainstorming meal.

Upon its August 2016 release, “Suicide Squad” was greeted by some of the worst reviews for a comic book movie ever, though critics and fans agreed that Robbie was the best thing in it. The film made $746 million worldwide, a sequel was greenlit — critics be damned — and LuckyChap signed a first-look deal with Warner Bros.

As for Robbie’s vision for “Birds of Prey,” Hodson says: “She really wanted to see Harley with girlfriends, Harley in a girl gang. Harley is such a naturally sociable character. And I think there was just a general longing to see girls together on screen — women being friends.”

Ackerley agrees about Robbie’s motivations. “She has a group of friends in the U.K.; she has a group of friends in Australia; she has a group of girlfriends here,” he says. “They live fun and vivacious lives. And she was like, ‘I don’t see that on screen.’” She also wanted the film to be rated R, for which, since “Deadpool” hadn’t yet come out, there was no precedent — and “it took a bit of convincing,” Robbie says.

Robbie and Hodson would meet to watch movies, and to discuss “comics that we love, different movies we love,” Robbie says. They would look at something like “Trainspotting”: “How did they achieve this feeling of beautiful chaos, but within it, everything feels satisfying?” she wonders. One of their sessions lasted 13 hours, Hodson recalls. “I was at the keyboard; she was doing story cards. She is remarkable in that sense. I certainly don’t know of any other actors like her who would do that.”

The two got along so well that when Hodson had an idea for improving the dismal numbers for women screenwriters, they decided to create the Lucky Exports Pitch Program, a four-week writers’ room for six writers; four of the selected were women of color. (Hodson herself is half-Taiwanese.) Each came in with kernels of ideas, and now, with the program having just wrapped, all have solid pitches — and Hodson and LuckyChap attached as producers. “We are going to go out and pitch to all the studios and hopefully get them sold, and get them made,” Robbie says.

When it came to finding a director for “Birds of Prey,” Robbie and the other producers — who by that point included Kroll, the longtime Warner Bros. marketing chief executive who now runs Kroll & Co. Entertainment, and “I, Tonya” producer Bryan Unkeless — were committed to trying to hire a woman. But as with “I, Tonya,” directed by Craig Gillespie, they wanted to choose the best person for the job. In the end, Yan, a Chinese American director whose sole movie credit was the 2018 indie feature “Dead Pigs,” sold them. “She spoke to the aesthetic color palette, how she wanted to shoot action, how she wanted costume design to be reflective of the characters’ personalities,” Robbie says. “It was perfect.”

The movie, as its subtitle implies, starts after Harley’s breakup with the Joker. Robbie confirms that Leto’s incarnation of the character doesn’t appear, not even as a cameo. As far as that other “Joker” goes, Robbie thinks Joaquin Phoenix “did a phenomenal job.” But “Birds of Prey,” she says, isn’t at all like the Todd Phillips film: “I feel like the ‘Joker’ film was much more grounded. Ours is different. It’s heightened.”

“Birds of Prey” will be the first of five tentpole movies released in 2020 directed by women: Niki Caro’s “Mulan,” Cate Shortland’s “Black Widow,” Patty Jenkins’ “Wonder Woman 1984” and Chloé Zhao’s “The Eternals” are the others. It’s reflective of Hollywood’s glacial move toward progress, Kroll says, in which “women are part of every conversation now.” Kroll loves how “Birds of Prey” turned out, calling its characters “nuanced” and saying the film has “a beautiful sense of place.”

“But at the end of the day,” she adds, “it’s a really fun, badass group of women getting together. It’s a ride. It’s a crazy ride.”

On the experience of working with Robbie as a producer, Kroll says: “If she were not such a gifted actor, and if she decided she didn’t want to do that anymore, she could be a full-time producer. She’s really good at it.”

Kroll is one of many colleagues who speak admiringly about Robbie. Roach raves about her “Bombshell” performance. “She’s very precise, and she’s worked out the craft of it all. But then once that’s worked out, an amazing sort of heart and spirit and soulfulness all kick in on top of the craft,” he says. “It’s really a wonder to experience it. I felt very, very fortunate to be on set.”

Toward the end of “Bombshell,” Theron’s Megyn Kelly, seeking out other possible Ailes victims, approaches Kayla. “You should report Roger,” she says. “You’ll be protected.” The scene takes a turn when Kayla, whom Megyn thinks will express gratitude, instead accuses her of complicity. “Did you think what your silence would mean for us? The rest of us?” Kayla asks, choking on her anger and sorrow.

Robbie gave a lot of thought to how Kayla would feel in that moment, balancing how much she “idolizes” Megyn against her sense of betrayal. “I wanted it to have heat behind it. I wanted to have real accusation behind it,” she says. Roach was surprised by how the scene played out. “She had a very emotional reaction to it, and apologized after: ‘I just got caught up in it.’ And I said, ‘That was amazing.’ We tried some less emotional takes, but it just was never as powerful.”

“I think that was just her emotions coming out in an unexpected way. And it was really fun to play that with Charlize,” Robbie says.

Kayla — who says things like “Fox is how we do church!” — could have been cartoonish. But not in Robbie’s hands.

“I think her performance in this movie is a very rare performance,” Theron says. “I’ve seen this movie 50 times now, if not more, and every single time she gets me. It’s just ridiculous — and I’m dead inside! And she gets me every f—ing time.”