01 - Preheat the oven to 350°F. Grease and line two 8-inch round cake pans with parchment paper.
02 - Process the shelled pistachios in a food processor until finely ground. Set aside.
03 - Whisk together flour, baking powder, salt, and ground pistachios in a medium bowl.
04 - Beat butter and sugar in a large bowl until light and fluffy. Add eggs one at a time, mixing well after each addition.
05 - Mix in vanilla extract and lemon zest until incorporated.
06 - Alternately add the flour mixture and milk to the butter mixture, beginning and ending with flour. Mix until just combined.
07 - Gently fold fresh raspberries into the batter.
08 - Divide batter evenly between prepared pans. Bake for 40-45 minutes until a toothpick inserted in the center comes out clean. Cool in pans for 10 minutes, then transfer to a wire rack.
09 - Beat cream cheese and butter until smooth. Gradually add powdered sugar and vanilla, beating until fluffy.
10 - Spread frosting over one cooled cake layer, top with second layer, and frost top and sides. Decorate with chopped pistachios and fresh raspberries.