I see so many hindutva wadis arguing that caste system is a foreign concept and hinduism only had the varna system. As if the varna system was fair? Also isn't caste derived from the varna system? Like brahmins and Kshatriyas became upper castes, vaishyas became obc and shudra were dalits?
I had the impression that the caste system was the documentation of people who already belonged to the varna system. Do correct me if I'm wrong.
It's a little more complicated than that. Currently, we live under the jaati(or jāti) system broadly speaking. When people talk about the caste system in modern India, it is this system superimposed on the varna system that they are referring to. Functionally, the caste system now is a hybrid of the two systems.
The Varna system and the Jaati System are both systems of social hierarchy.
As everyone is already aware, under the varna system, the society is divided into four categories(i.e. brahmins, kshatriyas, vaishyas and shudras) which are hierarchical in nature and mentioned in the various ancient religious texts. Crucially important to this system is the existence of a fifth category, the untouchables(I assume you're already aware of the practice of untouchability) and the outsiders(often termed as "mlechhas", which is now a derogatory xenophobic{and casteist!} slur coming back into popular use thanks to the resurgence of regressive ideas under hindutva politics). These are important to mention because the marginalization of these people was based on them being an out-group i.e. not part of the varna system. People claim the varnas were mutable based on a handful of examples in said texts but I would like to point out that those examples are said to be exceptions rather than the rule.
The Jaati System would be more familiar to you in terms of lived experience. Under this system, society is divided into socio-ethnic endogamous groups or communities and each of the groups have different socio-economic standing in society. The practice of endogamy(marriage limited to within a social group) is important to this system as there is emphasis on one's birth. This is why people say that intermarriage is the most significant step towards dismantling the entire system, but I digress. Prior to the colonization of India, these groups worked on a purely social basis of privilege and exclusion. Villages and cities were(and still are!) segregated based on these jatis. One's occupation was defined by their birth as long as they lived in their specific society.
I would like to emphasize that this system existed and thrived even before the colonisers ever came knocking on the subcontinent's doors. We can find mentions of the system in the historical accounts of both people of the subcontinent and travellers from outside. A study of people's DNA by some scholars claims that the endogamous groups can be traced back to as far as the Gupta Empire(mid 3rd century to mid 6th century CE).
The assertion that the caste system is a purely colonial fabrication is absurd. People point to the term "caste" as being of foreign origin but the term "jaati" already existed and was in use. "Caste" is just another way of referring to jaatis.
Now on to some legitimacy hidden in the nonsensical claims, in the 1901 census of the subcontinent, the British bureaucracy fit the various jatis under the broad classification of the four varnas. It was not a clean fit, leaving many in an awkward position of having been classified wrongly. This is their fault. Not the construction of the system but rather the wrongful categorisation of it.
Officially, there are over 3,000 castes and 25,000 sub-castes in India. Take these numbers with a grain of salt because there are many unregistered castes and sub-castes to this day fighting their own battles of legal recognition.
The castes do not cleanly map onto the varnas. There are many castes who are in the upper strata of the hierarchy in one region and the lower strata in different regions. The system is incredibly nuanced and complex and our current legal systems have not caught up to the sophistication required to deal with it because of the people in power's adamant insistence of ignoring the system simply because they profit off of the oppression of others.
I don't want to add to the miscategorization but I feel like I should correct you on the fact that broadly speaking shudras are classified more under OBCs. (Please keep in mind that this not a clear category and there can be some castes who are said to be shudra who can be other categories as well.) There's much to be said about that because there's no distinction made between the land owner castes and the landless castes. And no, the creamy layer is not a good marker either.
There are some castes(1,108 of them to be exact) who were listed as scheduled castes(SC) in the Constitution of India for affirmative action. This was done to socially reform the country and help those in the marginalized sections of society to gain social mobility. The hope was to remove caste discrimination. As we know, it wasn't successful because caste discrimination still exists and caste based violence is on the rise again.
The term dalit is a contemporary word for the untouchable castes who were and are subjected to despicable discrimination in society.
The reason that I say that we now function under a hybrid of the two systems is that the superimposition of the varna system over the jaati system has been accepted and in many cases, embraced by the people now. You will find many a "upper caste" people proudly flaunting their Brahmin or kshatriya identities. The varna system is now interlinked with the jaati or the caste system whether we like it or not.
The system is complicated and fucked. We should get rid of it, guys. And with your help, you can make that dream a reality.