@MadDog
Let us for a while assume, that, Pakistani foreign policy during the Cold War was right. It was strategic. It needed to ensure, that, Soviets were kept away. With this in mind, Pakistan acted as a front-line state during the Cold War. For this, Pakistan received tanks, ammunition and the rest. Now, here is a question. What did you gain beside a military? Did you gain anything like NATO which also was composed of front-line states? Which also provided support and land bases to the US? Now, let me assume that NATO is different and it cannot be compared to Pakistan. Still, what was the benefit Pakistan received, which ensured that in the long run you succeeded?
The problem lies, in the way you deal with policy. Everything revolves round defence against an adversary. Even in all your arguments, not once, have you said development or economics. We (I will put, India too in this) are developing countries. While defense is a critical part of policy it is not the guiding policy. Defense is an instrument of policy. It cannot define policy.
Having said the above, I would say you made the mistake in the way your Afghan policy and implementation was concerned. In a professional force, you need to forward your country's interests. This is paramount. For this you can use external forces and use any means necessary. But, you do not sympathise with your instruments of force (the Taliban/Mujahideen/or any other). And you never let your civil society get encouraged to be part of that force.
Why is this so? Because, once your need for the 'force' is over, you should be able to pull out of it or worst case, destroy it. This is possible only through ensuring insulation of the uniformed and civil forces from the external force you use. This is where I say, Pakistan has not learnt yet. It continues to use its citizens an instrument to forward policies in other countries.
Second, there was the end of the Cold War. Here too there was an opportunity to re-align or better still multi-align. Let's see what happened between the end of the Cold War and 2011. The focus on the Pakistani western front reduced and support for Kashmir 'solution' started in full force. This could have been a diversion of the pro-Pakistan elements to create trouble in the Indian state. Was this a good policy? Maybe, you think so. But here too, you mixed up your civil population into becoming a part of the solution. You have what you call "non state actors" becoming a serious problem. This happens due to radicalisation. Pakistan is a unique case, because, here it used its own citizens as instruments of foreign policy in a armed environment.
Third 9/11 happened. This was a prime opportunity for Pakistan to rid itself of all the disruptive elements. But again, it simply resulted in top level Taliban operatives moving to Pakistan. I think, this was the biggest missed opportunity. You now had a chance, to eliminate all the monsters created. But, the thought of bad and good Taliban still existed. Again, not a great long term policy.
Between all this, was the nuclear bomb explosion. Now, think if you had not exploded the bomb. Do you really believe that had you not exploded it, you could not have conveyed to the GoI that you had a bomb? Had you not exploded it, you would have been hailed as a model state, sanctions would not have been imposed. The reason for it was purely populist. The smart decision would have been to convey to the GoI, "well done, but lest you forget, we have the bomb too and keep that in mind".
Now let's come to the current scenario. You have aligned with China. Why? They should be agreeing to your terms. Not the other way round. They have trouble on the eastern and southern front. Then they have Indian in the IOR. You are a friendly country to them. Why would you not negotiate a better deal? Why would you not tell them, your companies are allowed in, but, they need to use Pakistani engineers and workmen. Why not tell the GCC, we need power and we will let you invest in our country via power projects. Why is it that you could not tell the US, look you need us to exit out of Afghanistan, we need that pipeline from Iran. So let's agree to that. Why not?
Now, do you understand why I say, there has been one after another policy disaster.
Having said all of the above, let me also tell you about Indian policy. Because, I know, there are major linkages to how policy gets defined in Pakistan. We are not a threat to your territorial integrity. We do not want to deal with the nut jobs who get funded by the ME. Our differences are on Kashmir and related issues. But, this will not result in a war from an Indian push. It never has and never will. We have one of the largest poor population. This is our priority. We need power. This is our priority. We have a lot to lose if we go to war with Pakistan.