Preheat your oven to 350°F (175°C) and line a muffin tin with paper liners.
In a large bowl, whisk together the flour, cocoa powder, baking soda, and salt until evenly combined. This helps distribute the dry ingredients uniformly.
In another bowl, beat the softened butter and granulated sugar with a whisk or spatula until the mixture looks light and fluffy, and you can see a slight sheen, about 3 minutes.
Add eggs one at a time to the butter mixture, beating well after each addition until smooth and incorporated.
Stir in the vanilla extract, followed by the buttermilk, mixing until the batter is smooth and slightly glossy.
Gently fold the dry ingredients into the wet mixture using a spatula, just until no streaks of flour remain. Avoid overmixing to keep the cupcakes tender.
Divide the batter evenly among the prepared paper liners, filling each about two-thirds full. Use an ice cream scoop for consistency.
Bake for 18-20 minutes, until the tops are slightly domed and a toothpick inserted in the center comes out clean.
Remove the cupcakes from the oven and let them cool in the tin for 5 minutes, then transfer to a cooling rack to cool completely.
While the cupcakes cool, prepare the frosting by beating the softened cream cheese and powdered sugar until smooth and creamy.
Once the cupcakes are fully cooled, generously spread or pipe the frosting onto each cupcake, then serve and enjoy the striking midnight hue and moist, tender crumb.