What's the problem ? Hardness is not the definition of a metal.
You need to expand your thinking. EVERY element is solid, liquid, and gas, over different ranges of temperature ... including all of the metals. There are only TWO elements that are liquid AT ROOM TEMPERATURE, and mercury is one of them. But on a mild day at the south pole, mercury is solid too.
Mercury is classified as a metal despite being liquid at room temperature due to its metallic properties such as luster and electrical conductivity. It functions similarly to other metals by forming amalgams and reacting with them, which reinforces its identity as a metal. This categorization is based on its atomic structure and behavior rather than its state of matter.
;