Mario Cristobal correctly predicted the sun would come up on Sunday in Eugene.

Oregon, despite Saturday night’s dark defeat at Autzen Stadium, moved up one spot in this week’s Associated Press poll to No. 19.

Now the Ducks (3-1, 0-1 Pac-12) will try to put the 38-31 overtime loss to No. 7 Stanford in the rearview mirror and focus on the looming road trip this Saturday to face No. 24 California in Berkeley.

“The rebound is not going to be easy,” nose guard Jordon Scott said after the Cardinal outscored Oregon 31-7 after halftime to steal a critical Pac-12 North Division victory. “But by the end of the day (Sunday) everyone is going to be focused on Cal and this will be behind us.”

Oregon found a way to waste what may have been the best performance of Justin Herbert’s career. The junior quarterback completed 92.6 of his throws in regulation, passed for 346 yards and a touchdown, and rushed for 35 net yards against a Stanford defense that was allowing 7.7 points per game.

Herbert connected with wide receiver Dillon Mitchell 14 times for 239 yards. Mitchell flirted with the single-game school records for receptions (16 by Samie Parker vs. Minnesota in 2003) and receiving yards (242 by Tony Hartley vs. Washington in 1998).

“The first NFL draft pick,” Mitchell said after Herbert’s stirring performance in the national spotlight. “That’s basically the only way I can say it. He’s going to come out there and do what he does every night.”

The Ducks finished with 178 yards rushing and held Stanford to 71 yards rushing yards.

But with a chance to take a 31-7 lead with a first-and-goal at the 1, Cyrus Habibi-Likio fumbled for a 9-yard loss. Then center Jake Hanson’s high snap to Herbert hit the ground and was returned by Stanford linebacker Joey Alfieri for an 80-yard touchdown.

“That was my first time running the ball in about five years,” Alfieri, a former standout running back at Portland’s Jesuit High, told the San Francisco Chronicle after his memorable homecoming. “It felt good. It made me kind of miss the tailback days. I don’t know if I’d do it again. It took me a while to recover.”

Oregon appeared to recover and regain control of the game after a 1-yard touchdown run by Habibi-Likio made the score 31-21 with 4:39 remaining in regulation.

K.J. Costello had no choice but to start carving up the Ducks’ secondary and capped a three-play, 79-yard drive with a 15-yard touchdown pass to J.J. Arcega-Whiteside to make it a three-point game.

Oregon was inches away from victory when redshirt freshman running back CJ Verdell, who led the team with 115 yards rushing and a touchdown, fumbled with 51 seconds left.

Jet Toner tied the score with a 32-yard field goal as time expired, and Costello threw a 23-yard touchdown pass to tight end to Colby Parkinson in overtime.

“A lot of back and forth in this game,” Cristobal said. “A lot of things showed up in a positive way that this team was not ready to do a year ago. We were able to compete, and at moments in the game, control the game that we have an opportunity to put away.”

Herbert was nearly flawless in regulation but ended with an interception in the end zone on fourth-and-goal from the 10 in overtime.

“These guys left it all on the field like we expected them to,” Cristobal said. “I’m proud of that part, but also understanding that we have to get on a plane here in about six days and keep playing conference play.”

The Ducks will face a Cal defense ranked 16th in total yards allowed (302.3 ypg) and 27th in passing yards allowed (170.7 ypg). The Bears (3-0) beat No. 20 BYU on the road during nonconference play.

“I know for a fact that no one in Berkeley is going to feel sorry for us,” right guard Shane Lemieux said. “We’ve got to wipe this (Stanford) game really fast. I’m already thinking about Cal right now. This game is over with and there’s nothing we can do but go beat Cal.”