Prepare the chocolate tart dough. Whisk the flour, cocoa powder, powdered sugar, and salt together in a mixing bowl. Add the cold cubed butter and work it into the dry ingredients with your fingertips or a pastry cutter until coarse crumbs form.
Add the egg yolk. Mix in cold milk, 1 tablespoon at a time, just until the dough comes together. Shape it into a disc, wrap, and refrigerate for at least 30 minutes.
Blind bake the tart shell. Preheat the oven to 350°F (175°C). Roll out the chilled dough and carefully press it into a 9-inch tart pan. Trim the edges and prick the bottom lightly with a fork.
Line the tart shell with parchment paper and add pie weights or dried beans. Bake for 15 minutes. Carefully remove the parchment and weights, then bake for another 10 minutes. Cool completely.
Prepare the first ganache layer. Heat 1/2 cup heavy cream in a small saucepan until it is just beginning to simmer. Pour it over 100g chopped dark chocolate and leave undisturbed for 2 minutes.
Stir until completely smooth. Mix in the vanilla and salt. Pour the ganache into the cooled tart shell, spread evenly, and refrigerate for approximately 30 minutes or until set.
Make the pistachio filling. Blend the shelled pistachios and whole milk in a blender or food processor until as smooth as possible. Transfer the mixture to a saucepan.
Add 1/2 cup heavy cream, granulated sugar, and cornstarch. Cook over medium heat while stirring continuously until thickened to a custard-like consistency.
Remove from the heat and stir in the almond extract, if using. Cool for 5–10 minutes before gently folding in the whole roasted pistachios.
Spread the pistachio mixture carefully over the chilled chocolate layer. Refrigerate for another 30–45 minutes.
Make the final ganache. Heat the remaining 1/2 cup heavy cream until it just begins to simmer. Pour it over the remaining 100g chopped chocolate and 1 tablespoon butter. Allow it to sit briefly, then stir until glossy and smooth.
Gently pour the ganache over the pistachio layer and smooth the surface with a spatula. This final layer gives the Chocolate Pistachio Ganache Tart its glossy chocolate finish.
Garnish with chopped or whole roasted pistachios. Refrigerate for at least 1 hour before slicing so the layers can set completely.