jashdoshi77 commited on
Commit
d9e7e99
·
1 Parent(s): 4a0ff1a

Redesign About section - remove card, add hero statement, story blocks, and fix scroll animations

Browse files
Files changed (1) hide show
  1. src/components/AboutSection.tsx +58 -237
src/components/AboutSection.tsx CHANGED
@@ -10,18 +10,12 @@ if (typeof window !== "undefined") {
10
 
11
  export default function AboutSection() {
12
  const sectionRef = useRef<HTMLElement>(null);
13
- const marqueeRef = useRef<HTMLDivElement>(null);
14
  const headerWrapperRef = useRef<HTMLDivElement>(null);
15
- const cardRef = useRef<HTMLDivElement>(null);
16
- const textLine1Ref = useRef<HTMLDivElement>(null);
17
- const textLine2Ref = useRef<HTMLDivElement>(null);
18
- const textLine3Ref = useRef<HTMLDivElement>(null);
19
- const textLine4Ref = useRef<HTMLDivElement>(null);
20
- const statsRef = useRef<HTMLDivElement>(null);
21
  const stripsWrapperRef = useRef<HTMLDivElement>(null);
22
- const stat1Ref = useRef<HTMLDivElement>(null);
23
- const stat2Ref = useRef<HTMLDivElement>(null);
24
- const stat3Ref = useRef<HTMLDivElement>(null);
25
  const [mounted, setMounted] = useState(false);
26
 
27
  useEffect(() => {
@@ -56,24 +50,15 @@ export default function AboutSection() {
56
  ease: "linear",
57
  });
58
 
59
- // Set initial states - all hidden with enhanced effects
60
- // Header starts collapsed to center (scaleX: 0)
61
- gsap.set(headerWrapperRef.current, {
62
- scaleX: 0,
63
- transformOrigin: "center center"
64
- });
65
- gsap.set(cardRef.current, { opacity: 0, y: 80, scale: 0.9, rotateY: -15, filter: "blur(10px)" });
66
- gsap.set(textLine1Ref.current, { opacity: 0, x: 200, filter: "blur(8px)" });
67
- gsap.set(textLine2Ref.current, { opacity: 0, x: -200, filter: "blur(8px)" });
68
- gsap.set(textLine3Ref.current, { opacity: 0, y: 60, filter: "blur(6px)" });
69
- gsap.set(textLine4Ref.current, { opacity: 0, y: 60, filter: "blur(6px)" });
70
- gsap.set(statsRef.current, { opacity: 0 });
71
- gsap.set(stat1Ref.current, { opacity: 0, y: 50, scale: 0.8 });
72
- gsap.set(stat2Ref.current, { opacity: 0, y: 50, scale: 0.8 });
73
- gsap.set(stat3Ref.current, { opacity: 0, y: 50, scale: 0.8 });
74
- gsap.set(stripsWrapperRef.current, { opacity: 0, y: 80, scale: 0.95 });
75
 
76
- // Header expansion from center - starts early as section enters viewport
77
  gsap.to(headerWrapperRef.current, {
78
  scaleX: 1,
79
  ease: "power2.out",
@@ -90,7 +75,7 @@ export default function AboutSection() {
90
  scrollTrigger: {
91
  trigger: sectionRef.current,
92
  start: "top top",
93
- end: "+=2000",
94
  scrub: 1,
95
  pin: true,
96
  anticipatePin: 1,
@@ -98,92 +83,16 @@ export default function AboutSection() {
98
  },
99
  });
100
 
101
- // Reveal card with 3D effect - starts immediately when pinned
102
- tl.to(cardRef.current, {
103
- opacity: 1,
104
- y: 0,
105
- scale: 1,
106
- rotateY: 0,
107
- filter: "blur(0px)",
108
- duration: 0.25,
109
- ease: "power3.out",
110
- }, 0);
111
-
112
- // Text line 1 - dramatic slide in
113
- tl.to(textLine1Ref.current, {
114
- opacity: 1,
115
- x: 0,
116
- filter: "blur(0px)",
117
- duration: 0.2,
118
- ease: "power3.out",
119
- }, 0.12);
120
-
121
- // Text line 2 - slide from opposite direction
122
- tl.to(textLine2Ref.current, {
123
- opacity: 1,
124
- x: 0,
125
- filter: "blur(0px)",
126
- duration: 0.2,
127
- ease: "power3.out",
128
- }, 0.22);
129
-
130
- // Text line 3 - fade up
131
- tl.to(textLine3Ref.current, {
132
- opacity: 1,
133
- y: 0,
134
- filter: "blur(0px)",
135
- duration: 0.18,
136
- ease: "power2.out",
137
- }, 0.35);
138
-
139
- // Text line 4 - fade up
140
- tl.to(textLine4Ref.current, {
141
- opacity: 1,
142
- y: 0,
143
- filter: "blur(0px)",
144
- duration: 0.18,
145
- ease: "power2.out",
146
- }, 0.45);
147
-
148
- // Stats container fade in
149
- tl.to(statsRef.current, {
150
- opacity: 1,
151
- duration: 0.1,
152
- }, 0.55);
153
-
154
- // Stats staggered reveal with scale
155
- tl.to(stat1Ref.current, {
156
- opacity: 1,
157
- y: 0,
158
- scale: 1,
159
- duration: 0.12,
160
- ease: "back.out(1.7)",
161
- }, 0.58);
162
 
163
- tl.to(stat2Ref.current, {
164
- opacity: 1,
165
- y: 0,
166
- scale: 1,
167
- duration: 0.12,
168
- ease: "back.out(1.7)",
169
- }, 0.65);
170
 
171
- tl.to(stat3Ref.current, {
172
- opacity: 1,
173
- y: 0,
174
- scale: 1,
175
- duration: 0.12,
176
- ease: "back.out(1.7)",
177
- }, 0.72);
178
-
179
- // Strips reveal at the end with scale
180
- tl.to(stripsWrapperRef.current, {
181
- opacity: 1,
182
- y: 0,
183
- scale: 1,
184
- duration: 0.2,
185
- ease: "power3.out",
186
- }, 0.82);
187
 
188
  }, sectionRef);
189
 
@@ -194,12 +103,6 @@ export default function AboutSection() {
194
  const strip1Text = "★ Driven by Passion, Built with Code ★ Custom Web Experiences ★ Innovative Self-Made Creations ★ Tailored Web Solutions ★ ";
195
  const strip2Text = "★ Premium Quality ★ Performance First ★ Pixel Perfect ★ Digital Craft ★ Modern Development ★ Creative Coding ★ ";
196
 
197
- const stats = [
198
- { number: "3+", label: "YEARS", ref: stat1Ref },
199
- { number: "50+", label: "PROJECTS", ref: stat2Ref },
200
- { number: "30+", label: "CLIENTS", ref: stat3Ref },
201
- ];
202
-
203
  return (
204
  <section
205
  id="about"
@@ -209,14 +112,12 @@ export default function AboutSection() {
209
  {/* Gradient fade from video section above */}
210
  <div
211
  className="absolute top-0 left-0 right-0 h-32 pointer-events-none z-10"
212
- style={{
213
- background: "linear-gradient(to bottom, #050505 0%, transparent 100%)"
214
- }}
215
  />
216
 
217
- {/* Pinned wrapper that includes header and content */}
218
- <div className="min-h-screen pt-20">
219
- {/* Large Header Marquee Banner - Expands from center on scroll */}
220
  <div ref={headerWrapperRef} className="py-3 md:py-4 overflow-hidden border-b border-white/5">
221
  <div className="about-header-marquee flex whitespace-nowrap" style={{ width: "200%" }}>
222
  <span className="text-2xl md:text-4xl lg:text-6xl font-black tracking-tight text-white/90 uppercase">
@@ -225,127 +126,48 @@ export default function AboutSection() {
225
  </div>
226
  </div>
227
 
228
- {/* Main Content Area */}
229
- <div className="px-6 md:px-12 lg:px-20 py-3 md:py-4">
230
- <div className="flex items-start gap-8 md:gap-12 lg:gap-16">
231
- {/* Left Side - Card */}
232
- <div
233
- ref={cardRef}
234
- className="flex-shrink-0 w-48 md:w-56 lg:w-64"
235
- style={{ perspective: "1000px" }}
236
- >
237
- <div className="relative aspect-[3/4] rounded-3xl overflow-hidden bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 border border-white/10">
238
- {/* Background effects - neutral grey color scheme */}
239
- <div className="absolute inset-0 opacity-60">
240
- <div className="absolute top-0 left-1/4 w-40 h-40 bg-neutral-400/20 rounded-full blur-[70px]" />
241
- <div className="absolute bottom-0 right-1/4 w-40 h-40 bg-zinc-400/25 rounded-full blur-[70px]" />
242
- </div>
243
-
244
- {/* Grid pattern */}
245
- <div
246
- className="absolute inset-0 opacity-[0.04]"
247
- style={{
248
- backgroundImage: "linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px)",
249
- backgroundSize: "30px 30px",
250
- }}
251
- />
252
 
253
- {/* Card content */}
254
- <div className="absolute inset-0 flex flex-col items-center justify-center p-8">
255
- {/* Avatar */}
256
- <div className="relative mb-4">
257
- <div className="absolute inset-0 w-24 h-24 md:w-32 md:h-32 rounded-full bg-gradient-to-br from-neutral-300 to-zinc-400 blur-xl opacity-30 animate-pulse" />
258
- <div className="relative w-24 h-24 md:w-32 md:h-32 rounded-full bg-gradient-to-br from-white/10 to-white/5 border border-white/20 flex items-center justify-center backdrop-blur-sm">
259
- <span className="text-3xl md:text-5xl font-thin text-white/70">JD</span>
260
- </div>
261
- </div>
262
-
263
- {/* Title */}
264
- <p className="text-white/40 text-sm tracking-widest uppercase mb-4">About Me</p>
265
-
266
- {/* Status */}
267
- <div className="flex items-center gap-2 mt-auto">
268
- <div className="w-2.5 h-2.5 rounded-full bg-green-400/80 animate-pulse" />
269
- <span className="text-xs text-white/40">Available</span>
270
- </div>
271
- </div>
272
-
273
- {/* Corner accents */}
274
- <div className="absolute top-3 left-3 w-6 h-6 border-l-2 border-t-2 border-white/10 rounded-tl" />
275
- <div className="absolute top-3 right-3 w-6 h-6 border-r-2 border-t-2 border-white/10 rounded-tr" />
276
- <div className="absolute bottom-3 left-3 w-6 h-6 border-l-2 border-b-2 border-white/10 rounded-bl" />
277
- <div className="absolute bottom-3 right-3 w-6 h-6 border-r-2 border-b-2 border-white/10 rounded-br" />
278
-
279
- {/* Side accent - neutral grey gradient */}
280
- <div className="absolute -right-0.5 top-1/3 w-1 h-24 bg-gradient-to-b from-neutral-300 via-zinc-400 to-neutral-500 rounded-full" />
281
-
282
- {/* Location tag */}
283
- <div className="absolute bottom-4 left-1/2 -translate-x-1/2">
284
- <span className="text-[10px] text-white/30 tracking-wider">INDIA • 2026</span>
285
- </div>
286
- </div>
287
  </div>
 
 
 
 
 
 
 
 
288
 
289
- {/* Right Side - Text Content */}
290
- <div className="flex-1 pt-4">
291
- {/* Animated text lines - enhanced typography */}
292
- <div className="space-y-2 md:space-y-3 mb-6 md:mb-8">
293
- <div ref={textLine1Ref}>
294
- <h2 className="text-2xl md:text-3xl lg:text-4xl xl:text-5xl text-white leading-[1.1]">
295
- <span className="font-extralight">Crafting</span>{" "}
296
- <span className="font-bold italic">digital</span>{" "}
297
- <span className="font-light">experiences</span>
298
- </h2>
299
- </div>
300
-
301
- <div ref={textLine2Ref}>
302
- <h2 className="text-2xl md:text-3xl lg:text-4xl xl:text-5xl leading-[1.1]">
303
- <span className="text-white/40 font-light">that </span>
304
- <span className="font-black text-transparent bg-clip-text bg-gradient-to-r from-white via-neutral-200 to-zinc-300">inspire</span>
305
- <span className="text-white/40 font-light"> and </span>
306
- <span className="font-black text-transparent bg-clip-text bg-gradient-to-r from-zinc-200 via-neutral-100 to-white">engage</span>
307
- </h2>
308
- </div>
309
-
310
- <div ref={textLine3Ref} className="max-w-2xl pt-1">
311
- <p className="text-base md:text-lg lg:text-xl text-white/60 leading-relaxed font-light">
312
- I&apos;m a <span className="text-white font-semibold">creative developer</span> passionate about building
313
- intuitive, <span className="text-white/90 font-medium">high-performance</span> web applications that
314
- deliver meaningful results.
315
- </p>
316
- </div>
317
-
318
- <div ref={textLine4Ref} className="max-w-2xl">
319
- <p className="text-base md:text-lg lg:text-xl text-white/40 leading-relaxed font-light italic">
320
- From concept to launch, I focus on user-centered design
321
- and clean, maintainable code.
322
- </p>
323
- </div>
324
- </div>
325
-
326
- {/* Stats */}
327
- <div ref={statsRef}>
328
- <div className="h-px bg-gradient-to-r from-white/30 via-white/15 to-transparent mb-4 max-w-xl" />
329
- <div className="flex gap-8 md:gap-12 lg:gap-16">
330
- {stats.map((stat) => (
331
- <div key={stat.label} ref={stat.ref}>
332
- <p className="text-3xl md:text-4xl lg:text-5xl font-black text-transparent bg-clip-text bg-gradient-to-b from-white to-white/60 mb-0.5">
333
- {stat.number}
334
- </p>
335
- <p className="text-xs md:text-sm text-white/50 uppercase tracking-[0.25em] font-medium">
336
- {stat.label}
337
- </p>
338
- </div>
339
- ))}
340
- </div>
341
- </div>
342
  </div>
343
  </div>
344
  </div>
345
 
346
  {/* Diagonal Crossing Strips */}
347
  <div ref={stripsWrapperRef} className="relative h-28 md:h-32">
348
- {/* Strip 1 - White/Light - Tilted Down-Right */}
349
  <div
350
  className="absolute w-[300vw] left-[-100vw] bg-white py-5 md:py-6 shadow-2xl z-10"
351
  style={{ transform: "rotate(-4deg)", top: "5%" }}
@@ -357,7 +179,6 @@ export default function AboutSection() {
357
  </div>
358
  </div>
359
 
360
- {/* Strip 2 - Dark - Tilted Down-Left (Crossing) */}
361
  <div
362
  className="absolute w-[300vw] left-[-100vw] bg-[#151515] py-5 md:py-6 shadow-2xl border-y border-white/5 z-20"
363
  style={{ transform: "rotate(4deg)", top: "50%" }}
 
10
 
11
  export default function AboutSection() {
12
  const sectionRef = useRef<HTMLElement>(null);
 
13
  const headerWrapperRef = useRef<HTMLDivElement>(null);
14
+ const heroLine1Ref = useRef<HTMLDivElement>(null);
15
+ const heroLine2Ref = useRef<HTMLDivElement>(null);
16
+ const storyBlock1Ref = useRef<HTMLDivElement>(null);
17
+ const storyBlock2Ref = useRef<HTMLDivElement>(null);
 
 
18
  const stripsWrapperRef = useRef<HTMLDivElement>(null);
 
 
 
19
  const [mounted, setMounted] = useState(false);
20
 
21
  useEffect(() => {
 
50
  ease: "linear",
51
  });
52
 
53
+ // Set initial states
54
+ gsap.set(headerWrapperRef.current, { scaleX: 0, transformOrigin: "center center" });
55
+ gsap.set(heroLine1Ref.current, { opacity: 0, y: 100, filter: "blur(10px)" });
56
+ gsap.set(heroLine2Ref.current, { opacity: 0, y: 100, filter: "blur(10px)" });
57
+ gsap.set(storyBlock1Ref.current, { opacity: 0, x: -100, filter: "blur(8px)" });
58
+ gsap.set(storyBlock2Ref.current, { opacity: 0, x: 100, filter: "blur(8px)" });
59
+ gsap.set(stripsWrapperRef.current, { opacity: 0, y: 60 });
 
 
 
 
 
 
 
 
 
60
 
61
+ // Header expansion
62
  gsap.to(headerWrapperRef.current, {
63
  scaleX: 1,
64
  ease: "power2.out",
 
75
  scrollTrigger: {
76
  trigger: sectionRef.current,
77
  start: "top top",
78
+ end: "+=1500",
79
  scrub: 1,
80
  pin: true,
81
  anticipatePin: 1,
 
83
  },
84
  });
85
 
86
+ // Hero lines reveal
87
+ tl.to(heroLine1Ref.current, { opacity: 1, y: 0, filter: "blur(0px)", duration: 0.25, ease: "power3.out" }, 0);
88
+ tl.to(heroLine2Ref.current, { opacity: 1, y: 0, filter: "blur(0px)", duration: 0.25, ease: "power3.out" }, 0.15);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
+ // Story blocks
91
+ tl.to(storyBlock1Ref.current, { opacity: 1, x: 0, filter: "blur(0px)", duration: 0.25, ease: "power3.out" }, 0.35);
92
+ tl.to(storyBlock2Ref.current, { opacity: 1, x: 0, filter: "blur(0px)", duration: 0.25, ease: "power3.out" }, 0.50);
 
 
 
 
93
 
94
+ // Strips - reveal right after story blocks
95
+ tl.to(stripsWrapperRef.current, { opacity: 1, y: 0, duration: 0.25, ease: "power3.out" }, 0.70);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  }, sectionRef);
98
 
 
103
  const strip1Text = "★ Driven by Passion, Built with Code ★ Custom Web Experiences ★ Innovative Self-Made Creations ★ Tailored Web Solutions ★ ";
104
  const strip2Text = "★ Premium Quality ★ Performance First ★ Pixel Perfect ★ Digital Craft ★ Modern Development ★ Creative Coding ★ ";
105
 
 
 
 
 
 
 
106
  return (
107
  <section
108
  id="about"
 
112
  {/* Gradient fade from video section above */}
113
  <div
114
  className="absolute top-0 left-0 right-0 h-32 pointer-events-none z-10"
115
+ style={{ background: "linear-gradient(to bottom, #050505 0%, transparent 100%)" }}
 
 
116
  />
117
 
118
+ {/* Pinned wrapper */}
119
+ <div className="min-h-screen pt-16">
120
+ {/* Large Header Marquee Banner */}
121
  <div ref={headerWrapperRef} className="py-3 md:py-4 overflow-hidden border-b border-white/5">
122
  <div className="about-header-marquee flex whitespace-nowrap" style={{ width: "200%" }}>
123
  <span className="text-2xl md:text-4xl lg:text-6xl font-black tracking-tight text-white/90 uppercase">
 
126
  </div>
127
  </div>
128
 
129
+ {/* Main Content */}
130
+ <div className="px-6 md:px-12 lg:px-20 xl:px-32 py-8 md:py-12">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
+ {/* Hero Statement */}
133
+ <div className="mb-16 md:mb-24">
134
+ <div ref={heroLine1Ref}>
135
+ <h2 className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-extralight text-white tracking-tighter leading-[0.95]">
136
+ I build things that
137
+ </h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  </div>
139
+ <div ref={heroLine2Ref}>
140
+ <h2 className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl tracking-tighter leading-[0.95]">
141
+ <span className="font-black text-white">live</span>
142
+ <span className="font-extralight text-white/50"> on the </span>
143
+ <span className="font-black text-transparent bg-clip-text bg-gradient-to-r from-white via-neutral-300 to-white/70">internet</span>
144
+ </h2>
145
+ </div>
146
+ </div>
147
 
148
+ {/* Story Section - Two Column */}
149
+ <div className="grid md:grid-cols-2 gap-8 md:gap-16 mb-16 md:mb-24">
150
+ <div ref={storyBlock1Ref} className="space-y-4">
151
+ <p className="text-white/30 text-xs uppercase tracking-[0.3em] font-medium">My Journey</p>
152
+ <p className="text-lg md:text-xl lg:text-2xl text-white/80 font-light leading-relaxed">
153
+ Started as a <span className="text-white font-medium">curious teenager</span> tinkering with code,
154
+ I&apos;ve evolved into a developer who obsesses over every pixel and
155
+ every millisecond of load time.
156
+ </p>
157
+ </div>
158
+ <div ref={storyBlock2Ref} className="space-y-4">
159
+ <p className="text-white/30 text-xs uppercase tracking-[0.3em] font-medium">My Approach</p>
160
+ <p className="text-lg md:text-xl lg:text-2xl text-white/80 font-light leading-relaxed">
161
+ I believe the best digital experiences are the ones you
162
+ <span className="text-white font-medium"> don&apos;t notice</span>—they just work,
163
+ feel natural, and leave you wondering how it was so seamless.
164
+ </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  </div>
166
  </div>
167
  </div>
168
 
169
  {/* Diagonal Crossing Strips */}
170
  <div ref={stripsWrapperRef} className="relative h-28 md:h-32">
 
171
  <div
172
  className="absolute w-[300vw] left-[-100vw] bg-white py-5 md:py-6 shadow-2xl z-10"
173
  style={{ transform: "rotate(-4deg)", top: "5%" }}
 
179
  </div>
180
  </div>
181
 
 
182
  <div
183
  className="absolute w-[300vw] left-[-100vw] bg-[#151515] py-5 md:py-6 shadow-2xl border-y border-white/5 z-20"
184
  style={{ transform: "rotate(4deg)", top: "50%" }}