Lightly grease or line a small freezer-safe container (about 6x6 inches or slightly smaller) and set aside.
Heat a dry nonstick skillet over medium-high heat. Add 1 cup gram/garbanzo bean flour and stir constantly for 3–4 minutes until the flour becomes aromatic and only very slightly darkens.
Reduce heat to medium. Whisk in 1/2 cup melted ghee or butter. Stir constantly; the mixture will clump at first, then the ghee will loosen and the mixture will become more fluid. Continue stirring and cook until the mixture darkens slightly and simmers gently, about 3–4 minutes more. Remove from heat and transfer the roasted flour mixture to a bowl; set aside.
In the same skillet, combine 3/4 cup granulated sugar and 1/4 cup water. Bring to a simmer over medium heat, stirring frequently for about 5 minutes until the syrup thickens.
Test the syrup for the two-thread stage: blow on a small amount to cool it, take a drop between thumb and index finger, and pull fingers apart—if the syrup forms two thin threads, it is ready. (Work cautiously; the syrup is hot.)
Return the roasted flour and ghee mixture to the skillet with the syrup. Stir constantly and bring the combined mixture to a gentle simmer. Cook and stir for another 3–4 minutes until the mixture comes together into a thick, cohesive mass.
Stir in 1/4 teaspoon ground cardamom and 1 tablespoon chopped pistachio nuts until evenly distributed.
Pour the mixture into the prepared container and spread it evenly. Sprinkle the remaining 1 tablespoon chopped pistachio nuts over the top and gently press them into the surface.
Chill the barfi in the freezer for 1–2 hours until firm. Remove from the container and slice to your preferred size.