Cook Pasta: Bring a large pot of salted water to a rolling boil. Add the macaroni and cook it according to the package instructions, but reduce the cooking time by one minute to keep it slightly firm. Drain thoroughly.
Coat Pasta with Butter: Return the drained macaroni to the pot. Immediately add the butter or oil and toss gently until all pasta is lightly coated. This helps prevent the noodles from sticking together or swelling during baking. Set aside to cool slightly.
Prepare Breadcrumb Topping: In a small bowl, mix the panko breadcrumbs with melted butter and salt until evenly combined. Set this mixture aside; it will add a crunchy, flavorful crust after baking.
Make the Cheese Sauce: In a large saucepan or ovenproof skillet, melt the butter over medium heat. Whisk in the flour to create a roux and cook for about one minute to eliminate the raw flour taste. Slowly pour in about one cup of warm milk while whisking constantly to form a smooth paste. Gradually add the remaining milk, stirring continuously to prevent lumps.
Thicken the Sauce: Continue cooking the mixture over medium heat, whisking regularly, for 5 to 8 minutes until the sauce thickens to a creamy consistency that coats the back of a spoon.
Add Seasonings and Cheese: Remove the pan from heat. Stir in salt and any optional spices like garlic, onion, or mustard powder if desired. Add the shredded Gruyere and mozzarella cheeses, stirring gently until just combined—the cheese will melt into a silky sauce.
Combine Pasta and Sauce: Pour the cheese sauce over the butter-coated macaroni in the pot. Stir quickly to evenly coat the pasta. Transfer everything to an ovenproof skillet or baking dish, spreading it out evenly.
Add Topping and Bake: Sprinkle the buttered breadcrumb mixture evenly over the top. Bake in a preheated oven at 180°C (350°F) for 25 minutes, or until the crust turns a light golden brown and the sauce bubbles at the edges. Avoid overbaking to keep the sauce luscious.
Serve Immediately: Remove from the oven and serve hot. Garnish with fresh parsley if you like for a pop of color and freshness.