Then why did China apply a "nationalist mindset" to the military industry? Why did China not carry on buying from Russia ??
You have started with a flawed premise.
1. In its early stages—during the "Great Leap Forward"—China was indeed driven by extreme nationalism. This mindset deeply influenced the military-industrial sector, leading to the planning of many projects that appeared impressive on paper but, in reality, almost all ended in failure.
2. China’s "autonomous" industrial base was not an outcome we proactively sought; rather, it was a path forced upon us by pressure and sanctions from the international community. Had it not been for such external pressure, China’s industrial sector today might well be deeply integrated into the global division of labor—much like the industries of Europe, Japan, or South Korea—instead of striving to manufacture everything domestically.
Even today, many in China are tasked with identifying the weaknesses in our industrial sector and developing contingency plans. Currently, we still rely on imports for many things. However, we will not disclose these details.
I support Pakistan’s pursuit of industrial autonomy, but true autonomy can only be achieved by starting from the foundations. This is not something that can be realized through mere rhetoric; you must begin with the most basic, fundamental industrial layers—rather than simply presenting a "dazzling" PowerPoint deck from the very start.
Regarding the JF-17 series of fighter jets, I believe Pakistan should first focus its efforts on achieving the capability to manufacture the airframe entirely—100%—within its own borders. As things stand, you are still a very long way from reaching your goal of developing a medium-weight fighter jet based on the JF-17 platform.
A small example: you could ask whether PAC is capable of achieving 100% domestic production—including both the raw steel and the machining—of landing gear for the JF-17 fighter jet in Pakistan.