Preheat oven to 350°F (175°C). Line a standard 12-cup muffin tin with paper liners and set aside.
In a medium bowl, sift together the flour, cocoa powder, baking soda, baking powder, and salt. Whisk to ensure even distribution.
In a large bowl, whisk the melted butter with both sugars until well combined and slightly glossy. Add eggs one at a time, whisking well after each, then add vanilla extract.
Alternate adding the dry ingredients and the buttermilk into the wet mixture, starting and ending with dry. Mix gently with a spatula until just combined—avoid overmixing to keep the cupcakes light.
Stir in the hot coffee or water slowly until the batter is smooth and pourable. Fold in the chocolate chips if using for extra fudginess.
Divide the batter evenly among the prepared cupcake liners, filling each about ⅔ full. Tap the pan gently on the counter to remove air bubbles.
Bake for 18–20 minutes or until a toothpick inserted into the center comes out with just a few moist crumbs. Let cupcakes cool in the pan for 5 minutes, then transfer to a wire rack to cool completely before frosting.