You can target military objectives like certain infrastructure to disable it, but you're not allowed to target civilians. The rules of war just says when civilian casualties aren't punishable. You have to take measures to ensure attacks are as precise as you can make them and with as little collateral damage as possible.
"eliminate every human because they might be an enemy" is not a valid military objective.
That's true, you cannot target civilians. But you can destroy a military objective even if you know it will kill civilians. Per ICC:
Under international humanitarian law and the Rome Statute, the death of civilians during an armed conflict, no matter how grave and regrettable, does not in itself constitute a war crime. International humanitarian law and the Rome Statute permit belligerents to carry out proportionate attacks against military objectives, even when it is known that some civilian deaths or injuries will occur.
"Eliminate every human" is not a valid objective, but "eliminate Hamas" is.
Even if they somehow were accurate, these numbers only cover the direct deaths from attacks, the totals you cite include all deaths from starvation and disease and more. The attacks on the hospital system and infrastructure and access to food will cause the ratio to get much much worse. Famine is indiscriminate.
I can't find any source showing the context of the 30-35% claim from US Intel. I can't even find a reliable source of the US estimate of how many fighters they have. The last public numbers from US intel in January had much more detail and said 20% incapacitated, not 20% dead. A jump to +30% of Hamas fighters dead now seems beyond implausible. Especially because USA has also said they don't independently track deaths in the region, they rely on local numbers.
Different Hamas officials have made different claims about their losses, and all the sources seems vague. It's been reported as 6000 - 8000 either lost (could be casualties including injured survivors not able to fight) or dead. And some of them deny the numbers entirely.
25-30K fighters, 20-30% killed, so at best ~10K down to ~5K, assuming their intel is correct. It's very strange that the estimate of killed fighters is in percent and injuries is in absolute numbers. Doesn't make me feel confident they got the context right of the numbers shared
I believe those are still from January, when the total number of deaths was 25,000. So if they are correct then that would result in a casualty ratio between 1.5:1 and 4:1