Prep the pan: Heat the oven to 350°F (175°C). Line a 12-cup muffin tin with paper liners.
Whisk dry ingredients: In a large bowl, whisk flour, sugar, cocoa powder, baking powder, baking soda, and salt until evenly combined and no cocoa lumps remain.
Mix wet ingredients (except coffee): In a separate bowl, whisk buttermilk, oil, eggs, and vanilla until smooth.
Combine wet and dry: Pour the wet mixture into the dry ingredients.
Whisk gently until just combined; a few small lumps are fine.
Add hot liquid: Stir in the hot coffee (or water). The batter will be thin—this is what makes the cupcakes moist.
Optional mix-ins: Fold in mini chocolate chips if using.
Fill and bake: Divide the batter evenly among the liners, filling each about 2/3 full. Bake for 16–20 minutes, or until a toothpick comes out with a few moist crumbs.
Cool: Let cupcakes cool in the pan for 5 minutes, then transfer to a wire rack to cool completely before frosting.
Make the buttercream: Beat the softened butter until creamy.
Sift in powdered sugar and cocoa. Add vanilla, salt, and 2 tablespoons milk. Beat until fluffy, adding more milk as needed for a smooth, spreadable consistency.
Frost and serve: Swirl the buttercream onto cooled cupcakes with a knife or piping bag.
Add sprinkles, shaved chocolate, or a pinch of flaky sea salt if you like.