Spread the sugar in a single layer on the same pan. Keep the flame on low and let it melt slowly - don't mix yet. This can take 12-15 minutes, so be patient.
Once melted, the sugar will turn dark like caramel. Give it a mix if there are any unmelted pockets of sugar left, then cook for another 2-3 minutes. Priya's tip - Don't let it get too dark or the caramel will turn bitter - you don't need to reach a one-string consistency.
Gradually pour in the remaining milk in batches, mixing the caramel and milk swiftly as you go. Priya's tip - Remember to keep the flame on low-medium.
Keep stirring until all the milk is incorporated and there are no lumps in the mixture.
Add the cooked rava mixture, pressing it into the caramel-milk base. Cook for 2-3 minutes.
The rava mixture should break down completely and blend smoothly with the caramel. Priya's tip - Use the back of your spoon to mash the rava mixture if needed.
Add the roasted desiccated coconut to the pan. Mix and continue cooking until the mixture comes together like a soft dough. Priya's tip - The barfi mixture should not stick to the bottom of the pan and should resemble a soft dough.
Add the cardamom powder and half of the crushed nuts, reserving the rest for garnish. Priya's tip - Add an extra teaspoon of ghee here if needed.
Swiftly mix everything together.
Transfer the mixture to a greased tray and flatten it out evenly.
Sprinkle the remaining fried, chopped nuts over the top and press them gently into the barfi.
Cut into squares and let it cool completely. Priya's tip: if you're in a rush, pop the tray in the fridge for 10 minutes to speed up the cooling. Transfer the coconut barfi pieces to a platter and serve.