I'm looking to create a fluid container that adjusts its height gradually based on the width of the window (as the div's width is set to 100%). Similar to the behavior achieved with the aspect-ratio CSS rule, I want the height to smoothly increase or decrease in a linear fashion. However, I also need to set limits on the minimum and maximum height. If CSS alone isn't enough to achieve this effect, I'm open to using JavaScript as well.