-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
613 lines (528 loc) · 32.1 KB
/
index.html
File metadata and controls
613 lines (528 loc) · 32.1 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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shajith Khan – Data Analyst Portfolio | Python, Power BI, SQL, Excel</title>
<meta name="description"
content="Shajith Khan is an aspiring Data Analyst skilled in Python, SQL, Excel, and Power BI. Explore data analytics projects, dashboards, and business insights portfolio.">
<link rel="stylesheet" href="css/style.css">
<!-- Open Graph -->
<meta property="og:title" content="Mohammed Shajith Khan - Data Analyst & Business Intelligence Professional">
<meta property="og:description"
content="Aspiring Data Analyst with expertise in Python, Excel, Power BI, and SQL. Transforming raw data into actionable business insights through analytics and visualization.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://shajithkhan.com">
<meta property="og:image" content="https://shajithkhan.com/og-image.jpg">
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Mohammed Shajith Khan - Data Analyst & Business Intelligence Professional">
<meta name="twitter:description"
content="Aspiring Data Analyst with expertise in Python, Excel, Power BI, and SQL. Transforming raw data into actionable business insights through analytics and visualization.">
<meta name="twitter:image" content="https://shajithkhan.com/og-image.jpg">
<!-- Tailwind & Icons -->
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<script>
tailwind.config = {
darkMode: 'class'
}
</script>
<!-- Font Awesome -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
</head>
<body class="bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100 transition-colors duration-300">
<!-- NAVIGATION BAR START -->
<header class="navbar">
<div class="logo">Portfolio</div>
<nav class="nav-links" id="navMenu">
<a href="#home">Home</a>
<a href="#skills">Skills</a>
<a href="#projects">Projects</a>
<a href="#experience">Experience</a>
<a href="#contact">Contact</a>
<a href="assets/Resume/Mohammed_Resume_2026.pdf" download class="font-semibold text-blue-600 dark:text-blue-400">Resume</a>
</nav>
<button id="theme-toggle"
class="bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-100 px-4 py-2 rounded-lg shadow">
🌙 Dark Mode
</button>
<div class="burger" id="burger">
<span></span>
<span></span>
<span></span>
</div>
</header>
<!-- NAVBAR END -->
<!-- ================= MAIN ================= -->
<main>
<!-- HERO SECTION -->
<section id = "home"
class="relative bg-gradient-to-br from-blue-50 via-white to-indigo-50 dark:from-gray-900 dark:via-gray-900 dark:to-gray-800 py-20 lg:py-32 overflow-hidden">
<div
class="absolute inset-0 bg-grid-slate-100 [mask-image:linear-gradient(0deg,white,rgba(255,255,255,0.6))] -z-10">
</div>
<div class="container mx-auto px-4 lg:px-8">
<div class="grid lg:grid-cols-2 gap-12 items-center">
<div class="space-y-8">
<div class="space-y-4">
<span
class="inline-block px-4 py-2 bg-blue-100 text-blue-800 rounded-full text-sm font-medium">
Aspiring Data Analyst / Business Intelligence Analyst
</span>
<h1
class="text-4xl lg:text-6xl font-bold text-gray-900 dark:text-white leading-tight">
Mohammed Shajith Khan
</h1>
<p
class="text-xl lg:text-2xl text-gray-600 dark:text-gray-300 leading-relaxed max-w-2xl">
Entry-level Data Analyst with hands-on experience in Python data analysis, Excel data
cleaning and feature engineering, and Power BI dashboard development. Experienced in
analyzing real-world datasets, building dashboards, and delivering clear, actionable
business insights through data visualization and reporting.
</p>
</div>
<div class="mt-8 flex justify-start [perspective:1000px] w-64 h-40">
<div
class="relative w-full h-full transition-transform duration-700 [transform-style:preserve-3d] hover:[transform:rotateY(180deg)]">
<!-- Front -->
<div
class="absolute w-full h-full bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white rounded-xl flex items-center justify-center text-sm font-semibold [backface-visibility:hidden]">
Curious Mind. Analytical Approach.
</div>
<!-- Back -->
<div
class="absolute w-full h-full bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 rounded-xl flex items-center justify-center text-sm text-center p-3 [transform:rotateY(180deg)] [backface-visibility:hidden]">
I love asking the right questions and letting data answer them
</div>
</div>
</div>
<!-- Buttons -->
<div class="flex flex-col sm:flex-row gap-4">
<a href="mailto:shajithkhanprof@gmail.com"
class="inline-flex items-center justify-center px-8 py-4 bg-blue-600 text-white font-semibold rounded-lg hover:bg-blue-700 transition-colors shadow-lg">
Get In Touch
</a>
</div>
</div>
<!-- Hero Image -->
<div class="relative">
<img src="assets/images/Headshot.png"
alt="Data analyst working with visualizations"
class="w-full max-w-md lg:max-w-full rounded-2xl object-cover shadow-xl" />
<div
class="absolute inset-0 bg-gradient-to-t from-black/20 to-transparent rounded-2xl">
</div>
</div>
</div>
</div>
</section>
<!-- ABOUT + EXPERIENCE SECTION -->
<section id="about" class="py-16 bg-white dark:bg-gray-900">
<div class="container mx-auto px-6 lg:px-20 grid lg:grid-cols-2 gap-16 items-start">
<!-- ABOUT -->
<div>
<p class="text-lg text-gray-700 dark:text-gray-300 leading-relaxed max-w-xl">
Introduction
</p>
<h2 class="text-3xl lg:text-4xl font-bold text-gray-900 dark:text-white mb-4">
About
</h2>
<p class="text-lg text-gray-700 dark:text-gray-300 leading-relaxed">
I'm an aspiring Data Analyst and Business Intelligence professional focused on transforming
raw, unstructured data into clear and meaningful insights...
</p>
<div class="mt-6">
<p class="font-semibold text-gray-800 dark:text-gray-200">Tools & Technologies</p>
<p class="text-gray-600 dark:text-gray-400">Python | Power BI | SQL | Excel | Matplotlib | Pandas</p>
</div>
<div class="grid grid-cols-2 gap-6 mt-8">
<div>
<p class="text-3xl font-bold text-blue-600 dark:text-blue-400">6+</p>
<p class="text-sm text-gray-600 dark:text-gray-400">Months Experience</p>
</div>
<div>
<p class="text-3xl font-bold text-blue-600 dark:text-blue-400">2</p>
<p class="text-sm text-gray-600 dark:text-gray-400">End-to-End Data Projects</p>
</div>
<div>
<p class="text-3xl font-bold text-blue-600 dark:text-blue-400">4+</p>
<p class="text-sm text-gray-600 dark:text-gray-400">BI & Analytics Tools</p>
</div>
<div>
<p class="text-3xl font-bold text-blue-600 dark:text-blue-400">100%</p>
<p class="text-sm text-gray-600 dark:text-gray-400">Hands-On Learning</p>
</div>
</div>
</div>
<!-- EXPERIENCE -->
<div id="experience">
<h2 class="text-3xl lg:text-4xl font-bold text-gray-900 dark:text-white mb-4">
Experience
</h2>
<div>
<h3 class="text-xl font-semibold mb-1 text-gray-900 dark:text-white">
Data Operations Intern
</h3>
<p class="text-sm mb-3 text-gray-700 dark:text-gray-300">
<span class="text-blue-600">Omandurar Medical College</span>
<span class="text-gray-600 dark:text-gray-400 mx-2">|</span>
<span class="text-gray-700 dark:text-gray-300">6 Months</span>
</p>
<ul class="list-disc pl-5 text-gray-700 dark:text-gray-300 space-y-2 text-sm">
<li>Created operational reports and dashboards using Advanced Excel (Pivot Tables, charts, structured summaries).</li>
<li>Cleaned, validated, and maintained hospital operational datasets, ensuring data accuracy and consistency.</li>
<li>Prepared performance and summary reports to support management review and decision-making.</li>
<li>Organized and standardized large datasets to improve reporting efficiency and readability.</li>
<li>Assisted in tracking key operational metrics through regularly updated Excel reports.</li>
<li>Worked with real-world healthcare data, following data confidentiality and documentation practices.</li>
</ul>
</div>
</div>
</div>
</section>
<!-- TECHNICAL SKILLS SECTION -->
<section id="skills" class="py-20 bg-gray-50 dark:bg-gray-900">
<div class="container mx-auto px-4 lg:px-8">
<h2
class="text-3xl lg:text-4xl font-bold text-gray-900 dark:text-white mb-12 text-center">
Technical Skills
</h2>
<div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-8 text-center items-start">
<div class="skill-card cursor-pointer bg-white dark:bg-gray-800 p-6 rounded-xl shadow-md hover:shadow-xl hover:-translate-y-1 transition-all duration-300"
data-skill="python">
<i data-lucide="code-2" class="mx-auto mb-4 w-10 h-10 text-blue-600"></i>
<h3 class="font-semibold text-lg">Python</h3>
<div class="skill-info hidden mt-4 text-left border-t pt-3">
<ul class="list-disc pl-5 text-sm space-y-1"></ul>
</div>
</div>
<div class="skill-card cursor-pointer bg-white dark:bg-gray-800 p-6 rounded-xl shadow-md hover:shadow-xl hover:-translate-y-1 transition-all duration-300"
data-skill="excel">
<i data-lucide="file-spreadsheet" class="mx-auto mb-4 w-10 h-10 text-green-600"></i>
<h3 class="font-semibold text-lg">Advanced Excel</h3>
<div class="skill-info hidden mt-4 text-left border-t pt-3">
<ul class="list-disc pl-5 text-sm space-y-1"></ul>
</div>
</div>
<div class="skill-card cursor-pointer bg-white dark:bg-gray-800 p-6 rounded-xl shadow-md hover:shadow-xl hover:-translate-y-1 transition-all duration-300"
data-skill="sql">
<i data-lucide="database" class="mx-auto mb-4 w-10 h-10 text-purple-600"></i>
<h3 class="font-semibold text-lg">SQL</h3>
<div class="skill-info hidden mt-4 text-left border-t pt-3">
<ul class="list-disc pl-5 text-sm space-y-1"></ul>
</div>
</div>
<div class="skill-card cursor-pointer bg-white dark:bg-gray-800 p-6 rounded-xl shadow-md hover:shadow-xl hover:-translate-y-1 transition-all duration-300"
data-skill="powerbi">
<i data-lucide="bar-chart-3" class="mx-auto mb-4 w-10 h-10 text-yellow-600"></i>
<h3 class="font-semibold text-lg">Power BI</h3>
<div class="skill-info hidden mt-4 text-left border-t pt-3">
<ul class="list-disc pl-5 text-sm space-y-1"></ul>
</div>
</div>
</div>
</div>
</section>
<!-- PROJECTS SECTION -->
<section id="projects" class="py-20 bg-white dark:bg-gray-900">
<div class="container mx-auto px-4 lg:px-8">
<h2
class="text-3xl lg:text-4xl font-bold text-gray-900 dark:text-white mb-12 text-center">
Projects
</h2>
<div class="grid md:grid-cols-2 gap-10">
<!-- Project 1 -->
<div class="flip-card cursor-pointer">
<div class="flip-inner">
<div
class="flip-front bg-white dark:bg-gray-800 rounded-2xl shadow-md hover:shadow-xl transition overflow-hidden">
<img src="assets/images/Sales_Analysis.png" alt="Sales Dashboard"
class="w-full h-56 object-cover">
<div class="p-6 pb-6 flex flex-col flex-1 overflow-y-auto">
<h3
class="text-xl font-semibold mb-2 text-gray-900 dark:text-white">
Sales & Retail Data Analysis
</h3>
<p class="text-gray-600 dark:text-gray-300 mb-4">
Analyzed a retail Superstore dataset containing over 6,000 records to uncover
sales performance trends, profit drivers, and regional patterns.
</p>
<ul
class="text-sm text-gray-600 dark:text-gray-300 space-y-2 mb-4">
<li>✔ Cleaned and preprocessed retail sales data</li>
<li>✔ Explored trends in sales, profit, and discounts</li>
<li>✔ Evaluated regional and category performance</li>
<li>✔ Built business-focused visualizations</li>
</ul>
<div class="flex flex-wrap gap-2 mt-auto pt-4">
<span
class="px-3 py-1 text-xs sm:text-sm font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full">Python</span>
<span
class="px-3 py-1 text-xs sm:text-sm font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full">Pandas</span>
<span
class="px-3 py-1 text-xs sm:text-sm font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full">Matplotlib</span>
<span
class="px-3 py-1 text-xs sm:text-sm font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full">Data Visualization</span>
</div>
</div>
</div>
<div
class="flip-back bg-white dark:bg-gray-800 rounded-2xl shadow-md p-6">
<img src="assets/images/Sales_Analysis.png" alt="Sales Dashboard"
class="w-full h-56 object-cover">
<h3
class="text-lg font-semibold mb-4 text-blue-700 dark:text-blue-400">
Key Insights
</h3>
<ul
class="text-sm text-gray-700 dark:text-gray-300 space-y-2 list-disc pl-5 mb-4">
<li>Sales were concentrated in a few high-performing regions</li>
<li>Heavy discounting reduced profit margins</li>
<li>Some categories had high sales but weak profit</li>
<li>Seasonal demand spikes were clearly visible</li>
<li>Certain regions had steady sales but low profitability</li>
</ul>
<hr class="my-4 border-gray-300 dark:border-gray-600">
<p class="text-gray-600 dark:text-gray-300 mb-4">
Impact: Identified key loss-driving discount patterns and high-revenue low-profit categories, helping define data-backed pricing and sales strategies.
</p>
</div>
</div>
</div>
<!-- Project 2 -->
<div class="flip-card cursor-pointer">
<div class="flip-inner">
<div
class="flip-front bg-white dark:bg-gray-800 rounded-2xl shadow-md hover:shadow-xl transition overflow-hidden">
<img src="assets/images/Dashboard.jpeg" alt="HR Dashboard"
class="w-full h-56 object-cover">
<div class="p-6 pb-6 flex flex-col flex-1 overflow-y-auto">
<h3
class="text-xl font-semibold mb-2 text-gray-900 dark:text-white">
Employee Salary & Compensation Dashboard
</h3>
<p class="text-gray-600 dark:text-gray-300 mb-4">
Built an interactive dashboard analyzing employee salary distribution and
compensation patterns.
</p>
<ul
class="text-sm text-gray-600 dark:text-gray-300 space-y-2 mb-4">
<li>✔ Cleaned and structured HR data in Excel</li>
<li>✔ Engineered salary and experience features</li>
<li>✔ Designed dashboard layout for storytelling</li>
<li>✔ Built Power BI visuals and DAX measures</li>
</ul>
<div class="flex flex-wrap gap-2 mt-auto pt-4">
<span
class="px-3 py-1 text-xs sm:text-sm font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full">Power BI</span>
<span
class="px-3 py-1 text-xs sm:text-sm font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full">Excel</span>
<span
class="px-3 py-1 text-xs sm:text-sm font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full">DAX</span>
<span
class="px-3 py-1 text-xs sm:text-sm font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full">Data Modeling</span>
</div>
</div>
</div>
<div
class="flip-back bg-white dark:bg-gray-800 rounded-2xl shadow-md p-6">
<img src="assets/images/Dashboard.jpeg" alt="HR Dashboard"
class="w-full h-56 object-cover">
<h3
class="text-lg font-semibold mb-4 text-yellow-700 dark:text-yellow-400">
Key Insights
</h3>
<ul
class="text-sm text-gray-700 dark:text-gray-300 space-y-2 list-disc pl-5 mb-4">
<li>Salary growth plateaued after mid-level experience</li>
<li>Wide salary variation existed across similar experience roles</li>
<li>Salary per experience year declined at senior levels</li>
<li>Specific roles dominated top salary bands</li>
<li>Senior roles had higher pay dispersion than entry roles</li>
</ul>
<hr class="my-4 border-gray-300 dark:border-gray-600">
<p class="text-gray-600 dark:text-gray-300 mb-4">
Impact: Built a reusable HR dashboard for tracking compensation trends, pay gaps, and experience-based salary growth for better workforce planning.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- CONTACT SECTION -->
<section id="contact" class="py-20 bg-gray-50 dark:bg-gray-800">
<div class="container mx-auto px-6 lg:px-20">
<h2 class="text-3xl lg:text-4xl font-bold text-center mb-12">Contact Me</h2>
<div class="grid md:grid-cols-2 gap-16 items-start">
<div class="space-y-6 md:max-w-xs">
<h3 class="text-xl font-semibold mb-4">Connect with me</h3>
<a href="https://github.com/shajithkhan-dev" target="_blank"
class="flex items-center gap-4 text-gray-700 dark:text-gray-300 hover:text-black dark:hover:text-white transition">
<i class="fab fa-github text-2xl"></i>
<span>GitHub</span>
</a>
<a href="https://www.linkedin.com/in/mohammed-shajith-khan-196918292" target="_blank"
class="flex items-center gap-4 text-gray-700 dark:text-gray-300 hover:text-black dark:hover:text-white transition">
<i class="fab fa-linkedin text-2xl"></i>
<span>LinkedIn</span>
</a>
<a href="mailto:shajithkhanprof@gmail.com"
class="flex items-center gap-4 text-gray-700 dark:text-gray-300 hover:text-black dark:hover:text-white transition">
<i class="fas fa-envelope text-2xl"></i>
<span>Email Me</span>
</a>
</div>
<form id="contact-form" action="https://formspree.io/f/xzdgqowy" method="POST"
class="space-y-4 bg-white dark:bg-gray-900 p-8 rounded-xl shadow-md w-full max-w-lg">
<div>
<label for="name" class="block text-sm font-medium mb-1">Name</label>
<input id="name" type="text" name="name" required
class="w-full border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-white rounded-lg px-4 py-2 focus:ring-2 focus:ring-blue-500 outline-none">
</div>
<div>
<label for="email" class="block text-sm font-medium mb-1">Email</label>
<input id="email" type="email" name="email" required
class="w-full border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-white rounded-lg px-4 py-2 focus:ring-2 focus:ring-blue-500 outline-none">
</div>
<div>
<label for="message" class="block text-sm font-medium mb-1">Message</label>
<textarea id="message" name="message" rows="4" required
class="w-full border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-white rounded-lg px-4 py-2 focus:ring-2 focus:ring-blue-500 outline-none"></textarea>
</div>
<button type="submit"
class="bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700 transition">
Send Message
</button>
</form>
</div>
</div>
</section>
</main>
<!-- ================= FOOTER ================= -->
<footer class="bg-gray-900 text-white py-12">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
<p>© 2024 Mohammed Shajith Khan. All rights reserved.</p>
<p class="text-gray-400 mt-2 text-sm">Built with passion for data & analytics</p>
</div>
</footer>
<!-- Lucide Icons -->
<script src="https://unpkg.com/lucide@latest"></script>
<script>
lucide.createIcons();
</script>
<!-- Your JS File -->
<script src="js/script.js"></script>
<script>
document.querySelectorAll(".flip-card").forEach(card => {
card.addEventListener("click", () => {
card.classList.toggle("flipped");
});
});
</script>
<script>
const skillData = {
python: ["Pandas", "NumPy", "Matplotlib", "Data Cleaning", "EDA"],
excel: ["Pivot Tables", "XLOOKUP", "Dashboards", "Data Cleaning", "Power Query"],
sql: ["SELECT Queries", "Joins", "Group By", "Subqueries", "Data Filtering"],
powerbi: ["DAX", "Data Modeling", "Dashboard Design", "Power Query", "KPI Reports"]
};
document.querySelectorAll(".skill-card").forEach(card => {
card.addEventListener("click", () => {
const skill = card.dataset.skill;
const infoBox = card.querySelector(".skill-info");
const list = infoBox.querySelector("ul");
if (infoBox.classList.contains("hidden")) {
list.innerHTML = skillData[skill].map(item => `<li>${item}</li>`).join("");
infoBox.classList.remove("hidden");
} else {
infoBox.classList.add("hidden");
}
});
});
</script>
<script>
const toggleBtn = document.getElementById("theme-toggle");
const htmlEl = document.documentElement;
if (localStorage.getItem("theme") === "dark") {
htmlEl.classList.add("dark");
toggleBtn.textContent = "☀ Light Mode";
}
toggleBtn.addEventListener("click", () => {
htmlEl.classList.toggle("dark");
if (htmlEl.classList.contains("dark")) {
localStorage.setItem("theme", "dark");
toggleBtn.textContent = "☀ Light Mode";
} else {
localStorage.setItem("theme", "light");
toggleBtn.textContent = "🌙 Dark Mode";
}
});
</script>
<!-- Success Popup -->
<div id="success-popup"
class="fixed inset-0 flex items-center justify-center bg-black/50 opacity-0 pointer-events-none transition-opacity duration-300 z-50">
<div
class="bg-white dark:bg-gray-800 p-6 rounded-xl shadow-xl text-center max-w-sm w-full">
<h3 class="text-lg font-semibold text-green-600 mb-2">Message Sent ✅</h3>
<p class="text-sm text-gray-600 dark:text-gray-300">
Thanks for reaching out. I'll get back to you soon!
</p>
<button id="close-popup"
class="mt-4 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
Close
</button>
</div>
</div>
<script>
const form = document.getElementById("contact-form");
const popup = document.getElementById("success-popup");
const closePopup = document.getElementById("close-popup");
if (form) {
form.addEventListener("submit", async (e) => {
e.preventDefault();
const formData = new FormData(form);
try {
const response = await fetch(form.action, {
method: "POST",
body: formData,
headers: { 'Accept': 'application/json' }
});
if (response.ok) {
form.reset();
popup.classList.remove("opacity-0", "pointer-events-none");
setTimeout(() => {
popup.classList.add("opacity-0", "pointer-events-none");
}, 3000);
} else {
alert("Oops! Something went wrong.");
}
} catch (error) {
console.error("Form submission failed:", error);
popup.querySelector("h3").textContent = "Error ❌";
popup.querySelector("p").textContent = "Something went wrong. Please try again later.";
popup.classList.remove("opacity-0", "pointer-events-none");
}
});
}
closePopup.addEventListener("click", () => {
popup.classList.add("opacity-0", "pointer-events-none");
});
</script>
<script>
const burger = document.getElementById("burger");
const navMenu = document.getElementById("navMenu");
burger.addEventListener("click", () => {
navMenu.classList.toggle("show");
});
// Optional: Close menu when a link is clicked (better UX on mobile)
document.querySelectorAll(".nav-links a").forEach(link => {
link.addEventListener("click", () => {
navMenu.classList.remove("show");
});
});
</script>
</body>
</html>