Preheat your oven to 350°F (175°C) and prepare a 12-cup muffin tin with cupcake liners.
In a spacious bowl, combine the flour, sugar, cocoa powder, baking soda, baking powder, and salt, whisking them together until well mixed.
In a separate bowl, blend the cooled coffee, vegetable oil, vanilla extract, vinegar, and eggs until smooth.
Gently fold the wet ingredients into the dry ingredients, stirring just until combined; it’s fine if the batter is a bit lumpy.
Spoon the batter into the cupcake liners, filling each about two-thirds full.
Bake for 18-20 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cupcakes to cool in the pan for 5 minutes before moving them to a wire rack to cool completely.
While the cupcakes are cooling, make the frosting by whipping the softened butter until light and fluffy.
Gradually incorporate the powdered sugar and cocoa powder, mixing until well blended.
Stir in the cooled coffee and vanilla extract, beating until the frosting is smooth and airy.
Once the cupcakes have cooled completely, generously spread the mocha frosting on top.