01 - Whisk together flour, cocoa powder, powdered sugar, and salt in a large bowl. Add cold butter and rub in with your fingertips until the mixture resembles coarse crumbs. Add egg yolk and 2 tbsp cold water, mixing just until the dough comes together. Add more water if needed, 1 tsp at a time. Shape into a disk, wrap in plastic, and chill for at least 30 minutes.
02 - Roll out dough on a lightly floured surface to fit a 9-inch tart pan. Press into the pan, trim excess, and prick the base with a fork. Freeze for 15 minutes.
03 - Preheat oven to 350°F. Line the crust with parchment and fill with pie weights. Bake 15 minutes, remove weights and parchment, and bake 8-10 minutes more until set. Cool completely.
04 - In a medium saucepan, heat milk and vanilla bean (or extract) over medium heat until just simmering. In a bowl, whisk egg yolks, sugar, and cornstarch until pale and smooth.
05 - Slowly pour hot milk into egg mixture, whisking constantly. Return mixture to saucepan and cook over medium heat, whisking constantly, until thickened and bubbling for 2-3 minutes. Remove from heat, whisk in butter until smooth. Transfer to a bowl, press plastic wrap directly onto surface, and chill until cold (about 1 hour).
06 - Spread chilled pastry cream evenly into cooled tart shell. Arrange raspberries on top in concentric circles. Optionally warm raspberry jam and brush over berries for a glossy finish, or drizzle melted chocolate over the top for extra decadence.
07 - Chill the tart for at least 30 minutes before slicing and serving.