Position racks in the lower and upper third of the oven and preheat to 350 degrees. Place the almonds and pecans on a baking sheet; toast on the upper oven rack until lightly browned and fragrant, about 8 minutes. Let cool, then pulse in a food processor with 1/4 cup granulated sugar until finely ground. (Don't overprocess or the mixture will turn into a paste.) Turn off the oven.
Whisk the flour, cinnamon, cardamom and salt in a medium bowl. Set aside.
Using a mixer, beat the butter and the remaining 1 1/4 cups granulated sugar in a large bowl until light and fluffy. Beat in the vanilla extract, egg yolks, and the lemon and orange zest; add the ground nuts. Add the flour mixture, mixing just until incorporated (do not over mix). Divide the dough into 2 pieces; place 1 piece between 2 lightly floured sheets of parchment paper and roll into a 14-inch square, about 1/4-inch thick. Repeat with the other piece of dough. Refrigerate both rectangles, covered with the parchment sheets, until firm, at least 1 hour.
Preheat the oven to 350 degrees. Cut the dough into hearts with a 2 1/4- to 2 1/2-inch heart-shaped cookie cutter. Using a smaller heart-shaped cutter (about 1 1/2 inches), cut out the centers from half of the cookies (you can reroll the centers and scraps). Place the cookies, about 1 inch apart, on baking sheets and bake 2 sheets at a time until the edges are golden, 12 to 15 minutes, rotating the sheets halfway through. Cool on wire racks.
Sift confectioners' sugar over the cookies. Spread 1 teaspoon raspberry preserves evenly over each whole heart cookie, leaving a slight border around the edge; top with the cut-out heart cookies.
Photograph by Allan Penn
Recipe courtesy Lulu's Bake Shoppe, Boston for Food Network Magazine