(CNN) John T. Earnest, the accused synagogue shooter, may have summed it up best himself.

"If you told me even 6 months ago that I would do this I would have been surprised," he allegedly wrote in an online manifesto before last weekend's attack on the Chabad synagogue near San Diego.

On Tuesday, Earnest entered a not guilty plea in court. Wearing glasses and dark blue jail-issued clothes, the 19-year-old was assigned a public defender as he faces one count of murder, a count of arson of a house of worship and three counts of attempted murder.

He will be held without bail while investigators, family and friends continue to piece together Earnest's baffling, and seemingly sudden, departure from the world he once knew.

How, and when, they wonder, did the piano playing, academic overachiever from a churchgoing family of lifeguards, go so wrong?

"How our son was attracted to such darkness is a terrifying mystery to us," Earnest's family wrote in a statement released this week. They said their son's "actions were informed by people we do not know, and ideas we do not hold."

JUST WATCHED Injured rabbi chokes up remembering shooting victim Replay More Videos ... MUST WATCH Injured rabbi chokes up remembering shooting victim 02:12

Former classmates also say they were perplexed by the turn of events. The Earnest in court Tuesday is unrecognizable from the high school boy they knew two years ago.

Back then he was known as the guy who was so smart that he didn't bother to take notes in advanced chemistry and physics, but still aced every exam; so quiet that some teachers were startled when he spoke.

"I walked the same hallways as this guy, read the same textbooks, drove around the same areas, and essentially had the same upbringing," one student posted on the online forum Reddit, "but he became a murderer?"

CNN interviewed the student and confirmed she was the author of the post.

According to law enforcement officials, Earnest used an "AR-type assault weapon" to shoot the victims. Prosecutors told a judge Tuesday that Earnest donned a tactical vest and helmet during the attack and had extra magazines of ammunition with him. The shooting, they said, was captured on video and abruptly ended when either his gun jammed or he was unable to reload. He fled the scene and called 911 on himself, making statements about the incident that San Diego District Attorney Summer Stephan described as "consistent with the charges."

Stephan did not say how or when Earnest acquired the weapon, but that the investigation "so far indicates that he obtained the gun legally." A new law that took effect in California earlier this year requires gun purchasers to be at least 21 years old under most circumstances. One exception, Stephan noted, was if the weapon was purchased by someone with a hunting license. She would not confirm whether that was how Earnest acquired the gun.

Stephan said prosecutors have not decided whether to seek the death penalty against Earnest, who was pursuing a nursing degree at California State University at San Marcos before the shooting.

In the online manifesto, Earnest allegedly wrote he was inspired by an attacker who killed scores of people at a New Zealand mosque and Islamic center on March 15. The teen said he conceived of and executed his own assault within a month. The assault on the synagogue was April 27.

The manifesto reflects a long-simmering, extreme hatred of Jews. His expletive-filled rant refers to Jews as degenerative, genocidal, ugly, cursed and corrupt. He blames the Jews for a multitude of what he considers societal problems, from communism to pornography. He added bigoted and racist comments about many other ethnicities, religions and races.

Earnest brags of what he calls his European ancestry -- his "magnificent bloodline." He claims that his violence is condoned by his Christianity. He rails against law enforcement. He lists Adolf Hitler as one of his inspirations.

The teenager's family said they were disgusted by his actions, writing in their statement, "He has killed and injured the faithful who were gathered in a sacred place on a sacred day. To our great shame, he is now part of the history of evil that has been perpetrated on Jewish people for centuries."

JUST WATCHED 8-year-old Chabad victim shows reporter her injury Replay More Videos ... MUST WATCH 8-year-old Chabad victim shows reporter her injury 05:05

Earnest's purported words and actions are in stark contrast to the clean-cut looking student featured on a Facebook page for Mt. Carmel High School's Fraternity of Academic and Civic Excellence.

He is dressed in a blue suit and red tie, arms folded, smile beaming. Next to him is a bio describing his 4.31 GPA, membership on the varsity swim team, prowess in piano and first, second and third-place showings in the school talent show.

Francis "Sonny" Pizzo, who graduated from Mt. Carmel High School with Earnest in 2017, said he did not know Earnest well, but recalled him as "a quiet person, not very outspoken."

Pizzo said he was known for his musical talent, but that he did not seem particularly social.

"He didn't bring attention to himself," Pizzo said.

A fellow student who posted about the attack on Reddit said she felt physically ill for hours after learning that Earnest, who she said friends called "Johnny," was responsible.

She recalled how Earnest would sit in class, listening to music, "both hands shoved into his jeans pockets ... and still managed to ace every exam and quiz."

CNN reached out to the author of the post and confirmed her identity as a student at Mt. Carmel High School. She said school officials have discouraged students from speaking with the media and asked that she not be identified by name. She said she was friends with a member of the Earnest family and thought very highly of them.

In an interview, the student said she was struck by the contrast between Earnest's alleged online bluster and his in-person demeanor.

"He seemed very outspoken in that post," she said. "But in real life he doesn't talk."

The only exception, she said, was that he had a reputation for sometimes airing conservative views in a government class.

"He didn't really reveal himself to be a radical individual at the time," she said. "He was off the radar."

The student, who said she also held conservative views on topics including immigration, taxes and abortion, said they were not popular positions with most fellow students.

"Conservatives have it rough here," she said. "They don't respect our opinion."

In her Reddit post, she said she could not begin to understand what prompted him to carry out the attack, which she called "the worst crime that any mortal can commit."

Another student who posted online about the attack called it "horrific and reprehensible" and said she was "deeply upset" for the victims.

But she also wrote that she felt anguish for the family of the shooter, particularly his father, who was also her physics teacher at Mt. Carmel.

She said she and other students were with the elder Earnest, also named John, on the morning of the shooting for an Advanced Placement exam preparation session he was leading.

"I can vividly remember seeing the smile on his face yesterday morning with a batch of cookies he had baked for us," she wrote. "For each student that came to the review, he had prepared by hand [a] special binder with review for our upcoming exam. This was one of countless ways Mr. Earnest went above and beyond for his students."

CNN contacted the author of the post and confirmed that she was a student at Mt. Carmel High School. She, too, asked not to be identified due to the sensitive nature of the subject.

She wrote in the post that she is close friends with other members of the Earnest family and knows they had no hand in what John Earnest is accused of doing.

"There may be many reasons why he got radicalized but one thing is for sure, his family is not the reason," she wrote. "It is unbearable to see such a tragedy affect their family this way."

District Attorney Stephan was asked at a news conference Tuesday whether Earnest's family had any knowledge of his extreme views.

She declined to say what the family may have known but added: "Many times families don't see things happening."