Preheat your oven to 350°F (175°C).
In a saucepan, combine sugar and water. Bring to a boil and simmer for about 10 minutes to make a syrup. Add cardamom and cinnamon, then set aside to cool.
Brush a baking dish with melted butter.
Layer 6 sheets of phyllo dough in the baking dish, brushing each layer with melted butter.
Sprinkle a layer of chopped walnuts and almonds over the phyllo dough.
Repeat the layering process with phyllo dough and nuts until you run out of ingredients, ending with a layer of phyllo dough on top.
Brush the top layer with melted butter.
Using a sharp knife, cut the pakhlava into diamond-shaped pieces.
Bake in the preheated oven for about 30-35 minutes or until golden brown.
Remove from the oven and immediately pour the cooled syrup over the hot pakhlava.
Allow the pakhlava to cool and soak up the syrup before serving.
Enjoy!