... was a document that was used as a tool by the "noble" class to restrict what the king would (not could, but would) do in the future. It eventually evolved into a primary basis for common law amongst the people.
A contract must be by consenting adults, of like mind, for consideration, etc. It was not a contract. It was a POLITICAL tool used by rich men to thwart actions by an even richer man (the king), so that they (the rich men) would retain their status. It had the side effect of eventually benefiting others, as well, as it was used as a means of promoting the idea that no person should have that much power over others. It was part of the evolution from full tyranny towards more liberty. The American founders were influenced by it, as well as other works.
"Rights" do not exist. They are not tangible things we can point to. Rights is a term we use to identify what we SHOULD agree to with each other.
If you and I enter into a contract, each of us has acquired contractual rights, but no one outside of that contract is affected one way or another.
If a government is formed and a constitution is put in place, then the people who swear an oath to uphold it in the carrying out of their duties are taking on the duty to uphold constitutional rights that OTHER people (not the employees) are said to have. It is a ONE WAY street. The employees are supposed to uphold constitutional rights. They can "give" you the "right" to vote. It is a constitutional right.
If you and I form a business, we each have voting rights. If I rent your house, I have possession rights (or leasehold rights), and you have ownership rights. If we both live in a place where a "government" claims to assert authority and claims to do so by virtue of a constitution where they claim to enforce voting rights, then we both have voting rights, which are a type of constitutional right (similar to contractual rights that we both might have in voting on things having to do with our business agreement).
Fundamental rights are life, liberty, and property (which Jefferson expanded to "pursuit of happiness"). These are fundamental. If a government can take them away, then they cannot be fundamental. If they are fundamental, then not even government can take them away. They are inalienable for this reason (inalienable had to do with the noble class' rights to property back in the day in England). It just means that "even" government cannot take them away, because otherwise they would not be fundamental.
Where do fundamental rights come from? They come from common agreement among us because that is the only way we can survive as a species and live in a peaceful society. These "rights" (or more precisely, these ways of interacting with one another) were understood by humans LONG before governments came into existence. This is how we would treat each other if stranded on a deserted island with no "government" in the picture. It is an axiom that life, liberty, and property are fundamental rights, because to claim otherwise is to destroy the concept.
Some people will say these come from a god, but then where did the god get the rights or powers? They will claim they are part of his nature. In that case, we can just eliminate the middle man and state that fundamental rights must be a part of human nature itself, wherever humans came from, because there is no other reasonable viewpoint. Anything else means slavery. And slavery is the worst human condition. We are talking about what is the BEST human condition, and so we can eliminate that which is its opposite (slavery).
Fundamental rights are part of our humanity. From the fundamental rights, we can enter into voluntary agreements and we can, as individuals, acquire contractual rights vis-a-vis each other.
Constitutional rights, if they are promoted through force (which they are) are questionable. Having said that, we also live in a society that is ignorant (uninformed, misinformed, and dis-informed) when it comes to these concepts, and constitutional rights are something that most people can identify with and accept. So, defending them is not necessarily a bad thing.
However just remember that owning slaves was a "constitutional right" for the first 21 years under the US Constitution. Constitutional rights, like contractual rights, can be changed over time. Fundamental rights do not change because they are a part of humanity itself.