Prep the pan: Heat oven to 350°F (175°C).
Line an 8x8-inch metal pan with parchment, leaving overhang on two sides for easy lifting. Lightly grease the parchment.
Melt butter and chocolate: In a heatproof bowl set over a pot of simmering water, melt the butter and chopped chocolate, stirring until smooth. Remove from heat and let cool 5 minutes.
You can also microwave in 20–30 second bursts, stirring between each.
Whisk in sugars: Add granulated and brown sugar to the warm chocolate mixture and whisk until glossy and combined.
Add eggs and vanilla: Whisk in eggs one at a time until fully incorporated. Add vanilla. Whisk for about 30–45 seconds more until the batter looks shiny and slightly thick—this helps that crinkly top.
Combine dry ingredients: In a separate bowl, whisk flour, cocoa powder, espresso powder, and salt to break up any lumps.
Fold gently: Use a spatula to fold the dry ingredients into the wet mixture just until no dry streaks remain.
If using, fold in chocolate chips or chunks. Do not overmix.
Pour and level: Scrape the batter into the prepared pan and smooth the top. If you like a sweet-salty finish, sprinkle a pinch of flaky salt.
Bake: Bake 24–28 minutes, until the edges are set and the center wobbles slightly but doesn’t look wet.
A toothpick inserted 2 inches from the edge should come out with moist, fudgy crumbs. The center may yield a little—that’s good.
Cool and set: Place the pan on a rack and cool at least 1 hour. For the cleanest slices and the gooiest texture, chill 30–45 minutes, then lift out and cut with a warm, clean knife.
Serve: Enjoy at room temp for maximum goo, or slightly warmed with ice cream for a classic sundae vibe.