STANFORD – It took just one half of football for Stanford coach David Shaw to realize that he would need to adjust his play-calling this season.

Facing San Diego State in the season opener, the Cardinal ran for just 50 yards, including 29 yards on 18 carries from Heisman Trophy frontrunner Bryce Love. But receiver JJ Arcega-Whiteside had 226 receiving yards, the third-highest total in school history, while sophomore quarterback K.J. Costello threw four touchdown passes.

“We wanted to establish the run, which never really got going,” Shaw said. “So we came back at halftime and said, ‘OK, let’s just stop being stubborn.’”

And thus Stanford, its decade of success rooted in the run game, became a passing team. Not just for the rest of the San Diego State game, but for the rest of the season.

Whether it was throwing from fourth-and-1 out of the jumbo package against Utah or calling nothing but passes on the first two series last week against UCLA, Stanford (7-4, 5-3 Pac-12) has transformed its offense this season. Only seven FBS teams (out of 129) have rushed for fewer yards per game than Stanford. Only 18 have passed for more.

Costello, a redshirt sophomore in his first full year as a starter, leads the conference in passing efficiency and has joined John Elway and Steve Stenstrom as the only Stanford quarterbacks to throw for 300 yards seven times in a season. Arcega-Whiteside’s 14 touchdown catches are tied for the most in team history, Kaden Smith had the most catches by a tight end in FBS before his injury earlier this month, and fellow tight end Colby Parkinson recently became the third Stanford player to catch four TDs in a game.

“We’re pass protecting very well right now and we have got a quarterback that has an outstanding arm and we’ve got guys that can go get it,” Shaw said.

After passing the ball less than 40 percent of the time in Shaw’s first seven seasons, the Cardinal has thrown on 55 percent of its plays this year, the second-most in the Pac-12 behind Washington State’s pass-happy Air Raid.

But that’s not to say that Shaw has changed his mindset.

“We have to run the football,” Shaw said after last month’s loss to Utah, when Stanford threw on 42 of 70 plays (60 percent). “I’m sure some people will write that change will be due — throw the ball all over the yard. Those people don’t know me. Those people don’t understand this program. Those people don’t understand what it’s taken to get where we are, and how many games that we’ve won with the philosophy that we have. It’s a proven philosophy.”

But there’s something Shaw values even more than running the ball – winning. And this season, that means throwing.

Shaw isn’t the only person having to adjust his mindset. Senior center Jesse Burkett acknowledged that it’s been a transition to go into a pass-heavy offense.

“We like to impose our will on a defense,” Burkett said. “This year it’s just kind of shifted into imposing the passing game, which isn’t our usual route, but we’ll take 400 yards of offense a game however we can get it.”

The lack of success in the run game was a surprise considering Stanford’s personnel. Love was coming off a season in which he had rushed for 2,118 yards and 19 touchdowns. His backup, Cameron Scarlett, had averaged 4.3 yards per carry and scored eight touchdowns. They would be running behind four offensive linemen who received all-conference recognition in 2017.

As it turned out, the season opener wasn’t an outlier for Stanford or for Love. He has rushed for only 665 yards and while no small part of that can be attributed to his ankle problems, he had been held in check when healthy early in the season.

The offensive line has been unsettled, with six different starting combinations (only left tackle Walker Little has started every game), all while adjusting to new offensive line coach and run game coordinator Kevin Carberry. But past Stanford teams hadn’t let injuries or coaching changes stop them from running the football effectively.

“It feels unusual,” Costello said. “The game’s flowing differently, there’s no doubt. There’s no secret we’re not as balanced as we want to be.”

After seeing how effective the team was in the two-minute drill, Shaw has even implemented hurry-up no-huddle offense in recent weeks, another trendy offensive technique that previously would have been anathema on The Farm under Shaw and Jim Harbaugh.

The biggest beneficiary from the changes has been Costello, who is taking advantage of the opportunity to air it out and leads the Pac-12 in yards per attempt.

San Diego State’s defensive approach – taking out Love and forcing Costello to beat it – may have seemed smart after last season’s results. But Costello has showed he’s one of the top downfield passers in the game, while also improving on his pocket presence and ability to read defenses.

Even when he stumbles early, such as the early pick against UCLA or two interceptions in the first quarter against UC Davis, Costello is able to shake it off.

“I never worry about him. He’s unshakable,” Shaw said. “He missed a couple of throws, made a couple of bad decisions and he comes back, and he’s bouncing on his toes and he says, ‘Okay, Coach, what did you want to call next?’”

Saturday against Cal, which has the best pass defense in the Pac-12, it’s a good bet Stanford still will attack through the air.

“Still want to run the ball, still want to be physical,” Shaw said. “But at the same time, we also want to be on the attack and we have wide receivers and tight ends that are making plays in space. I think we’ve evolved a little bit to utilize the personnel we have.”