In a shallow dish, combine the cooled coffee and coffee liqueur (if using). Set aside.
In a large mixing bowl, whisk the egg yolks and granulated sugar together until the mixture is pale and thick, about 5 minutes.
Add the mascarpone cheese and vanilla extract to the egg yolk mixture, and gently fold until smooth and well combined.
In a separate bowl, beat the egg whites until stiff peaks form. Carefully fold the beaten egg whites into the mascarpone mixture until no white streaks remain.
Quickly dip each ladyfinger into the coffee mixture, ensuring they are soaked but not soggy. Arrange a layer of soaked ladyfingers in the bottom of a 9x9-inch dish.
Spread half of the mascarpone mixture over the layer of ladyfingers. Repeat the process with another layer of soaked ladyfingers followed by the remaining mascarpone mixture.
Cover the dish with plastic wrap and refrigerate for at least 4 hours, preferably overnight, to allow the flavors to meld and the dessert to set.
Before serving, dust the top with cocoa powder and garnish with dark chocolate shavings if desired.