When designing layouts for desktop, tablet, and smartphone in both portrait and landscape orientations within a Single Page Application, is it more effective to separate the layouts as different resources and load them dynamically based on device detection, or utilize a single html/css resource with complex media queries to differentiate the layout?
Should the layouts be duplicated for each device type, considering they may share common UI elements, or would handling multiple combinations of device size and orientation within the same html/css lead to complexity, especially if the layouts vary significantly?
What approach would be most optimal and why?