As soon as she entered the courtroom, former middle school teacher Stephanie Peterson Ferri used her long black hair to shield her face from the cameras.

She shuffled toward the judge and whispered to her attorney.

Minutes later, the judge agreed to cut her bail in half — from $25,000 to $12,500.

The 26-year-old ex-science teacher is accused of having sex with a 14-year-old middle-school student. She was charged Wednesday with two counts of lewd or lascivious battery and one count of transmission of harmful materials to a minor.

Ferri resigned from her job Monday at New Smyrna Beach Middle School.

The state asked that her bail remain the same, based on how “egregious” the crime was and the fact that her accuser is a minor. Her attorney, Aaron Delgado, argued that Ferri poses no societal danger or flight risk and asked that she be released on her own recognizance. County Judge Bryan Feigenbaum compromised.

During her first-appearance hearing Thursday afternoon, Ferri was dressed in an orange, jail-issued jumpsuit. She looked pale and her appearance — aside from her long, dark-blue painted fingernails — was significantly different from the photographs of her that were widely viewed once news stories of her arrest were posted on the Web. Those viral images were taken from her Facebook page, which was removed from public view as of late Wednesday afternoon.

Volusia County sheriff’s deputies said Ferri carried on a sexual relationship with her former male student beginning in November 2017. The pair had their encounters at her house while her husband, a DeLand firefighter she’s now in the process of divorcing, was at work, and inside a barn on the teen’s parent’s property, authorities said.

Detectives said they also obtained provocative photos of Ferri, which she had sent to the teen.

Delgado already has filed a motion to suppress Ferri’s admission statements, alleging they were “obtained illegally.” He also filed a motion to dismiss all charges, court records show.

Delgado declined to discuss the case.

Ferri joins a list of female teachers in Florida who have been accused of having sex with male students. In October 2008, Cynthia Horvath, then 45, was a teacher at Warner Christian Academy in South Daytona when she was arrested on allegations of having sex with a 17-year-old student. She pleaded no contest to a second-degree felony charge and received house arrest for a year. She also was required to register as a sex offender. Delgado was her attorney.

Perhaps the most notorious such case in Florida occurred in 2004. Debra Lafave, who at the time was 24 years old, had sex with a 14-year-old student multiple times in Hillsborough and Marion counties. She pleaded guilty to a count of lewd and lascivious battery and received three years of house arrest and seven years of probation. She, too, is a registered sex offender