In a large bowl, cream together the softened butter, granulated sugar, and brown sugar until light and fluffy. Add the egg and vanilla extract, mixing well. If using almond extract, stir it in at this stage for extra depth of flavor.
In a separate bowl, whisk together the flour, baking powder, salt, and finely ground pistachios. Gradually add the dry mixture to the wet ingredients, mixing until just combined. Fold in the chopped pistachios for added crunch.
Wrap the dough in plastic wrap and refrigerate for at least 30 minutes. Chilling helps the cookies maintain their shape and enhances their flavor.
Preheat the oven to 350°F (175°C). Line a baking sheet with parchment paper. Scoop out small portions of dough (about 1 tablespoon each) and roll them into balls. Place them on the baking sheet, leaving space between each. Lightly press down on each ball to flatten slightly.
Bake for 10-12 minutes, or until the edges are lightly golden. Allow the cookies to cool on the baking sheet for 5 minutes before transferring them to a wire rack to cool completely