File size: 26,255 Bytes
9382c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d6fdbe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9382c04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<!-- Add lang attribute and potentially 'dark' class -->
<html lang="en" class=""> <!-- Start without 'dark' initially -->
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Technology Stack - NIC Project</title>
    <!-- Tailwind CSS via CDN -->
    <script src="https://cdn.tailwindcss.com/3.4.1"></script>
    <script>
        // *** Add dark mode strategy to Tailwind config ***
        tailwind.config = {
            darkMode: 'class', // Enable class-based dark mode
            theme: {
                extend: {
                    colors: {
                        primary: '#1a73e8',
                        secondary: '#e8f0fe',
                        // Define dark mode colors if needed, or rely on Tailwind's defaults
                        // dark: {
                        //     background: '#1a202c',
                        //     text: '#e2e8f0',
                        // }
                    },
                    borderRadius: {
                        'none': '0px', 'sm': '4px', DEFAULT: '8px', 'md': '12px',
                        'lg': '16px', 'xl': '20px', '2xl': '24px', '3xl': '32px',
                        'full': '9999px', 'button': '8px'
                    }
                }
            }
        }
    </script>
    <!-- Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
    <!-- Icons -->
    <link href="https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css" rel="stylesheet">
    <!-- Custom Styles -->
    <style>
        /* --- Font Definitions (Ensure loaded via <link> tags in base.html) --- */
body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    -webkit-font-smoothing: antialiased; /* Smoother fonts */
    -moz-osx-font-smoothing: grayscale;
}

.hindi-font {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

/* --- Custom Switch Styles (from provided HTML) --- */
.custom-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.custom-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* Default off color */
    transition: .4s;
    border-radius: 34px; /* Rounded */
}

.custom-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white; /* Changed from original rgb(136, 145, 212) to white for consistency with dark mode logic in base.html */
    transition: .4s;
    border-radius: 50%; /* Circle */
}

.custom-switch-input:checked + .custom-switch-slider {
    background-color: #1a73e8; /* Primary color when on */
}

.custom-switch-input:checked + .custom-switch-slider:before {
    transform: translateX(26px); /* Move the circle */
}

/* --- Accessibility: Ensure focus is visible --- */
/* Tailwind's default focus rings are usually good, but this is a fallback */
*:focus-visible {
  outline: 2px solid #1a73e8; /* Use primary color for focus */
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.3); /* Optional softer focus ring */
}

/* --- Other Minimal Custom Styles (if any) --- */

/* Example: Add a specific style for the example image containers if needed beyond grid/aspect ratio */
.example-image-container {
    /* Custom styles here */
    /* aspect-ratio: 3 / 2; */ /* Tailwind handles aspect ratio now */
}

