Preheat your oven to 350°F (175°C). Line a 9×13-inch baking pan with parchment paper, leaving some overhang on the long sides for easy lifting. Lightly spray the parchment and exposed sides of the pan with nonstick baking spray.
nonstick baking spray, parchment paper
In a large mixing bowl, beat the softened butter and granulated sugar together with a hand mixer on medium speed (or in a stand mixer with the paddle attachment) for 2–3 minutes, until light, fluffy, and slightly paler. If mixing by hand, use a sturdy wooden spoon; it will take a bit longer.
1 cup unsalted butter, 3/4 cup granulated sugar
Add the egg, vanilla extract, and almond extract to the creamed butter and sugar. Mix until fully combined and smooth, scraping down the sides of the bowl as needed.
1/4 teaspoon fine sea salt, 1 large egg, 1 1/2 teaspoons pure vanilla extract, 1 teaspoon almond extract
In a separate bowl, whisk together the flour, salt, and finely ground almonds or almond flour (if using). Add the dry mixture to the wet ingredients in two additions, mixing on low speed just until a soft, thick dough forms and no dry streaks of flour remain. Do not overmix.
1/4 teaspoon fine sea salt, 2 1/4 cups all-purpose flour, 1/4 cup finely ground almonds or almond flour
Transfer about 2/3 of the dough to the prepared pan. Press it evenly into the bottom with clean hands or the back of a measuring cup, forming a smooth, even almond shortbread layer all the way to the edges. Set the remaining 1/3 of the dough aside for the crumb topping.
Bake the crust at 350°F (175°C) for 12–15 minutes, until the edges look set and just barely start to turn light golden but are not browned. Remove from the oven and let the crust cool for about 5 minutes while you prepare the jam layer.
In a small bowl, stir the raspberry jam to loosen it to a spreadable consistency. If using lemon zest, stir it into the jam. If the jam is very thick or cold, warm it briefly in the microwave for 10–15 seconds to make it easier to spread.
3/4–1 cup raspberry jam or preserves, 1 teaspoon fresh lemon zest
Carefully spread the raspberry jam mixture over the warm shortbread crust, leaving a very small border around the edges so the jam does not burn or bubble over. Aim for an even layer without bare spots.
3/4–1 cup raspberry jam or preserves
Pinch off small pieces of the remaining dough and scatter them evenly over the raspberry layer. You want a crumbly topping with bits of jam peeking through rather than a solid second crust.
Sprinkle the sliced almonds evenly over the top of the crumbs. They will toast as the bars bake, adding crunch and flavor.
1/2 cup sliced almonds
Return the pan to the oven and bake at 350°F (175°C) for 25–30 minutes, or until the top is light golden, the almonds are lightly toasted, and the jam is bubbling gently around the edges. If the almonds brown too quickly, tent the pan loosely with foil for the last 5–10 minutes.
Place the pan on a cooling rack and let the bars cool completely, at least 2 hours, so the jam layer can set. Use the parchment overhang to lift the slab from the pan, transfer to a cutting board, and cut into 24 bars (4 rows by 6 rows). For extra neat slices, chill the bars in the refrigerator for about 30 minutes before cutting.