-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
790 lines (694 loc) · 40.5 KB
/
index.html
File metadata and controls
790 lines (694 loc) · 40.5 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
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.5">
<title>Nikhil Bisht | Data Scientist & Researcher</title>
<link rel="icon" href="assets/favicon.ico">
<meta property="og:title" content="Nikhil Bisht: Data Scientist & Researcher">
<meta name="description" content="Bridging the gap between theoretical physics and production-grade software engineering with Deep Learning and HPC.">
<meta property="og:description" content="Bridging the gap between theoretical physics and production-grade software engineering with Deep Learning and HPC.">
<meta property="og:image" content="assets/profile.webp">
<meta property="og:url" content="https://astrodnerd.github.io/">
<meta property="og:type" content="website">
<!-- CSS & Icons -->
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
<!-- D3.js -->
<script src="https://d3js.org/d3.v7.min.js"></script>
</head>
<body>
<!-- BACKGROUND CANVAS -->
<canvas id="bg-canvas"></canvas>
<input type="checkbox" id="theme-toggle" class="theme-toggle-checkbox">
<div class="site">
<!-- HEADER -->
<header>
<div class="logo">
<a href="#"><span>N</span>B</a>
</div>
<nav>
<ul>
<li><a href="#about">About Me</a></li>
<li><a href="#timeline">My Timeline</a></li>
<li><a href="#projects">My Projects</a></li>
<li><a href="#skills">My Skill Stack</a></li>
<li><a href="personal.html" style="color: var(--accent);">to the Flipside></a></li>
</ul>
</nav>
<label for="theme-toggle" class="theme-toggle-label">
<i class="fa-solid fa-moon"></i>
<i class="fa-solid fa-sun"></i>
</label>
</header>
<!-- HERO SECTION -->
<section class="hero" id="home">
<div class="container">
<h2>Hi! I am </h2>
<h1>Nikhil Bisht</h1>
<p>I am a Data Scientist & a </p>
<p><span class="var-text"></span></p>
<div style="margin-top: 30px;">
<a href="assets/Bisht_Nikhil_Industry_CV.pdf" target="_blank" class="email-link" style="display:inline-block; font-size:1rem; border:1px solid var(--accent); padding:10px 20px; border-radius:4px;">Download Resume <i class="fa-solid fa-download"></i></a>
</div>
</div>
<!-- My Hero Image / Avatar -->
<div class="hero-img">
<img src="assets/profile.webp" alt="Nikhil Bisht">
</div>
</section>
<!-- ABOUT SECTION -->
<section id="about" class="section-pad-small">
<div class="container">
<div class="glass-panel">
<h2>About Me</h2>
<p style="font-size: 1.1rem; margin-bottom: 20px;">
I am a <strong>PhD Candidate in Physics</strong> with a focus on applied data science and machine learning. My work involves building and evaluating models on large-scale datasets,
quantifying uncertainty, and translating complex quantitative problems into actionable insights. I am currently pursuing industry data science roles.
</p>
<div class="architecture-diagram">
<div class="arch-step">
<div class="arch-icon"><i class="fa-brands fa-sith"></i></div>
<h4>Physics Simulations</h4>
<p>Stochastic 3D Multi-Field Systems</p>
</div>
<div class="arch-arrow"><i class="fa-solid fa-arrow-right"></i></div>
<div class="arch-step">
<div class="arch-icon"><i class="fa-solid fa-server"></i></div>
<h4>HPC / ETL</h4>
<p>Distributed Pipelines</p>
</div>
<div class="arch-arrow"><i class="fa-solid fa-arrow-right"></i></div>
<div class="arch-step">
<div class="arch-icon"><i class="fa-solid fa-brain"></i></div>
<h4>Deep Learning</h4>
<p>ConvGRU Architectures</p>
</div>
<div class="arch-arrow"><i class="fa-solid fa-arrow-right"></i></div>
<div class="arch-step">
<div class="arch-icon"><i class="fa-solid fa-magnifying-glass-chart"></i></div>
<h4>Analysis</h4>
<p>Forecasting Turbulence</p>
</div>
</div>
<p>
My work so far bridges the gap between theoretical physics and production-grade software engineering.
In my PhD research, I build end-to-end ML pipelines for terabyte-scale 3D simulations, optimize code for HPC environments,
and develop novel architectures to solve complex spatiotemporal problems.
Whether it's forecasting molecular cloud collapse or optimizing distributed ETL pipelines, I thrive
where data is massive, noisy, and physically constrained.
</p>
<p>
For my current work, I developed a multi-field fully 3D convGRU-UNet architecture to predict turbulent flows in star-forming regions.
We improved predictive accuracy by <strong>28%</strong> while enforcing statistical and physical constraints to ensure model validity. Learn more about
the project <a href="project1_sim_collapse.html" style="color: var(--accent);">here</a>.
</p>
<div class="model-chart-wrapper">
<p class="chart-caption">Fig 1. My Hybrid ConvGRU-UNet Architecture</p>
<div class="img-container">
<img src="assets/UNet3level_chart.png" alt="Detailed Model Architecture Diagram" class="zoom-img">
</div>
</div>
</div>
</div>
</section>
<!-- TIMELINE SECTION (Side Scrolling) -->
<section id="timeline" class="section-pad-small">
<div class="container">
<h2>My Timeline so far</h2>
<div class="timeline-wrapper" id="timelineWrapper">
<div class="timeline-track">
<!-- PhD FSU -->
<div class="timeline-item">
<div class="t-dot"></div>
<div class="t-content">
<span class="t-date">Nov 2022 - Present</span>
<h3 class="t-role">Data Scientist, Graduate Research Fellow</h3>
<div class="t-company">Dept. of Physics, Florida State University</div>
<p class="t-desc">Architecting 3D Spatiotemporal forecasting models (ConvGRU-UNet).
Engineered distributed ETL pipelines for HDF5/Parquet, reducing training time from weeks to days via Multi-GPU DDP.</p>
<div class="t-tags">
<span class="t-tag">PyTorch</span>
<span class="t-tag">HPC</span>
<span class="t-tag">3D Vision</span>
</div>
</div>
</div>
<!-- BNN BITS Goa -->
<div class="timeline-item">
<div class="t-dot"></div>
<div class="t-content">
<span class="t-date">Jul 2020 - Aug 2022</span>
<h3 class="t-role">Applied Physics & ML Engineer</h3>
<div class="t-company">BITS Pilani, Goa</div>
<p class="t-desc">Designed Bayesian Neural Networks (BNN) for multi-target probabilistic regression, successfully modeling
high-dimensional non-linear relationships with quantified uncertainty intervals</p>
<div class="t-tags">
<span class="t-tag">Python</span>
<span class="t-tag">Nuclear Astrophysics</span>
<span class="t-tag">Bayesian Statistics</span>
</div>
</div>
</div>
<!-- Project RT -->
<div class="timeline-item">
<div class="t-dot"></div>
<div class="t-content">
<span class="t-date">Mar 2018 - July 2022</span>
<h3 class="t-role">Lead Engineer (Computer Science Vertical)</h3>
<div class="t-company">Project Radio Telescope</div>
<p class="t-desc">Founded and led a cross-functional engineering team of 10+ to build a full-stack instrumentation facility.
Developed Python-based automated signal processing pipelines for real-time spectral analysis and noise reduction.</p>
<div class="t-tags">
<span class="t-tag">Arduino</span>
<span class="t-tag">Astronomy</span>
<span class="t-tag">Python</span>
</div>
</div>
</div>
<!-- TNG -->
<div class="timeline-item">
<div class="t-dot"></div>
<div class="t-content">
<span class="t-date">August 2021 - July 2022</span>
<h3 class="t-role">Data Analyst</h3>
<div class="t-company">Max Planck Institute for Astronomy, Heidelberg</div>
<p class="t-desc">Investigated a statistically significant sample of Milky-Way/M31 analogs in
TNG-5O, a set of large, cosmological magnetohydrodynamic galaxy simulations to quantify stellar Radial Migration.</p>
<div class="t-tags">
<span class="t-tag">Python</span>
<span class="t-tag">Time Series Analysis</span>
<span class="t-tag">Inferential Statistics</span>
</div>
</div>
</div>
<!-- Physoc-->
<div class="timeline-item">
<div class="t-dot"></div>
<div class="t-content">
<span class="t-date">Mar 2019 - July 2021</span>
<h3 class="t-role">Coordinator</h3>
<div class="t-company">Physics Association, BITS Pilani, Goa</div>
<p class="t-desc">Planned the logistics for meetings, conferences, seminars, lectures, and workshops.
Served as the central point of contact and liaison between students, faculty and staff.</p>
<div class="t-tags">
<span class="t-tag">Communication</span>
<span class="t-tag">Organizational</span>
<span class="t-tag">Management </span>
</div>
</div>
</div>
<!-- SEDS-->
<div class="timeline-item">
<div class="t-dot"></div>
<div class="t-content">
<span class="t-date">Mar 2018 - April 2019</span>
<h3 class="t-role">Secretary</h3>
<div class="t-company">Students for Exploration & Development of Space, Celestia</div>
<p class="t-desc">Worked towards promoting space exploration through projects, conferences, and career development for students.</p>
<div class="t-tags">
<span class="t-tag">Scientific Communication</span>
<span class="t-tag">Project Management</span>
<span class="t-tag">Organizational </span>
</div>
</div>
</div>
</div>
</div>
<p style="text-align: center; font-size: 0.8rem; opacity: 0.6; margin-top: 10px;">
<i class="fa-solid fa-arrows-left-right"></i> Scroll to explore history
</p>
</div>
</section>
<!-- PROJECTS SECTION -->
<section id="projects" class="section-pad-small">
<div class="container">
<h2>Applied Data Science & Modeling Projects</h2>
<div class="project-grid">
<!-- Project -->
<div class="project-card">
<div class="p-img-box">
<img src="assets/sim_suite.webp" alt="SimSuite">
</div>
<div class="p-info">
<h3>Forecasting Complex System Evolution with Machine Learning</h3>
<p>Built and evaluated deep learning models on large-scale simulation data to forecast the evolution of complex systems under uncertainty.</p>
<p><strong>Project Importance:</strong> Scalable model evaluation, uncertainty-aware forecasting, and working with multi-terabyte, high-dimensional datasets.</p>
<p>Read more <a href="project1_sim_collapse.html" style="color: var(--accent);" >here</a></p>
<div class="p-stack">Python • PyTorch • Large-Scale Data • Parquet</div>
</div>
</div>
<!-- Project -->
<div class="project-card">
<div class="p-img-box">
<img src="./assets/shap_summary.png" alt="SHAP Summary">
</div>
<div class="p-info">
<h3>Panhandle Health Network: XGBoost based Appointment No-Show Predictor</h3>
<p>End-to-end predictive system (XGBoost/Streamlit) for healthcare appointments that identifies high-risk patients and optimizes intervention thresholds to project ~$193K in revenue recovery.</p>
<p><strong>Project Importance:</strong> Translating model performance into financial ROI, optimizing operational decision-making, and deploying interpretable AI tools for non-technical stakeholders.</p>
<p>Read more <a href="https://github.com/AstroDnerd/healthcare-appointment-prediction-PNH" style="color: var(--accent);" target="_blank" >here</a></p>
<div class="p-stack">Python • XGBoost • Streamlit • SHAP • Cost-Benefit Analysis</div>
</div>
</div>
<!-- Project -->
<div class="project-card">
<div class="p-img-box">
<img src="https://www.scaler.com/topics/images/tensorflow-probability-bayesian-neural-network-1.webp" alt="BNNViz">
</div>
<div class="p-info">
<h3>Probabilistic Regression and Uncertainty Quantification</h3>
<p>Applied Bayesian machine learning methods to perform multi-target regression on noisy, high-dimensional data.</p>
<p><strong>Project Importance:</strong> Uncertainty quantification, model interpretability, and statistical reasoning for decision-making under uncertainty.</p>
<p>Read more <a href="https://github.com/AstroDnerd/BayesianEOSInference" style="color: var(--accent);" target="_blank" >here</a></p>
<div class="p-stack">Python • Bayesian Modeling • Probabilistic ML</div>
</div>
</div>
<!-- Project -->
<div class="project-card">
<div class="p-img-box">
<img src="https://www.tng-project.org/static/tng/images/figure_tng50_example_galaxies_z1z2.jpg" alt="TNG50galaxy">
</div>
<div class="p-info">
<h3>Statistical Analysis of Large-Scale Simulation Populations</h3>
<p>Performed statistical analysis across hundreds of simulated systems to quantify population-level trends and variability.</p>
<p><strong>Project Importance:</strong> Large-sample analysis, hypothesis testing, and extracting insights from noisy observational data.</p>
<div class="p-stack">Inferential Statistics • Data Analysis • Python</div>
</div>
</div>
</div>
</div>
</section>
<!-- TECH STACK SECTION (D3) -->
<section id="skills" class="section-pad-big">
<div class="container">
<h2>Technical Arsenal</h2>
<p style="margin-bottom: 20px;">An interactive map of my production capabilities.</p>
<div id="graph-container"></div>
<div class="d3-tooltip" id="d3-tooltip"></div>
<script>
// --- 1. CONFIGURATION & ASSETS ---
// Icon Mappings (Using DevIcon hosted SVG URLs)
const iconMap = {
"Python": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/python/python-original.svg",
"C++": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/cplusplus/cplusplus-original.svg",
"Bash": "https://i.redd.it/a3s16nut3ylc1.png",
"SQL": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/postgresql/postgresql-original.svg", // Using Postgres for SQL
"PyTorch": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/pytorch/pytorch-original.svg",
"TensorFlow": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/tensorflow/tensorflow-original.svg",
"Pandas": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/pandas/pandas-original.svg",
"NumPy": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/numpy/numpy-original.svg",
"Scikit-Learn": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/scikitlearn/scikitlearn-original.svg",
"Docker": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/docker/docker-original.svg",
"Git": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/git/git-original.svg",
"Linux": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/linux/linux-original.svg",
"Jupyter": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/jupyter/jupyter-original.svg",
"CUDA": "https://d29g4g2dyqv443.cloudfront.net/sites/default/files/pictures/2019/NVIDIACuda_Logo.jpg",
"Ubuntu": "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/ubuntu/ubuntu-plain.svg"
};
// Data Definition
// Groups: 1:Lang, 2:ML, 3:HPC, 4:DevOps, 5:CS
const categories = [
{ id: "Languages", group: 1, val: 65, type: "Category" },
{ id: "ML", group: 2, val: 65, type: "Category" },
{ id: "HPC", group: 3, val: 65, type: "Category" },
{ id: "DevOps", group: 4, val: 65, type: "Category" },
{ id: "Comp Sci", group: 5, val: 65, type: "Category" }
];
const skills = [
// Languages
{ id: "Python", group: 1, val: 45, icon: iconMap["Python"] },
{ id: "C++", group: 1, val: 40, icon: iconMap["C++"] },
{ id: "SQL", group: 1, val: 30, icon: iconMap["SQL"] },
{ id: "Bash", group: 1, val: 28, icon: iconMap["Bash"] },
{ id: "Memory Mgmt", group: 1, val: 18 },
{ id: "STL", group: 1, val: 18 },
// ML
{ id: "PyTorch", group: 2, val: 42, icon: iconMap["PyTorch"] },
{ id: "TensorFlow", group: 2, val: 38, icon: iconMap["TensorFlow"] },
{ id: "Pandas", group: 2, val: 30, icon: iconMap["Pandas"] },
{ id: "NumPy", group: 2, val: 30, icon: iconMap["NumPy"] },
{ id: "Scikit-Learn", group: 2, val: 28, icon: iconMap["Scikit-Learn"] },
{ id: "Computer Vision", group: 2, val: 35 },
{ id: "Transformers", group: 2, val: 28 },
{ id: "XGBoost", group: 2, val: 25 },
{ id: "Bayesian", group: 2, val: 22 },
{ id: "Time-Series", group: 2, val: 22 },
// HPC
{ id: "Distributed", group: 3, val: 35 },
{ id: "CUDA", group: 3, val: 32, icon: iconMap["CUDA"] },
{ id: "MPI", group: 3, val: 25 },
{ id: "SLURM", group: 3, val: 22 },
{ id: "Dask", group: 3, val: 28 },
{ id: "ETL", group: 3, val: 25 },
{ id: "Parquet", group: 3, val: 20 },
// DevOps
{ id: "Docker", group: 4, val: 38, icon: iconMap["Docker"] },
{ id: "Git", group: 4, val: 35, icon: iconMap["Git"] },
{ id: "Linux", group: 4, val: 32, icon: iconMap["Linux"] },
{ id: "CI/CD", group: 4, val: 30 },
{ id: "Jupyter", group: 4, val: 25, icon: iconMap["Jupyter"] },
{ id: "MLOps", group: 4, val: 28 },
// CS
{ id: "Algorithms", group: 5, val: 35 },
{ id: "CFD", group: 5, val: 30 },
{ id: "Octrees", group: 5, val: 22 },
{ id: "Monte Carlo", group: 5, val: 25 },
{ id: "Numerical", group: 5, val: 25 },
{ id: "GDB/Valgrind", group: 5, val: 20 }
];
const nodes = [...categories, ...skills];
// Simplified linking strategy: Connect skills to their main Category
const links = [];
skills.forEach(skill => {
const targetId = categories.find(c => c.group === skill.group).id;
links.push({ source: skill.id, target: targetId });
});
// Inter-category links (to keep the whole cluster together)
links.push({ source: "Languages", target: "Comp Sci" });
links.push({ source: "Languages", target: "ML" });
links.push({ source: "ML", target: "HPC" });
links.push({ source: "HPC", target: "DevOps" });
// --- 2. LAYOUT LOGIC ---
const container = document.getElementById('graph-container');
let width = container.clientWidth;
let height = container.clientHeight;
// Colors (Pastel/Neon Palette)
// Groups: Lang(Blue), ML(Purple/Pink), HPC(Emerald), DevOps(Orange), CS(Cyan)
const colors = {
1: "#60a5fa", // Blue
2: "#d946ef", // Fuchsia
3: "#34d399", // Emerald
4: "#fb923c", // Orange
5: "#22d3ee" // Cyan
};
// --- 3. D3 SETUP ---
const svg = d3.select("#graph-container").append("svg")
.attr("width", width)
.attr("height", height)
.attr("viewBox", [0, 0, width, height]);
// Gradient Definitions for visual flare
const defs = svg.append("defs");
// Create a glow filter
const filter = defs.append("filter")
.attr("id", "glow");
filter.append("feGaussianBlur")
.attr("stdDeviation", "3.5")
.attr("result", "coloredBlur");
const feMerge = filter.append("feMerge");
feMerge.append("feMergeNode").attr("in", "coloredBlur");
feMerge.append("feMergeNode").attr("in", "SourceGraphic");
// The Simulation
const simulation = d3.forceSimulation(nodes)
.force("link", d3.forceLink(links).id(d => d.id).distance(70))
.force("charge", d3.forceManyBody().strength(-200)) // Repel
.force("collide", d3.forceCollide().radius(d => d.val + 2).iterations(3)); // Prevent overlap
// Function to Calculate Group Foci (Centers of Gravity) based on Screen Size
function getGroupFocus(groupId, w, h) {
// Layout Strategy:
// Desktop: Lang(1), ML(2), HPC(3) Top Row | DevOps(4), CS(5) Bottom Row
// Mobile: Stacked vertically
if (w > 1000) {
// Wide Screen
const colW = w / 4;
const rowH = h / 3;
switch(groupId) {
case 1: return { x: colW * 1, y: rowH * 0.8 }; // Lang
case 2: return { x: colW * 2, y: rowH * 0.8 }; // ML
case 3: return { x: colW * 3, y: rowH * 0.8 }; // HPC
case 4: return { x: colW * 1.5, y: rowH * 2.0 }; // DevOps
case 5: return { x: colW * 2.5, y: rowH * 2.0 }; // CS
}
} else {
// Narrow/Mobile
const rowH = h / 6;
return { x: w / 2, y: rowH * groupId };
}
return { x: w/2, y: h/2 };
}
// Apply Forces
function updateForces() {
width = container.clientWidth;
height = container.clientHeight;
svg.attr("width", width).attr("height", height);
// Apply custom gravity per group
simulation.force("x", d3.forceX().x(d => getGroupFocus(d.group, width, height).x).strength(0.3));
simulation.force("y", d3.forceY().y(d => getGroupFocus(d.group, width, height).y).strength(0.3));
simulation.alpha(0.5).restart();
}
// --- 4. DRAWING ---
const g = svg.append("g");
// Links
const link = g.append("g")
.attr("stroke", "#999")
.attr("stroke-opacity", 0.2)
.selectAll("line")
.data(links)
.join("line")
.attr("stroke-width", 1);
// Node Group wrapper
const node = g.append("g")
.selectAll("g")
.data(nodes)
.join("g")
.call(drag(simulation));
// 1. Circles (Background Bubble)
node.append("circle")
.attr("r", d => d.val)
.attr("fill", d => colors[d.group])
.attr("fill-opacity", 0.15) // Very translucent
.attr("stroke", d => colors[d.group])
.attr("stroke-width", 1.5)
.attr("stroke-opacity", 0.6)
.style("cursor", "pointer")
.style("transition", "all 0.3s ease");
// 2. Images (Icons) - Clipped to circle
node.append("clipPath")
.attr("id", d => "clip-" + d.index)
.append("circle")
.attr("r", d => d.val - 4); // Slightly smaller than bubble
node.filter(d => d.icon).append("image")
.attr("xlink:href", d => d.icon)
.attr("x", d => -d.val/1.5) // Center image
.attr("y", d => -d.val/1.5)
.attr("width", d => d.val * 1.35)
.attr("height", d => d.val * 1.35)
.attr("clip-path", d => "url(#clip-" + d.index + ")")
.style("pointer-events", "none")
.style("opacity", 0.9);
// 3. Text Labels (For nodes WITHOUT icons, or Category nodes)
node.filter(d => !d.icon).append("text")
.text(d => d.id)
.attr("text-anchor", "middle")
.attr("dy", ".35em")
.attr("fill", "white")
.attr("font-size", d => d.val / 2.5 + "px")
.style("pointer-events", "none")
.style("text-shadow", "0 2px 4px rgba(0,0,0,0.8)")
.style("opacity", 0.9);
// --- 5. INTERACTION ---
const tooltip = document.getElementById("d3-tooltip");
node
.on("mouseover", function(event, d) {
// Visual Highlight
d3.select(this).select("circle")
.attr("fill-opacity", 0.4)
.attr("stroke-opacity", 1)
.attr("stroke-width", 3)
.style("filter", "url(#glow)"); // Add glow effect
// Scale up slightly
d3.select(this).transition().duration(200).attr("transform",
`translate(${d.x},${d.y}) scale(1.15)`
);
// Show Tooltip
tooltip.style.opacity = 1;
tooltip.innerHTML = `
<div style="color:${colors[d.group]}; font-size:12px; text-transform:uppercase; letter-spacing:1px; margin-bottom:4px;">
${categories.find(c => c.group === d.group).id}
</div>
<div style="font-size:16px;">${d.id}</div>
`;
tooltip.style.left = event.pageX + "px";
tooltip.style.top = event.pageY + "px";
})
.on("mouseout", function(event, d) {
// Reset Visuals
d3.select(this).select("circle")
.attr("fill-opacity", 0.15)
.attr("stroke-opacity", 0.6)
.attr("stroke-width", 1.5)
.style("filter", null);
// Scale down
d3.select(this).transition().duration(200).attr("transform",
`translate(${d.x},${d.y}) scale(1)`
);
tooltip.style.opacity = 0;
});
// Tick Function
simulation.on("tick", () => {
link
.attr("x1", d => d.source.x)
.attr("y1", d => d.source.y)
.attr("x2", d => d.target.x)
.attr("y2", d => d.target.y);
node.attr("transform", d => `translate(${d.x},${d.y})`);
});
// Drag Behavior
function drag(simulation) {
function dragstarted(event, d) {
if (!event.active) simulation.alphaTarget(0.3).restart();
d.fx = d.x;
d.fy = d.y;
}
function dragged(event, d) {
d.fx = event.x;
d.fy = event.y;
}
function dragended(event, d) {
if (!event.active) simulation.alphaTarget(0);
d.fx = null;
d.fy = null;
}
return d3.drag()
.on("start", dragstarted)
.on("drag", dragged)
.on("end", dragended);
}
// Handle Resize
window.addEventListener('resize', updateForces);
// Initialize
updateForces();
</script>
</div>
</section>
<!-- CONTACT -->
<section id="contact" class="section-pad-small">
<div class="container">
<div class="contact-box">
<p>Something caught your eye?</p>
<h2>Start the conversation! <i class="fa-solid fa-arrow-down"></i></h2>
<a href="mailto:nikhilbisht65@gmail.com" class="email-link">nikhilbisht65@gmail.com</a>
<div class="social-links">
<a href="https://github.com/AstroDnerd" target="_blank"><i class="fa-brands fa-github"></i></a>
<a href="https://linkedin.com/in/nikhilpsbisht" target="_blank"><i class="fa-brands fa-linkedin"></i></a>
</div>
</div>
</div>
</section>
<footer>
<div class="container" style="text-align: center; opacity: 0.6; font-size: 0.9rem;">
© 2025 Nikhil P. S. Bisht. Built with vanilla HTML, CSS, JavaScript, a dash of pixel art and some Dark Matter :).
</div>
</footer>
</div>
<!-- Scripts -->
<script src="https://unpkg.com/typed.js@2.1.0/dist/typed.umd.js"></script>
<script src="main.js"></script>
<!-- 1. BACKGROUND CANVAS LOGIC (Dual Mode) -->
<script>
const canvas = document.getElementById('bg-canvas');
const ctx = canvas.getContext('2d');
const toggle = document.getElementById('theme-toggle');
let bwidth, bheight;
let particles = [];
let mouse = { x: -1000, y: -1000 };
let animationId;
// Config
const CONFIG = {
starCount: 1000,
dustCount: 1000,
starSpeed: 1.0, // Slow float
dustSpeed: 1.5, // Turbulent float
mouseRadius: 100,
mouseForce: 0.5
};
function resize() {
bwidth = window.innerWidth;
bheight = window.innerHeight;
canvas.width = bwidth;
canvas.height = bheight;
ctx.translate(bwidth/2, bheight/2);
}
class Particle {
constructor(isDark) {
this.isDark = isDark;
this.init(true);
}
init(randomZ = false) {
this.x = (Math.random() - 0.5) * bwidth * 3;
this.y = (Math.random() - 0.5) * height * 3;
this.z = randomZ ? Math.random() * 2000 : 2000;
this.size = Math.random() * 2 + 1;
this.vx = 0; this.vy = 0;
}
update(speed) {
this.z -= speed;
const perspective = 300 / (300 + this.z);
const sx = this.x * perspective;
const sy = this.y * perspective;
// Mouse Interaction
const mx = mouse.x - bwidth/2;
const my = mouse.y - bheight/2;
const dx = sx - mx;
const dy = sy - my;
const dist = Math.sqrt(dx*dx + dy*dy);
if(dist < CONFIG.mouseRadius) {
const angle = Math.atan2(dy, dx);
const force = (CONFIG.mouseRadius - dist) / CONFIG.mouseRadius;
this.vx += Math.cos(angle) * force * CONFIG.mouseForce;
this.vy += Math.sin(angle) * force * CONFIG.mouseForce;
}
// Turbulence for Solar Mode
if(!this.isDark) this.vy -= 0.05;
this.vx *= 0.95; this.vy *= 0.95;
this.x += this.vx; this.y += this.vy;
if(this.z <= 1 || Math.abs(sx) > bwidth || Math.abs(sy) > bheight) this.init();
}
draw() {
const perspective = 300 / (300 + this.z);
const sx = this.x * perspective;
const sy = this.y * perspective;
const scale = (2000 - this.z) / 2000;
const sSize = Math.max(1, this.size * scale * 2);
let color = this.isDark ? `rgba(255,255,255,${scale})` : `rgba(40,10,0,${scale})`; // White vs Dark Ash
ctx.fillStyle = color;
ctx.fillRect(sx, sy, sSize, sSize);
}
}
function initParticles() {
particles = [];
const isDark = !toggle.checked;
const count = isDark ? CONFIG.starCount : CONFIG.dustCount;
for(let i=0; i<count; i++) particles.push(new Particle(isDark));
}
function animate() {
const isDark = !toggle.checked;
// Clear
ctx.clearRect(-bwidth/2, -bheight/2, bwidth, bheight);
// Update & Draw
particles.forEach(p => {
p.update(isDark ? CONFIG.starSpeed : CONFIG.dustSpeed);
p.draw();
});
animationId = requestAnimationFrame(animate);
}
// Events
window.addEventListener('resize', resize);
window.addEventListener('mousemove', e => { mouse.x = e.clientX; mouse.y = e.clientY; });
toggle.addEventListener('change', () => {
document.body.classList.toggle('light-mode');
initParticles();
});
// Start
resize();
initParticles();
animate();
// Timeline Scroll Logic
const tlContainer = document.getElementById('timelineWrapper');
tlContainer.addEventListener('wheel', (evt) => {
evt.preventDefault();
tlContainer.scrollLeft += evt.deltaY;
});
</script>
</body>
</html>