-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.html
More file actions
771 lines (545 loc) · 40.6 KB
/
blog.html
File metadata and controls
771 lines (545 loc) · 40.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Site Info -->
<title>Mit Patel - Blog</title>
<meta name="description" content="Mit Patel - Highly experienced and results-oriented lecturer with 7 years of expertise in educating and guiding students in mathematics, statistics, and programming. Possessing a Master's degree in Data Analytics and a strong foundation in Information Technology, I have successfully developed and delivered comprehensive curricula in core subjects such as Machine Learning, Data Analysis, and Python. Proven ability to simplify complex concepts, enhance student performance, and foster a positive learning environment. Driven to leverage my analytical, problem-solving, and programming skills, coupled with continuous upskilling in cutting-edge AI/ML technologies (including LLMs and MLOps), to contribute to innovative solutions in the Data Science domain, developing and implementing advanced machine learning models to solve complex business problems.">
<meta name="author" content="Mit Patel">
<!-- Open Graph Tags: The title of the page for social media sharing. It can match the title tag or be more descriptive. -->
<meta property="og:title" content="Mit Patel">
<!-- Open Graph Tags: Typically set to "website" for static sites or "article" for content-heavy pages. -->
<meta property="og:type" content="website">
<!-- Open Graph Tags: The URL of the page, used to ensure link previews resolve to the correct page. -->
<!-- base_url -->
<meta property="og:url" content="127.0.0.1:5500/blog.html">
<!-- Open Graph Tags: URL of an image that represents the page. Useful for link previews. -->
<!-- base_url -->
<meta property="og:image" content="127.0.0.1:5500/portfolio_media/photo_2.jpg">
<!-- Open Graph Tags: Provides an alternative text for the image to improve accessibility. -->
<meta property="og:image:alt" content="Mit Patel Profile Image">
<!-- Preconnect for Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Custom Font -->
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap"
rel="stylesheet">
<!-- Stylesheet -->
<link rel="stylesheet" href="css/modern_normalize.css" />
<link rel="stylesheet" href="css/html5bp.css">
<link rel="stylesheet" href="css/main.css">
<!-- <link rel="stylesheet" href="css/resume.css"> -->
<!-- Set a theme color that matches your website's primary color -->
<meta name="theme-color" content="#fafafa">
<!-- Favicon for all browsers -->
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<!-- Apple touch icon for iOS devices -->
<link rel="apple-touch-icon" sizes="180x180" href="/icon.png">
<!-- Web app manifest for Progressive Web Apps -->
<link rel="manifest" href="/site.webmanifest">
<!-- Add an icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Content Security Policy: Uncomment to enhance security by restricting where content can be loaded from (useful for preventing certain attacks like XSS). Update if adding external sources (e.g., Google Fonts, Bootstrap CDN, analytics, etc). -->
<!-- <meta http-equiv="Content-Security-Policy" content=" default-src 'self'; script-src 'self' code.jquery.com; style-src 'self' fonts.googleapis.com; font-src fonts.gstatic.com; img-src 'self' images.examplecdn.com; "> -->
</head>
<body>
<header class="page-header">
<div class="container">
<div class="header-top flex-responsive">
<div class="header-info">
<!-- name -->
<h1>Mit Patel's Blog</h1>
<nav>
<ul class="inline-list flex-responsive">
<li><a href="index.html">Home</a></li>
<li><a href="resume.html">Resume</a></li>
<li><a href="projects.html">Projects</a></li>
<li><a href="tech-stack.html">Tech Stack</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="page-content">
<div class="container">
<main>
<section>
<div class="blog-heading-row">
<h2 class="section-heading">
<span style="display: inline-flex; align-items: baseline; gap: 0.5rem;">
Recent Posts
<span
style="font-size: 0.65em; font-weight: 500; opacity: 0.6; text-transform: uppercase; font-style: italic; letter-spacing: 0.5px;">Total
Posts: 12</span>
</span>
</h2>
<!-- Mobile filter toggle button (hidden on desktop) -->
<button id="mobile-filter-toggle" class="mobile-filter-toggle"
aria-label="Filter by technology">
<i class="fas fa-filter"></i>
<span class="mobile-filter-label">Filter</span>
</button>
</div>
<!-- Mobile filter dropdown (hidden by default, shown on toggle) -->
<div id="mobile-filter-panel" class="mobile-filter-panel">
<div id="mobile-tag-filter-container" class="mobile-tag-container">
<button class="tag filter-tag active" data-tag="all">Show All</button>
<button class="tag filter-tag" data-tag="aws">AWS</button>
<button class="tag filter-tag" data-tag="aws ec2">AWS EC2</button>
<button class="tag filter-tag" data-tag="aws ecr">AWS ECR</button>
<button class="tag filter-tag" data-tag="aws elastic beanstalk">AWS Elastic Beanstalk</button>
<button class="tag filter-tag" data-tag="aws s3">AWS S3</button>
<button class="tag filter-tag" data-tag="aws sagemaker">AWS SageMaker</button>
<button class="tag filter-tag" data-tag="agentic ai">Agentic AI</button>
<button class="tag filter-tag" data-tag="agno">Agno</button>
<button class="tag filter-tag" data-tag="cloudwatch">CloudWatch</button>
<button class="tag filter-tag" data-tag="dagshub">Dagshub</button>
<button class="tag filter-tag" data-tag="docker">Docker</button>
<button class="tag filter-tag" data-tag="duckduckgo api">DuckDuckGo API</button>
<button class="tag filter-tag" data-tag="duckduckgotools">DuckDuckGoTools</button>
<button class="tag filter-tag" data-tag="fastapi">FastAPI</button>
<button class="tag filter-tag" data-tag="flask">Flask</button>
<button class="tag filter-tag" data-tag="github actions">GitHub Actions</button>
<button class="tag filter-tag" data-tag="google api">Google API</button>
<button class="tag filter-tag" data-tag="google gemini">Google Gemini</button>
<button class="tag filter-tag" data-tag="groq">Groq</button>
<button class="tag filter-tag" data-tag="huggingface transformers">HuggingFace Transformers</button>
<button class="tag filter-tag" data-tag="mlops">MLOps</button>
<button class="tag filter-tag" data-tag="mlflow">MLflow</button>
<button class="tag filter-tag" data-tag="mongodb">MongoDB</button>
<button class="tag filter-tag" data-tag="multi-agent systems">Multi-Agent Systems</button>
<button class="tag filter-tag" data-tag="nlp">NLP</button>
<button class="tag filter-tag" data-tag="numpy">NumPy</button>
<button class="tag filter-tag" data-tag="pandas">Pandas</button>
<button class="tag filter-tag" data-tag="pytorch">PyTorch</button>
<button class="tag filter-tag" data-tag="python">Python</button>
<button class="tag filter-tag" data-tag="scikit-learn">Scikit-learn</button>
<button class="tag filter-tag" data-tag="streamlit">Streamlit</button>
<button class="tag filter-tag" data-tag="tensorboard">TensorBoard</button>
<button class="tag filter-tag" data-tag="weights & biases">Weights & Biases</button>
<button class="tag filter-tag" data-tag="yfinancetools">YFinanceTools</button>
<button class="tag filter-tag" data-tag="google-generativeai">google-generativeai</button>
<button class="tag filter-tag" data-tag="python-dotenv">python-dotenv</button>
<button class="tag filter-tag" data-tag="torchvision">torchvision</button>
</div>
</div>
<!-- blogs -->
<div id="blog-posts-container">
<article class="blog-post" data-tags="python,streamlit,agno,google gemini,duckduckgo api,google-generativeai,python-dotenv">
<h3 class="post-meta">
<a href="posts/building-an-intelligent-video-analyst-crafting-the-agents-brain-part-2.html">Building an Intelligent Video Analyst: Crafting the Agent's Brain (Part 2)</a>
</h3>
<p class="section-label">Published on: 2025-09-22</p>
<p>A robust pipeline is just the beginning; the real intelligence comes from the agent's 'brain.' This post is a deep dive into the art of prompt engineering, showing how carefully crafted instructions enable our `Agno` agent to not only analyze video with Google Gemini but also to autonomously use web search tools for a richer, more contextual analysis. See how the final pieces came together to create an intelligent video research assistant.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="python,streamlit,agno,google gemini,duckduckgo api,google-generativeai,python-dotenv">
<h3 class="post-meta">
<a href="posts/building-an-intelligent-video-analyst-the-foundational-pipeline-part-1.html">Building an Intelligent Video Analyst: The Foundational Pipeline (Part 1)</a>
</h3>
<p class="section-label">Published on: 2025-09-21</p>
<p>My journey to build an intelligent video analyst started with what seemed like a simple task: uploading a video. I quickly hit a wall with Google's asynchronous File API, a common real-world challenge that requires more than just basic code. This post covers the architectural decisions, the code for building a resilient video processing pipeline, and the "aha!" moment that made it all work, setting the stage for the AI agent.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="python,agno,groq,agentic ai,multi-agent systems,fastapi,duckduckgotools,yfinancetools,google api">
<h3 class="post-meta">
<a href="posts/multi-agent-chaos-when-ai-agents-wouldnt-cooperate.html">Multi-Agent Chaos: When AI Agents Wouldn't Cooperate</a>
</h3>
<p class="section-label">Published on: 2025-09-20</p>
<p>My journey to build an AI financial analyst started with a single, confused bot that failed miserably. The solution wasn't a better model, but a better architecture: a coordinated team of AI specialists. Here's a deep dive into the code, the struggles, and the key lessons learned from building a multi-agent system with Agno and Groq.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="aws,python,flask,scikit-learn,pandas,numpy,aws ec2,aws elastic beanstalk,mlops">
<h3 class="post-meta">
<a href="posts/student-performance-prediction-when-simple-isnt-always-better.html">Student Performance Prediction: When Simple Isn't Always Better</a>
</h3>
<p class="section-label">Published on: 2025-09-19</p>
<p>A candid, in-depth account of developing an end-to-end Student Performance Prediction system. This post explores the journey from an experimental Jupyter Notebook to a production-ready, modular ML pipeline, covering the critical roles of custom logging, exception handling, and a component-based architecture. It also details the real-world challenges and hard-won lessons from deploying a Flask application on AWS.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="huggingface transformers,pytorch,fastapi,docker,python,weights & biases,mlops,nlp">
<h3 class="post-meta">
<a href="posts/text-summarizer-journey-serving-the-model-part-3.html">Text Summarizer Journey: Serving the Model (Part 3)</a>
</h3>
<p class="section-label">Published on: 2025-09-18</p>
<p>The final step in our MLOps journey is making the trained model useful. This post covers the "last mile" of deployment, showing how to wrap the text summarization model in a high-performance API using FastAPI. I then walk through creating a Dockerfile to containerize the entire application, ensuring a consistent and portable service that can be deployed anywhere.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="huggingface transformers,pytorch,fastapi,docker,python,weights & biases,mlops,nlp">
<h3 class="post-meta">
<a href="posts/text-summarizer-journey-the-ml-engine-room-part-2.html">Text Summarizer Journey: The ML Engine Room (Part 2)</a>
</h3>
<p class="section-label">Published on: 2025-09-17</p>
<p>With a robust MLOps pipeline in place, this post dives into the core machine learning workflow of the Text Summarizer project. I explore each critical stage: transforming the raw SAMSum dataset for the model, fine-tuning a pre-trained Pegasus Transformer using a configuration-driven approach, and quantitatively evaluating its performance with ROUGE metrics.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="huggingface transformers,pytorch,fastapi,docker,python,weights & biases,mlops,nlp">
<h3 class="post-meta">
<a href="posts/text-summarizer-journey-the-mlops-blueprint-part-1.html">Text Summarizer Journey: The MLOps Blueprint (Part 1)</a>
</h3>
<p class="section-label">Published on: 2025-09-16</p>
<p>My Text Summarizer project started in a Jupyter notebook—a great place for experimentation, but a fragile foundation for a real application. This post details the journey of refactoring that initial script into a robust, production-ready MLOps pipeline, tackling the challenges of hardcoded paths, scattered configuration, and monolithic execution with a modular, component-based architecture.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="aws,aws sagemaker,scikit-learn,aws s3,python,mlops,cloudwatch">
<h3 class="post-meta">
<a href="posts/when-sagemaker-humbled-me-a-cloud-native-ml-reality-check.html">When SageMaker Humbled Me: A Cloud-Native ML Reality Check</a>
</h3>
<p class="section-label">Published on: 2025-09-15</p>
<p>I thought taking a scikit-learn model to the cloud would be simple, but AWS SageMaker taught me more about cloud architecture and DevOps than I ever expected. This post details my entire journey, from battling IAM roles and structuring S3 buckets to mastering the SageMaker training patterns that finally bridged the gap between my local machine and a production-ready endpoint. It's a story of the struggles, the breakthroughs, and the hard-won lessons learned while building a real-world ML pipeline.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="pytorch,fastapi,flask,torchvision,python,tensorboard">
<h3 class="post-meta">
<a href="posts/from-notebook-to-ui-the-web-deployment-journey-part-2.html">From Notebook to UI: The Web Deployment Journey (Part 2)</a>
</h3>
<p class="section-label">Published on: 2025-09-13</p>
<p>A machine learning model is useless if no one can use it. This post covers the "last mile" problem: giving my PyTorch model an interactive body. This is the story of my struggle against frozen UIs, the architectural epiphany that led to a framework-agnostic core, and the final lessons learned while building identical apps in both Flask and FastAPI.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="pytorch,fastapi,flask,torchvision,python,tensorboard">
<h3 class="post-meta">
<a href="posts/from-notebook-to-ui-the-local-development-journey-part-1.html">From Notebook to UI: The Local Development Journey (Part 1)</a>
</h3>
<p class="section-label">Published on: 2025-09-12</p>
<p>My FoodVision Mini project started with a simple question in a Jupyter Notebook, but the answer required a real engineering journey. This post tells the story of how I tamed chaotic experiments with a systematic process, unlocked the true power of transfer learning through trial and error, and refactored a monolithic script into a robust, modular ML pipeline.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="python,mlflow,dagshub,aws ec2,aws ecr,aws s3,scikit-learn,mongodb,fastapi,docker,github actions">
<h3 class="post-meta">
<a href="posts/from-messy-data-to-production-mlops-my-network-security-journey-part-2.html">From Messy Data to Production MLOps: My Network Security Journey (Part 2)</a>
</h3>
<p class="section-label">Published on: 2025-09-09</p>
<p>With a working local pipeline, the "easy" part was next: deployment. This turned into a multi-day AWS nightmare. After successfully automating the CI/CD pipeline with GitHub Actions, the app was live but unreachable. The culprit? A single, critical line of code related to container networking. This post dives into the humbling, real-world challenges of cloud infrastructure, debugging EC2 security groups, and the final "aha!" moment that brought the entire system online.</p>
<div class="tech-stack">
</div>
</article>
<article class="blog-post" data-tags="python,mlflow,dagshub,aws ec2,aws ecr,aws s3,scikit-learn,mongodb,fastapi,docker,github actions">
<h3 class="post-meta">
<a href="posts/from-messy-data-to-production-mlops-my-network-security-journey-part-1.html">From Messy Data to Production MLOps: My Network Security Journey (Part 1)</a>
</h3>
<p class="section-label">Published on: 2025-09-08</p>
<p>My journey began with a classic MLOps mistake: underestimating messy data. My model worked locally, but I spent weeks debugging failures until a breakthrough came from implementing rigorous <strong>data validation schemas</strong> and <strong>drift detection</strong>. This post covers the foundational engineering—modular architecture, custom logging, and experiment tracking—that's essential *before* you even think about the cloud. It’s the story of building a resilient pipeline from the ground up.</p>
<div class="tech-stack">
</div>
</article>
</div>
<div class="load-more-wrapper" style="text-align: center; margin-top: 2rem;">
<button id="load-more-btn" class="load-more-btn">Load More Posts</button>
</div>
</section>
</main>
<!-- Sidebar Section -->
<aside>
<!-- PASTE THE FILTER SECTION YOU CUT EARLIER RIGHT HERE -->
<section>
<h2 class="section-heading">Filter by Technology</h2>
<div id="tag-filter-container" class="tech-stack">
<button class="tag filter-tag active" data-tag="all">Show All</button>
<button class="tag filter-tag" data-tag="aws">AWS</button>
<button class="tag filter-tag" data-tag="aws ec2">AWS EC2</button>
<button class="tag filter-tag" data-tag="aws ecr">AWS ECR</button>
<button class="tag filter-tag" data-tag="aws elastic beanstalk">AWS Elastic Beanstalk</button>
<button class="tag filter-tag" data-tag="aws s3">AWS S3</button>
<button class="tag filter-tag" data-tag="aws sagemaker">AWS SageMaker</button>
<button class="tag filter-tag" data-tag="agentic ai">Agentic AI</button>
<button class="tag filter-tag" data-tag="agno">Agno</button>
<button class="tag filter-tag" data-tag="cloudwatch">CloudWatch</button>
<button class="tag filter-tag" data-tag="dagshub">Dagshub</button>
<button class="tag filter-tag" data-tag="docker">Docker</button>
<button class="tag filter-tag" data-tag="duckduckgo api">DuckDuckGo API</button>
<button class="tag filter-tag" data-tag="duckduckgotools">DuckDuckGoTools</button>
<button class="tag filter-tag" data-tag="fastapi">FastAPI</button>
<button class="tag filter-tag" data-tag="flask">Flask</button>
<button class="tag filter-tag" data-tag="github actions">GitHub Actions</button>
<button class="tag filter-tag" data-tag="google api">Google API</button>
<button class="tag filter-tag" data-tag="google gemini">Google Gemini</button>
<button class="tag filter-tag" data-tag="groq">Groq</button>
<button class="tag filter-tag" data-tag="huggingface transformers">HuggingFace Transformers</button>
<button class="tag filter-tag" data-tag="mlops">MLOps</button>
<button class="tag filter-tag" data-tag="mlflow">MLflow</button>
<button class="tag filter-tag" data-tag="mongodb">MongoDB</button>
<button class="tag filter-tag" data-tag="multi-agent systems">Multi-Agent Systems</button>
<button class="tag filter-tag" data-tag="nlp">NLP</button>
<button class="tag filter-tag" data-tag="numpy">NumPy</button>
<button class="tag filter-tag" data-tag="pandas">Pandas</button>
<button class="tag filter-tag" data-tag="pytorch">PyTorch</button>
<button class="tag filter-tag" data-tag="python">Python</button>
<button class="tag filter-tag" data-tag="scikit-learn">Scikit-learn</button>
<button class="tag filter-tag" data-tag="streamlit">Streamlit</button>
<button class="tag filter-tag" data-tag="tensorboard">TensorBoard</button>
<button class="tag filter-tag" data-tag="weights & biases">Weights & Biases</button>
<button class="tag filter-tag" data-tag="yfinancetools">YFinanceTools</button>
<button class="tag filter-tag" data-tag="google-generativeai">google-generativeai</button>
<button class="tag filter-tag" data-tag="python-dotenv">python-dotenv</button>
<button class="tag filter-tag" data-tag="torchvision">torchvision</button>
</div>
</section>
</aside>
</div>
</div>
<footer class="page-footer">
<div class="container">
<p>© 2026 Mit Patel. All rights reserved.</p>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const tagContainer = document.getElementById('tag-filter-container');
const mobileTagContainer = document.getElementById('mobile-tag-filter-container');
const blogPosts = Array.from(document.querySelectorAll('.blog-post'));
const loadMoreBtn = document.getElementById('load-more-btn');
const mobileFilterToggle = document.getElementById('mobile-filter-toggle');
const mobileFilterPanel = document.getElementById('mobile-filter-panel');
let currentMax = 5;
const POSTS_PER_PAGE = 5;
let currentFilter = 'all';
function updatePostsDisplay() {
let visibleCount = 0;
// Filter posts
const matchingPosts = blogPosts.filter(post => {
const postTags = post.getAttribute('data-tags');
return currentFilter === 'all' || postTags.includes(currentFilter);
});
// Hide all posts first
blogPosts.forEach(post => { post.style.display = 'none'; });
// Show up to currentMax matching posts
for (let i = 0; i < matchingPosts.length; i++) {
if (i < currentMax) {
matchingPosts[i].style.display = 'block';
visibleCount++;
}
}
// Update Load More button visibility
if (visibleCount >= matchingPosts.length) {
loadMoreBtn.style.display = 'none';
} else {
loadMoreBtn.style.display = 'inline-block';
}
}
// Sync active state across both filter containers
function syncFilterState(clickedTag, sourceContainer) {
const allContainers = [tagContainer, mobileTagContainer].filter(Boolean);
const selectedTag = clickedTag.getAttribute('data-tag').toLowerCase();
allContainers.forEach(container => {
container.querySelectorAll('.filter-tag').forEach(btn => {
btn.classList.remove('active');
if (btn.getAttribute('data-tag').toLowerCase() === selectedTag) {
btn.classList.add('active');
}
});
});
currentFilter = selectedTag;
currentMax = POSTS_PER_PAGE;
updatePostsDisplay();
}
// Desktop sidebar filter
if (tagContainer) {
tagContainer.addEventListener('click', function (e) {
if (e.target.matches('.filter-tag')) {
syncFilterState(e.target, tagContainer);
}
});
}
// Mobile filter dropdown
if (mobileTagContainer) {
mobileTagContainer.addEventListener('click', function (e) {
if (e.target.matches('.filter-tag')) {
syncFilterState(e.target, mobileTagContainer);
}
});
}
// Mobile filter toggle button
if (mobileFilterToggle && mobileFilterPanel) {
mobileFilterToggle.addEventListener('click', function () {
const isOpen = mobileFilterPanel.classList.toggle('open');
mobileFilterToggle.classList.toggle('active', isOpen);
});
}
if (loadMoreBtn) {
loadMoreBtn.addEventListener('click', function () {
currentMax += POSTS_PER_PAGE;
updatePostsDisplay();
});
}
// Initial display update
updatePostsDisplay();
});
</script>
<style>
/* ===== Filter Tag Base Styles ===== */
.filter-tag {
cursor: pointer;
border: 1px solid transparent;
}
.filter-tag.active {
border-color: var(--link-color, #0077cc);
background-color: #cceeff;
color: #000;
}
/* Desktop sidebar filter layout */
#tag-filter-container {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
#tag-filter-container .filter-tag {
width: 100%;
text-align: left;
margin-right: 0;
}
/* Load more button styles */
.load-more-btn {
padding: 10px 24px;
border: 2px solid var(--link-color, #0077cc);
border-radius: 6px;
background-color: transparent;
color: var(--link-color, #0077cc);
font-weight: bold;
font-size: 1rem;
cursor: pointer;
transition: all 0.2s ease-in-out;
}
.load-more-btn:hover {
background-color: var(--link-color, #0077cc);
color: #fff;
}
/* ===== Blog Heading Row ===== */
.blog-heading-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.blog-heading-row .section-heading {
flex: 1;
margin-bottom: 0;
}
/* ===== Mobile Filter Toggle Button ===== */
.mobile-filter-toggle {
display: none;
/* Hidden by default on desktop */
}
/* ===== Mobile Filter Panel ===== */
.mobile-filter-panel {
display: none;
/* Hidden by default */
}
/* ===== Mobile / Tablet: show filter button, hide sidebar ===== */
@media (max-width: 48rem) {
/* Hide the desktop sidebar completely on mobile */
aside {
display: none !important;
}
/* Show the mobile filter toggle button */
.mobile-filter-toggle {
display: inline-flex;
align-items: center;
gap: 0.4rem;
padding: 8px 14px;
border: 1px solid var(--border-color);
border-radius: 6px;
background-color: var(--card-bg-color);
color: var(--text-color);
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
flex-shrink: 0;
font-family: inherit;
}
.mobile-filter-toggle i {
font-size: 0.85rem;
color: var(--link-color);
}
.mobile-filter-toggle:hover,
.mobile-filter-toggle.active {
border-color: var(--link-color);
color: var(--link-color);
}
/* Mobile filter panel (dropdown) */
.mobile-filter-panel {
display: none;
/* Still hidden until .open is added */
}
.mobile-filter-panel.open {
display: block;
margin-bottom: 1.5rem;
padding: 1rem;
background-color: var(--card-bg-color);
border: 1px solid var(--border-color);
border-radius: 8px;
animation: filterSlideDown 0.25s ease-out;
}
@keyframes filterSlideDown {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Mobile tag container: horizontal wrap layout */
.mobile-tag-container {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.mobile-tag-container .filter-tag {
font-size: 0.85rem;
padding: 4px 10px;
}
}
</style>
</footer>
<!-- ===== Style Switcher Start ===== -->
<div class="theme-toggle-container">
<div id="theme-toggle-icon" class="theme-icon">
<i class="fas"></i>
</div>
</div>
<!-- ===== Style Switcher End ===== -->
<!-- ===== Search Feature Start ===== -->
<button id="search-fab" class="search-fab" aria-label="Search blog posts">
<i class="fas fa-magnifying-glass"></i>
</button>
<div id="search-overlay" class="search-overlay">
<div class="search-modal">
<div class="search-header">
<i class="fas fa-magnifying-glass"></i>
<input type="text" id="search-input" placeholder="Search blog posts…" autocomplete="off">
<span class="search-kbd">⌘K</span>
<button id="search-clear-btn" class="search-action-btn" aria-label="Clear search"
style="display:none;"><i class="fas fa-delete-left"></i></button>
<button id="search-close-btn" class="search-action-btn" aria-label="Close search"><i
class="fas fa-xmark"></i></button>
</div>
<div id="search-results" class="search-results">
<p class="search-hint">Type at least 2 characters to search…</p>
</div>
</div>
</div>
<!-- ===== Search Feature End ===== -->
<script src="js/search-index.js"></script>
<script src="js/search.js"></script>
<script src="js/app.js"></script>
</body>
</html>