-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmobile-hero.css
More file actions
281 lines (253 loc) · 7.09 KB
/
mobile-hero.css
File metadata and controls
281 lines (253 loc) · 7.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
/* Enhanced Mobile Hero Animation */
@media (max-width: 768px) {
/* Special Hero Container for Mobile */
.hero {
position: relative;
overflow: hidden;
min-height: 100vh; /* Full viewport height for impact */
}
/* Ensure theme toggle has consistent positioning on mobile */
.theme-toggle {
position: fixed !important;
right: 20px !important;
top: 24px !important;
z-index: 1000 !important;
}
/* Mobile-optimized hero background */
.mobile-hero-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: linear-gradient(135deg, #4361ee 0%, #3a86ff 60%, #4cc9f0 100%);
overflow: hidden;
}
/* Animated particles background */
.mobile-particles {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* Individual particles */
.mobile-particle {
position: absolute;
background: rgba(255, 255, 255, 0.3);
border-radius: 50%;
pointer-events: none;
}
/* Shooting stars effect */
.shooting-star {
position: absolute;
width: 3px;
height: 3px;
border-radius: 50%;
background: white;
box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
opacity: 0;
animation: shooting 3s ease-in-out infinite;
}
@keyframes shooting {
0% {
transform: translate(0, 0) rotate(-45deg) scale(0);
opacity: 0;
}
10% {
transform: translate(-20px, 20px) rotate(-45deg) scale(1);
opacity: 1;
}
100% {
transform: translate(-300px, 300px) rotate(-45deg) scale(0.2);
opacity: 0;
}
}
/* Enhanced Hero Content */
.hero .hero-content {
position: relative;
z-index: 2;
text-align: center;
padding: 40px 20px;
}
/* Mobile heading animation */
.hero .hero-content h1 {
margin: 0;
font-size: 2.5rem;
line-height: 1.2;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
opacity: 0;
transform: translateY(20px);
animation: mobile-fade-in 1s ease forwards 0.5s;
position: relative;
z-index: 5; /* Ensure text stays above icons */
}
/* Light theme specific color for mobile hero h1 */
body:not(.dark-theme) .hero .hero-content h1 {
color: var(--dark-color); /* Use a dark color for light theme */
text-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Softer shadow for dark text */
}
body.dark-theme .hero .hero-content h1 {
color: white; /* Explicitly white for dark theme */
}
/* Glowing underline effect */
.hero .hero-content h1:after {
content: "";
display: block;
width: 0;
height: 3px;
margin: 15px auto 0;
box-shadow: 0 0 10px 1px rgba(255, 255, 255, 0.8);
animation: expand-line 2s ease forwards 1.5s;
}
body:not(.dark-theme) .hero .hero-content h1:after {
background: var(--primary-color); /* Use primary color for underline in light mode */
box-shadow: 0 0 8px 1px rgba(var(--rgb-primary-color), 0.5);
}
body.dark-theme .hero .hero-content h1:after {
background: white; /* Explicitly white for dark theme */
}
/* Enhance subtitle styles */
.hero .hero-content p {
font-size: 1.1rem;
margin: 25px 0;
opacity: 0;
transform: translateY(20px);
animation: mobile-fade-in 1s ease forwards 1s;
position: relative;
z-index: 5; /* Ensure text stays above icons */
}
/* Light theme specific color for mobile hero p */
body:not(.dark-theme) .hero .hero-content p {
color: var(--dark-color); /* Use a dark color for light theme */
opacity: 0.9;
}
body.dark-theme .hero .hero-content p {
color: rgba(255, 255, 255, 0.9); /* Explicitly light for dark theme */
}
/* Button animation */
.hero .hero-buttons {
opacity: 0;
transform: translateY(20px);
animation: mobile-fade-in 1s ease forwards 1.5s;
position: relative;
z-index: 5; /* Ensure buttons stay above icons */
}
.hero .btn-primary {
background: white;
color: #4361ee; /* This is var(--primary-color) essentially */
border: none;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
/* Default mobile hero secondary button (for dark theme context) */
.hero .btn-secondary {
background: transparent;
border: 2px solid rgba(255, 255, 255, 0.7);
color: white;
}
/* Light theme specific colors for mobile hero secondary button */
body:not(.dark-theme) .hero .btn-secondary {
border-color: var(--primary-color);
color: var(--primary-color);
}
/* Explicit dark theme colors for mobile hero secondary button (redundant but good for clarity) */
body.dark-theme .hero .btn-secondary {
border-color: rgba(255, 255, 255, 0.7);
color: white;
}
/* Floating icons for mobile */
.mobile-floating-icon {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 45px;
height: 45px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.9);
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
color: #4361ee;
font-size: 1.2rem;
z-index: 2;
animation: float-fun 8s ease-in-out infinite;
transition: all 0.3s ease;
}
/* Position floating icons */
.mobile-icon-code {
bottom: 20px;
right: 25%;
animation-delay: 0s;
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(220,240,255,0.95));
}
.mobile-icon-mobile {
bottom: 40px;
left: 20%;
animation-delay: 1s;
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(220,255,240,0.95));
}
.mobile-icon-design {
bottom: 10px;
left: 55%;
animation-delay: 2s;
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,220,255,0.95));
}
.mobile-icon-web {
bottom: 30px;
right: 15%;
animation-delay: 3s;
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,240,220,0.95));
}
/* More fun animations for icons */
@keyframes float-fun {
0% {
transform: translateY(0) rotate(0deg);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
25% {
transform: translateY(-12px) rotate(8deg);
box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}
50% {
transform: translateY(5px) rotate(-5deg);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
75% {
transform: translateY(-8px) rotate(3deg);
box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}
100% {
transform: translateY(0) rotate(0deg);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
}
/* Add glow effect on tap */
.mobile-floating-icon:active {
transform: scale(1.3);
box-shadow: 0 0 30px rgba(67, 97, 238, 0.6);
}
/* Standard animations */
@keyframes mobile-fade-in {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Darkened overlay to improve text contrast */
.mobile-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to bottom,
rgba(0,0,0,0.4) 0%,
rgba(0,0,0,0.1) 40%,
rgba(0,0,0,0.1) 60%,
rgba(0,0,0,0.4) 100%);
z-index: 1; }
}