GWANGJU, South Korea — At 9:45 p.m., Nathan Adrian was atop the medal podium with his teammates, accepting gold medals for their strong turn in the 4x100-meter freestyle relay at the FINA world championships. Adrian wasn’t even back to the athletes’ village yet when an email arrived at 10:11.

Adrian, the anchor leg, knew he had a good swim, posting a time of 47.08 seconds, the fastest on his team and the third best among the event’s 32 swimmers. But the email went deeper. Suddenly, Adrian could see his stroke rate, stroke tempo and detailed split times, complete with charts and tables. And he could see how all those numbers compared with his previous big races over the past three years.

“I wasn’t even ready to look at it yet, but it was all right there,” he said with a laugh.

The email came from Russell Mark, USA Swimming’s high performance manager, whose unusual background and engineering smarts have helped American coaches and swimmers tap into detailed analytics and treat a simple sport like a complex science.

“He’s kind of our secret weapon,” said Dave Durden, head coach of the U.S. men’s team.

Mark’s job is to apply data and video to help the nation’s top swimmers shave tiny slivers of time in the water. Virtually every sport has undergone an analytics revolution of sorts in recent years, and Mark’s role is to help make USA Swimming faster by being a lot smarter.

“I think swimming is at the infancy for this stuff,” he said. “Even without data, we’re still learning about technique and how people can swim fastest. But when you add numbers and video, the possibilities are infinite right now.”

Mark swam at the University of Virginia, where he studied aerospace engineering. He had dreamed of someday working for NASA and becoming an astronaut. After college, he took a job with Pratt & Whitney, the aerospace manufacturing giant, and worked on mechanical systems in the company’s military division.

Barely nine months into the job, he was stationed at a desk, fiddling with a computer. He came across a posting on USA Swimming’s website for a coaching fellowship. He soon walked away from a career where he was making $65,000 right out of college for a swimming job that paid $1,000 per month.

“It was only supposed to last a year,” he said.

Now 17 years later, Mark has worked with virtually every U.S. swimmer who’s competed on the national stage. At the world championships, he’s especially busy, working nearly around the clock to dissect races.

The 39-year-old arrives at the pool early. During training sessions, he dips a GoPro camera into the water. He holds the other end of a stick and walks along the deck, recording swimmers as they make their laps. The video is instantly transferred to an iPad, and Mark can review with swimmers almost as soon as they get out of the water.

When he started at the organization, he had never seen underwater video. In those early days, if coaches wanted to study a swimmer’s form and technique from below, they might use a weatherproof security camera with cables snaking out of the water, attached to a computer that would be pushed in a cart alongside the pool. Now Mark works almost in real time with a library of clips from several meets stored on his iPad and laptop, ready at all times to dissect starts, turns, head position, form, arm and hand movement and leg kicks.

“He has this eye — like a photographic memory for our strokes,” said Adrian, a five-time Olympic champion who has worked with Mark since he was 16. “He notices the smallest things.”

Mark sees things others might miss, applying some of the general principles from his previous line of work: physics, force production, fluid dynamics and fluid mechanics.

“Engineering, in general, is problem solving,” he said. “Seeing something, deconstructing it, reconstructing it, explaining it and all the pieces and components. That thought process is what has helped here.”

During races, Mark is stationed high above the pool with an overhead camera. When a race ends, that’s often when Mark and his team spring into action. They’ll instantly review the footage, manually counting strokes by tapping a computer key over and over. They’ll be able to calculate the swimmer’s stroke rate (the number of strokes per minute) and stroke tempo (essentially how long it takes a swimmer to make a single stroke through the water).

“Let’s say Katie Ledecky is swimming at a 1.15 or 1.20 tempo — so it takes her 1.2 seconds to move her arms in one cycle,” he explains. “What’s crazy is we’ll see that a difference from 1.20 seconds per cycle to an average of 1.22 seconds can change your speed by tenths of a second. We’re talking 0.02 seconds, but over 20 cycles, that impacts your speed. So we’re thinking about ways we can get them to move their arms just a tiny bit faster.”

They’ll also go through the video frame by frame to collect times at different points in the race. They aren’t studying 50-meter splits. Instead, they’ll break that 50-meter lap into three segments: the first 15 meters, the middle 20 and the final 15. When they look for areas to improve, they might notice that an athlete can find fractions of a second in the middle of a lap or maybe need to maintain a higher stroke tempo on the final push to the wall.

This week, for example, Andrew Wilson, an ardent student of the race data, was able to cut time in the first 15 meters of his breaststroke. And Mark noticed that Kelsi Dahlia got off to a slow start in an early heat of her 100 butterfly, so after studying video of past races, they met and discussed a tiny tweak.

“It’s one thing to collect and give the data,” Mark said, “but I think the real challenge and opportunity is in understanding and connecting the data to action and performance.”

Mark utilizes analytics to tackle bigger issues, too. He counted the number of Olympic swimming medalists the United States produced from 2004 to 2016. There were 13 backstrokers, seven breaststroke medalists and 11 individual medley specialists — but only four butterfly medal-winners. He then counted the U.S. finalists at the 2017 world championships and junior worlds with 16 possible spots available in each stroke. Sixteen breaststrokers reached their respective finals, as did 14 backstrokers and 14 IM swimmers — but only six butterfly swimmers.

The result: Mark, along with Mitch Dalton, the national junior team director, launched what they called “Butterfly Revolution” two years ago, a concerted effort to strengthen the stroke in the United States and create more depth across all levels.

“I think we’re now in an exciting place,” he said. “We’re seeing some movement in butterfly in the U.S.”

Over the course of a year, Mark travels around the country to meet with national team members and works closely with them when they come to Colorado Springs to train. He’ll be a key to the team’s push toward the Tokyo Olympics next summer, but will also work with younger swimmers so that USA Swimming is competitive for years to come.

“He’s been a consistent force with USA Swimming for such a long time,” said Greg Meehan, the U.S. women’s coach. “He’s always trying to get out in front in terms of stroke technique, race data, whatever is out there. He’s just always thinking about what’s next.”

More on the Olympics: