Skip to content

Commit c5db969

Browse files
committed
Add grid animations
1 parent e86ec38 commit c5db969

4 files changed

Lines changed: 59 additions & 6 deletions

File tree

src/components/AboutSection.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ const AboutSection = () => {
2222
}
2323

2424
return (
25-
<section id="about" ref={ref} className="min-h-screen py-32 px-4 md:px-8 relative z-10">
26-
<div className="max-w-7xl mx-auto">
25+
<section id="about" ref={ref} className="min-h-screen py-32 px-4 md:px-8 relative z-10 overflow-hidden">
26+
{/* Animated Grid Background */}
27+
<div className="bg-grid-wrapper opacity-30">
28+
<div className="bg-grid-animated" />
29+
</div>
30+
31+
<div className="max-w-7xl mx-auto relative z-10">
2732
<motion.div
2833
className="mb-16 flex items-end justify-between border-b border-white/10 pb-8"
2934
variants={itemVariants}

src/components/HeroSection.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ const HeroSection = () => {
3737
className="min-h-screen flex items-center justify-center relative overflow-hidden pt-20"
3838
ref={containerRef}
3939
>
40+
{/* Animated Grid Background */}
41+
<div className="bg-grid-wrapper">
42+
<div className="bg-grid-animated" />
43+
</div>
44+
4045
<div className="max-w-7xl mx-auto px-4 w-full flex flex-col items-center justify-center relative z-10">
4146

4247
<motion.div
@@ -45,7 +50,7 @@ const HeroSection = () => {
4550
y: mousePosition.y
4651
}}
4752
transition={{ type: "spring", stiffness: 50, damping: 20 }}
48-
className="text-center"
53+
className="text-center w-full"
4954
>
5055
<motion.div
5156
initial="hidden"
@@ -64,7 +69,7 @@ const HeroSection = () => {
6469

6570
<motion.h1
6671
variants={titleVariants}
67-
className="text-7xl md:text-9xl lg:text-[12rem] font-black tracking-tighter leading-none mb-6 kinetic-text"
72+
className="text-7xl md:text-9xl lg:text-[12rem] font-black tracking-tighter leading-none mb-6 cyber-title select-none w-full max-w-full overflow-hidden"
6873
>
6974
SHIELD44
7075
</motion.h1>

src/components/ProjectsSection.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,13 @@ const ProjectsSection = () => {
9797
}
9898

9999
return (
100-
<section id="projects" ref={ref} className="min-h-screen py-32 px-4 md:px-8 relative z-10">
101-
<div className="max-w-7xl mx-auto">
100+
<section id="projects" ref={ref} className="min-h-screen py-32 px-4 md:px-8 relative z-10 overflow-hidden">
101+
{/* Animated Grid Background */}
102+
<div className="bg-grid-wrapper opacity-30">
103+
<div className="bg-grid-animated" />
104+
</div>
105+
106+
<div className="max-w-7xl mx-auto relative z-10">
102107
<motion.div
103108
className="mb-16 flex items-end justify-between border-b border-white/10 pb-8"
104109
variants={itemVariants}

src/styles/globals.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,42 @@ h1, h2, h3, h4, h5, h6 {
9191
.no-scrollbar {
9292
-ms-overflow-style: none;
9393
scrollbar-width: none;
94+
}
95+
96+
/* Cyber Title - Hollow text that fills on hover */
97+
.cyber-title {
98+
color: transparent;
99+
-webkit-text-stroke: 2px rgba(255, 255, 255, 0.9);
100+
transition: all 0.5s ease-out;
101+
cursor: default;
102+
}
103+
.cyber-title:hover {
104+
color: #00E5FF;
105+
-webkit-text-stroke: 0px transparent;
106+
text-shadow: 0 0 60px rgba(0, 229, 255, 0.8), 0 0 100px rgba(139, 92, 246, 0.5);
107+
transform: scale(1.02);
108+
}
109+
110+
/* Animated Grid Background */
111+
@keyframes grid-move {
112+
0% { transform: translateY(0); }
113+
100% { transform: translateY(50px); }
114+
}
115+
.bg-grid-wrapper {
116+
position: absolute;
117+
inset: 0;
118+
overflow: hidden;
119+
z-index: 0;
120+
pointer-events: none;
121+
mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
122+
-webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
123+
}
124+
.bg-grid-animated {
125+
position: absolute;
126+
inset: -100px;
127+
background-image:
128+
linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
129+
linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
130+
background-size: 50px 50px;
131+
animation: grid-move 3s linear infinite;
94132
}

0 commit comments

Comments
 (0)