In the bowl of a stand mixer fitted with the paddle attachment, cream the unsalted butter and both granulated sugar and brown sugar together on medium-low speed until smooth, about 2 minutes. You’re looking for a creamy, fluffy texture here—this is where the cookies get their lightness. Make sure everything is well-blended.
Add the eggs and vanilla extract to the mixture and mix until incorporated, about 1 minute. The mixture should look shiny and smooth, indicative of the eggs being fully combined with the butter and sugars.
In a medium bowl, whisk together the cocoa powder, all-purpose flour, baking soda, espresso powder, and both kosher salt and coarse sea salt. This step ensures that all the dry ingredients are well distributed, preventing any clumps of cocoa or baking soda in your final dough.
Gradually add the dry mixture to the wet mixture in the stand mixer, mixing on low speed until no dry flour remains visible. The dough will start to come together and may be a bit sticky.
Cover a clean work surface with plastic wrap. Roll half of the dough (it will be somewhat sticky) into a log about 10-12 inches long and 2 inches in diameter. Use the plastic wrap to help you shape the log neatly. Repeat with the other half of the dough.
Wrap the logs tightly in plastic wrap and refrigerate the cookie dough for at least 2 hours. Chilling the dough is crucial as it helps the cookies maintain their shape during baking and enhances the flavors.
When you’re ready to bake, set the oven rack to the middle position and preheat the oven to 350°F (175°C). Line 3 baking sheets with parchment paper to prevent sticking and make cleanup easier.
Slice the chilled dough logs into ½-inch thick rounds. Place the slices onto prepared baking sheets, ensuring they are spaced 3 inches apart to allow for spreading while baking.
Optionally, liberally sprinkle each dough circle with nonpareils, pressing lightly to ensure they adhere to the dough. This step adds a fun and colorful touch to your cookies!
Bake for 10 minutes, or until the cookies are just set around the edges. They should look soft in the center. Don’t worry; they will firm up as they cool.
Transfer the cookies to a wire rack to cool completely. This step is important as it allows the cookies to firm up while maintaining a soft center.