Syrian student Ali Khaled Stouf has to walk down several steps into a hole in the ground to get inside his school - a cave.
There for four hours each morning, he studies subjects like Arabic, English, maths and religion, sitting on a rug with dozens of children in the underground space in Tramla, an opposition-held village in Syria's northwestern Idlib province.
"I study in a cave. The conditions are not very good but the professor and his wife treat us very well," the 14-year-old, originally from neighboring Hama province, said. "We sit on the ground and often we don't see clearly because it is dark."
His teacher Mohamed and his wife, also from Hama, have opened up their underground home to teach some 100 children, whose families have been displaced by the Syrian conflict.
More than five years of war, which began as a peaceful protest against President Bashar al-Assad and has since drawn in foreign military involvement and allowed for the growth of Islamic State, has displaced millions of Syrian children and limited their access to education.
With schools themselves at times attacked, teachers make do with the basics to provide education.
Mohamed said the primitive, six-month-old school floods when it rains, forcing him to teach outside or in a tent, although he prefers the security underground.
"We believe the cave is the safest place from shelling and air strikes and all the students are in one place," he said.
Idlib province is a stronghold of insurgent groups including the al-QaIda-linked Nusra Front and has been regularly targeted in airstrikes by the Syrian government, whose war effort has been boosted by the Russian air force.
At the Souriya al-Ammal (Syria the hope) school, in the town of Maarat al-Numan, corridors and classrooms are bullet-ridden and sometimes crumbling. In one less damaged area, walls have been repainted and the school now has some 250 pupils.
"War has affected education massively; most schools, if not destroyed completely, are damaged," school supervisor Abdullatif al-Rahoum said, adding those who missed out on education are now playing catch up with younger students.
"The biggest challenges we face are the warplanes, which never leave the skies. This always worries students."
In the nearby town of Saraqib, a mobile caravan serves as a classroom, run by a group aiming to reach children who have no access to schooling in the area.
Lack of books is problematic. Teachers in Idlib said they relied on charities or used books printed in neighboring Turkey by the opposition run Directorate of Education. In the rebel-held town of Douma, outside Damascus, Mounir Abdelaziz, a member of the opposition-run education body, said local schools were using old textbooks, but with changes.
"We follow the same curriculum as the education ministry but with some modifications and articles related to the [Assad] regime deleted," he said.