Preheat your oven to 350°F (175°C). Grease and flour the cake pans.
In a mixing bowl, whisk together the flour, sugar, cocoa powder, baking powder, and salt.
In another bowl, beat the softened butter until creamy. Gradually add in the sugar and continue to beat until light and fluffy.
Mix in the eggs one at a time, then add the cooled espresso and vanilla extract, mixing until well combined.
Gradually add the dry ingredient mixture to the wet ingredients, carefully mixing until no streaks of flour remain.
Divide the batter evenly between the two prepared cake pans. Bake for 20-25 minutes, or until a toothpick inserted in the center comes out clean.
Once baked, allow the cakes to cool in the pans for 10 minutes, then turn them out onto a cooling rack to cool completely.
While the cakes are cooling, prepare the mascarpone filling. In a bowl, whip the heavy cream until soft peaks form.
In another bowl, mix the mascarpone, powdered sugar, vanilla extract, and coffee liqueur until smooth and creamy.
Gently fold the whipped cream into the mascarpone mixture until well combined.
When the cakes are completely cool, slice each cake in half horizontally to create four layers in total.
In a shallow dish, combine some brewed espresso with a bit of sugar. Dip each layer of cake lightly into the coffee mixture to soak.
Assemble the cake by placing one soaked layer on a serving platter and spreading a layer of the mascarpone filling on top. Repeat the process with the remaining layers.
Finish with the last layer of cake, then spread a thin layer of mascarpone on the top and sides of the cake. Chill the assembled cake in the refrigerator for at least 2 hours.
Before serving, dust the top with cocoa powder and add dark chocolate shavings if desired.