@@ -62,10 +62,10 @@ export default function MetricsTable() {
6262 } , [ ] ) ;
6363
6464 return (
65- < div ref = { tableRef } className = "overflow-x-auto " >
66- < div className = "min-w-[650px] bg-gray-900/50 backdrop-blur-xl rounded-2xl border border-gray-800 overflow-hidden" >
67- { /* Table Header */ }
68- < div className = "grid grid-cols-4 gap-4 p-6 bg-linear-to-r from-gray-900 to-gray-800 border-b border-gray-700" >
65+ < div ref = { tableRef } className = "w-full " >
66+ < div className = "flex flex-col gap-4 md:gap-0 md: bg-gray-900/50 md: backdrop-blur-xl md: rounded-2xl md: border md: border-gray-800 md: overflow-hidden" >
67+ { /* Table Header - Desktop Only */ }
68+ < div className = "hidden md: grid grid-cols-4 gap-4 p-6 bg-linear-to-r from-gray-900 to-gray-800 border-b border-gray-700" >
6969 < div className = "font-semibold text-gray-300" > Metric</ div >
7070 < div className = "font-semibold text-gray-300" > Without context</ div >
7171 < div className = "font-semibold text-gray-300" > With context</ div >
@@ -76,23 +76,37 @@ export default function MetricsTable() {
7676 { metrics . map ( ( metric , index ) => (
7777 < motion . div
7878 key = { metric . name }
79- className = "grid grid-cols-4 gap-4 p-6 border-b border-gray-800 last:border-b-0 hover:bg-gray-800/50 transition-colors"
80- initial = { { opacity : 0 , x : - 20 } }
81- animate = { isVisible ? { opacity : 1 , x : 0 } : { } }
79+ className = "flex flex-col p-6 bg-gray-900/40 backdrop-blur-sm rounded-2xl border border-gray-800 md:bg-transparent md:rounded-none md:border-0 md:border-b md: border-gray-800 md: last:border-b-0 md:grid md:grid-cols-4 md:gap-4 md:items-center hover:bg-gray-800/50 transition-colors"
80+ initial = { { opacity : 0 , y : 20 } }
81+ animate = { isVisible ? { opacity : 1 , y : 0 } : { } }
8282 transition = { { delay : index * 0.1 , duration : 0.5 } }
8383 >
84- < div className = "font-medium text-white" > { metric . name } </ div >
85- < div className = "text-gray-400" > { metric . without } </ div >
86- < div className = "text-white font-semibold" > { metric . with } </ div >
87- < div >
88- < motion . span
89- className = { `inline-block px-3 py-1 rounded-full text-sm font-bold bg-linear-to-r ${ metric . color } text-white` }
90- initial = { { scale : 0 } }
91- animate = { isVisible ? { scale : 1 } : { } }
92- transition = { { delay : index * 0.1 + 0.3 , type : 'spring' , stiffness : 200 } }
93- >
94- { metric . improvement }
95- </ motion . span >
84+ < div className = "mb-4 md:mb-0" >
85+ < div className = "text-lg font-bold text-white md:text-base md:font-medium" > { metric . name } </ div >
86+ </ div >
87+
88+ < div className = "grid grid-cols-2 gap-4 md:contents" >
89+ < div className = "md:block" >
90+ < div className = "text-xs text-gray-500 uppercase tracking-wider mb-1 md:hidden" > Without context</ div >
91+ < div className = "text-gray-400" > { metric . without } </ div >
92+ </ div >
93+
94+ < div className = "md:block" >
95+ < div className = "text-xs text-gray-500 uppercase tracking-wider mb-1 md:hidden" > With context</ div >
96+ < div className = "text-white font-semibold" > { metric . with } </ div >
97+ </ div >
98+
99+ < div className = "col-span-2 md:col-span-1 md:block mt-2 md:mt-0" >
100+ < div className = "text-xs text-gray-500 uppercase tracking-wider mb-2 md:hidden" > Improvement</ div >
101+ < motion . span
102+ className = { `inline-block px-3 py-1 rounded-full text-sm font-bold bg-linear-to-r ${ metric . color } text-white` }
103+ initial = { { scale : 0 } }
104+ animate = { isVisible ? { scale : 1 } : { } }
105+ transition = { { delay : index * 0.1 + 0.3 , type : 'spring' , stiffness : 200 } }
106+ >
107+ { metric . improvement }
108+ </ motion . span >
109+ </ div >
96110 </ div >
97111 </ motion . div >
98112 ) ) }
0 commit comments