Prep your battlestation. Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans, or line them with parchment paper. A stuck cake is a sad cake.
Mix the dry team. In a medium bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, ginger, cloves, and salt. Set aside. (I know, this step seems boring, but proper distribution of leavening agents and spices is what separates good carrot cake from great carrot cake.)
Blend the wet squad. In a large bowl, beat together granulated sugar, brown sugar, and oil until well combined. Add eggs one at a time, beating well after each. Stir in vanilla extract. Your mixture should look like a golden, glossy dream.
Unite the ingredients. Gradually add the dry ingredients to the wet ingredients, mixing just until combined. No overmixing! That leads to tough cake, and we want tender cake.
Fold in the fun stuff. Gently fold in the grated carrots, nuts, drained pineapple, and raisins (if using). The batter will be thick and textured – that's exactly what you want.
Divide and conquer. Distribute the batter evenly between your prepared pans. Give them a gentle tap on the counter to remove air bubbles.
Bake to perfection. Slide those pans into the oven and bake for 30-35 minutes, or until a toothpick inserted in the center comes out clean or with a few moist crumbs. The tops should spring back when lightly pressed.
Cool your jets. Allow cakes to cool in pans for 15 minutes, then turn out onto wire racks to cool completely. Patience is a virtue here – frosting a warm cake is a disaster waiting to happen.
Make that heavenly frosting. In a large bowl, beat cream cheese and butter until smooth and creamy, about 2 minutes. Add powdered sugar one cup at a time, beating well after each addition. Mix in vanilla and salt. Beat for an additional 2-3 minutes until fluffy and smooth. Try not to face-plant directly into the bowl.
Assemble your masterpiece. Place one cake layer on your serving plate. Spread a generous layer of frosting on top. Place the second cake layer on top and frost the top and sides of the cake. Get creative with swirls and peaks, or go for a smooth finish. Decorate the sides with extra chopped nuts if desired.