33import Link from 'next/link' ;
44import { motion } from 'framer-motion' ;
55import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
6- import { faHome , faArrowLeft } from '@fortawesome/free-solid-svg-icons' ;
6+ import { faHome , faArrowLeft , faFolder , faNewspaper , faUser , faEnvelope } from '@fortawesome/free-solid-svg-icons' ;
7+
8+ const staggerContainer = {
9+ hidden : { opacity : 0 } ,
10+ visible : { opacity : 1 , transition : { staggerChildren : 0.1 } }
11+ } ;
12+
13+ const staggerItem = {
14+ hidden : { opacity : 0 , y : 10 } ,
15+ visible : { opacity : 1 , y : 0 }
16+ } ;
717
818export default function NotFound ( ) {
19+ const quickLinks = [
20+ { name : 'Home' , path : '/' , icon : faHome , description : 'Back to the main page' } ,
21+ { name : 'Projects' , path : '/projects' , icon : faFolder , description : 'Browse my portfolio' } ,
22+ { name : 'Blog' , path : '/blog' , icon : faNewspaper , description : 'Read my articles' } ,
23+ { name : 'About' , path : '/about' , icon : faUser , description : 'Learn more about me' } ,
24+ { name : 'Contact' , path : '/contact' , icon : faEnvelope , description : 'Get in touch' } ,
25+ ] ;
26+
927 return (
10- < div className = "min-h-[70vh ] flex items-center justify-center px-4" >
28+ < div className = "min-h-[80vh ] flex items-center justify-center px-4 py-12 " >
1129 < motion . div
12- className = "text-center glass-card p-8 md:p-12 max-w-xl "
13- initial = { { opacity : 0 , scale : 0.95 } }
14- animate = { { opacity : 1 , scale : 1 } }
30+ className = "text-center max-w-2xl w-full "
31+ initial = { { opacity : 0 , y : 20 } }
32+ animate = { { opacity : 1 , y : 0 } }
1533 transition = { { duration : 0.5 } }
1634 >
1735 { /* Error Code */ }
1836 < motion . div
1937 className = "mb-6"
20- initial = { { opacity : 0 , y : - 20 } }
21- animate = { { opacity : 1 , y : 0 } }
22- transition = { { delay : 0.2 } }
38+ initial = { { opacity : 0 , scale : 0.8 } }
39+ animate = { { opacity : 1 , scale : 1 } }
40+ transition = { { delay : 0.1 , duration : 0.4 } }
2341 >
2442 < span className = "text-8xl md:text-9xl font-display font-bold text-gradient" >
2543 404
@@ -28,37 +46,65 @@ export default function NotFound() {
2846
2947 { /* Terminal-style message */ }
3048 < motion . div
31- className = "bg-light-surface dark:bg-deep-space rounded-lg p-4 mb-8 font-mono text-sm text-left border border-light-border dark:border-slate-700/50 "
49+ className = "glass-card p-4 mb-8 font-mono text-sm text-left max-w-md mx-auto "
3250 initial = { { opacity : 0 } }
3351 animate = { { opacity : 1 } }
34- transition = { { delay : 0.4 } }
52+ transition = { { delay : 0.2 } }
3553 >
3654 < div className = "flex items-center gap-2 mb-2 pb-2 border-b border-light-border dark:border-slate-700/50" >
37- < span className = "w-3 h-3 rounded-full bg-red-500" />
38- < span className = "w-3 h-3 rounded-full bg-yellow-500" />
39- < span className = "w-3 h-3 rounded-full bg-green-500" />
40- < span className = "ml-2 text-light-text-secondary dark:text-muted-steel text-xs" > error.log </ span >
55+ < span className = "w-3 h-3 rounded-full bg-red-500" aria-hidden = "true" />
56+ < span className = "w-3 h-3 rounded-full bg-yellow-500" aria-hidden = "true" />
57+ < span className = "w-3 h-3 rounded-full bg-green-500" aria-hidden = "true" />
58+ < span className = "ml-2 text-light-text-secondary dark:text-muted-steel text-xs" > terminal </ span >
4159 </ div >
4260 < p className = "text-red-500" > $ ERROR: Page not found</ p >
4361 < p className = "text-light-text-secondary dark:text-muted-steel" >
44- > The requested resource does not exist
62+ > The requested URL does not exist on this server
4563 </ p >
46- < p className = "text-signal-green" > $ Suggestion: Navigate to a valid route </ p >
64+ < p className = "text-signal-green" > $ Redirecting to helpful links... </ p >
4765 </ motion . div >
4866
4967 { /* Title and description */ }
50- < h1 className = "text-2xl md:text-3xl font-display font-bold text-light-text dark:text-ghost-white mb-4 " >
51- Page Not Found
68+ < h1 className = "text-2xl md:text-3xl font-display font-bold text-light-text dark:text-ghost-white mb-3 " >
69+ Oops! Page Not Found
5270 </ h1 >
53- < p className = "text-light-text-secondary dark:text-muted-steel mb-8" >
54- The page you're looking for doesn't exist or has been moved.
71+ < p className = "text-light-text-secondary dark:text-muted-steel mb-8 max-w-md mx-auto" >
72+ The page you're looking for might have been moved, deleted, or perhaps never existed.
73+ Let me help you find your way.
5574 </ p >
5675
76+ { /* Quick Navigation Links */ }
77+ < motion . div
78+ className = "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-3 mb-8"
79+ variants = { staggerContainer }
80+ initial = "hidden"
81+ animate = "visible"
82+ >
83+ { quickLinks . map ( ( link ) => (
84+ < motion . div key = { link . path } variants = { staggerItem } >
85+ < Link
86+ href = { link . path }
87+ className = "group flex flex-col items-center p-4 rounded-xl bg-light-surface dark:bg-midnight-steel/50 border border-light-border dark:border-slate-700/50 hover:border-neural-blue/50 transition-all duration-300 hover:-translate-y-1"
88+ >
89+ < span className = "w-10 h-10 rounded-lg bg-neural-blue/10 flex items-center justify-center mb-2 group-hover:bg-neural-blue/20 transition-colors" >
90+ < FontAwesomeIcon icon = { link . icon } className = "text-neural-blue" />
91+ </ span >
92+ < span className = "text-sm font-medium text-light-text dark:text-ghost-white group-hover:text-neural-blue transition-colors" >
93+ { link . name }
94+ </ span >
95+ </ Link >
96+ </ motion . div >
97+ ) ) }
98+ </ motion . div >
99+
57100 { /* Action buttons */ }
58101 < div className = "flex flex-col sm:flex-row gap-4 justify-center" >
59- < Link href = "/" className = "btn-primary inline-flex items-center justify-center gap-2" >
102+ < Link
103+ href = "/"
104+ className = "btn-primary inline-flex items-center justify-center gap-2"
105+ >
60106 < FontAwesomeIcon icon = { faHome } />
61- Go Home
107+ Go to Homepage
62108 </ Link >
63109 < button
64110 onClick = { ( ) => window . history . back ( ) }
@@ -68,6 +114,15 @@ export default function NotFound() {
68114 Go Back
69115 </ button >
70116 </ div >
117+
118+ { /* Help text */ }
119+ < p className = "mt-8 text-sm text-light-text-secondary dark:text-muted-steel" >
120+ Still can't find what you're looking for?{ ' ' }
121+ < Link href = "/contact" className = "text-neural-blue hover:text-synapse-cyan transition-colors" >
122+ Contact me
123+ </ Link >
124+ { ' ' } and I'll help you out.
125+ </ p >
71126 </ motion . div >
72127 </ div >
73128 ) ;
0 commit comments