Preheat the oven to 350°F (175°C).
Grease a 9x13-inch baking pan or line it with parchment paper.
In a large mixing bowl, whisk together flour, sugar, and salt.
Cut in the cold butter using a pastry cutter until coarse crumbs form.
Add the egg yolk and ice water, mixing until a soft dough forms.
Press the dough evenly into the prepared baking pan.
Bake for 15–20 minutes until lightly golden.
While the crust bakes, prepare the blackberry filling.
Combine blackberries and sugar in a medium saucepan over medium heat.
Cook for 5–7 minutes until the berries release their juices.
Stir in lemon juice and cornstarch.
Continue cooking for 1–2 minutes until thickened.
Remove from heat and allow the filling to cool slightly.
For the topping, whisk together flour, brown sugar, and baking powder.
Cut in the cold butter until crumbly.
Stir in the egg and vanilla extract.
Fold in the pistachios.
Remove the crust from the oven.
Spread the blackberry filling evenly over the crust.
Sprinkle the pistachio topping over the filling and gently press down.
Bake for 30–35 minutes until golden brown and bubbling.
Allow the bars to cool completely before slicing.