.example-image {
   /* Custom image styles here */
}
        /* Add base dark mode styles */
        html.dark body {
            background-color: #1a202c; /* Example dark background */
            color: #e2e8f0; /* Example dark text */
        }
        html.dark header, html.dark footer { /* Adjust header/footer */
            background-color: #2d3748;
            color: #e2e8f0;
        }
         html.dark .card { /* Adjust card styles */
             background-color: #2d3748;
             border-color: #4a5568;
         }
         html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6, html.dark p, html.dark span, html.dark li, html.dark label, html.dark small {
             /* Adjust general text elements */
             color: #e2e8f0; /* Light text */
         }
          html.dark .text-gray-600, html.dark .text-gray-700, html.dark .text-gray-800, html.dark .text-gray-900 {
             color: #a0aec0; /* Lighter gray for dark mode */
         }
         html.dark .text-muted {
            color: #718096;
         }
         html.dark .bg-white { background-color: #2d3748 !important; }
         html.dark .bg-gray-50 { background-color: #1a202c !important; }
         html.dark .bg-gray-100 { background-color: #2d3748 !important; }
         html.dark .border-gray-100, html.dark .border-gray-200 { border-color: #4a5568 !important; }
         html.dark .hover\:bg-gray-50:hover { background-color: #4a5568 !important; }
         html.dark .navbar-dark .navbar-brand, html.dark .navbar-dark .nav-link { color: #fff; }
         html.dark .navbar-dark .nav-link.active { color: #fff; font-weight: bold; }


    </style>
    
</head>
<!-- Add dark mode background/text for body base -->
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-200">

    <!-- Header -->
    <header class="bg-white dark:bg-gray-800 shadow-sm sticky top-0 z-50">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center">
                <a href="index.html" class="text-2xl font-['Pacifico'] text-primary dark:text-blue-400 mr-8" data-lang-en="AI Text Tools" data-lang-hi="एआई टेक्स्ट उपकरण">AI Text Tools</a>
                <!-- *** START: Updated Navigation Bar *** -->
                <nav id="mainNav" class="hidden md:flex space-x-6">
                     <a href="index.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Home" data-lang-hi="होम">Home</a>
                     <!-- Assuming recognizer.html is the main tool page, link from index.html might be better -->
                     <a href="recognizer.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Recognize" data-lang-hi="पहचानें">Recognize</a>
                     <!-- Assuming examples.html exists -->
                     <a href="examples.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Examples" data-lang-hi="उदाहरण">Examples</a>
                     <!-- Assuming technology.html exists -->
                     <a href="technology.html" class="nav-link text-primary dark:text-blue-400 font-medium" data-lang-en="Technology" data-lang-hi="तकनीक">Technology</a>
                     <!-- Assuming about.html exists -->
                    <a href="about.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="About" data-lang-hi="बारे में">About</a>
                    <!-- Link to contact.html -->
                    <a href="contact.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Contact" data-lang-hi="संपर्क">Contact</a>
                    <!-- Active link for this page -->
                    <a href="feedback.html" class="nav-link hover:text-primary dark:hover:text-blue-400 text-gray-600 dark:text-gray-300" data-lang-en="Feedback" data-lang-hi="प्रतिक्रिया">Feedback</a>
                </nav>
            </div>
            <!-- Right side header items -->
            <div class="flex items-center space-x-4">
                <!-- Language Switch -->
                <div class="items-center space-x-2 hidden md:flex">
                    <span class="text-sm text-gray-600 dark:text-gray-400">EN</span>
                    <label class="custom-switch">
                        <!-- *** Add ID: languageToggle *** -->
                        <input type="checkbox" id="languageToggle" class="custom-switch-input">
                        <span class="custom-switch-slider"></span>
                    </label>
                    <span class="text-sm text-gray-600 dark:text-gray-400 hindi-font">हिंदी</span>
                </div>
                 <!-- Theme Switch -->
                 <div class="items-center space-x-2 hidden md:flex">
                    <span class="text-sm text-gray-600 dark:text-gray-400"><i class="ri-sun-line"></i></span>
                    <label class="custom-switch">
                         <!-- *** Add ID: themeToggle *** -->
                        <input type="checkbox" id="themeToggle" class="custom-switch-input">
                        <span class="custom-switch-slider"></span>
                    </label>
                    <span class="text-sm text-gray-600 dark:text-gray-400"><i class="ri-moon-line"></i></span>
                </div>
                <!-- User/Notification Icons (Keep as placeholders) -->
                <div class="w-10 h-10 flex items-center justify-center bg-gray-100 dark:bg-gray-700 rounded-full cursor-pointer" title="User Profile (Placeholder)">
                    <i class="ri-user-line text-gray-600 dark:text-gray-300"></i>
                </div>
                <div class="w-10 h-10 flex items-center justify-center relative cursor-pointer" title="Notifications (Placeholder)">
                    <i class="ri-notification-3-line text-gray-600 dark:text-gray-300"></i>
                    <span class="absolute top-0 right-0 bg-red-500 text-white text-xs w-5 h-5 flex items-center justify-center rounded-full">3</span>
                </div>
                 <!-- Mobile Menu Button (Placeholder) -->
                <button class="md:hidden w-10 h-10 flex items-center justify-center" aria-label="Toggle Menu">
                     <i class="ri-menu-line text-gray-600 dark:text-gray-300 text-xl"></i>
                </button>
            </div>
        </div>
    </header>

    <!-- Main Content Area -->
    <main class="flex-grow">
        
<div class="container mx-auto px-4 py-8">
    <div class="max-w-3xl mx-auto">
        <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md border border-gray-200 dark:border-gray-700 overflow-hidden">
             <div class="px-6 py-4 bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600">
                <h2 class="text-xl font-semibold text-gray-800 dark:text-white flex items-center">
                   <i class="ri-flask-line mr-2 text-primary text-2xl"></i> <!-- Flask icon or other relevant icon -->
                    Technology Stack & Methodology
                </h2>
            </div>
            <div class="p-6 md:p-8 space-y-6 text-gray-700 dark:text-gray-300 leading-relaxed">
                <h3 class="text-2xl font-semibold text-gray-900 dark:text-white mb-4">Core Components</h3>

                <div class="space-y-4">
                    <h4 class="text-lg font-semibold text-gray-800 dark:text-white pt-2">1. Deep Learning Model</h4>
                    <p>
                        The core recognition engine relies on a deep neural network architecture commonly used for sequence recognition tasks, particularly OCR. This typically involves:
                    </p>
                    <ul class="list-disc list-inside space-y-1 pl-4 text-gray-700 dark:text-gray-300">
                        <li><strong>Convolutional Neural Network (CNN) Layers:</strong> These layers act as feature extractors, automatically learning relevant visual patterns (like strokes, curves, loops) directly from the pixel data of the input word images.</li>
                        <li><strong>Recurrent Neural Network (RNN) Layers:</strong> Long Short-Term Memory (LSTM) or Gated Recurrent Unit (GRU) layers are often used after the CNN. They process the sequence of features extracted along the width of the image, capturing contextual information and dependencies between different parts of the word. Bidirectional RNNs are commonly employed to consider context from both left-to-right and right-to-left.</li>
                        <li><strong>Connectionist Temporal Classification (CTC) Loss:</strong> This loss function is essential for training OCR models without requiring pre-segmented character locations. It calculates the probability of the predicted sequence given the input image features, summing over all possible alignments between the input sequence and the target text label.</li>
                    </ul>
                     <p class="text-sm text-gray-600 dark:text-gray-400 italic mt-2">
                        <em>Specific Library Used: TensorFlow 1.15 (as indicated by logs)</em>
                    </p>
                     <!-- Optional: Model Diagram Placeholder -->
                     <!-- <div class="my-4 p-4 border rounded-md bg-gray-50 text-center text-gray-500">Model Architecture Diagram Placeholder</div> -->
                </div>

                <hr class="my-6 border-gray-200 dark:border-gray-600">

                 <div class="space-y-4">
                    <h4 class="text-lg font-semibold text-gray-800 dark:text-white">2. Image Preprocessing</h4>
                     <p>
                        Raw input images are processed before being fed into the neural network to ensure consistency and optimal performance. Steps (handled by `SamplePreprocessor.py`) include:
                     </p>
                     <ul class="list-disc list-inside space-y-1 pl-4 text-gray-700 dark:text-gray-300">
                        <li><strong>Grayscale Conversion:</strong> Converting the image to a single channel (grayscale) reduces complexity.</li>
                        <li><strong>Resizing:</strong> Images are typically resized to a fixed height (e.g., 32 or 64 pixels) while maintaining the aspect ratio. Width may vary or be padded to a maximum length.</li>
                        <li><strong>Normalization:</strong> Pixel values are scaled to a standard range (e.g., [0, 1] or [-1, 1]) to stabilize training.</li>
                        <li><em>(Mention any other significant steps like binarization, slant correction if applicable)</em></li>
                     </ul>
                     <p class="text-sm text-gray-600 dark:text-gray-400 italic mt-2">
                        <em>Primary Library Used: OpenCV (`cv2`)</em>
                     </p>
                 </div>

                <hr class="my-6 border-gray-200 dark:border-gray-600">

                <div class="space-y-4">
                    <h4 class="text-lg font-semibold text-gray-800 dark:text-white">3. Backend Framework</h4>
                     <p>
                        The server-side logic, API handling, and coordination are managed by **Flask**, a Python microframework known for its simplicity and flexibility. Flask's responsibilities in this project include:
                     </p>
                      <ul class="list-disc list-inside space-y-1 pl-4 text-gray-700 dark:text-gray-300">
                        <li>Defining URL routes (e.g., <code>/</code>, <code>/recognize</code>, <code>/predict</code>, <code>/api/examples</code>).</li>
                        <li>Handling HTTP requests (GET for pages, POST for predictions).</li>
                        <li>Receiving and securely saving uploaded image files.</li>
                        <li>Calling the Python functions in <code>main.py</code> to trigger image preprocessing and model inference.</li>
                        <li>Formatting the prediction results into JSON for the API endpoint.</li>
                        <li>Rendering HTML templates (using the Jinja2 engine) to display web pages.</li>
                        <li>Serving static assets like CSS, JavaScript, and images.</li>
                     </ul>
                </div>

                 <hr class="my-6 border-gray-200 dark:border-gray-600">

                <div class="space-y-4">
                    <h4 class="text-lg font-semibold text-gray-800 dark:text-white">4. Frontend Interface</h4>
                     <p>
                        The user interacts with the application through a web interface built using:
                     </p>
                      <ul class="list-disc list-inside space-y-1 pl-4 text-gray-700 dark:text-gray-300">
                        <li><strong>HTML5:</strong> Provides the fundamental structure and content of the web pages.</li>
                        <li><strong>Tailwind CSS:</strong> A utility-first CSS framework used for rapidly building the user interface. It provides low-level utility classes (like <code>p-6</code>, <code>rounded-lg</code>, <code>text-center</code>, <code>font-semibold</code>, <code>hidden</code>) to style elements directly in the HTML markup, promoting consistency and custom design without writing extensive custom CSS.</li>
                        <li><strong>Vanilla JavaScript:</strong> Handles all client-side interactivity, including:
                            <ul class="list-['○'] list-inside space-y-1 pl-6 mt-1">
                                <li>Managing file input selection and example image clicks.</li>
                                <li>Displaying image previews.</li>
                                <li>Making asynchronous API calls (<code>fetch</code>) to the Flask backend's <code>/predict</code> endpoint to send the image data.</li>
                                <li>Receiving and parsing the JSON response from the backend.</li>
                                <li>Dynamically updating the HTML to show prediction results, loading states, or error messages.</li>
                                <li>Handling basic UI state changes (e.g., enabling/disabling buttons).</li>
                            </ul>
                         </li>
                         <li><strong>Remixicon / Google Fonts:</strong> Used for icons and specific typography (Inter, Noto Sans Devanagari, Pacifico).</li>
                     </ul>
                </div>

            </div>
        </div>
    </div>
</div>

    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-400 py-12"> <!-- Adjusted footer text color -->
        <div class="container mx-auto px-4">
             <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                 <div>
                     <!-- Add data-lang attributes to footer elements if needed -->
                    <a href="/" class="text-2xl font-['Pacifico'] text-white mb-4 inline-block" data-lang-en="HindiOCR" data-lang-hi="हिन्दी ओसीआर">HindiOCR</a>
                    <p class="mb-4 text-sm" data-lang-en="Transforming handwritten Hindi documents into digital text." data-lang-hi="हस्तलिखित हिंदी दस्तावेज़ों को डिजिटल टेक्स्ट में बदलना।">Transforming handwritten Hindi documents into digital text.</p>
                    <div class="flex space-x-4">
                         <a href="#" class="hover:text-white" title="GitHub (Placeholder)"><i class="ri-github-fill"></i></a>
                         <a href="#" class="hover:text-white" title="LinkedIn (Placeholder)"><i class="ri-linkedin-box-fill"></i></a>
                    </div>
                </div>
                 <div>
                    <h3 class="text-lg font-medium text-white mb-4" data-lang-en="Quick Links" data-lang-hi="त्वरित लिंक्स">Quick Links</h3>
                    <ul class="space-y-2 text-sm">
                        <li><a href="/" class="hover:text-white" data-lang-en="Home" data-lang-hi="होम">Home</a></li>
                        <li><a href="/recognize" class="hover:text-white" data-lang-en="Recognize" data-lang-hi="पहचानें">Recognize</a></li>
                        <li><a href="/examples" class="hover:text-white" data-lang-en="Examples" data-lang-hi="उदाहरण">Examples</a></li>
                         <li><a href="/technology" class="hover:text-white" data-lang-en="Technology" data-lang-hi="तकनीक">Technology</a></li>
                        <li><a href="/about" class="hover:text-white" data-lang-en="About" data-lang-hi="बारे में">About</a></li>
                    </ul>
                </div>
                 <div>
                    <h3 class="text-lg font-medium text-white mb-4" data-lang-en="Resources" data-lang-hi="संसाधन">Resources</h3>
                    <ul class="space-y-2 text-sm">
                        <li><a href="#" class="hover:text-white" data-lang-en="Documentation (TBD)" data-lang-hi="प्रलेखन (TBD)">Documentation (TBD)</a></li>
                        <li><a href="#" class="hover:text-white" data-lang-en="GitHub Repo (Link)" data-lang-hi="गिटहब रेपो (लिंक)">GitHub Repo (Link)</a></li>
                        <li><a href="#" class="hover:text-white" data-lang-en="Support (TBD)" data-lang-hi="समर्थन (TBD)">Support (TBD)</a></li>
                    </ul>
                </div>
                 <div>
                    <h3 class="text-lg font-medium text-white mb-4" data-lang-en="Contact (Project)" data-lang-hi="संपर्क (परियोजना)">Contact (Project)</h3>
                    <ul class="space-y-2 text-sm">
                        <li class="flex items-start">
                            <i class="ri-mail-line mt-1 mr-2"></i>
                            <span>khansamayashaswini@gmail.com</span>
                        </li>
                        <li class="flex items-center">
                            <i class="ri-building-line mr-2"></i>
                            <span>MATS University,Raipur / NIC Durg</span>
                        </li>
                    </ul>
                </div>
            </div>
            <!-- Copyright -->
             <div class="border-t border-gray-700 mt-8 pt-8 text-center">
                <p class="text-sm">© 2025 Yashaswini khansama | Final Year Project | NIC</p>
            </div>
        </div>
    </footer>

    <!-- Bootstrap JS Bundle (Not needed for Tailwind, can remove if not used elsewhere) -->
    <!-- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> -->

    <!-- Base Theme/Language Script -->
    <script>
        // --- Theme Toggle ---
        const themeToggle = document.getElementById('themeToggle');
        const htmlElement = document.documentElement; // Target <html> tag

        // Function to apply theme based on preference
        function applyTheme(isDark) {
            if (isDark) {
                htmlElement.classList.add('dark');
                if(themeToggle) themeToggle.checked = true;
                console.log("Theme applied: dark");
            } else {
                htmlElement.classList.remove('dark');
                 if(themeToggle) themeToggle.checked = false;
                 console.log("Theme applied: light");
            }
        }

        // Check localStorage on load
        const prefersDark = localStorage.getItem('theme') === 'dark' ||
                           (localStorage.getItem('theme') === null && window.matchMedia('(prefers-color-scheme: dark)').matches);
        applyTheme(prefersDark);

        // Add listener to toggle button
        if(themeToggle){
            themeToggle.addEventListener('change', (event) => {
                const isDark = event.target.checked;
                applyTheme(isDark);
                // Save preference to localStorage
                localStorage.setItem('theme', isDark ? 'dark' : 'light');
            });
        } else {
             console.warn("Theme toggle button not found.");
        }

        // --- Language Toggle (Simple Version) ---
        const languageToggle = document.getElementById('languageToggle');
        const langElements = document.querySelectorAll('[data-lang-en]'); // Select elements with language data

        // Function to apply language
        function applyLanguage(lang) { // lang should be 'en' or 'hi'
             console.log("Applying language:", lang);
             htmlElement.setAttribute('lang', lang); // Set overall page lang

             langElements.forEach(el => {
                const text = el.getAttribute(`data-lang-${lang}`);
                if (text) {
                    el.textContent = text; // Replace text content
                }
             });

             // Update toggle state
             if (languageToggle) languageToggle.checked = (lang === 'hi');

             // Save preference
             localStorage.setItem('language', lang);
        }

         // Check localStorage on load for language
         const savedLang = localStorage.getItem('language') || 'en'; // Default to English
         applyLanguage(savedLang);

         // Add listener to language toggle button
         if (languageToggle) {
             languageToggle.addEventListener('change', (event) => {
                const newLang = event.target.checked ? 'hi' : 'en';
                applyLanguage(newLang);
             });
         } else {
             console.warn("Language toggle button not found.");
         }

    </script>

    <!-- Block for page-specific scripts -->
    
</body>
</html>