01 - Preheat the oven to 350°F. Line an 8x8-inch baking pan with parchment paper, allowing some overhang for easy removal.
02 - In a medium bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg until well combined.
03 - In a large bowl, whisk the brown sugar, granulated sugar, eggs, oil, and vanilla extract until smooth and well blended.
04 - Gently fold the grated carrots, crushed pineapple, and chopped nuts into the wet mixture until evenly distributed.
05 - Add the dry ingredients to the wet mixture and stir until just combined. Do not overmix. Set aside.
06 - In a separate bowl, beat the softened cream cheese until smooth. Add the sugar, egg, and vanilla extract, blending until creamy and free of lumps.
07 - Spread about two-thirds of the carrot cake batter evenly into the prepared pan. Pour the cream cheese mixture over the top, then dollop the remaining carrot cake batter over the cream cheese layer.
08 - Use a knife or skewer to gently swirl the two batters together, creating a marbled pattern. Be careful not to over-swirl.
09 - Bake for 38 to 42 minutes, or until a toothpick inserted into the center comes out mostly clean with a few moist crumbs.
10 - Let the bars cool completely in the pan. Refrigerate for at least 2 hours to firm up before cutting into squares and serving.