Preheat the oven to 350°F [180°C]. Line a baking sheet with parchment paper.
In a large bowl, whisk together the flour, baking powder, and salt. Pour half of the flour mixture into another bowl, then whisk in the cocoa powder. In the first bowl without the cocoa powder, whisk in cardamom and coffee grounds.
In the bowl of a stand mixer fitted with a paddle attachment, beat the butter and brown sugar on medium-low speed until creamy, about 2 minutes. Add the vanilla followed by the eggs, one at a time, and beat until combined, about 30 seconds.
Make a well in the center of the flour mixture without the cocoa and pour half of the butter-sugar mixture into the center. Using a sturdy spatula or your hands, fold the dough until a stiff ball forms. Fold in the chocolate chips and set aside.
Add the cocoa mixture to the remaining butter-sugar mixture and mix on medium speed until a stiff ball forms, about 2 minutes. Stir in any dry ingredients that remain at the bottom of the bowl.
Have ready a piece of wax paper that is 25-in [63.5-cm] long and dust it with flour. Transfer the cocoa dough ball to the wax paper. Dust the top of the cocoa dough and top with another layer of wax paper. Using a rolling pin, roll out the dough into a 61/2-by-11-in [16.5-by-28-cm] oval that’s about 1/2 in [12 mm] thick. Transfer to the prepared baking sheet. Repeat with the other dough ball, rolling it into a 61/2-by-11-in [16.5-by-28-cm] oval that’s about 1/2 in [12 mm] thick. Place the rolled-out dough directly on top of the cocoa dough. Gently press the two doughs into each other and shift around the layers as needed to cover the edges so that the chocolate chip layer covers the cocoa layer completely.
Bake for 30 minutes. Remove from the oven and carefully cut on the diagonal into 3/4-in [2-cm] slices. Turn the biscotti pieces so the cut sides are facing up and bake until dry and dark around the edges, about 15 minutes more. Let cool completely. Store in an airtight container for up to 1 week.