01 - Preheat the oven to 350°F (175°C).
02 - In a bowl, whisk together flour, cocoa powder, powdered sugar, and salt.
03 - Cut in cold butter until mixture resembles coarse crumbs.
04 - Add egg yolk and 2 tbsp ice water; mix until dough comes together. Add more water if needed, 1 tsp at a time.
05 - Press dough evenly into a 9-inch tart pan with removable bottom. Prick bottom with a fork.
06 - Chill crust in freezer for 10 minutes.
07 - Line crust with parchment and fill with pie weights. Bake for 15 minutes. Remove weights and parchment; bake 5 more minutes. Cool completely.
08 - To make ganache, heat heavy cream in a small saucepan until just simmering. Pour over chopped chocolate in a heatproof bowl. Let sit 2 minutes, then whisk until smooth. Add butter and vanilla; stir until glossy.
09 - Pour ganache into cooled tart shell. Smooth top with a spatula.
10 - Chill tart for at least 1 hour until ganache is set.
11 - Arrange raspberries on top. Dust with powdered sugar if desired.
12 - Slice and serve at room temperature.