-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout.html
More file actions
869 lines (770 loc) · 24.5 KB
/
about.html
File metadata and controls
869 lines (770 loc) · 24.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
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
<!DOCTYPE html>
<!--[if lte IE 8]> <html class="oldie" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="format-detection" content="telephone=no">
<meta name="description" content="Vikram Mishra is a dynamic entrepreneur and industrial designer leading the charge in revolutionizing organic farming through cutting-edge robotics and automation.">
<meta name="keywords" content="Vikram Mishra, industrial design, entrepreneurship, AgTech, robotics, automation, organic farming">
<meta name="author" content="Vikram Mishra">
<meta property="og:title" content="About Me - Vikram Mishra">
<meta property="og:description" content="Vikram Mishra is a dynamic entrepreneur and industrial designer leading the charge in revolutionizing organic farming through cutting-edge robotics and automation.">
<meta property="og:image" content="https://vikramdesign.com/images/ProfilePic.jpeg">
<meta property="og:url" content="https://vikramdesign.com/about.html">
<meta property="og:site_name" content="Vikram Mishra">
<link rel="icon" href="images/favicon.jpeg" type="image/x-icon">
<title>About Me - Vikram Mishra</title>
<link rel="stylesheet" href="css/fancySelect.css" />
<link rel="stylesheet" href="css/uniform.css" />
<link rel="stylesheet" href="css/all.css" />
<link media="screen" rel="stylesheet" type="text/css" href="css/screen.css" />
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8505110363248163"
crossorigin="anonymous"></script>
</head>
<body>
<div id="imagePopup" class="image-popup">
<div class="popup-content">
<span class="close-popup">×</span>
<img src="images/JouleThief.jpg" alt="Joule Thief Project" class="popup-image">
</div>
</div>
<div id="header-placeholder"></div>
<div id="wrapper">
<div class="wrapper-holder">
<header id="header">
<span class="Header-logo"><a href="index.html">Vikram Mishra</a></span>
<a href="#" class="menu_trigger">☰</a>
<nav id="nav">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="resume.html">Resume</a></li>
<li><a href="blog/index.html">Blog</a></li>
</ul>
</nav>
</header>
<section class="bar">
<div class="bar-frame">
<ul class="breadcrumbs">
<li>About me</li>
</ul>
</div>
</section>
<section id="main">
<div class="hero-image">
<img src="images/about_hero.jpg" alt="Vikram Mishra">
</div>
<div class="content-wrapper">
<!-- Main content column -->
<div class="main-content">
<div class="details-info">
<div class="description">
<div class="head">
<h1 class="title">Vikram Mishra</h1>
</div>
<div class="entry">
<p class="manifesto">
I combine robotics and AI to transform physical industries, guided by a deep curiosity about soil and infrastructure. My work aims to accelerate technological progress and boost American dynamism through innovations that bridge the gap between cutting-edge robotics and the physical systems that underpin our society.
<div class="principles">
<h2>Core Beliefs</h2>
<ol class="numbered-beliefs">
<li><span class="emphasis">Technology and innovation</span> are the primary drivers of <span class="emphasis">human progress</span></li>
<li><span class="emphasis">The biggest opportunities</span> lie in <span class="emphasis">solving problems others consider impossible</span></li>
<li><span class="emphasis">Creating abundance through technological advancement</span> is our generation's mission</li>
</ol>
</div>
<div class="current-focus">
<h2>Current Focus</h2>
<ol class="numbered-beliefs">
<li>Artificial Intelligence & <span class="emphasis">Robotics</span></li>
<li>Precision <span class="emphasis">Agriculture</span> Solutions</li>
<li>Advanced <span class="emphasis">Manufacturing</span></li>
</ol>
</div>
</div>
<div class="events-section">
<h2>Events I Organize</h2>
<ol class="numbered-beliefs">
<li>
<a href="https://partiful.com/e/mqfvc2nsQetTAOzQgPMQ" target="_blank" rel="noopener">
The San Francisco Potluck</a> <span class="highlight">Happening March 1st, 2025</span>
- Monthly potluck series bringing together builders and creators
</li>
<li>
<a href="https://lu.ma/2d2gz27x" target="_blank" rel="noopener">
San Francisco AgTech Meetup
</a>
- Community of founders and enthusiasts exploring the future of farming
</li>
<li>
<a href="#">Hackathon</a>
<span class="highlight">(Coming Soon to San Francisco)</span>
</li>
</ol>
</div>
<div class="section">
<h2>Let's Build Something Important</h2>
<a href="https://calendly.com/vikrammishra/meeting" class="btn black normal" target="_blank" rel="noopener">Schedule a Meeting</a>
</div>
</div>
</div>
</div>
<!-- Long Story sidebar -->
<div class="long-story">
<br><br>
<h2 class="story-title">My Journey: From Curiosity to Innovation</h2>
<div class="story-content">
<p>Growing up with entrepreneurial parents, I witnessed firsthand the intricate dance of innovation, setbacks, and breakthroughs. My journey began unexpectedly at a Google tech conference when I was thirteen, where I presented <span class="highlight">a simple home security solution</span> I'd created using an old tablet. What started as a practical solution for my parents to monitor our home remotely turned into my first step into the world of <span class="highlight">technology and design</span>. In eighth grade, I started "Tech Cosmo for a Better World" developing mobile apps that addressed everyday challenges. One of my first projects helped students capture and enhance their learning experience by automatically converting lecture content to <a href="https://apkpure.com/lecture-notes/appinventor.ai_vikrammishra824.Notes/download/1.1#google_vignette" target="_blank" rel="noopener">notes</a> and helped annotate images with key concepts for visual learning.
</p>
<p>My high school years marked a pivotal shift in my understanding of design's impact. A design course introduced me to user-centric thinking, leading me to create an autonomous transport vehicle that caught the attention of the Indian Space Research Organization. This opened up an opportunity to learn about indoor navigation through <span class="highlight">mentorship</span> with Honeywell. While working on various projects, I had the chance to visit Cottolengo Special School, where I developed the <a href="#" class="image-link">Joule Thief project</a> – a lamp that could <a href="https://devopedia.org/joule-thief-circuit" target="_blank" rel="noopener"><span class="highlight">run on residual energy from discarded batteries</span></a>. After twelve attempts, this solution helped light up dormitories during power outages while addressing electronic waste issues, teaching me crucial lessons about persistence and the importance of understanding user needs deeply.
</p>
<p>The intersection of technology and human needs continues to drive my current work. At Procter & Gamble, I've focused on creating prototypes that real users can test and provide feedback on, learning valuable lessons about <span class="highlight">bringing complex technologies to market</span>. Recently, I've been working on an <a href="https://autosolder.framer.website/" target="_blank" rel="noopener">automated soldering station</a>, <a href="https://www.youtube.com/watch?v=UYJ7d93_kUI" target="_blank" rel="noopener">farming robot</a>, <a href="https://opx.framer.website/" target="_blank" rel="noopener">home assistant devices</a>, and new projects, each building upon insights gained from hands-on development and user feedback.
</p>
<p>My work is driven by a <span class="highlight">vision of the future</span> where technology creates abundance. The automated soldering station aims to accelerate hardware innovation by making electronics development faster and more accessible. Similarly, <a href="https://zaptrack.us">Zaptrack</a> robots work toward a future where advanced automation dramatically reduces the cost of growing healthy food. These projects all build on principles I learned early on: understand the user, <span class="highlight">iterate persistently</span>, and always build towards the bigger picture. It's about creating technologies that can scale to transform industries and improve lives.
</p>
</div>
<div class="scroll-indicator" id="beginnings-indicator" style="display: none;">
<div class="scroll-line"></div>
<div class="scroll-marker" data-section="beginnings">
<div class="marker-dot"></div>
<div class="marker-label">
<span class="marker-text">Beginnings</span>
<span class="marker-icon">🌱</span>
</div>
</div>
</div>
<div class="scroll-indicator" id="highschool-indicator" style="display: none;">
<div class="scroll-line"></div>
<div class="scroll-marker" data-section="highschool">
<div class="marker-dot"></div>
<div class="marker-label">
<span class="marker-text">High School</span>
<span class="marker-icon">🔬</span>
</div>
</div>
</div>
<div class="scroll-indicator" id="adulthood-indicator" style="display: none;">
<div class="scroll-line"></div>
<div class="scroll-marker" data-section="adulthood">
<div class="marker-dot"></div>
<div class="marker-label">
<span class="marker-text">Adulthood</span>
<span class="marker-icon">🚀</span>
</div>
</div>
</div>
<div class="scroll-indicator" id="future-indicator" style="display: none;">
<div class="scroll-line"></div>
<div class="scroll-marker" data-section="future">
<div class="marker-dot"></div>
<div class="marker-label">
<span class="marker-text">The Future</span>
<span class="marker-icon">🌟</span>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<footer id="footer">
<div class="footer-holder">
<div class="footer-frame">
<div class="footer-content">
<div class="col-holder">
<div class="col">
<div class="heading">
<h3></h3>
</div>
</div>
<div class="col">
<div class="heading">
<h3>Contact</h3>
</div>
<address>
<p><strong>Vikram Mishra</strong></p>
<p>+1 (513) 815-1799</p>
<p></p>
<p><a href="mailto:vikram@zaptrack.us">vikram@zaptrack.us</a></p>
</div>
<div class="col col-contact">
<div class="heading">
<h3>Socials</h3>
</div>
<ul class="social">
<li class="Twitter"><a target="_blank" href="https://x.com/hypercosmac">Twitter</a></li>
<li class="linkedin"><a target="_blank" href="https://www.linkedin.com/in/vikram-mishra/">LinkedIn</a></li>
</ul>
</div>
</div>
</div>
<div class="footer-bottom">
<div class="holder">
<p>© <script>document.write(new Date().getFullYear())</script> VikramDesign</p>
</div>
</div>
</div>
</div>
</footer>
</div>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="js/jquery.bxslider.min.js"></script>
<script type="text/javascript" src="js/jquery.placeholder.js"></script>
<script type="text/javascript" src="js/jquery.uniform.min.js"></script>
<script type="text/javascript" src="js/fancySelect.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
line-height: 1.5;
color: #333;
background: #fff;
}
.details-info {
max-width: 640px;
margin: 0 auto;
padding: 4rem 2rem;
}
.title {
font-size: 2rem;
font-weight: 500;
margin-bottom: 3rem;
letter-spacing: -0.02em;
}
.manifesto {
font-size: 1.5rem;
line-height: 1.4;
margin-bottom: 4rem;
font-weight: 400;
letter-spacing: -0.01em;
}
h2 {
font-size: 1.125rem;
font-weight: 500;
margin-bottom: 1rem;
letter-spacing: -0.01em;
}
.principles, .current-focus {
margin: 3rem 0;
}
ul {
list-style: none;
padding: 0;
}
li {
margin-bottom: 0.75rem;
font-size: 1rem;
color: #555;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
text-decoration: none;
margin-top: 2rem;
font-size: 1rem;
color: #fff;
background: #333;
border: none;
border-radius: 0;
transition: all 0.2s ease;
}
.btn:hover {
background: #000;
color: #fff;
}
.btn.black {
background: #333;
color: #fff;
}
.section {
margin-top: 4rem;
padding-top: 2rem;
border-top: 1px solid #eee;
}
.hero-image {
width: 100%;
height: 500px;
overflow: hidden;
}
.hero-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.content-wrapper {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
display: flex;
gap: 4rem;
}
.main-content {
flex: 1;
min-width: 0; /* Prevents flex item from overflowing */
}
.long-story {
width: 400px;
padding-left: 2rem;
border-left: 1px solid #eee;
}
.story-content {
font-size: 1rem;
line-height: 1.6;
color: #555;
}
.story-content p {
margin-bottom: 1.5rem;
}
/* Responsive layout */
@media (max-width: 1024px) {
.content-wrapper {
flex-direction: column;
}
.long-story {
width: auto;
max-width: 640px;
margin: 0 auto;
padding-left: 0;
border-left: none;
border-top: 1px solid #eee;
padding-top: 2rem;
margin-top: 2rem;
}
}
/* Maintain existing mobile-friendly typography */
@media (max-width: 768px) {
.content-wrapper {
padding: 1rem;
}
.story-content {
font-size: 0.95rem;
}
.long-story,
.details-info {
padding: 1rem;
}
}
/* Link styling */
a {
color: #000;
font-weight: bold;
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 2px;
transition: text-underline-offset 0.2s ease;
}
a:hover {
text-underline-offset: 4px;
}
/* Emphasis styling inspired by the image */
.highlight {
background: #FFE14D;
padding: 0 4px;
font-weight: 500;
}
.emphasis {
font-size: 1.2em;
font-weight: 500;
}
/* Update story content to allow for more dramatic typography */
.story-content {
font-size: 1rem;
line-height: 1.6;
color: #555;
}
.story-content p {
margin-bottom: 1.5rem;
}
/* Add monospace font for certain emphasized elements */
.mono {
font-family: "Courier New", monospace;
font-weight: 500;
}
.story-title {
font-size: 1.1rem;
font-weight: 700;
margin-bottom: 2rem;
letter-spacing: -0.02em;
}
.image-popup {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9999;
backdrop-filter: blur(5px);
}
.popup-content {
position: relative;
max-width: 800px;
width: auto;
height: auto;
max-height: 80vh;
margin: 5% auto;
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.popup-image {
display: block;
width: auto;
height: auto;
max-height: 80vh;
max-width: 100%;
object-fit: contain;
}
.close-popup {
position: absolute;
right: 20px;
top: 20px;
width: 36px;
height: 36px;
background: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
font-weight: bold;
color: #333;
cursor: pointer;
z-index: 10000;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
transition: all 0.2s ease;
}
.close-popup:hover {
transform: scale(1.1);
background: #f8f8f8;
}
/* Add responsive adjustments */
@media (max-width: 900px) {
.popup-content {
max-width: 90%;
margin: 10% auto;
}
}
.numbered-beliefs {
list-style: none;
counter-reset: beliefs;
padding: 0;
}
.numbered-beliefs li {
counter-increment: beliefs;
margin-bottom: 1rem;
padding-left: 2.5rem;
position: relative;
line-height: 1.6;
}
.numbered-beliefs li::before {
content: counter(beliefs);
position: absolute;
left: 0;
font-weight: 500;
font-size: 1.1rem;
color: #000;
width: 1.5rem;
text-align: center;
}
.events-section {
margin: 3rem 0;
font-size: 1.2rem;
}
.events-section li {
line-height: 1.6;
}
.current-focus {
margin: 3rem 0;
font-size: 1.2rem;
}
.scroll-indicator {
position: fixed;
top: 50%;
transform: translateY(-50%);
height: 10vh; /* Set a fixed height to space elements */
display: flex;
flex-direction: column;
align-items: center;
z-index: 100;
opacity: 0;
transition: opacity 0.3s ease, right 0.3s ease; /* Add transition for right property */
}
/* Add a curved gradient line connecting the dots */
.scroll-line {
position: absolute;
width: 2px;
height: 100%;
background: linear-gradient(180deg,
rgba(0,0,0,0.05) 0%,
rgba(0,0,0,0.2) 25%,
rgba(0,0,0,0.2) 75%,
rgba(0,0,0,0.05) 100%
);
z-index: -1;
border-radius: 100%;
transform: rotate(-5deg); /* Slight curve */
}
.scroll-marker {
position: relative;
height: 25%; /* This will space them evenly across the height */
width: 100%;
display: flex;
align-items: center;
transform: rotate(-5deg); /* Match the curve */
margin: 20px 0;
}
.marker-dot {
width: 12px;
height: 12px;
border-radius: 50%;
background: #fff;
border: 2px solid rgba(0,0,0,0.2);
transition: all 0.3s ease;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.marker-label {
position: absolute;
left: 24px;
display: flex;
align-items: center;
gap: 8px;
opacity: 0.3;
transition: all 0.3s ease;
white-space: nowrap;
transform: rotate(5deg); /* Counter-rotate the text */
}
.marker-text {
font-size: 14px;
font-weight: 500;
background: linear-gradient(90deg, #000, #333);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.marker-icon {
font-size: 16px;
}
.scroll-marker.active .marker-dot {
background: linear-gradient(45deg, #000, #333);
transform: scale(1.2);
border-color: transparent;
}
.scroll-marker.active .marker-label {
opacity: 1;
transform: translateX(5px) rotate(5deg);
}
/* Ensure non-active markers have reduced opacity */
.scroll-marker:not(.active) .marker-label {
opacity: 0.3;
}
/* Hide on mobile */
@media (max-width: 1024px) {
.scroll-indicator {
display: none;
}
}
/* Header Styles */
#header {
position: fixed;
top: 0;
left: 0;
right: 0;
background: white;
padding: 20px 40px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
}
.Header-logo {
font-size: 1.5rem;
font-weight: 700;
color: #333;
text-decoration: none;
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}
#header .Header-logo a {
color: #333 !important;
text-decoration: none;
}
#nav ul {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
#nav ul li a {
color: #333;
text-decoration: none;
font-weight: 500;
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}
.menu_trigger {
display: none;
color: #333;
text-decoration: none;
font-size: 1.5rem;
}
@media (max-width: 768px) {
.menu_trigger {
display: block;
}
#nav {
display: none;
}
#nav.active {
display: block;
position: absolute;
top: 100%;
left: 0;
right: 0;
background: white;
padding: 1rem;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#nav.active ul {
flex-direction: column;
gap: 1rem;
}
}
#wrapper {
padding-top: 100px;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
const popup = document.getElementById('imagePopup');
const imageLinks = document.getElementsByClassName('image-link');
const closeBtn = document.getElementsByClassName('close-popup')[0];
// Open popup when image link is clicked
for (let link of imageLinks) {
link.onclick = function(e) {
e.preventDefault();
popup.style.display = 'block';
document.body.style.overflow = 'hidden';
};
}
// Close popup when X is clicked
closeBtn.onclick = function() {
popup.style.display = 'none';
document.body.style.overflow = 'auto';
};
// Close popup when clicking outside
window.onclick = function(e) {
if (e.target == popup) {
popup.style.display = 'none';
document.body.style.overflow = 'auto';
}
};
// Close popup on escape key
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape' && popup.style.display === 'block') {
popup.style.display = 'none';
document.body.style.overflow = 'auto';
}
});
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const storyParagraphs = document.querySelectorAll('.story-content p');
const indicators = {
beginnings: document.getElementById('beginnings-indicator'),
highschool: document.getElementById('highschool-indicator'),
adulthood: document.getElementById('adulthood-indicator'),
future: document.getElementById('future-indicator')
};
// Map paragraphs to their corresponding sections
const sections = ['beginnings', 'highschool', 'adulthood', 'future'];
const observerOptions = {
root: null,
rootMargin: '-30% 0px -30% 0px', // Adjust when the observer triggers
threshold: [0, 0.5, 1]
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
const index = Array.from(storyParagraphs).indexOf(entry.target);
const currentSection = sections[index];
const currentIndicator = indicators[currentSection];
if (entry.isIntersecting && entry.intersectionRatio > 0.5) {
// Show and activate current section
Object.values(indicators).forEach(ind => {
if (ind === currentIndicator) {
ind.style.display = 'flex';
ind.style.opacity = '1';
ind.querySelector('.scroll-marker').classList.add('active');
} else {
// Keep others visible but not active
ind.querySelector('.scroll-marker').classList.remove('active');
ind.style.opacity = '0.6';
}
});
} else if (!entry.isIntersecting && entry.intersectionRatio === 0) {
// If paragraph is completely out of view
if (currentIndicator) {
currentIndicator.querySelector('.scroll-marker').classList.remove('active');
}
}
});
}, observerOptions);
// Observe all paragraphs
storyParagraphs.forEach((paragraph, index) => {
paragraph.setAttribute('data-section', sections[index]);
observer.observe(paragraph);
});
// Show first indicator when scrolled past hero image
const heroImage = document.querySelector('.story-title');
const heroObserver = new IntersectionObserver((entries) => {
const entry = entries[0];
if (!entry.isIntersecting && entry.boundingClientRect.top < 0) {
// Show all indicators with curved positioning
Object.values(indicators).forEach((indicator, index) => {
indicator.style.display = 'flex';
indicator.style.top = `${30 + (index * 10)}%`; // Vertical spacing
// Adjust right position to create curve effect
let rightPosition;
switch(index) {
case 0: // Beginnings
rightPosition = '12%';
break;
case 1: // High School
rightPosition = '11.5%';
break;
case 2: // Adulthood
rightPosition = '11%';
break;
case 3: // Future
rightPosition = '10.5%';
break;
}
indicator.style.right = rightPosition;
indicator.style.opacity = '0.3';
});
} else {
// Hide all indicators when hero is visible
Object.values(indicators).forEach(indicator => {
indicator.style.opacity = '0';
setTimeout(() => {
indicator.style.display = 'none';
}, 300);
});
}
}, {
threshold: 0
});
heroObserver.observe(heroImage);
// Rest of your existing JavaScript
});
</script>
</body>
</html>