Preheat oven to 350°F. Grease two 9-inch round cake pans and line with parchment paper.
In a large bowl, whisk together flour, sugar, cocoa powder, baking soda, and salt.
Add buttermilk, vegetable oil, eggs, and vanilla to the dry ingredients and mix until well combined.
Gradually add hot coffee to the batter, stirring until smooth.
Divide the batter evenly between the prepared pans and bake for 30 minutes, or until a toothpick inserted into the center comes out clean.
Allow cakes to cool in pans for 10 minutes, then transfer to a wire rack to cool completely.
For the raspberry filling, combine raspberries, sugar, cornstarch, and water in a saucepan over medium heat. Cook until the raspberries break down and the mixture thickens. Cool completely.
For the frosting, beat butter until light and fluffy. Gradually add powdered sugar and cocoa powder. Add heavy cream and vanilla, and beat until smooth and spreadable.
To assemble, place one cake layer on a serving plate. Spread with half of the raspberry filling. Top with the second cake layer.
Frost the top and sides of the cake with chocolate frosting. Decorate with fresh raspberries if desired.