UNIVERSITY PARK, Pa. — Christian Hackenberg has been in some sort of zone the past two weeks.

Whether he is slinging touchdowns, reeling off long completions or extending plays with his legs, this Hackenberg looks much different than the one who was asked to manage games earlier this season. Penn State’s junior quarterback is adjusting to whatever opposing defenses throw at him, finding a rhythm, and success has followed.

“Quarterbacks are graded by touchdown-to-interception ratio, third-down percentage, red zone, and — obviously, most importantly — wins and losses,” coach James Franklin said. “I’m pleased with him, pleased with the whole offense. … Staying positive works.”

For the second consecutive week, Hackenberg put together an outing reminiscent of his standout freshman season, one when he moved the offense up and down the field and got the ball to his playmakers. And for the second consecutive week, it resulted in a win, with the Nittany Lions (7-2, 4-1 Big Ten Conference) also riding a dominant defense that shut out Illinois, 39-0, Saturday at Beaver Stadium.

Hackenberg, who exited the game early in the fourth quarter with the Lions holding a sizable lead against the Fighting Illini (4-4,1-3), completed 21 of 29 passes for 266 yards and two touchdowns. He hasn’t thrown an interception in the past six games and has thrown 12 touchdowns in that span. Hackenberg has 19 completions of 16-plus yards in the past two games — with nine coming against Illinois — after 21 of those in the previous seven games combined.

Hackenberg delivered first-quarter touchdown passes to receivers Chris Godwin and Geno Lewis, for completions of 5 and 6 yards, and followed a sharp first quarter in which he completed 8 of 9 passes for 92 yards and two touchdowns with the first touchdown reception of his career.

Running back Nick Scott, who hit Godwin for a 32-yard halfback pass earlier this season, stepped to his left and delivered a pass to a wide-open Hackenberg, who was split out at the bottom of the formation, in the third quarter.

“I was a little worried I was going to underthrow him, that’s why I put it right at him,” said Scott, who played some quarterback in high school. Hackenberg was knocked out of bounds after the play and Scott had a few choice words for the Illini defender.

“I always have Hack’s back,” Scott said.

Hackenberg couldn’t recall the previous time he caught a touchdown, but said the Lions practiced the play successfully all week in practice.

Add in a 3-yard rushing gain on a play in which Hackenberg — not known for his elusiveness — broke three tackles, and everything seems to be clicking for No. 14.

With freshman running back Saquon Barkley back at full strength, rushing for 84 yards and catching three passes for 58 yards, Hackenberg looked at ease in and out of the pocket.

“It gets tough at times when you’re getting hit in the mouth a couple times (and) it’s always in the back of your head,” Hackenberg said. “But (we’re) showing (we’re) able to overcome that and (we’re) doing what we need to do to get the job done. … We just got lost in the flow of the game as a team, and that really helped.”

It helps that as the offense finds its footing, the defense continues to keep its foot on the gas.

Penn State, which entered the game 22nd in defense in Football Bowl Subdivision (318.6 yards per game), was not outmatched by an Illinois offensive line that entered the game having allowed just eight sacks through seven games. The Nittany Lions’ dominant front four of Carl Nassib, Anthony Zettel, Austin Johnson and Garrett Sickels rattled Illini quarterback Wes Lunt, who completed 16 of 36 passes for 129 yards.

The Lions sacked Lunt three times and the defense shored up tackling issues that popped up the previous two weeks.

“We never stop, even if it’s a three-step (drop), we push the pocket and try to get our hands up. If it’s five-step, obviously we try to rush the quarterback,” Johnson said. “It’s definitely paying off.”