Heat the oven to 350 °F, line two or three 8-inch round cake pans with parchment, and coat the pans with baking spray or butter and cocoa powder. The parchment and cocoa coating help the layers release cleanly without leaving a pale floury edge.
Whisk the flour, granulated sugar, brown sugar, cocoa powder, baking powder, baking soda, and salt in a large bowl until evenly combined. The mixture should look uniform in color with no dark cocoa pockets or brown sugar lumps.
In a separate bowl, whisk the eggs, sour cream, oil, and vanilla, then add that mixture to the dry ingredients and stir just until combined before mixing in the hot water or hot coffee. The batter will loosen noticeably and become smooth and glossy, which is exactly what you want.
Divide the batter evenly among the prepared pans and bake for 25 to 30 minutes, or 30 to 35 minutes if using 2 layers, then cool in the pans for 10 minutes before turning out onto racks to cool completely. The tops should feel slightly tacky but not wet, and a toothpick inserted in the center should come out clean.
Place the sugar in a dry medium saucepan over medium heat and stir constantly until it melts completely, then add the butter and stir it in before adding the heavy cream and boiling the caramel for 1 minute without stirring. The sugar will first clump, then turn into a smooth light amber liquid, and the mixture will bubble hard when the butter and cream go in.
Take the caramel off the heat and stir in the vanilla extract and salt, then let it cool until thick but still pourable, reheating gently if it firms too much. Fresh caramel looks quite thin at first, but it should become glossier and slightly heavier as it cools.
Warm the cream, corn syrup, and butter in a medium saucepan over medium-low heat until small bubbles form around the edges, pour over the chopped chocolate and cocoa powder, let stand for 5 minutes, whisk smooth, then stir in the sour cream and cool until spreadable. The frosting will change from a shiny glaze to a thicker, softer fudge texture that holds swirls instead of running off the spoon.
Set one cake layer on a plate, spread on about 1/3 of the frosting, drizzle over about 1/3 of the caramel, scatter with 1/3 cup chopped pecans, then repeat with the remaining layers and finish the outside with frosting, whole pecans, and a caramel drip if desired. For the cleanest finish, the frosting should hold its shape and the caramel should settle slowly instead of racing toward the edges.