
        :root {
            --primary: #4361ee;
            --secondary: #3a0ca3;
            --accent: #4cc9f0;
            --light: #f8f9fa;
            --dark: #212529;
            --gray: #6c757d;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f5f7ff;
            color: var(--dark);
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* Navigation */
        header {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            padding: 1rem 0;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            display: flex;
            align-items: center;
            font-size: 1.5rem;
            font-weight: 700;
            color: white;
            text-decoration: none;
        }

        .logo i {
            margin-right: 0.5rem;
            color: var(--accent);
        }

        nav ul {
            display: flex;
            list-style: none;
        }

        nav ul li {
            margin-left: 1.5rem;
        }

        nav ul li a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: opacity 0.3s;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        nav ul li a:hover {
            opacity: 0.8;
        }

        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
        }

        /* Main Content */
        main {
            flex: 1;
            padding: 2rem;
            max-width: 1200px;
            margin: 0 auto;
            width: 100%;
        }

        .builder-container {
            display: grid;
            grid-template-columns: 300px 1fr;
            gap: 2rem;
        }

        

        /* Form Styles */
        .form-section {
            background: white;
            padding: 1.5rem;
            border-radius: 10px;
            box-shadow: var(--shadow);
            height: fit-content;
            position: sticky;
            top: 80px;
            overflow-y: auto;
            max-height: calc(100vh - 100px);
        }

        .form-section h2 {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: var(--primary);
            border-bottom: 2px solid var(--accent);
            padding-bottom: 0.5rem;
        }

        .form-group {
            margin-bottom: 1.2rem;
        }

        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--dark);
        }

        input, textarea, select {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            transition: all 0.3s;
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        textarea {
            min-height: 100px;
            resize: vertical;
        }

        button {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.8rem 1.5rem;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        button:hover {
            background: var(--secondary);
            transform: translateY(-2px);
        }

        .btn-outline {
            background: white;
            color: var(--primary);
            border: 1px solid var(--primary);
        }

        .btn-outline:hover {
            background: #f0f4ff;
        }

        .btn-danger {
            background: #e63946;
        }

        .btn-danger:hover {
            background: #c1121f;
        }

        /* CV Preview Styles */
        .cv-preview-container {
            position: sticky;
            top: 80px;
        }

        .cv-preview {
            background: white;
            width: 210mm;
            min-height: 297mm;
            margin: 0 auto;
            padding: 20mm;
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
        }

        .cv-header {
            display: flex;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid var(--primary);
        }

        .profile-img {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid var(--accent);
            margin-right: 1.5rem;
        }

        .header-text h2 {
            font-size: 2rem;
            color: var(--primary);
            margin-bottom: 0.5rem;
        }

        .header-text p {
            color: var(--gray);
        }

        .cv-section {
            margin-bottom: 1.5rem;
        }

        .section-title {
            color: var(--primary);
            border-bottom: 1px solid #eee;
            padding-bottom: 0.5rem;
            margin-bottom: 1rem;
            font-size: 1.3rem;
        }

        .experience-item, .education-item {
            margin-bottom: 1.2rem;
        }

        .item-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.3rem;
        }

        .item-title {
            font-weight: 600;
        }

        .item-date {
            color: var(--gray);
            font-style: italic;
        }

        .skills-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .skill-tag {
            background: var(--accent);
            color: white;
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.9rem;
        }

        /* Template Selector */
        .template-selector {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin: 1rem 0;
        }

        .template {
            border: 2px solid #ddd;
            border-radius: 5px;
            padding: 0.5rem;
            cursor: pointer;
            transition: all 0.3s;
        }

        .template:hover {
            border-color: var(--primary);
        }

        .template.active {
            border-color: var(--primary);
            background: #f0f5ff;
        }

        .template-preview {
            height: 100px;
            background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
            margin-bottom: 0.5rem;
            position: relative;
            overflow: hidden;
        }

        /* Template-specific styles */
        .template-1 .template-preview {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            border-left: 5px solid #4361ee;
        }
        .template-1 .name {
            color: #4361ee;
            font-weight: bold;
            left: 15px;
            bottom: 15px;
        }

        .template-2 .template-preview {
            background: linear-gradient(135deg, #fff0f6, #fcc2d7);
            border-top: 5px solid #d6336c;
        }
        .template-2 .name {
            color: #d6336c;
            font-family: 'Georgia', serif;
            right: 15px;
            top: 15px;
        }

        .template-3 .template-preview {
            background: linear-gradient(135deg, #e6fcf5, #96f2d7);
            border-bottom: 5px solid #20c997;
        }
        .template-3 .name {
            color: #20c997;
            font-family: 'Arial', sans-serif;
            text-align: center;
            top: 50%;
            transform: translateY(-50%);
            width: 100%;
        }

        /* CV Template Styles */
        .cv-minimal {
            --primary: #212529;
            --secondary: #343a40;
            --accent: #495057;
            background: white;
        }
        .cv-minimal .section-title {
            border-bottom: 1px solid #dee2e6;
        }

        .cv-creative {
            --primary: #d6336c;
            --secondary: #a61e4d;
            --accent: #f06595;
            background: #fff0f6;
        }
        .cv-creative .section-title {
            border-left: 4px solid var(--primary);
            padding-left: 10px;
        }

        .cv-modern {
            --primary: #228be6;
            --secondary: #1c7ed6;
            --accent: #74c0fc;
            background: white;
        }
        .cv-modern .section-title {
            background: linear-gradient(90deg, #e7f5ff, white);
            padding: 5px 10px;
        }

        /* Action Buttons */
        .action-buttons {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
            position: sticky;
            bottom: 2rem;
            justify-content: flex-end;
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .builder-container {
                grid-template-columns: 1fr;
            }

            .form-section {
                position: static;
                max-height: none;
            }

            .cv-preview-container {
                position: static;
            }
        }

/* Responsive styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--secondary, #333);
        padding: 1rem;
        gap: 1rem;
        z-index: 999;
        text-align: center;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0;
    }

    .nav-container {
        padding: 1rem;
        flex-wrap: wrap;
    }
}
        .cv-preview {
            padding: 10mm;
            width: 100%;
            height: auto;
            box-shadow: none;
        }
        @media (max-width: 480px) {
            .template-selector {
                grid-template-columns: 1fr;
            }

            .cv-header {
                flex-direction: column;
                align-items: center;
                text-align: center;
            }

            .profile-img {
                margin-right: 0;
                margin-bottom: 1rem;
            }

            .action-buttons {
                flex-direction: column;
                gap: 0.5rem;
            }

            .action-buttons button {
                width: 100%;
            }
        }

        /* Print Styles */
        @media print {
            body * {
                visibility: hidden;
            }
            .cv-preview, .cv-preview * {
                visibility: visible;
            }
            .cv-preview {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                margin: 0;
                padding: 20mm;
                box-shadow: none;
            }
            .no-print {
                display: none !important;
            }
        }

        /* Prevent unwanted page breaks */
.cv-section, .experience-item, .education-item {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* Constrain content to single page */
.cv-preview {
    max-height: 297mm;
    overflow: hidden;
}

/* Print-specific adjustments */
@media print {
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
    .cv-preview {
        width: 210mm !important;
        height: 297mm !important;
        box-shadow: none !important;
    }
}

        /* Footer */
        footer {
            background: var(--dark);
            color: white;
            padding: 2rem 1rem;
            margin-top: 2rem;
        }

        .footer-container {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 2rem;
        }

        .footer-column h3 {
            font-size: 1.2rem;
            margin-bottom: 1rem;
            color: var(--accent);
        }

        .footer-column ul {
            list-style: none;
        }

        .footer-column ul li {
            margin-bottom: 0.5rem;
        }

        .footer-column ul li a {
            color: #adb5bd;
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-column ul li a:hover {
            color: white;
        }

        .social-links {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
        }

        .social-links a {
            color: white;
            font-size: 1.2rem;
        }

        .copyright {
            text-align: center;
            margin-top: 2rem;
            padding-top: 1rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: #6c757d;
            font-size: 0.9rem;
        }


    .nav-container,
    .footer-container {
        width: 100%;
        padding: 1rem;
    }

