Boil water in a large pot and salt it generously—I use enough that it tastes like the sea. Cook the rotini until just al dente, about 12-14 minutes, then drain and rinse with cold water for 30 seconds to stop the cooking.
While the pasta cools, combine the minced garlic, lemon juice, and red pepper flakes in a small bowl. Whisk in the olive oil slowly, tasting as you go because lemon intensity varies by fruit.
Pour the warm pasta into a large serving bowl and immediately drizzle with the dressing, tossing gently to coat every piece. I do this step while the pasta is still warm because it absorbs the flavors—this is why most caprese pasta salad crowd summer recipes taste flat if you skip it.
Let the dressed pasta cool to room temperature for about 5 minutes, then fold in the fresh basil, black pepper, and sea salt. The leaves should stay bright green and fragrant, not wilted.
Now gently fold in the cubed mozzarella and halved cherry tomatoes, being careful not to break them. I always confess that I wait until the last minute for this because warm pasta can soften the cheese too much.
Toast the pine nuts and almonds separately in a dry skillet over medium heat for about 2 minutes each, shaking the pan constantly. The smell tells you when they're done—it shifts from raw to nutty and warm. Sprinkle them over the salad just before serving because they'll lose their crunch if they sit in the dressing.