@@ -10,6 +10,7 @@ import {
1010 fetchTools , fetchDomains , fetchLearningPath ,
1111} from "@/data/trends" ;
1212import DashboardShell from "@/components/DashboardShell" ;
13+ import WatchlistButton from "@/components/WatchlistButton" ;
1314import { motion , AnimatePresence } from "framer-motion" ;
1415import Link from "next/link" ;
1516
@@ -25,7 +26,7 @@ function priorityStyle(p: string): { label: string; cls: string } {
2526 case "MEDIUM" : return { label : "Worth learning" , cls : "text-indigo-600 bg-indigo-500/10 border-indigo-500/20" } ;
2627 case "LOW" : return { label : "Stable pick" , cls : "text-indigo-600 bg-indigo-500/10 border-indigo-500/20" } ;
2728 case "AVOID" : return { label : "Declining" , cls : "text-rose-600 bg-rose-500/10 border-rose-500/20" } ;
28- default : return { label : "Tracked" , cls : "text-[#5A6072 ] bg-white /5 border-white/10" } ;
29+ default : return { label : "Tracked" , cls : "text-[var(--c-ink-2) ] bg-[var(--c-surface)] /5 border-white/10" } ;
2930 }
3031}
3132
@@ -38,7 +39,7 @@ function ScoreRing({ score, size = 56, stroke = 4 }: { score: number; size?: num
3839 return (
3940 < div className = "relative shrink-0" style = { { width : size , height : size } } >
4041 < svg width = { size } height = { size } className = "-rotate-90" >
41- < circle cx = { size / 2 } cy = { size / 2 } r = { r } stroke = "rgba(20,23,38,0.10)" strokeWidth = { stroke } fill = "none" />
42+ < circle cx = { size / 2 } cy = { size / 2 } r = { r } style = { { stroke : "var(--c-border)" } } strokeWidth = { stroke } fill = "none" />
4243 < motion . circle
4344 cx = { size / 2 } cy = { size / 2 } r = { r } stroke = { color } strokeWidth = { stroke } fill = "none"
4445 strokeLinecap = "round" strokeDasharray = { circ }
@@ -73,30 +74,31 @@ function PathCard({ tool, isEntry = false }: { tool: Tool; isEntry?: boolean })
7374 </ span >
7475 ) }
7576 < div className = "flex items-center gap-4 relative" >
76- < span className = "text-3xl p-2.5 bg-[#F7F8FC ] border border-[rgba(20,23,38,0.10 )] rounded-xl group-hover:scale-105 group-hover:border-indigo-400/40 transition-all" >
77+ < span className = "text-3xl p-2.5 bg-[var(--c-surface-2) ] border border-[var(--c-border )] rounded-xl group-hover:scale-105 group-hover:border-indigo-400/40 transition-all" >
7778 { tool . icon }
7879 </ span >
7980 < div className = "min-w-0 flex-1" >
80- < h4 className = "font-bold text-sm text-[#141726 ] group-hover:text-indigo-600 transition-colors truncate" > { tool . name } </ h4 >
81- < p className = "text-[10px] font-mono text-[#5A6072 ]/60 uppercase truncate" > { tool . category } </ p >
81+ < h4 className = "font-bold text-sm text-[var(--c-ink) ] group-hover:text-indigo-600 transition-colors truncate" > { tool . name } </ h4 >
82+ < p className = "text-[10px] font-mono text-[var(--c-ink-2) ]/60 uppercase truncate" > { tool . category } </ p >
8283 </ div >
8384 < ScoreRing score = { tool . score } />
8485 </ div >
8586
86- < p className = "text-[11px] text-[#5A6072 ] leading-relaxed mt-4 line-clamp-2 font-light relative" >
87+ < p className = "text-[11px] text-[var(--c-ink-2) ] leading-relaxed mt-4 line-clamp-2 font-light relative" >
8788 { tool . description || "Tracked live across developer signal sources." }
8889 </ p >
8990
9091 < div className = "flex items-center justify-between mt-4 pt-3 border-t border-indigo-500/5 relative" >
9192 < span className = { `px-2 py-0.5 rounded-md border text-[9px] font-mono font-bold uppercase tracking-wide ${ prio . cls } ` } >
9293 { prio . label }
9394 </ span >
94- < div className = "flex items-center gap-3 text-[10px] font-mono" >
95- < span className = "flex items-center gap-1 text-[#5A6072 ]/70" >
95+ < div className = "flex items-center gap-2 text-[10px] font-mono" >
96+ < span className = "flex items-center gap-1 text-[var(--c-ink-2) ]/70" >
9697 < Star className = "w-3 h-3 text-amber-500 fill-amber-500" />
9798 { tool . stars >= 1000 ? `${ ( tool . stars / 1000 ) . toFixed ( 0 ) } k` : tool . stars }
9899 </ span >
99- < Link href = { `/tools/${ tool . slug } ` } className = "flex items-center gap-0.5 text-indigo-600 hover:text-[#141726] transition-colors font-bold" >
100+ < WatchlistButton toolSlug = { tool . slug } className = "-my-1" />
101+ < Link href = { `/tools/${ tool . slug } ` } className = "flex items-center gap-0.5 text-indigo-600 hover:text-[var(--c-ink)] transition-colors font-bold" >
100102 Analyze < ArrowRight className = "w-3 h-3 group-hover:translate-x-0.5 transition-transform" />
101103 </ Link >
102104 </ div >
@@ -133,7 +135,13 @@ export default function ExplorePage() {
133135 const [ toolData , domainData ] = await Promise . all ( [ fetchTools ( ) , fetchDomains ( ) ] ) ;
134136 setTools ( toolData ) ;
135137 setDomains ( domainData ) ;
136- if ( domainData . length > 0 ) setActiveDomain ( domainData [ 0 ] . slug ) ;
138+ if ( domainData . length > 0 ) {
139+ const domainParam = new URLSearchParams ( window . location . search ) . get ( "domain" ) ;
140+ const preselect = domainParam && domainData . some ( ( d ) => d . slug === domainParam )
141+ ? domainParam
142+ : domainData [ 0 ] . slug ;
143+ setActiveDomain ( preselect ) ;
144+ }
137145 } catch ( err ) {
138146 console . error ( "Failed to fetch data:" , err ) ;
139147 } finally {
@@ -176,7 +184,7 @@ export default function ExplorePage() {
176184 < DashboardShell >
177185 < div className = "flex flex-col items-center justify-center py-32 gap-3" >
178186 < Loader2 className = "w-8 h-8 text-indigo-600 animate-spin" />
179- < span className = "text-xs font-mono text-[#5A6072 ]/70" > Mapping learning paths…</ span >
187+ < span className = "text-xs font-mono text-[var(--c-ink-2) ]/70" > Mapping learning paths…</ span >
180188 </ div >
181189 </ DashboardShell >
182190 ) ;
@@ -190,32 +198,32 @@ export default function ExplorePage() {
190198 < div className = "space-y-8 relative z-10 pb-16" >
191199
192200 { /* ─── Cinematic Header ─── */ }
193- < header className = "p-6 md:p-8 rounded-3xl border border-indigo-500/10 bg-[#FFFFFF ]/80 backdrop-blur-md relative overflow-hidden" >
201+ < header className = "p-6 md:p-8 rounded-3xl border border-indigo-500/10 bg-[var(--c-surface) ]/80 backdrop-blur-md relative overflow-hidden" >
194202 < div className = "absolute inset-0 bg-[radial-gradient(circle_at_15%_20%,rgba(67,56,202,0.08),transparent_55%)] pointer-events-none" />
195203 < div className = "flex flex-col md:flex-row justify-between items-start md:items-end gap-5 relative" >
196204 < div className = "space-y-2" >
197205 < span className = "text-[10px] font-mono font-bold text-indigo-600 uppercase tracking-widest flex items-center gap-2" >
198206 < Route className = "w-3.5 h-3.5" /> Momentum-driven learning paths
199207 </ span >
200208 < h1 className = "text-3xl md:text-5xl font-black tracking-tight font-display flex items-center gap-3" >
201- < span className = "gradient -text" > Explore Universe</ span >
209+ < span className = "text -text-primary " > Explore Universe</ span >
202210 </ h1 >
203- < p className = "text-[#5A6072 ] text-sm max-w-xl font-light" >
211+ < p className = "text-[var(--c-ink-2) ] text-sm max-w-xl font-light" >
204212 Pick a domain and follow the sequence StackRadar recommends — ordered by what's worth learning
205213 < span className = "text-indigo-600" > right now</ span > , from entry point to advanced.
206214 </ p >
207215 </ div >
208216
209217 < div className = "relative group w-full md:w-80" >
210218 < div className = "absolute -inset-[1px] bg-gradient-to-r from-indigo-500 to-indigo-500 rounded-xl opacity-20 group-focus-within:opacity-50 transition-opacity duration-300 blur-sm" />
211- < div className = "relative bg-[#F1F3FA ] rounded-xl flex items-center border border-indigo-500/10 px-3" >
219+ < div className = "relative bg-[var(--c-surface-2) ] rounded-xl flex items-center border border-indigo-500/10 px-3" >
212220 < Search className = "w-4 h-4 text-slate-500 group-focus-within:text-indigo-600" />
213221 < input
214222 type = "text"
215223 placeholder = "Search all technologies…"
216224 value = { searchQuery }
217225 onChange = { ( e ) => setSearchQuery ( e . target . value ) }
218- className = "w-full bg-transparent border-none py-3 px-2 text-xs text-[#141726 ] focus:outline-none placeholder-[#5A6072 ]/50"
226+ className = "w-full bg-transparent border-none py-3 px-2 text-xs text-[var(--c-ink) ] focus:outline-none placeholder-[var(--c-ink-2) ]/50"
219227 />
220228 </ div >
221229 </ div >
@@ -225,8 +233,8 @@ export default function ExplorePage() {
225233 < div className = "grid grid-cols-1 lg:grid-cols-12 gap-8 items-start" >
226234
227235 { /* ─── Domain rail ─── */ }
228- < aside className = "lg:col-span-3 bg-[#FFFFFF ]/80 border border-indigo-500/10 rounded-2xl p-4 space-y-1.5 lg:sticky lg:top-24 z-10 backdrop-blur-md" >
229- < span className = "text-[10px] font-mono font-bold text-[#5A6072 ]/50 uppercase tracking-widest block px-2 pb-2 border-b border-indigo-500/5" >
236+ < aside className = "lg:col-span-3 bg-[var(--c-surface) ]/80 border border-indigo-500/10 rounded-2xl p-4 space-y-1.5 lg:sticky lg:top-24 z-10 backdrop-blur-md" >
237+ < span className = "text-[10px] font-mono font-bold text-[var(--c-ink-2) ]/50 uppercase tracking-widest block px-2 pb-2 border-b border-indigo-500/5" >
230238 Domains
231239 </ span >
232240 < div className = "flex flex-row lg:flex-col gap-1.5 overflow-x-auto lg:overflow-visible pb-2 lg:pb-0 scrollbar-none" >
@@ -237,7 +245,7 @@ export default function ExplorePage() {
237245 key = { d . slug }
238246 onClick = { ( ) => { setSearchQuery ( "" ) ; setActiveDomain ( d . slug ) ; } }
239247 className = { `w-full flex items-center gap-2.5 px-3 py-2.5 rounded-xl border text-xs font-mono tracking-wider transition-all duration-300 shrink-0 text-left cursor-pointer ${
240- isActive ? "bg-indigo-600/15 border-indigo-500/40 text-[#141726 ] font-bold" : "bg-transparent border-transparent text-[#5A6072 ] hover:text-[#141726 ] hover:bg-[#F1F3FA ]/50"
248+ isActive ? "bg-indigo-600/15 border-indigo-500/40 text-[var(--c-ink) ] font-bold" : "bg-transparent border-transparent text-[var(--c-ink-2) ] hover:text-[var(--c-ink) ] hover:bg-[var(--c-surface-2) ]/50"
241249 } `}
242250 >
243251 < span className = "text-base select-none" > { d . icon } </ span >
@@ -256,11 +264,11 @@ export default function ExplorePage() {
256264 { searchResults ? (
257265 < div className = "space-y-5" >
258266 < div className = "flex items-center justify-between" >
259- < h3 className = "text-sm font-mono text-[#5A6072 ]" > SEARCH RESULTS · "{ searchQuery } "</ h3 >
267+ < h3 className = "text-sm font-mono text-[var(--c-ink-2) ]" > SEARCH RESULTS · "{ searchQuery } "</ h3 >
260268 < span className = "text-xs font-mono text-indigo-600 font-bold" > { searchResults . length } FOUND</ span >
261269 </ div >
262270 { searchResults . length === 0 ? (
263- < div className = "p-12 glass-panel rounded-2xl text-center font-mono text-xs text-[#5A6072 ]" >
271+ < div className = "p-12 glass-panel rounded-2xl text-center font-mono text-xs text-[var(--c-ink-2) ]" >
264272 No tracked technologies match this lookup.
265273 </ div >
266274 ) : (
@@ -284,24 +292,24 @@ export default function ExplorePage() {
284292 < div className = "absolute inset-0 bg-[radial-gradient(circle_at_80%_20%,rgba(67,56,202,0.12),transparent_55%)] pointer-events-none" />
285293 < div className = "flex flex-col md:flex-row items-start md:items-center gap-6 relative" >
286294 < div className = "flex items-center gap-5" >
287- < span className = "text-5xl p-4 bg-[#FFFFFF ] border border-indigo-500/20 rounded-2xl" > { entryTool . icon } </ span >
295+ < span className = "text-5xl p-4 bg-[var(--c-surface) ] border border-indigo-500/20 rounded-2xl" > { entryTool . icon } </ span >
288296 < ScoreRing score = { entryTool . score } size = { 76 } stroke = { 5 } />
289297 </ div >
290298 < div className = "flex-1 space-y-2" >
291299 < span className = "text-[10px] font-mono font-bold text-indigo-600 uppercase tracking-widest flex items-center gap-1.5" >
292300 < Sparkles className = "w-3.5 h-3.5" /> Recommended entry point · { currentDomain . name }
293301 </ span >
294302 < h2 className = "text-2xl md:text-3xl font-black font-display" >
295- Start with < span className = "text-[#141726 ]" > { entryTool . name } </ span >
303+ Start with < span className = "text-[var(--c-ink) ]" > { entryTool . name } </ span >
296304 </ h2 >
297- < p className = "text-sm text-[#5A6072 ] font-light max-w-xl leading-relaxed" >
305+ < p className = "text-sm text-[var(--c-ink-2) ] font-light max-w-xl leading-relaxed" >
298306 { entryTool . recommendation || `${ entryTool . name } is the highest-leverage place to begin in ${ currentDomain . name } . Follow the path below from here.` }
299307 </ p >
300308 < div className = "flex flex-wrap gap-3 pt-2" >
301309 < Link href = { `/roadmap/${ currentDomain . slug } ` } className = "btn-primary text-xs py-2.5 px-5 rounded-xl" >
302310 < Map className = "w-4 h-4" /> Start the { currentDomain . name } roadmap
303311 </ Link >
304- < Link href = { `/tools/${ entryTool . slug } ` } className = "px-5 py-2.5 rounded-xl border border-indigo-500/20 bg-[#FFFFFF ]/60 hover:bg-[#F1F3FA ] text-xs font-bold font-mono uppercase tracking-wider flex items-center gap-2 transition-colors" >
312+ < Link href = { `/tools/${ entryTool . slug } ` } className = "px-5 py-2.5 rounded-xl border border-indigo-500/20 bg-[var(--c-surface) ]/60 hover:bg-[var(--c-surface-2) ] text-xs font-bold font-mono uppercase tracking-wider flex items-center gap-2 transition-colors" >
305313 < Zap className = "w-3.5 h-3.5" /> Analyze { entryTool . name }
306314 </ Link >
307315 </ div >
@@ -315,7 +323,7 @@ export default function ExplorePage() {
315323 { pathLoading ? (
316324 < div className = "flex flex-col items-center justify-center py-20 gap-3" >
317325 < Loader2 className = "w-6 h-6 text-indigo-600 animate-spin" />
318- < span className = "text-xs font-mono text-[#5A6072 ]/60" > Sequencing the path…</ span >
326+ < span className = "text-xs font-mono text-[var(--c-ink-2) ]/60" > Sequencing the path…</ span >
319327 </ div >
320328 ) : learningPath && learningPath . path . length > 0 ? (
321329 < div className = "relative pl-6 md:pl-8" >
@@ -336,7 +344,7 @@ export default function ExplorePage() {
336344 STEP { meta . num }
337345 </ span >
338346 < h3 className = "text-lg md:text-xl font-black font-display uppercase tracking-wide" > { meta . label } </ h3 >
339- < span className = "text-[10px] font-mono text-[#5A6072 ]/50 border border-indigo-500/10 rounded px-2 py-0.5" >
347+ < span className = "text-[10px] font-mono text-[var(--c-ink-2) ]/50 border border-indigo-500/10 rounded px-2 py-0.5" >
340348 { tier . tools . length } { tier . tools . length === 1 ? "tool" : "tools" }
341349 </ span >
342350 </ div >
@@ -353,7 +361,7 @@ export default function ExplorePage() {
353361 </ div >
354362 </ div >
355363 ) : (
356- < div className = "text-center py-16 text-[#5A6072 ]/50 text-xs font-mono border border-dashed border-indigo-500/10 rounded-2xl" >
364+ < div className = "text-center py-16 text-[var(--c-ink-2) ]/50 text-xs font-mono border border-dashed border-indigo-500/10 rounded-2xl" >
357365 Select a domain to reveal its learning sequence.
358366 </ div >
359367 ) }
0 commit comments