Special equipment: 2 1/2-inch round, heart, square, diamond, star-shaped cutter or punch cutters 1-inch round or 1-inch heart cutter, for cutting out the center of the cookies
Adjust the oven rack to the middle position and preheat the oven to 325 degrees F.
Spread the hazelnuts and almonds on a baking sheet and toast in the oven until lightly browned, about 10 to 12 minutes. Shake the pan halfway through baking to ensure that the nuts toast evenly. Allow the nuts to cool. Gather the hazelnuts into a kitchen towel and rub them together to remove the skins.
In the bowl of a food processor fitted with the steel blade, combine the hazelnuts and almonds with 1/4 cup of the sugar and the cinnamon, and process until it's the consistency of a fine meal. Add the flour and pulse a few times to combine.
Separate and discard the whites of the eggs. Push the egg yolks through a fine-mesh sieve, scraping the yolks off the bottom of the sieve and into the flour mixture. Pulse on and off a few times to combine.
In the bowl of an electric mixer fitted with the paddle attachment, cream the butter and lemon zest on low 2 to 3 minutes, until softened. Add the remaining sugar and mix on medium, 3 to 4 minutes, until light and fluffy, scraping down the sides of the bowl as needed. Add the almond extract and mix to combine. Turn the mixer off, add the nut mixture, and mix on low until just incorporated.
Turn the dough out onto a lightly floured work surface and flatten into a rectangle, about 1-inch thick. Wrap in plastic and chill until firm, 1 to 2 hours or overnight.
Divide the dough in 1/2 and return one 1/2 to the refrigerator. On a lightly floured surface, roll the dough out to 1/8-inch thickness, flouring the surface of the dough as necessary. Using the shaped cutter, cutting as closely together as possible, cut out the cookies. Place them 1-inch apart on 1 to 2 parchment-lined baking sheets to chill until firm, 30 to 45 minutes. Set the scraps aside.
Roll and cut out the remaining dough in the same manner. Gather all the scraps together, chill, roll, and cut to make the tops. Using the small cutter, cut out the center s of 1/2 of the cookies and chill until firm, 30 to 45 minutes.
Adjust the oven racks to the upper and lower positions and preheat the oven to 350 degrees F. Bake for 15 to 20 minutes, until firm to the touch and lightly browned, rotating the baking sheets halfway through to ensure even baking. The cookies with the holes may bake more quickly than the others. Allow to cool and dust the perforated cookies with powdered sugar.
Flip over the cookies without holes, placing the darker side of the cookie underneath. Spoon about 1 1/2 to 2 teaspoons of the raspberry jam into the center. Place the perforated cookies, powdered sugar side up, on top of the jam, matching up the edges and pressing gently to spread the jam.