Melt 2 tablespoons of ghee in a heavy-bottomed pan over medium heat. Add the grated carrots and sauté for 7-8 minutes until they soften, shrink slightly, and turn deep orange.
Pour in the whole milk and bring the mixture to a boil. Reduce heat to medium-low and let it simmer, stirring occasionally to prevent sticking.
Cook for about 35-40 minutes, scraping down the sides of the pan regularly, until the milk has almost completely evaporated and the carrots are soft.
Stir in the sugar and the remaining 2 tablespoons of ghee. The mixture will become slightly liquidy again as the sugar dissolves.
Continue to cook on low heat, stirring constantly, until the moisture evaporates again and the halwa starts pulling away cleanly from the sides of the pan.
Stir in the cardamom powder and toasted nuts. Turn off the heat immediately to preserve the fresh cardamom aroma. Serve warm.