WebashalarForML commited on
Commit
6ccc91c
·
verified ·
1 Parent(s): a8e2413

Upload components/Work.js with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/Work.js +127 -0
components/Work.js ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use client';
2
+
3
+ import { motion, useScroll, useTransform } from 'framer-motion';
4
+ import { ArrowRight, Github, ExternalLink } from 'lucide-react';
5
+ import { useRef } from 'react';
6
+
7
+ const projects = [
8
+ {
9
+ title: 'NeuroGenesis',
10
+ category: 'Generative AI',
11
+ description: 'A diffusion model capable of generating high-fidelity synthetic data for autonomous training.',
12
+ image: 'https://images.unsplash.com/photo-1620712943543-bcc4688e7485?q=80&w=1965&auto=format&fit=crop',
13
+ tags: ['PyTorch', 'CUDA', 'Diffusion'],
14
+ },
15
+ {
16
+ title: 'Sentient Grid',
17
+ category: 'Reinforcement Learning',
18
+ description: 'Multi-agent system optimizing energy distribution in smart cities using advanced policy gradients.',
19
+ image: 'https://images.unsplash.com/photo-1518770660439-4636190af475?q=80&w=2070&auto=format&fit=crop',
20
+ tags: ['RL', 'Python', 'IoT'],
21
+ },
22
+ {
23
+ title: 'Vision Cortex',
24
+ category: 'Computer Vision',
25
+ description: 'Real-time semantic segmentation pipeline running on edge devices with <10ms latency.',
26
+ image: 'https://images.unsplash.com/photo-1555255707-c07966088b7b?q=80&w=2070&auto=format&fit=crop',
27
+ tags: ['OpenCV', 'TensorRT', 'C++'],
28
+ },
29
+ ];
30
+
31
+ export default function Work() {
32
+ const containerRef = useRef(null);
33
+ const { scrollYProgress } = useScroll({
34
+ target: containerRef,
35
+ offset: ['start end', 'end start'],
36
+ });
37
+
38
+ return (
39
+ <section id="projects" ref={containerRef} className="py-32 px-6 relative overflow-hidden">
40
+ <div className="max-w-7xl mx-auto">
41
+ <motion.div
42
+ initial={{ opacity: 0 }}
43
+ whileInView={{ opacity: 1 }}
44
+ className="mb-20 flex flex-col md:flex-row justify-between items-end"
45
+ >
46
+ <div>
47
+ <h2 className="font-serif text-4xl md:text-6xl mb-4">Selected Works</h2>
48
+ <p className="font-mono text-sm text-faint max-w-md">
49
+ Research initiatives and commercial applications pushing the boundaries of intelligence.
50
+ </p>
51
+ </div>
52
+ <div className="mt-6 md:mt-0 font-mono text-xs uppercase tracking-widest border border-white/20 px-4 py-2">
53
+ 2023 - 2024
54
+ </div>
55
+ </motion.div>
56
+
57
+ <div className="flex flex-col gap-32">
58
+ {projects.map((project, index) => (
59
+ <ProjectCard key={index} project={project} index={index} />
60
+ ))}
61
+ </div>
62
+ </div>
63
+ </section>
64
+ );
65
+ }
66
+
67
+ function ProjectCard({ project, index }) {
68
+ const ref = useRef(null);
69
+ const { scrollYProgress } = useScroll({
70
+ target: ref,
71
+ offset: ['start end', 'end start'],
72
+ });
73
+
74
+ const scale = useTransform(scrollYProgress, [0, 0.5, 1], [0.8, 1, 0.8]);
75
+ const x = useTransform(scrollYProgress, [0, 0.5, 1], [index % 2 === 0 ? -100 : 100, 0, index % 2 === 0 ? 100 : -100]);
76
+ const opacity = useTransform(scrollYProgress, [0, 0.2, 0.8, 1], [0, 1, 1, 0]);
77
+
78
+ return (
79
+ <motion.div
80
+ ref={ref}
81
+ style={{ scale, x, opacity }}
82
+ className="grid grid-cols-1 lg:grid-cols-12 gap-8 items-center group"
83
+ >
84
+ {/* Image Section */}
85
+ <div className={`lg:col-span-7 relative overflow-hidden ${index % 2 !== 0 ? 'lg:order-2' : ''}`}>
86
+ <div className="absolute inset-0 bg-white/10 z-10 mix-blend-overlay opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
87
+ <img
88
+ src={project.image}
89
+ alt={project.title}
90
+ className="w-full h-[400px] md:h-[600px] object-cover grayscale group-hover:grayscale-0 transition-all duration-700 ease-in-out transform group-hover:scale-105"
91
+ />
92
+ {/* Decorative Frame */}
93
+ <div className="absolute top-4 left-4 w-full h-full border border-white/20 -z-10 group-hover:translate-x-2 group-hover:translate-y-2 transition-transform duration-300"></div>
94
+ </div>
95
+
96
+ {/* Content Section */}
97
+ <div className={`lg:col-span-5 ${index % 2 !== 0 ? 'lg:order-1 lg:text-right' : ''}`}>
98
+ <div className="font-mono text-xs text-faint uppercase tracking-widest mb-4">
99
+ 0{index + 1} / {project.category}
100
+ </div>
101
+ <h3 className="font-serif text-4xl md:text-5xl mb-6 group-hover:text-gray-300 transition-colors">
102
+ {project.title}
103
+ </h3>
104
+ <p className="text-gray-400 leading-relaxed mb-8 font-light">
105
+ {project.description}
106
+ </p>
107
+
108
+ <div className={`flex flex-wrap gap-2 mb-8 ${index % 2 !== 0 ? 'lg:justify-end' : ''}`}>
109
+ {project.tags.map((tag) => (
110
+ <span key={tag} className="px-3 py-1 border border-white/10 text-xs font-mono uppercase">
111
+ {tag}
112
+ </span>
113
+ ))}
114
+ </div>
115
+
116
+ <div className={`flex gap-4 ${index % 2 !== 0 ? 'lg:justify-end' : ''}`}>
117
+ <button className="liquid-btn px-6 py-3 font-mono text-xs uppercase tracking-widest flex items-center gap-2 group/btn">
118
+ View Case Study <ArrowRight size={14} className="group-hover/btn:translate-x-1 transition-transform" />
119
+ </button>
120
+ <button className="px-6 py-3 border border-white/20 font-mono text-xs uppercase tracking-widest hover:bg-white hover:text-black transition-colors">
121
+ Source Code
122
+ </button>
123
+ </div>
124
+ </div>
125
+ </motion.div>
126
+ );
127
+ }