Write a function `spiral_traverse(matrix)` that accepts a rectangular 2D list of integers and returns a list of all its elements in clockwise spiral order, starting from the top-left corner and moving right, then down, then left, then up, and repeating this pattern until every element has been visited.
- The matrix is guaranteed to be rectangular: every row has the same length, and the matrix may be empty (length 0).
- If the matrix is empty, return an empty list.
- The function should NOT modify the input matrix.
Your implementation must be efficient enough to handle matrices with up to 200 rows and 200 columns.
Constraints
0 <= len(matrix) <= 200
0 <= len(matrix[i]) <= 200 (for all rows; all rows have same length)
Elements are integers between -10^6 and 10^6.
Time complexity O(n) where n is total number of elements. Space complexity O(n) for output.