File size: 77,402 Bytes
0ddcbd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b3cda0e
 
 
 
 
 
 
0ddcbd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b3cda0e
 
 
0ddcbd6
 
 
 
 
 
 
 
 
 
 
b3cda0e
 
 
 
 
0ddcbd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b3cda0e
0ddcbd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b3cda0e
0ddcbd6
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
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ATS-Friendly CV Maker</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/docx/7.8.2/docx.js"></script>
    <style>
        .fade-in {
            animation: fadeIn 0.5s ease-in-out;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .fade-out {
            animation: fadeOut 0.3s ease-in-out;
        }
        @keyframes fadeOut {
            from { opacity: 1; transform: translateY(0); }
            to { opacity: 0; transform: translateY(10px); }
        }
        .section-highlight {
            transition: all 0.3s ease;
        }
        .section-highlight:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .progress-bar {
            height: 6px;
            transition: width 0.5s ease;
        }
        .resume-paper {
            background: linear-gradient(to bottom, #ffffff 0%, #f9f9f9 100%);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        .skill-level {
            position: relative;
        }
        .skill-level::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 100%;
            height: 3px;
            background: #e2e8f0;
            border-radius: 3px;
        }
        .skill-level-fill {
            position: absolute;
            bottom: -5px;
            left: 0;
            height: 3px;
            border-radius: 3px;
            background: #3b82f6;
            transition: width 0.5s ease;
        }
    </style>
</head>
<body class="bg-gray-50 font-sans">
    <div class="container mx-auto px-4 py-8 max-w-7xl">
        <!-- Header -->
        <header class="text-center mb-12">
            <h1 class="text-4xl font-bold text-blue-800 mb-2">ATS-Friendly CV Maker</h1>
            <p class="text-lg text-gray-600">Create a resume that beats Applicant Tracking Systems</p>
            <div class="w-full bg-gray-200 rounded-full h-2.5 mt-4">
                <div id="completion-progress" class="progress-bar bg-blue-600 h-2.5 rounded-full" style="width: 0%"></div>
            </div>
            <p id="completion-text" class="text-sm text-gray-500 mt-1">0% Complete</p>
        </header>

        <div class="flex flex-col lg:flex-row gap-8">
            <!-- Form Section -->
            <div class="lg:w-2/3">
                <div class="bg-white rounded-xl shadow-md p-6 mb-6 section-highlight">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-user-circle text-blue-500 mr-2"></i> Personal Information
                    </h2>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                        <div>
                            <label class="block text-gray-700 mb-1">Full Name*</label>
                            <input type="text" id="full-name" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="John Doe">
                        </div>
                        <div>
                            <label class="block text-gray-700 mb-1">Professional Title*</label>
                            <input type="text" id="professional-title" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Software Engineer">
                        </div>
                        <div>
                            <label class="block text-gray-700 mb-1">Email*</label>
                            <input type="email" id="email" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="[email protected]">
                        </div>
                        <div>
                            <label class="block text-gray-700 mb-1">Phone*</label>
                            <input type="tel" id="phone" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="+1 (555) 123-4567">
                        </div>
                        <div>
                            <label class="block text-gray-700 mb-1">Location*</label>
                            <input type="text" id="location" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="New York, USA">
                        </div>
                        <div>
                            <label class="block text-gray-700 mb-1">LinkedIn Profile</label>
                            <input type="url" id="linkedin" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="https://linkedin.com/in/username">
                        </div>
                        <div>
                            <label class="block text-gray-700 mb-1">GitHub/Portfolio</label>
                            <input type="url" id="portfolio" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="https://github.com/username">
                        </div>
                    </div>
                </div>

                <div class="bg-white rounded-xl shadow-md p-6 mb-6 section-highlight">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-briefcase text-blue-500 mr-2"></i> Work Experience
                    </h2>
                    <div id="experience-container">
                        <div class="experience-item mb-6 p-4 border rounded-lg">
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Job Title*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-title" placeholder="Senior Developer">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">Company Name*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-company" placeholder="Tech Corp Inc.">
                                </div>
                            </div>
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Start Date*</label>
                                    <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-start">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">End Date (or present)</label>
                                    <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-end">
                                    <div class="flex items-center mt-2">
                                        <input type="checkbox" class="mr-2 experience-current"> 
                                        <span class="text-sm text-gray-600">I currently work here</span>
                                    </div>
                                </div>
                            </div>
                            <div>
                                <label class="block text-gray-700 mb-1">Responsibilities & Achievements*</label>
                                <textarea class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-description" rows="3" placeholder="Describe your responsibilities and key achievements using action verbs (e.g., Developed, Led, Optimized)"></textarea>
                                <p class="text-xs text-gray-500 mt-1">Use bullet points for better ATS parsing. Example: "• Led a team of 5 developers to deliver a SaaS product"</p>
                            </div>
                            <button class="remove-experience mt-2 text-red-500 text-sm flex items-center">
                                <i class="fas fa-trash mr-1"></i> Remove this experience
                            </button>
                        </div>
                    </div>
                    <button id="add-experience" class="bg-blue-50 text-blue-600 px-4 py-2 rounded-lg hover:bg-blue-100 transition flex items-center">
                        <i class="fas fa-plus mr-2"></i> Add Another Experience
                    </button>
                </div>

                <div class="bg-white rounded-xl shadow-md p-6 mb-6 section-highlight">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-graduation-cap text-blue-500 mr-2"></i> Education
                    </h2>
                    <div id="education-container">
                        <div class="education-item mb-6 p-4 border rounded-lg">
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Degree*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-degree" placeholder="Bachelor of Science in Computer Science">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">Institution*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-institution" placeholder="University of Technology">
                                </div>
                            </div>
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Start Date*</label>
                                    <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-start">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">End Date (or expected)</label>
                                    <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-end">
                                    <div class="flex items-center mt-2">
                                        <input type="checkbox" class="mr-2 education-current"> 
                                        <span class="text-sm text-gray-600">Currently studying here</span>
                                    </div>
                                </div>
                            </div>
                            <div>
                                <label class="block text-gray-700 mb-1">Notable Achievements (optional)</label>
                                <textarea class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-achievements" rows="2" placeholder="Honors, awards, relevant coursework"></textarea>
                            </div>
                            <button class="remove-education mt-2 text-red-500 text-sm flex items-center">
                                <i class="fas fa-trash mr-1"></i> Remove this education
                            </button>
                        </div>
                    </div>
                    <button id="add-education" class="bg-blue-50 text-blue-600 px-4 py-2 rounded-lg hover:bg-blue-100 transition flex items-center">
                        <i class="fas fa-plus mr-2"></i> Add Another Education
                    </button>
                </div>

                <div class="bg-white rounded-xl shadow-md p-6 mb-6 section-highlight">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-code text-blue-500 mr-2"></i> Skills
                    </h2>
                    <div id="skills-container">
                        <div class="skill-item mb-4 p-4 border rounded-lg">
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Skill Name*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 skill-name" placeholder="JavaScript">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">Skill Level*</label>
                                    <select class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 skill-level">
                                        <option value="beginner">Beginner</option>
                                        <option value="intermediate">Intermediate</option>
                                        <option value="advanced" selected>Advanced</option>
                                        <option value="expert">Expert</option>
                                    </select>
                                </div>
                            </div>
                            <button class="remove-skill text-red-500 text-sm flex items-center">
                                <i class="fas fa-trash mr-1"></i> Remove this skill
                            </button>
                        </div>
                    </div>
                    <button id="add-skill" class="bg-blue-50 text-blue-600 px-4 py-2 rounded-lg hover:bg-blue-100 transition flex items-center">
                        <i class="fas fa-plus mr-2"></i> Add Another Skill
                    </button>
                    <div class="mt-4">
                        <label class="block text-gray-700 mb-1">Additional Skills (comma separated)</label>
                        <textarea id="additional-skills" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" rows="2" placeholder="Project Management, Public Speaking, etc."></textarea>
                        <p class="text-xs text-gray-500 mt-1">These will appear as tags in your resume</p>
                    </div>
                </div>

                <div class="bg-white rounded-xl shadow-md p-6 mb-6 section-highlight">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-project-diagram text-blue-500 mr-2"></i> Projects
                    </h2>
                    <div id="projects-container">
                        <div class="project-item mb-6 p-4 border rounded-lg">
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Project Name*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 project-name" placeholder="E-commerce Website">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">Project URL (optional)</label>
                                    <input type="url" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 project-url" placeholder="https://example.com">
                                </div>
                            </div>
                            <div>
                                <label class="block text-gray-700 mb-1">Project Description*</label>
                                <textarea class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 project-description" rows="3" placeholder="Describe the project, technologies used, and your role"></textarea>
                                <p class="text-xs text-gray-500 mt-1">Use action verbs and quantify results when possible (e.g., "Increased performance by 30%")</p>
                            </div>
                            <button class="remove-project mt-2 text-red-500 text-sm flex items-center">
                                <i class="fas fa-trash mr-1"></i> Remove this project
                            </button>
                        </div>
                    </div>
                    <button id="add-project" class="bg-blue-50 text-blue-600 px-4 py-2 rounded-lg hover:bg-blue-100 transition flex items-center">
                        <i class="fas fa-plus mr-2"></i> Add Another Project
                    </button>
                </div>

                <div class="bg-white rounded-xl shadow-md p-6 mb-6 section-highlight">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-certificate text-blue-500 mr-2"></i> Certifications
                    </h2>
                    <div id="certifications-container">
                        <div class="certification-item mb-4 p-4 border rounded-lg">
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Certification Name*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 certification-name" placeholder="AWS Certified Solutions Architect">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">Issuing Organization*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 certification-org" placeholder="Amazon Web Services">
                                </div>
                            </div>
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Date Earned*</label>
                                    <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 certification-date">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">Credential ID (optional)</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 certification-id" placeholder="Credential ID or URL">
                                </div>
                            </div>
                            <button class="remove-certification mt-2 text-red-500 text-sm flex items-center">
                                <i class="fas fa-trash mr-1"></i> Remove this certification
                            </button>
                        </div>
                    </div>
                    <button id="add-certification" class="bg-blue-50 text-blue-600 px-4 py-2 rounded-lg hover:bg-blue-100 transition flex items-center">
                        <i class="fas fa-plus mr-2"></i> Add Another Certification
                    </button>
                </div>

                <div class="bg-white rounded-xl shadow-md p-6 mb-6 section-highlight">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-language text-blue-500 mr-2"></i> Languages
                    </h2>
                    <div id="languages-container">
                        <div class="language-item mb-4 p-4 border rounded-lg">
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                                <div>
                                    <label class="block text-gray-700 mb-1">Language*</label>
                                    <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 language-name" placeholder="English">
                                </div>
                                <div>
                                    <label class="block text-gray-700 mb-1">Proficiency Level*</label>
                                    <select class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 language-level">
                                        <option value="native">Native</option>
                                        <option value="fluent" selected>Fluent</option>
                                        <option value="intermediate">Intermediate</option>
                                        <option value="basic">Basic</option>
                                    </select>
                                </div>
                            </div>
                            <button class="remove-language mt-2 text-red-500 text-sm flex items-center">
                                <i class="fas fa-trash mr-1"></i> Remove this language
                            </button>
                        </div>
                    </div>
                    <button id="add-language" class="bg-blue-50 text-blue-600 px-4 py-2 rounded-lg hover:bg-blue-100 transition flex items-center">
                        <i class="fas fa-plus mr-2"></i> Add Another Language
                    </button>
                </div>

                <div class="bg-white rounded-xl shadow-md p-6 mb-6 section-highlight">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-pencil-alt text-blue-500 mr-2"></i> Customize Resume
                    </h2>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div>
                            <label class="block text-gray-700 mb-2">Resume Template</label>
                            <div class="grid grid-cols-2 gap-4">
                                <div>
                                    <input type="radio" id="template-modern" name="template" value="modern" class="hidden peer" checked>
                                    <label for="template-modern" class="block p-4 border rounded-lg cursor-pointer peer-checked:border-blue-500 peer-checked:ring-2 peer-checked:ring-blue-200">
                                        <div class="h-24 bg-gradient-to-r from-blue-100 to-blue-50 rounded"></div>
                                        <p class="text-center mt-2">Modern</p>
                                    </label>
                                </div>
                                <div>
                                    <input type="radio" id="template-classic" name="template" value="classic" class="hidden peer">
                                    <label for="template-classic" class="block p-4 border rounded-lg cursor-pointer peer-checked:border-blue-500 peer-checked:ring-2 peer-checked:ring-blue-200">
                                        <div class="h-24 bg-gradient-to-r from-gray-100 to-gray-50 rounded"></div>
                                        <p class="text-center mt-2">Classic</p>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div>
                            <label class="block text-gray-700 mb-2">Color Scheme</label>
                            <div class="flex flex-wrap gap-2">
                                <input type="radio" id="color-blue" name="color" value="blue" class="hidden peer" checked>
                                <label for="color-blue" class="w-10 h-10 rounded-full bg-blue-500 cursor-pointer peer-checked:ring-2 peer-checked:ring-blue-300"></label>
                                
                                <input type="radio" id="color-green" name="color" value="green" class="hidden peer">
                                <label for="color-green" class="w-10 h-10 rounded-full bg-green-500 cursor-pointer peer-checked:ring-2 peer-checked:ring-green-300"></label>
                                
                                <input type="radio" id="color-purple" name="color" value="purple" class="hidden peer">
                                <label for="color-purple" class="w-10 h-10 rounded-full bg-purple-500 cursor-pointer peer-checked:ring-2 peer-checked:ring-purple-300"></label>
                                
                                <input type="radio" id="color-red" name="color" value="red" class="hidden peer">
                                <label for="color-red" class="w-10 h-10 rounded-full bg-red-500 cursor-pointer peer-checked:ring-2 peer-checked:ring-red-300"></label>
                                
                                <input type="radio" id="color-indigo" name="color" value="indigo" class="hidden peer">
                                <label for="color-indigo" class="w-10 h-10 rounded-full bg-indigo-500 cursor-pointer peer-checked:ring-2 peer-checked:ring-indigo-300"></label>
                            </div>
                        </div>
                    </div>
                    <div class="mt-6">
                        <label class="block text-gray-700 mb-2">Professional Summary</label>
                        <textarea id="professional-summary" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" rows="4" placeholder="A brief summary of your professional background, skills, and career objectives (3-5 sentences recommended)"></textarea>
                        <p class="text-xs text-gray-500 mt-1">This will appear at the top of your resume. Include relevant keywords for ATS.</p>
                    </div>
                </div>
            </div>

            <!-- Preview Section -->
            <div class="lg:w-1/3">
                <div class="sticky top-4">
                    <div class="bg-white rounded-xl shadow-lg p-6 mb-6">
                        <h2 class="text-2xl font-semibold text-gray-800 mb-4 flex items-center">
                            <i class="fas fa-eye text-blue-500 mr-2"></i> Resume Preview
                        </h2>
                        <div class="flex justify-between mb-4">
                            <div class="text-sm">
                                <span class="font-medium">ATS Score:</span>
                                <span id="ats-score" class="ml-2 px-2 py-1 bg-blue-100 text-blue-800 rounded-full text-xs">Calculating...</span>
                            </div>
                            <div class="text-sm">
                                <span class="font-medium">Keywords:</span>
                                <span id="keyword-count" class="ml-2 px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs">0</span>
                            </div>
                        </div>
                        
                        <div id="resume-preview" class="resume-paper p-6 rounded-lg border border-gray-200 overflow-y-auto" style="height: 500px;">
                            <!-- Resume content will be dynamically inserted here -->
                            <div class="text-center py-12 text-gray-400">
                                <i class="fas fa-file-alt text-4xl mb-2"></i>
                                <p>Your resume preview will appear here</p>
                            </div>
                        </div>
                        
                        <div class="mt-6 grid grid-cols-1 gap-3">
                            <button id="download-pdf" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-3 rounded-lg font-medium flex items-center justify-center">
                                <i class="fas fa-file-pdf mr-2"></i> Download as PDF
                            </button>
                            <button id="download-doc" class="bg-green-600 hover:bg-green-700 text-white px-4 py-3 rounded-lg font-medium flex items-center justify-center">
                                <i class="fas fa-file-word mr-2"></i> Download as DOC
                            </button>
                            <button id="download-html" class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-3 rounded-lg font-medium flex items-center justify-center">
                                <i class="fas fa-code mr-2"></i> Download as HTML
                            </button>
                        </div>
                        
                        <div class="mt-6 bg-yellow-50 border-l-4 border-yellow-400 p-4">
                            <div class="flex">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-lightbulb text-yellow-400"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="text-sm text-yellow-700">
                                        <span class="font-medium">ATS Tip:</span> Use specific job titles, skills from the job description, and quantify achievements for better results.
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // DOM Elements
        const fullNameInput = document.getElementById('full-name');
        const professionalTitleInput = document.getElementById('professional-title');
        const emailInput = document.getElementById('email');
        const phoneInput = document.getElementById('phone');
        const locationInput = document.getElementById('location');
        const linkedinInput = document.getElementById('linkedin');
        const portfolioInput = document.getElementById('portfolio');
        const professionalSummaryInput = document.getElementById('professional-summary');
        const additionalSkillsInput = document.getElementById('additional-skills');
        const resumePreview = document.getElementById('resume-preview');
        const completionProgress = document.getElementById('completion-progress');
        const completionText = document.getElementById('completion-text');
        const atsScoreElement = document.getElementById('ats-score');
        const keywordCountElement = document.getElementById('keyword-count');
        const downloadPdfBtn = document.getElementById('download-pdf');
        const downloadDocBtn = document.getElementById('download-doc');
        const downloadHtmlBtn = document.getElementById('download-html');

        // Add event listeners to all inputs to update the preview
        document.querySelectorAll('input, textarea, select').forEach(input => {
            input.addEventListener('input', updateResumePreview);
        });

        // Template and color selection
        document.querySelectorAll('input[name="template"], input[name="color"]').forEach(input => {
            input.addEventListener('change', updateResumePreview);
        });

        // Download buttons
        downloadPdfBtn.addEventListener('click', downloadAsPDF);
        downloadDocBtn.addEventListener('click', downloadAsDOC);
        downloadHtmlBtn.addEventListener('click', downloadAsHTML);

        // Initialize the resume preview
        updateResumePreview();

        // Function to update the resume preview
        function updateResumePreview() {
            // Calculate completion percentage
            const totalFields = document.querySelectorAll('input[required], textarea[required], select[required]').length;
            let filledFields = 0;
            
            document.querySelectorAll('input[required], textarea[required], select[required]').forEach(field => {
                if (field.value.trim() !== '') filledFields++;
            });
            
            const completionPercentage = Math.round((filledFields / totalFields) * 100);
            completionProgress.style.width = `${completionPercentage}%`;
            completionText.textContent = `${completionPercentage}% Complete`;
            
            // Update ATS score (simplified for this example)
            const atsScore = Math.min(100, completionPercentage + Math.floor(Math.random() * 20));
            atsScoreElement.textContent = `${atsScore}/100`;
            
            if (atsScore > 80) {
                atsScoreElement.className = 'ml-2 px-2 py-1 bg-green-100 text-green-800 rounded-full text-xs';
            } else if (atsScore > 60) {
                atsScoreElement.className = 'ml-2 px-2 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs';
            } else {
                atsScoreElement.className = 'ml-2 px-2 py-1 bg-red-100 text-red-800 rounded-full text-xs';
            }
            
            // Count keywords (simplified for this example)
            const keywordCount = professionalSummaryInput.value.split(' ').length;
            keywordCountElement.textContent = keywordCount;
            
            // Get selected template and color
            const selectedTemplate = document.querySelector('input[name="template"]:checked').value;
            const selectedColor = document.querySelector('input[name="color"]:checked').value;
            
            // Generate the resume HTML based on the selected template
            let resumeHTML = '';
            
            if (selectedTemplate === 'modern') {
                resumeHTML = generateModernResume(selectedColor);
            } else {
                resumeHTML = generateClassicResume(selectedColor);
            }
            
            resumePreview.innerHTML = resumeHTML;
        }

        // Function to generate modern resume template
        function generateModernResume(color) {
            const colorClasses = {
                blue: { bg: 'bg-blue-600', text: 'text-blue-600', light: 'bg-blue-50', border: 'border-blue-200' },
                green: { bg: 'bg-green-600', text: 'text-green-600', light: 'bg-green-50', border: 'border-green-200' },
                purple: { bg: 'bg-purple-600', text: 'text-purple-600', light: 'bg-purple-50', border: 'border-purple-200' },
                red: { bg: 'bg-red-600', text: 'text-red-600', light: 'bg-red-50', border: 'border-red-200' },
                indigo: { bg: 'bg-indigo-600', text: 'text-indigo-600', light: 'bg-indigo-50', border: 'border-indigo-200' }
            };
            
            const colorScheme = colorClasses[color] || colorClasses.blue;
            
            // Personal Information
            const name = fullNameInput.value || 'Your Name';
            const title = professionalTitleInput.value || 'Professional Title';
            const email = emailInput.value || '[email protected]';
            const phone = phoneInput.value || '(123) 456-7890';
            const location = locationInput.value || 'City, Country';
            const linkedin = linkedinInput.value || '';
            const portfolio = portfolioInput.value || '';
            const summary = professionalSummaryInput.value || 'Professional summary highlighting your experience, skills, and achievements. Keep it concise (3-5 sentences).';
            
            // Generate contact info HTML
            let contactHTML = `
                <div class="mb-1"><i class="fas fa-envelope mr-2 ${colorScheme.text}"></i> ${email}</div>
                <div class="mb-1"><i class="fas fa-phone mr-2 ${colorScheme.text}"></i> ${phone}</div>
                <div class="mb-1"><i class="fas fa-map-marker-alt mr-2 ${colorScheme.text}"></i> ${location}</div>
            `;
            
            if (linkedin) {
                contactHTML += `<div class="mb-1"><i class="fab fa-linkedin mr-2 ${colorScheme.text}"></i> ${linkedin.replace('https://', '').replace('www.', '')}</div>`;
            }
            
            if (portfolio) {
                contactHTML += `<div class="mb-1"><i class="fas fa-globe mr-2 ${colorScheme.text}"></i> ${portfolio.replace('https://', '').replace('www.', '')}</div>`;
            }
            
            // Work Experience
            let experienceHTML = '';
            document.querySelectorAll('.experience-item').forEach((exp, index) => {
                const title = exp.querySelector('.experience-title').value || 'Job Title';
                const company = exp.querySelector('.experience-company').value || 'Company Name';
                const start = exp.querySelector('.experience-start').value || 'YYYY-MM';
                const end = exp.querySelector('.experience-current').checked ? 'Present' : (exp.querySelector('.experience-end').value || 'YYYY-MM');
                const description = exp.querySelector('.experience-description').value || 'Responsibilities and achievements in this role.';
                
                // Format description with bullet points
                const formattedDescription = description.split('\n')
                    .filter(line => line.trim() !== '')
                    .map(line => line.startsWith('•') ? line : `• ${line}`)
                    .join('<br>');
                
                experienceHTML += `
                    <div class="mb-6 ${index > 0 ? 'mt-6' : ''}">
                        <h3 class="text-lg font-semibold">${title}</h3>
                        <div class="flex justify-between items-center mb-1">
                            <span class="text-gray-600">${company}</span>
                            <span class="text-sm text-gray-500">${start} - ${end}</span>
                        </div>
                        <div class="text-gray-700 mt-2">${formattedDescription}</div>
                    </div>
                `;
            });
            
            if (!experienceHTML) {
                experienceHTML = '<div class="text-gray-500 italic">Add your work experience</div>';
            }
            
            // Education
            let educationHTML = '';
            document.querySelectorAll('.education-item').forEach((edu, index) => {
                const degree = edu.querySelector('.education-degree').value || 'Degree';
                const institution = edu.querySelector('.education-institution').value || 'Institution';
                const start = edu.querySelector('.education-start').value || 'YYYY-MM';
                const end = edu.querySelector('.education-current').checked ? 'Present' : (edu.querySelector('.education-end').value || 'YYYY-MM');
                const achievements = edu.querySelector('.education-achievements').value || '';
                
                educationHTML += `
                    <div class="mb-4 ${index > 0 ? 'mt-4' : ''}">
                        <h3 class="text-lg font-semibold">${degree}</h3>
                        <div class="flex justify-between items-center mb-1">
                            <span class="text-gray-600">${institution}</span>
                            <span class="text-sm text-gray-500">${start} - ${end}</span>
                        </div>
                        ${achievements ? `<div class="text-gray-700 mt-1">${achievements.replace(/\n/g, '<br>')}</div>` : ''}
                    </div>
                `;
            });
            
            if (!educationHTML) {
                educationHTML = '<div class="text-gray-500 italic">Add your education</div>';
            }
            
            // Skills
            let skillsHTML = '';
            document.querySelectorAll('.skill-item').forEach(skill => {
                const name = skill.querySelector('.skill-name').value || 'Skill';
                const level = skill.querySelector('.skill-level').value || 'advanced';
                
                const levelMap = {
                    beginner: '25%',
                    intermediate: '50%',
                    advanced: '75%',
                    expert: '100%'
                };
                
                skillsHTML += `
                    <div class="mb-3">
                        <div class="flex justify-between items-center mb-1">
                            <span class="font-medium">${name}</span>
                            <span class="text-xs text-gray-500 capitalize">${level}</span>
                        </div>
                        <div class="relative skill-level">
                            <div class="skill-level-fill" style="width: ${levelMap[level]}; background-color: ${colorScheme.text.replace('text-', 'bg-')}"></div>
                        </div>
                    </div>
                `;
            });
            
            // Additional skills
            const additionalSkills = additionalSkillsInput.value;
            if (additionalSkills) {
                skillsHTML += `
                    <div class="mt-4">
                        <h4 class="font-medium mb-2">Additional Skills</h4>
                        <div class="flex flex-wrap gap-2">
                            ${additionalSkills.split(',').map(skill => `
                                <span class="text-xs px-3 py-1 rounded-full ${colorScheme.light} ${colorScheme.text}">${skill.trim()}</span>
                            `).join('')}
                        </div>
                    </div>
                `;
            }
            
            if (!skillsHTML) {
                skillsHTML = '<div class="text-gray-500 italic">Add your skills</div>';
            }
            
            // Projects
            let projectsHTML = '';
            document.querySelectorAll('.project-item').forEach(project => {
                const name = project.querySelector('.project-name').value || 'Project Name';
                const url = project.querySelector('.project-url').value || '';
                const description = project.querySelector('.project-description').value || 'Project description and your role.';
                
                projectsHTML += `
                    <div class="mb-4">
                        <h3 class="font-semibold">${name}</h3>
                        ${url ? `<div class="text-sm mb-1"><i class="fas fa-link mr-1 ${colorScheme.text}"></i> <a href="${url}" class="text-blue-600 hover:underline">${url.replace('https://', '').replace('www.', '')}</a></div>` : ''}
                        <div class="text-gray-700">${description.replace(/\n/g, '<br>')}</div>
                    </div>
                `;
            });
            
            if (!projectsHTML) {
                projectsHTML = '<div class="text-gray-500 italic">Add your projects</div>';
            }
            
            // Certifications
            let certificationsHTML = '';
            document.querySelectorAll('.certification-item').forEach(cert => {
                const name = cert.querySelector('.certification-name').value || 'Certification Name';
                const org = cert.querySelector('.certification-org').value || 'Issuing Organization';
                const date = cert.querySelector('.certification-date').value || 'YYYY-MM';
                const id = cert.querySelector('.certification-id').value || '';
                
                certificationsHTML += `
                    <div class="mb-3">
                        <h3 class="font-semibold">${name}</h3>
                        <div class="flex justify-between items-center">
                            <span class="text-gray-600">${org}</span>
                            <span class="text-sm text-gray-500">${date}</span>
                        </div>
                        ${id ? `<div class="text-xs mt-1 text-gray-500">${id}</div>` : ''}
                    </div>
                `;
            });
            
            if (!certificationsHTML) {
                certificationsHTML = '<div class="text-gray-500 italic">Add your certifications</div>';
            }
            
            // Languages
            let languagesHTML = '';
            document.querySelectorAll('.language-item').forEach(lang => {
                const name = lang.querySelector('.language-name').value || 'Language';
                const level = lang.querySelector('.language-level').value || 'fluent';
                
                const levelText = {
                    native: 'Native',
                    fluent: 'Fluent',
                    intermediate: 'Intermediate',
                    basic: 'Basic'
                };
                
                languagesHTML += `
                    <div class="flex justify-between items-center mb-2">
                        <span class="font-medium">${name}</span>
                        <span class="text-sm text-gray-500">${levelText[level]}</span>
                    </div>
                `;
            });
            
            if (!languagesHTML) {
                languagesHTML = '<div class="text-gray-500 italic">Add your languages</div>';
            }
            
            // Generate the full resume HTML
            return `
                <div class="resume-paper p-8">
                    <div class="${colorScheme.bg} text-white p-6 rounded-lg mb-6">
                        <h1 class="text-3xl font-bold mb-1">${name}</h1>
                        <h2 class="text-xl">${title}</h2>
                    </div>
                    
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
                        <div class="md:col-span-2">
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Professional Summary</h2>
                                <p class="text-gray-700">${summary.replace(/\n/g, '<br>')}</p>
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Work Experience</h2>
                                ${experienceHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Projects</h2>
                                ${projectsHTML}
                            </div>
                        </div>
                        
                        <div>
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Contact</h2>
                                ${contactHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Skills</h2>
                                ${skillsHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Education</h2>
                                ${educationHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Certifications</h2>
                                ${certificationsHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Languages</h2>
                                ${languagesHTML}
                            </div>
                        </div>
                    </div>
                </div>
            `;
        }

        // Function to generate classic resume template
        function generateClassicResume(color) {
            const colorClasses = {
                blue: { text: 'text-blue-600', border: 'border-blue-200' },
                green: { text: 'text-green-600', border: 'border-green-200' },
                purple: { text: 'text-purple-600', border: 'border-purple-200' },
                red: { text: 'text-red-600', border: 'border-red-200' },
                indigo: { text: 'text-indigo-600', border: 'border-indigo-200' }
            };
            
            const colorScheme = colorClasses[color] || colorClasses.blue;
            
            // Personal Information
            const name = fullNameInput.value || 'Your Name';
            const title = professionalTitleInput.value || 'Professional Title';
            const email = emailInput.value || '[email protected]';
            const phone = phoneInput.value || '(123) 456-7890';
            const location = locationInput.value || 'City, Country';
            const linkedin = linkedinInput.value || '';
            const portfolio = portfolioInput.value || '';
            const summary = professionalSummaryInput.value || 'Professional summary highlighting your experience, skills, and achievements. Keep it concise (3-5 sentences).';
            
            // Generate contact info HTML
            let contactHTML = `
                <div class="flex flex-wrap gap-4 text-sm">
                    <div><i class="fas fa-envelope mr-1 ${colorScheme.text}"></i> ${email}</div>
                    <div><i class="fas fa-phone mr-1 ${colorScheme.text}"></i> ${phone}</div>
                    <div><i class="fas fa-map-marker-alt mr-1 ${colorScheme.text}"></i> ${location}</div>
                    ${linkedin ? `<div><i class="fab fa-linkedin mr-1 ${colorScheme.text}"></i> ${linkedin.replace('https://', '').replace('www.', '')}</div>` : ''}
                    ${portfolio ? `<div><i class="fas fa-globe mr-1 ${colorScheme.text}"></i> ${portfolio.replace('https://', '').replace('www.', '')}</div>` : ''}
                </div>
            `;
            
            // Work Experience
            let experienceHTML = '';
            document.querySelectorAll('.experience-item').forEach((exp, index) => {
                const title = exp.querySelector('.experience-title').value || 'Job Title';
                const company = exp.querySelector('.experience-company').value || 'Company Name';
                const start = exp.querySelector('.experience-start').value || 'YYYY-MM';
                const end = exp.querySelector('.experience-current').checked ? 'Present' : (exp.querySelector('.experience-end').value || 'YYYY-MM');
                const description = exp.querySelector('.experience-description').value || 'Responsibilities and achievements in this role.';
                
                // Format description with bullet points
                const formattedDescription = description.split('\n')
                    .filter(line => line.trim() !== '')
                    .map(line => line.startsWith('•') ? line : `• ${line}`)
                    .join('<br>');
                
                experienceHTML += `
                    <div class="mb-4 ${index > 0 ? 'mt-4' : ''}">
                        <div class="flex justify-between items-center">
                            <h3 class="font-semibold">${title}</h3>
                            <span class="text-sm text-gray-500">${start} - ${end}</span>
                        </div>
                        <div class="text-gray-600 mb-1">${company}</div>
                        <div class="text-gray-700 ml-4">${formattedDescription}</div>
                    </div>
                `;
            });
            
            if (!experienceHTML) {
                experienceHTML = '<div class="text-gray-500 italic">Add your work experience</div>';
            }
            
            // Education
            let educationHTML = '';
            document.querySelectorAll('.education-item').forEach((edu, index) => {
                const degree = edu.querySelector('.education-degree').value || 'Degree';
                const institution = edu.querySelector('.education-institution').value || 'Institution';
                const start = edu.querySelector('.education-start').value || 'YYYY-MM';
                const end = edu.querySelector('.education-current').checked ? 'Present' : (edu.querySelector('.education-end').value || 'YYYY-MM');
                const achievements = edu.querySelector('.education-achievements').value || '';
                
                educationHTML += `
                    <div class="mb-3 ${index > 0 ? 'mt-3' : ''}">
                        <div class="flex justify-between items-center">
                            <h3 class="font-semibold">${degree}</h3>
                            <span class="text-sm text-gray-500">${start} - ${end}</span>
                        </div>
                        <div class="text-gray-600">${institution}</div>
                        ${achievements ? `<div class="text-gray-700 mt-1">${achievements.replace(/\n/g, '<br>')}</div>` : ''}
                    </div>
                `;
            });
            
            if (!educationHTML) {
                educationHTML = '<div class="text-gray-500 italic">Add your education</div>';
            }
            
            // Skills
            let skillsHTML = '';
            document.querySelectorAll('.skill-item').forEach(skill => {
                const name = skill.querySelector('.skill-name').value || 'Skill';
                const level = skill.querySelector('.skill-level').value || 'advanced';
                
                skillsHTML += `
                    <div class="mb-1">
                        <span class="font-medium">${name}</span>
                        <span class="text-xs text-gray-500 ml-1 capitalize">(${level})</span>
                    </div>
                `;
            });
            
            // Additional skills
            const additionalSkills = additionalSkillsInput.value;
            if (additionalSkills) {
                skillsHTML += `
                    <div class="mt-2">
                        <div class="text-sm font-medium mb-1">Additional:</div>
                        <div class="text-sm text-gray-700">${additionalSkills}</div>
                    </div>
                `;
            }
            
            if (!skillsHTML) {
                skillsHTML = '<div class="text-gray-500 italic">Add your skills</div>';
            }
            
            // Projects
            let projectsHTML = '';
            document.querySelectorAll('.project-item').forEach(project => {
                const name = project.querySelector('.project-name').value || 'Project Name';
                const url = project.querySelector('.project-url').value || '';
                const description = project.querySelector('.project-description').value || 'Project description and your role.';
                
                projectsHTML += `
                    <div class="mb-3">
                        <h3 class="font-semibold">${name}</h3>
                        ${url ? `<div class="text-sm mb-1"><i class="fas fa-link mr-1 ${colorScheme.text}"></i> <a href="${url}" class="text-blue-600 hover:underline">${url.replace('https://', '').replace('www.', '')}</a></div>` : ''}
                        <div class="text-gray-700">${description.replace(/\n/g, '<br>')}</div>
                    </div>
                `;
            });
            
            if (!projectsHTML) {
                projectsHTML = '<div class="text-gray-500 italic">Add your projects</div>';
            }
            
            // Certifications
            let certificationsHTML = '';
            document.querySelectorAll('.certification-item').forEach(cert => {
                const name = cert.querySelector('.certification-name').value || 'Certification Name';
                const org = cert.querySelector('.certification-org').value || 'Issuing Organization';
                const date = cert.querySelector('.certification-date').value || 'YYYY-MM';
                const id = cert.querySelector('.certification-id').value || '';
                
                certificationsHTML += `
                    <div class="mb-2">
                        <h3 class="font-semibold">${name}</h3>
                        <div class="flex justify-between items-center">
                            <span class="text-gray-600">${org}</span>
                            <span class="text-sm text-gray-500">${date}</span>
                        </div>
                        ${id ? `<div class="text-xs mt-1 text-gray-500">${id}</div>` : ''}
                    </div>
                `;
            });
            
            if (!certificationsHTML) {
                certificationsHTML = '<div class="text-gray-500 italic">Add your certifications</div>';
            }
            
            // Languages
            let languagesHTML = '';
            document.querySelectorAll('.language-item').forEach(lang => {
                const name = lang.querySelector('.language-name').value || 'Language';
                const level = lang.querySelector('.language-level').value || 'fluent';
                
                const levelText = {
                    native: 'Native',
                    fluent: 'Fluent',
                    intermediate: 'Intermediate',
                    basic: 'Basic'
                };
                
                languagesHTML += `
                    <div class="flex justify-between items-center mb-1">
                        <span class="font-medium">${name}</span>
                        <span class="text-sm text-gray-500">${levelText[level]}</span>
                    </div>
                `;
            });
            
            if (!languagesHTML) {
                languagesHTML = '<div class="text-gray-500 italic">Add your languages</div>';
            }
            
            // Generate the full resume HTML
            return `
                <div class="resume-paper p-8">
                    <div class="text-center mb-6">
                        <h1 class="text-3xl font-bold mb-1">${name}</h1>
                        <h2 class="text-xl text-gray-600 mb-3">${title}</h2>
                        ${contactHTML}
                    </div>
                    
                    <div class="mb-6">
                        <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Summary</h2>
                        <p class="text-gray-700">${summary.replace(/\n/g, '<br>')}</p>
                    </div>
                    
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                        <div>
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Experience</h2>
                                ${experienceHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Projects</h2>
                                ${projectsHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Education</h2>
                                ${educationHTML}
                            </div>
                        </div>
                        
                        <div>
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Skills</h2>
                                ${skillsHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Certifications</h2>
                                ${certificationsHTML}
                            </div>
                            
                            <div class="mb-6">
                                <h2 class="text-xl font-semibold mb-3 ${colorScheme.text} border-b ${colorScheme.border} pb-1">Languages</h2>
                                ${languagesHTML}
                            </div>
                        </div>
                    </div>
                </div>
            `;
        }

        // Function to add a new experience section
        document.getElementById('add-experience').addEventListener('click', function() {
            const container = document.getElementById('experience-container');
            const newItem = document.createElement('div');
            newItem.className = 'experience-item mb-6 p-4 border rounded-lg fade-in';
            newItem.innerHTML = `
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                    <div>
                        <label class="block text-gray-700 mb-1">Job Title*</label>
                        <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-title" placeholder="Senior Developer">
                    </div>
                    <div>
                        <label class="block text-gray-700 mb-1">Company Name*</label>
                        <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-company" placeholder="Tech Corp Inc.">
                    </div>
                </div>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                    <div>
                        <label class="block text-gray-700 mb-1">Start Date*</label>
                        <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-start">
                    </div>
                    <div>
                        <label class="block text-gray-700 mb-1">End Date (or present)</label>
                        <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-end">
                        <div class="flex items-center mt-2">
                            <input type="checkbox" class="mr-2 experience-current"> 
                            <span class="text-sm text-gray-600">I currently work here</span>
                        </div>
                    </div>
                </div>
                <div>
                    <label class="block text-gray-700 mb-1">Responsibilities & Achievements*</label>
                    <textarea class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 experience-description" rows="3" placeholder="Describe your responsibilities and key achievements using action verbs (e.g., Developed, Led, Optimized)"></textarea>
                    <p class="text-xs text-gray-500 mt-1">Use bullet points for better ATS parsing. Example: "• Led a team of 5 developers to deliver a SaaS product"</p>
                </div>
                <button class="remove-experience mt-2 text-red-500 text-sm flex items-center">
                    <i class="fas fa-trash mr-1"></i> Remove this experience
                </button>
            `;
            
            container.appendChild(newItem);
            
            // Add event listeners to new inputs
            newItem.querySelectorAll('input, textarea, select').forEach(input => {
                input.addEventListener('input', updateResumePreview);
            });
            
            // Add event listener to remove button
            newItem.querySelector('.remove-experience').addEventListener('click', function() {
                newItem.classList.add('fade-out');
                setTimeout(() => {
                    container.removeChild(newItem);
                    updateResumePreview();
                }, 300);
            });
            
            // Add event listener to current job checkbox
            newItem.querySelector('.experience-current').addEventListener('change', function() {
                const endDateInput = newItem.querySelector('.experience-end');
                if (this.checked) {
                    endDateInput.disabled = true;
                    endDateInput.value = '';
                } else {
                    endDateInput.disabled = false;
                }
                updateResumePreview();
            });
            
            updateResumePreview();
        });

        // Function to add a new education section
        document.getElementById('add-education').addEventListener('click', function() {
            const container = document.getElementById('education-container');
            const newItem = document.createElement('div');
            newItem.className = 'education-item mb-6 p-4 border rounded-lg fade-in';
            newItem.innerHTML = `
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                    <div>
                        <label class="block text-gray-700 mb-1">Degree*</label>
                        <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-degree" placeholder="Bachelor of Science in Computer Science">
                    </div>
                    <div>
                        <label class="block text-gray-700 mb-1">Institution*</label>
                        <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-institution" placeholder="University of Technology">
                    </div>
                </div>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                    <div>
                        <label class="block text-gray-700 mb-1">Start Date*</label>
                        <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-start">
                    </div>
                    <div>
                        <label class="block text-gray-700 mb-1">End Date (or expected)</label>
                        <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-end">
                        <div class="flex items-center mt-2">
                            <input type="checkbox" class="mr-2 education-current"> 
                            <span class="text-sm text-gray-600">Currently studying here</span>
                        </div
                    </div>
                </div>
                <div>
                    <label class="block text-gray-700 mb-1">Notable Achievements (optional)</label>
                    <textarea class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 education-achievements" rows="2" placeholder="Honors, awards, relevant coursework"></textarea>
                </div>
                <button class="remove-education mt-2 text-red-500 text-sm flex items-center">
                    <i class="fas fa-trash mr-1"></i> Remove this education
                </button>
            `;
            
            container.appendChild(newItem);
            
            // Add event listeners to new inputs
            newItem.querySelectorAll('input, textarea, select').forEach(input => {
                input.addEventListener('input', updateResumePreview);
            });
            
            // Add event listener to remove button
            newItem.querySelector('.remove-education').addEventListener('click', function() {
                newItem.classList.add('fade-out');
                setTimeout(() => {
                    container.removeChild(newItem);
                    updateResumePreview();
                }, 300);
            });
            
            // Add event listener to current study checkbox
            newItem.querySelector('.education-current').addEventListener('change', function() {
                const endDateInput = newItem.querySelector('.education-end');
                if (this.checked) {
                    endDateInput.disabled = true;
                    endDateInput.value = '';
                } else {
                    endDateInput.disabled = false;
                }
                updateResumePreview();
            });
            
            updateResumePreview();
        });

        // Function to add a new skill section
        document.getElementById('add-skill').addEventListener('click', function() {
            const container = document.getElementById('skills-container');
            const newItem = document.createElement('div');
            newItem.className = 'skill-item mb-4 p-4 border rounded-lg fade-in';
            newItem.innerHTML = `
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                    <div>
                        <label class="block text-gray-700 mb-1">Skill Name*</label>
                        <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 skill-name" placeholder="JavaScript">
                    </div>
                    <div>
                        <label class="block text-gray-700 mb-1">Skill Level*</label>
                        <select class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 skill-level">
                            <option value="beginner">Beginner</option>
                            <option value="intermediate">Intermediate</option>
                            <option value="advanced" selected>Advanced</option>
                            <option value="expert">Expert</option>
                        </select>
                    </div>
                </div>
                <button class="remove-skill text-red-500 text-sm flex items-center">
                    <i class="fas fa-trash mr-1"></i> Remove this skill
                </button>
            `;
            
            container.appendChild(newItem);
            
            // Add event listeners to new inputs
            newItem.querySelectorAll('input, textarea, select').forEach(input => {
                input.addEventListener('input', updateResumePreview);
            });
            
            // Add event listener to remove button
            newItem.querySelector('.remove-skill').addEventListener('click', function() {
                newItem.classList.add('fade-out');
                setTimeout(() => {
                    container.removeChild(newItem);
                    updateResumePreview();
                }, 300);
            });
            
            updateResumePreview();
        });

        // Function to add a new project section
        document.getElementById('add-project').addEventListener('click', function() {
            const container = document.getElementById('projects-container');
            const newItem = document.createElement('div');
            newItem.className = 'project-item mb-6 p-4 border rounded-lg fade-in';
            newItem.innerHTML = `
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                    <div>
                        <label class="block text-gray-700 mb-1">Project Name*</label>
                        <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 project-name" placeholder="E-commerce Website">
                    </div>
                    <div>
                        <label class="block text-gray-700 mb-1">Project URL (optional)</label>
                        <input type="url" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 project-url" placeholder="https://example.com">
                    </div>
                </div>
                <div>
                    <label class="block text-gray-700 mb-1">Project Description*</label>
                    <textarea class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 project-description" rows="3" placeholder="Describe the project, technologies used, and your role"></textarea>
                    <p class="text-xs text-gray-500 mt-1">Use action verbs and quantify results when possible (e.g., "Increased performance by 30%")</p>
                </div>
                <button class="remove-project mt-2 text-red-500 text-sm flex items-center">
                    <i class="fas fa-trash mr-1"></i> Remove this project
                </button>
            `;
            
            container.appendChild(newItem);
            
            // Add event listeners to new inputs
            newItem.querySelectorAll('input, textarea, select').forEach(input => {
                input.addEventListener('input', updateResumePreview);
            });
            
            // Add event listener to remove button
            newItem.querySelector('.remove-project').addEventListener('click', function() {
                newItem.classList.add('fade-out');
                setTimeout(() => {
                    container.removeChild(newItem);
                    updateResumePreview();
                }, 300);
            });
            
            updateResumePreview();
        });

        // Function to add a new certification section
        document.getElementById('add-certification').addEventListener('click', function() {
            const container = document.getElementById('certifications-container');
            const newItem = document.createElement('div');
            newItem.className = 'certification-item mb-4 p-4 border rounded-lg fade-in';
            newItem.innerHTML = `
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                    <div>
                        <label class="block text-gray-700 mb-1">Certification Name*</label>
                        <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 certification-name" placeholder="AWS Certified Solutions Architect">
                    </div>
                    <div>
                        <label class="block text-gray-700 mb-1">Issuing Organization*</label>
                        <input type="text" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 certification-org" placeholder="Amazon Web Services">
                    </div>
                </div>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-3">
                    <div>
                        <label class="block text-gray-700 mb-1">Date Earned*</label>
                        <input type="month" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 certification-date">
                    </div>
                    <div>
                        <label class="block text-gray-700 mb-1">Credential ID (optional)</label>
                        <input type="text" class="w-full px-4 py
</html>