1.
Heat the oven to 350°F (175°C). Grease two 8-inch round cake pans and line the bottoms with parchment. If using springform pans, wrap the outsides in foil to catch any leaks.
2.
Toast the pecans on a baking sheet for 6–8 minutes, until fragrant. Cool, then set aside.
3.
Make the brownie batter: Melt the butter and bittersweet chocolate together gently in a heatproof bowl set over simmering water, or in short microwave bursts, stirring until smooth. Let cool for 5 minutes.
4.
Whisk the granulated and brown sugars into the chocolate mixture. Whisk in the eggs one at a time, then stir in the vanilla.
5.
In a separate bowl, whisk together the all-purpose flour, whole-wheat pastry flour, cocoa, espresso powder, and fine salt. Fold the dry ingredients into the chocolate mixture just until no dry streaks remain.
6.
Divide the batter evenly between the prepared pans and smooth the tops. Bake for 20–24 minutes, rotating the pans once, until the edges are set and a tester inserted near the center comes out with a few moist crumbs. Avoid overbaking.
7.
Cool the brownie layers in their pans for 15 minutes. Run a thin knife around the edges, turn them out, remove the parchment, and cool completely on racks.
8.
Make the caramel: Put the sugar and water in a medium, heavy-bottomed saucepan. Cook over medium heat without stirring, swirling the pan occasionally, until the syrup turns a deep amber color, about 7–10 minutes. Remove from the heat.
9.
Carefully whisk in the warm cream a little at a time; the mixture will bubble vigorously. Whisk in the butter and fine salt until smooth. If the caramel seizes, return the pan to low heat and stir until melted. Cool until thick but spreadable.
10.
Stir about ¾ cup of the toasted pecans into ½ cup of the caramel. Place one brownie layer on a serving plate. Spread the caramel-pecan mixture evenly over it, leaving a small border. Top with the second brownie layer and chill for 20 minutes to help the filling set. Reserve the remaining caramel and pecans for finishing.
11.
Make the ganache: Place the chopped semisweet chocolate in a heatproof bowl. Heat the cream just until steaming, pour it over the chocolate, and leave undisturbed for 3 minutes. Stir gently from the center outward until glossy. Cool briefly until thick enough to spread.
12.
Spread the ganache over the top of the torte, letting a little drip down the sides if desired. Sprinkle with the remaining pecans and a pinch of flaky salt. Drizzle with the reserved caramel; gently rewarm it if it has become too firm.
13.
Chill the torte for 45–60 minutes, or until the ganache is set. Let it stand at room temperature for 15 minutes before slicing with a warm, dry knife.