Prepare the Cupcakes:
Preheat your oven to 350°F (175°C) and line a muffin tin with cupcake liners.
In a medium bowl, whisk together the flour, baking powder, and salt.
In a large mixing bowl, beat the softened butter and granulated sugar until light and fluffy, about 2-3 minutes.
Add the eggs, one at a time, beating well after each addition. Stir in the vanilla extract.
Gradually add the dry ingredients to the wet ingredients, alternating with the milk. Start and end with the dry ingredients, mixing just until incorporated.
Divide the batter evenly among the cupcake liners, filling each about 2/3 full.
Bake for 18-20 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cupcakes to cool in the tin for 5 minutes, then transfer them to a wire rack to cool completely.
Prepare the Coffee Soak:
In a small bowl, combine the brewed espresso (or strong coffee) with the coffee liqueur (if using).
Once the cupcakes have cooled, use a toothpick to poke holes in the top of each cupcake.
Gently drizzle or spoon the coffee mixture over the cupcakes, letting it soak in. Be careful not to over-saturate the cupcakes.
Make the Mascarpone Frosting:
In a medium bowl, beat the mascarpone cheese and heavy cream until smooth and well combined.
Add the powdered sugar, vanilla extract, and coffee liqueur (if using). Beat until light and fluffy, about 3-4 minutes.
Assemble the Cupcakes:
Transfer the mascarpone frosting to a piping bag and pipe the frosting onto the cooled, soaked cupcakes.
Use a sifter to dust each cupcake with a thin layer of unsweetened cocoa powder.
Optionally, garnish with dark chocolate shavings for an extra touch of indulgence.