Place the sugar and water in a saucepan and place it over medium high heat. Bring it to a simmer, and cook for 10-15 minutes until it thickens a bit and sticks slightly to the back of a spoon. Add the lemon juice, turn the heat off and let the syrup come to room temperature. Keep in mind that the syrup will slightly thicken as it cools.
Tear or slice the cheese and make sure to remove the moisture by pressing between paper towels.
Cut the katayif into small pieces using a knife and place it in a bowl. Mix it with the melted butter using your hands to make sure every piece is coated with butter.
Preheat the oven to 350 degrees F and brush the bottom of a 12 inch pan (or two 9-inch pans) with melted butter.
Spread half of the buttered katayif evenly at the bottom of the prepared pan, pressing down firmly with a glass to create a compact base and form walls along the sides of the pan.
Distribute the torn mozzarella cheese evenly over the katayif layer, covering the entire surface.
Spread the remaining buttered katayif over the cheese layer, ensuring even coverage and pressing gently to compact the kunafa.
Bake the kunefe in the oven for 30 to 35 minutes until the top is crispy and golden. if the bottom is golden and the top is still pale in color, turn the broiler on for 3-5 minutes, and make sure to keep a close eye.
Once baked, remove the kunafa from the oven. While still hot, carefully pour the cooled syrup evenly over the entire surface of the kunafa. The hot kunafa will absorb the syrup and stays crispy.
Sprinkle chopped pistachios generously over the kunafa for added crunch and flavor.
Serve warm and fresh out of the oven. Slice into smaller pieces for each person and serve in small plates.