The practicalities of CSS Media Queries, lessons learned 15 years ago
"user-agent sniffing (long since shown to be a terrible idea)"
Wrong. On mobile the consensus is this is a sad necessity. There are services to automate and abstract this so you aren't manually creating your own UA DB.