The interesting thing to remember is that there aren't a lot of pure democracies out there.
As I said, people will also vote for irrational representatives; representative democracies don't magically make government rational or scientific.
The idea behind the US, for example, is supposed to be that it is based on rationality and scientific (or at least Enlightenment) principles.
No, that is incorrect. The idea behind the US is that people should foremost have the freedom to make their own choices, not collectively, but individually. It is an assumption of the Enlightenment that people will tend to make rational and scientifically sound choices, but there is no guarantee that they will.
Living under a direct democracy would probably be a terrifying experience without some form of voter exclusion that only allowed _informed_ votes (and any such system would be hard to prevent being gamed), and, even then, it could be terrifying if you were a member of any sort of minority.
A direct democracy based on majority rule is indeed incompatible with individual liberties, and that is why the US doesn't have such a system (of course, that doesn't stop either the left or the right from invoking a supposed majority as a justification of their various policies). But any system that attempts to enforce rational and scientifically sound government is likewise incompatible with individual liberties, because if you don't have the option to make "the wrong choice" you don't have a choice at all. And having that choice isn't an idle academic exercise: since nobody knows for certain what the rational and scientific choices actually are, the only way is to let everybody make their own choices and sort out later who was right and who was wrong.
What the US system has traditionally tried to do is to let everybody choose for themselves. If you want to destroy yourself with irrational or bad choices, that's your business; government would only intervene to protect people from causing harm to each other. Unfortunately, that system is falling apart, with both the left and the right trying to protect people from themselves, and to fabricate all sorts of harm and obligations to each other in an attempt to restrict people's ability to choose for themselves.