I recall making font sizes fluid and scale in ratio according to the viewport was not an easy task few years ago. Here's the formula I had bookmarked from css-tricks.com
Introducing clamp()
, a css function that is made for exact this use case. Clamp allows you to set minimum and maximum value.