Adjust an oven rack to the lower-middle position and preheat to 350°F. Grease a 9x13-inch baking pan and line it with parchment paper. If you're using raw walnuts or pecans, roast them on a baking sheet for 8 minutes. Once cooled, chop them into small pieces—use a knife or food processor, but don't pulverize them.
Set up a double boiler by placing a heatproof bowl over a saucepan with simmering water. Add the butter and bittersweet chocolate to the bowl, stirring until both are melted and smooth. Remove from heat, stir in the cocoa powder until smooth, and set aside to cool slightly.
In a large bowl, whisk together the eggs, oil, sugars, and vanilla. Gradually add the slightly cooled chocolate mixture and whisk until smooth. Then, gently fold in the flour, baking powder, salt, and chopped nuts (if using) with a spatula until just combined.
Pour the batter into the prepared pan, spreading it evenly. Bake for 22 to 27 minutes, until the edges are set, the top is glossy and beginning to crackle, and a toothpick inserted into the center comes out with moist crumbs (but not wet batter).
Transfer the pan to a wire rack. Cut the brownies while warm, then let them cool completely in the pan before using the parchment paper to lift them out.