   :root {
        /* Colors */
        --primary-color: #4f46e5;
        --primary-dark: #4338ca;
        --primary-light: #818cf8;
        --secondary-color: #10b981;
        --danger-color: #ef4444;
        --warning-color: #f59e0b;

        /* Light Mode */
        --bg-primary: #f8fafc;
        --bg-secondary: #ffffff;
        --bg-tertiary: #f1f5f9;
        --text-primary: #0f172a;
        --text-secondary: #475569;
        --text-tertiary: #94a3b8;
        --border-color: #e2e8f0;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
        --shadow-neomorph: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
        --shadow-neomorph-inset: inset 6px 6px 12px #d1d9e6,
          inset -6px -6px 12px #ffffff;

        /* Typography */
        --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, sans-serif;
        --font-secondary: "Georgia", serif;

        /* Spacing */
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;

        /* Layout */
        --sidebar-width: 420px;
        --header-height: 70px;
        --border-radius: 12px;

        /* CV Customization */
        --cv-line-spacing: 1.6;
        --cv-margins: 30px;
      }

      /* Dark Mode Variables */
      .dark-mode {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-tertiary: #64748b;
        --border-color: #334155;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
        --shadow-neomorph: 8px 8px 16px #0a0f1a, -8px -8px 16px #1e2938;
        --shadow-neomorph-inset: inset 6px 6px 12px #0a0f1a,
          inset -6px -6px 12px #1e2938;
      }

      /* Reset & Base Styles */
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        font-family: var(--font-primary);
        background: var(--bg-primary);
        color: var(--text-primary);
        line-height: 1.6;
        transition: background 0.3s ease, color 0.3s ease;
      }

      /* App Container */
      .app-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
      }

      /* ===================================
   HEADER
   =================================== */
      .app-header {
        height: var(--header-height);
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 var(--spacing-xl);
        box-shadow: var(--shadow-sm);
        z-index: 100;
      }

      .logo {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
      }

      .logo i {
        font-size: 2rem;
        color: var(--primary-color);
      }

      .logo h1 {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text-primary);
      }

      .logo .ultra {
        color: var(--primary-color);
        font-weight: 800;
      }

      .header-controls {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
      }

      /* ===================================
   BUTTONS
   =================================== */
      .btn-primary,
      .btn-secondary,
      .btn-icon,
      .btn-add {
        padding: 0.625rem 1.25rem;
        border: none;
        border-radius: var(--border-radius);
        font-family: var(--font-primary);
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: var(--spacing-sm);
      }

      .btn-primary {
        background: var(--primary-color);
        color: white;
        box-shadow: var(--shadow-md);
      }

      .btn-primary:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
      }

      .btn-secondary {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        box-shadow: var(--shadow-neomorph);
      }

      .btn-secondary:hover {
        box-shadow: var(--shadow-neomorph-inset);
      }

      .btn-icon {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
        background: var(--bg-tertiary);
        color: var(--text-secondary);
        box-shadow: var(--shadow-neomorph);
      }

      .btn-icon:hover {
        color: var(--primary-color);
        box-shadow: var(--shadow-neomorph-inset);
      }

      .btn-add {
        width: 100%;
        background: linear-gradient(
          135deg,
          var(--primary-color),
          var(--primary-light)
        );
        color: white;
        margin-top: var(--spacing-md);
        box-shadow: var(--shadow-md);
      }

      .btn-add:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
      }

      /* ===================================
   MAIN CONTENT LAYOUT
   =================================== */
      .main-content {
        display: flex;
        height: calc(100vh - var(--header-height));
        overflow: hidden;
      }

      /* ===================================
   EDITOR PANEL (LEFT)
   =================================== */
      .editor-panel {
        width: var(--sidebar-width);
        background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }

      /* ATS Panel */
      .ats-panel {
        background: linear-gradient(
          135deg,
          rgba(79, 70, 229, 0.1),
          rgba(16, 185, 129, 0.1)
        );
        border-bottom: 1px solid var(--border-color);
      }

      .ats-toggle {
        width: 100%;
        padding: var(--spacing-md) var(--spacing-lg);
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-family: var(--font-primary);
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        transition: all 0.3s ease;
      }

      .ats-toggle:hover {
        background: rgba(79, 70, 229, 0.1);
      }

      .ats-toggle i {
        font-size: 1.25rem;
        color: var(--primary-color);
      }

      .ats-content {
        padding: var(--spacing-lg);
        display: none;
      }

      .ats-content.active {
        display: block;
      }

      .ats-content h3 {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-md);
        color: var(--text-primary);
      }

      .ats-content textarea {
        width: 100%;
        height: 150px;
        padding: var(--spacing-md);
        border: 2px solid var(--border-color);
        border-radius: var(--border-radius);
        background: var(--bg-primary);
        color: var(--text-primary);
        font-family: var(--font-primary);
        font-size: 0.9rem;
        resize: vertical;
        margin-bottom: var(--spacing-md);
      }

      .ats-content textarea:focus {
        outline: none;
        border-color: var(--primary-color);
      }

      /* ATS Results */
      .ats-results {
        margin-top: var(--spacing-lg);
      }

      .match-score {
        text-align: center;
        margin-bottom: var(--spacing-xl);
      }

      .score-circle {
        position: relative;
        display: inline-block;
        margin-bottom: var(--spacing-md);
      }

      .score-ring {
        transform: rotate(-90deg);
      }

      .score-ring-circle {
        transition: stroke-dashoffset 1s ease;
      }

      .score-ring-fill {
        stroke: var(--primary-color);
        stroke-dasharray: 326.73;
        stroke-dashoffset: 326.73;
        stroke-linecap: round;
        transition: stroke-dashoffset 1s ease;
      }

      .score-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 2rem;
        font-weight: 700;
        color: var(--primary-color);
      }

      .score-label {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-secondary);
      }

      .keywords-section {
        margin-bottom: var(--spacing-lg);
      }

      .keywords-section h4 {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-md);
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        color: var(--secondary-color);
      }

      .keywords-section.missing h4 {
        color: var(--warning-color);
      }

      .keyword-list {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
      }

      .keyword-tag {
        padding: 0.375rem 0.75rem;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        background: rgba(79, 70, 229, 0.1);
        color: var(--primary-color);
        border: 1px solid var(--primary-light);
      }

      .keyword-tag.missing {
        background: rgba(245, 158, 11, 0.1);
        color: var(--warning-color);
        border: 1px solid var(--warning-color);
      }

      .recommendations {
        background: var(--bg-tertiary);
        padding: var(--spacing-md);
        border-radius: var(--border-radius);
        margin-top: var(--spacing-lg);
      }

      .recommendations h4 {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-md);
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        color: var(--text-primary);
      }

      .recommendations ul {
        list-style: none;
        padding-left: 0;
      }

      .recommendations li {
        padding: var(--spacing-sm) 0;
        color: var(--text-secondary);
        font-size: 0.85rem;
        display: flex;
        align-items: flex-start;
        gap: var(--spacing-sm);
      }

      .recommendations li:before {
        content: "•";
        color: var(--primary-color);
        font-weight: bold;
      }

      /* Wizard Tabs */
      .wizard-tabs {
        display: flex;
        background: var(--bg-tertiary);
        border-bottom: 1px solid var(--border-color);
      }

      .wizard-tab {
        flex: 1;
        padding: var(--spacing-md);
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        color: var(--text-secondary);
        font-family: var(--font-primary);
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xs);
      }

      .wizard-tab:hover {
        background: rgba(79, 70, 229, 0.05);
        color: var(--text-primary);
      }

      .wizard-tab.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
        background: var(--bg-secondary);
      }

      .wizard-tab i {
        font-size: 1.25rem;
      }

      /* Wizard Content */
      .wizard-content {
        flex: 1;
        overflow-y: auto;
        padding: var(--spacing-xl);
      }

      .wizard-step {
        display: none;
        animation: fadeIn 0.3s ease;
      }

      .wizard-step.active {
        display: block;
      }

      @keyframes fadeIn {
        from {
          opacity: 0;
          transform: translateY(10px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      .wizard-step h2 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
        color: var(--text-primary);
      }

      .step-description {
        color: var(--text-secondary);
        font-size: 0.9rem;
        margin-bottom: var(--spacing-lg);
      }

      /* Form Groups */
      .form-group {
        margin-bottom: var(--spacing-lg);
        position: relative;
      }

      .form-group label {
        display: block;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: var(--spacing-sm);
      }

      .form-group input[type="text"],
      .form-group input[type="email"],
      .form-group input[type="tel"],
      .form-group input[type="url"],
      .form-group input[type="number"],
      .form-group input[type="date"],
      .form-group select,
      .form-group textarea {
        width: 100%;
        padding: 0.75rem;
        border: 2px solid var(--border-color);
        border-radius: var(--border-radius);
        background: var(--bg-primary);
        color: var(--text-primary);
        font-family: var(--font-primary);
        font-size: 0.9rem;
        transition: all 0.3s ease;
      }

      .form-group input:focus,
      .form-group select:focus,
      .form-group textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
      }

      .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
      }

      .help-text {
        font-size: 0.8rem;
        color: var(--text-tertiary);
        margin-top: var(--spacing-xs);
      }

      /* Photo Upload */
      .photo-container {
        display: flex;
        align-items: center;
        gap: var(--spacing-lg);
      }

      .photo-preview {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: var(--bg-tertiary);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        box-shadow: var(--shadow-neomorph);
      }

      .photo-preview i {
        font-size: 3rem;
        color: var(--text-tertiary);
      }

      .photo-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      /* Magic Wand Button */
      .magic-wand {
        position: absolute;
        top: 0;
        right: 0;
        padding: 0.5rem;
        background: linear-gradient(
          135deg,
          var(--primary-color),
          var(--primary-light)
        );
        color: white;
        border: none;
        border-radius: var(--border-radius);
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-md);
      }

      .magic-wand:hover {
        transform: scale(1.1) rotate(10deg);
        box-shadow: var(--shadow-lg);
      }

      .suggestions {
        margin-top: var(--spacing-md);
        padding: var(--spacing-md);
        background: var(--bg-tertiary);
        border-radius: var(--border-radius);
        border-left: 4px solid var(--primary-color);
      }

      .suggestion-item {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
        background: var(--bg-secondary);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 0.85rem;
        color: var(--text-secondary);
      }

      .suggestion-item:hover {
        background: var(--primary-color);
        color: white;
        transform: translateX(5px);
      }

      /* Sortable Containers */
      .sortable-container {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
      }

      .sortable-item {
        padding: var(--spacing-lg);
        background: var(--bg-tertiary);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
        cursor: move;
        transition: all 0.3s ease;
      }

      .sortable-item:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
      }

      .sortable-item-header {
        display: flex;
        align-items: center;
        justify-content: between;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-md);
      }

      .drag-handle {
        color: var(--text-tertiary);
        cursor: move;
      }

      .sortable-item-title {
        flex: 1;
        font-weight: 600;
        color: var(--text-primary);
      }

      .item-actions {
        display: flex;
        gap: var(--spacing-sm);
      }

      .btn-icon-sm {
        padding: 0.375rem;
        background: transparent;
        border: none;
        color: var(--text-tertiary);
        cursor: pointer;
        border-radius: 6px;
        transition: all 0.2s ease;
      }

      .btn-icon-sm:hover {
        background: var(--bg-primary);
        color: var(--primary-color);
      }

      .btn-icon-sm.delete:hover {
        color: var(--danger-color);
      }

      /* Skill Items */
      .skill-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--spacing-md);
        background: var(--bg-tertiary);
        border-radius: var(--border-radius);
        margin-bottom: var(--spacing-sm);
      }

      .skill-info {
        flex: 1;
      }

      .skill-name {
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: var(--spacing-xs);
      }

      .skill-bar {
        height: 6px;
        background: var(--bg-primary);
        border-radius: 3px;
        overflow: hidden;
        width: 200px;
      }

      .skill-bar-fill {
        height: 100%;
        background: linear-gradient(
          90deg,
          var(--primary-color),
          var(--primary-light)
        );
        border-radius: 3px;
        transition: width 0.3s ease;
      }

      .skill-input-group {
        display: flex;
        gap: var(--spacing-sm);
        align-items: center;
      }

      .skill-input-group input[type="text"] {
        flex: 2;
      }

      .skill-input-group input[type="number"],
      .skill-input-group select {
        flex: 1;
      }

      /* Template Grid */
      .template-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
      }

      .template-card {
        padding: var(--spacing-md);
        background: var(--bg-tertiary);
        border: 2px solid transparent;
        border-radius: var(--border-radius);
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
      }

      .template-card:hover {
        border-color: var(--primary-light);
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
      }

      .template-card.active {
        border-color: var(--primary-color);
        background: rgba(79, 70, 229, 0.1);
      }

      .template-preview {
        height: 120px;
        background: var(--bg-primary);
        border-radius: 8px;
        margin-bottom: var(--spacing-md);
        position: relative;
        overflow: hidden;
      }

      .template-card h4 {
        font-size: 1rem;
        margin-bottom: var(--spacing-xs);
        color: var(--text-primary);
      }

      .template-card p {
        font-size: 0.8rem;
        color: var(--text-secondary);
      }

      /* Customizer Section */
      .customizer-section {
        margin-top: var(--spacing-xl);
        padding-top: var(--spacing-xl);
        border-top: 1px solid var(--border-color);
      }

      .customizer-section h3 {
        font-size: 1.2rem;
        margin-bottom: var(--spacing-lg);
        color: var(--text-primary);
      }

      .color-picker-group {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
      }

      .color-picker-group input[type="color"] {
        width: 60px;
        height: 40px;
        border: none;
        border-radius: var(--border-radius);
        cursor: pointer;
      }

      .checkbox-group {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
      }

      .checkbox-group label {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        font-weight: normal;
        cursor: pointer;
      }

      .checkbox-group input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
      }

      /* ===================================
   PREVIEW PANEL (RIGHT)
   =================================== */
      .preview-panel {
        flex: 1;
        background: var(--bg-primary);
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }

      .preview-controls {
        padding: var(--spacing-md) var(--spacing-xl);
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-md);
      }

      .zoom-level {
        font-weight: 600;
        color: var(--text-primary);
        min-width: 60px;
        text-align: center;
      }

      .preview-container {
        flex: 1;
        overflow: auto;
        padding: var(--spacing-xl);
        display: flex;
        justify-content: center;
        align-items: flex-start;
      }

      /* CV Preview Canvas */
      .cv-preview {
        width: 210mm;
        min-height: 297mm;
        background: white;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
        transform-origin: top center;
        transition: transform 0.3s ease;
      }

      /* Zoom Levels */
      .preview-container[data-zoom="80"] .cv-preview {
        transform: scale(0.8);
      }

      .preview-container[data-zoom="100"] .cv-preview {
        transform: scale(1);
      }

      .preview-container[data-zoom="120"] .cv-preview {
        transform: scale(1.2);
      }

      /* Scrollbar Styling */
      ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
      }

      ::-webkit-scrollbar-track {
        background: var(--bg-tertiary);
      }

      ::-webkit-scrollbar-thumb {
        background: var(--text-tertiary);
        border-radius: 5px;
      }

      ::-webkit-scrollbar-thumb:hover {
        background: var(--text-secondary);
      }

      /* Responsive Design */
      @media (max-width: 1024px) {
        .editor-panel {
          width: 380px;
        }
      }

      @media (max-width: 768px) {
        .main-content {
          flex-direction: column;
        }

        .editor-panel {
          width: 100%;
          height: 50vh;
        }

        .preview-panel {
          height: 50vh;
        }
      }

      /* Print Styles */
      @media print {
        body {
          background: white;
        }

        .app-header,
        .editor-panel,
        .preview-controls {
          display: none !important;
        }

        .preview-panel {
          overflow: visible;
        }

        .preview-container {
          padding: 0;
        }

        .cv-preview {
          box-shadow: none;
          transform: none !important;
          width: 100%;
          margin: 0;
        }
      }
      /* ===================================
   DEBDEX ULTRA - CV TEMPLATES
   Variable-First Approach for Theming
   =================================== */

      /* Common CV Styles */
      .cv-preview {
        font-family: var(--cv-font-primary, "Inter", sans-serif);
        color: #1a1a1a;
        line-height: var(--cv-line-spacing, 1.6);
        padding: var(--cv-margins, 30px);
        page-break-after: always;
      }

      .cv-preview * {
        box-sizing: border-box;
      }

      /* Template-specific variables will be defined below */

      /* ===================================
   TEMPLATE 1: SILICON VALLEY
   Modern, sidebar-heavy with progress bars
   =================================== */
      .cv-preview.silicon-valley {
        --cv-accent: var(--primary-color, #4f46e5);
        --cv-font-primary: "Inter", -apple-system, sans-serif;
        --cv-font-secondary: system-ui, sans-serif;

        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 0;
        padding: 0;
        overflow: hidden;
      }

      .silicon-valley .cv-sidebar {
        background: linear-gradient(180deg, var(--cv-accent), #3730a3);
        color: white;
        padding: 40px 30px;
      }

      .silicon-valley .cv-main {
        padding: 40px 35px;
        background: white;
      }

      .silicon-valley .cv-photo {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        border: 5px solid rgba(255, 255, 255, 0.3);
        margin: 0 auto 25px;
        overflow: hidden;
        display: block;
      }

      .silicon-valley .cv-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .silicon-valley .cv-name {
        font-size: 1.8rem;
        font-weight: 800;
        text-align: center;
        margin-bottom: 8px;
        color: white;
      }

      .silicon-valley .cv-title {
        font-size: 1rem;
        text-align: center;
        opacity: 0.9;
        margin-bottom: 30px;
        font-weight: 500;
      }

      .silicon-valley .cv-contact {
        margin-bottom: 35px;
      }

      .silicon-valley .cv-contact-item {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 15px;
        font-size: 0.85rem;
        word-break: break-word;
      }

      .silicon-valley .cv-contact-item i {
        width: 20px;
        text-align: center;
        opacity: 0.9;
      }

      .silicon-valley .cv-section-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid rgba(255, 255, 255, 0.3);
        text-transform: uppercase;
        letter-spacing: 1px;
      }

      .silicon-valley .cv-main .cv-section-title {
        color: var(--cv-accent);
        border-bottom-color: var(--cv-accent);
      }

      .silicon-valley .cv-skill-item {
        margin-bottom: 20px;
      }

      .silicon-valley .cv-skill-name {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .silicon-valley .cv-skill-bar {
        height: 8px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        overflow: hidden;
      }

      .silicon-valley .cv-skill-bar-fill {
        height: 100%;
        background: white;
        border-radius: 4px;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
      }

      .silicon-valley .cv-language-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        font-size: 0.9rem;
      }

      .silicon-valley .cv-language-level {
        font-size: 0.8rem;
        opacity: 0.8;
      }

      .silicon-valley .cv-section {
        margin-bottom: 35px;
      }

      .silicon-valley .cv-summary {
        font-size: 0.95rem;
        line-height: 1.7;
        color: #4a4a4a;
        margin-bottom: 35px;
      }

      .silicon-valley .cv-experience-item,
      .silicon-valley .cv-education-item,
      .silicon-valley .cv-project-item {
        margin-bottom: 28px;
        position: relative;
        padding-left: 20px;
      }

      .silicon-valley .cv-experience-item:before,
      .silicon-valley .cv-education-item:before,
      .silicon-valley .cv-project-item:before {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        width: 8px;
        height: 8px;
        background: var(--cv-accent);
        border-radius: 50%;
      }

      .silicon-valley .cv-item-header {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-bottom: 8px;
        flex-wrap: wrap;
      }

      .silicon-valley .cv-item-title {
        font-size: 1.05rem;
        font-weight: 700;
        color: #1a1a1a;
      }

      .silicon-valley .cv-item-company,
      .silicon-valley .cv-item-institution {
        font-size: 0.95rem;
        color: var(--cv-accent);
        font-weight: 600;
      }

      .silicon-valley .cv-item-date {
        font-size: 0.85rem;
        color: #666;
        white-space: nowrap;
      }

      .silicon-valley .cv-item-description {
        font-size: 0.9rem;
        color: #555;
        margin-top: 8px;
        line-height: 1.6;
      }

      .silicon-valley .cv-item-description ul {
        margin: 8px 0 0 0;
        padding-left: 20px;
      }

      .silicon-valley .cv-item-description li {
        margin-bottom: 6px;
      }

      /* ===================================
   TEMPLATE 2: WALL STREET
   Minimalist, professional serif
   =================================== */
      .cv-preview.wall-street {
        --cv-accent: #2c3e50;
        --cv-font-primary: "Merriweather", Georgia, serif;
        --cv-font-secondary: "Georgia", serif;

        font-family: var(--cv-font-primary);
        padding: 50px 60px;
        max-width: 210mm;
      }

      .wall-street .cv-header {
        text-align: center;
        border-bottom: 2px solid var(--cv-accent);
        padding-bottom: 25px;
        margin-bottom: 35px;
      }

      .wall-street .cv-name {
        font-size: 2.2rem;
        font-weight: 700;
        color: var(--cv-accent);
        margin-bottom: 8px;
        letter-spacing: 1px;
      }

      .wall-street .cv-title {
        font-size: 1.1rem;
        color: #555;
        margin-bottom: 20px;
        font-weight: 400;
        font-style: italic;
      }

      .wall-street .cv-contact {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
        font-size: 0.85rem;
        color: #666;
      }

      .wall-street .cv-contact-item {
        display: flex;
        align-items: center;
        gap: 6px;
      }

      .wall-street .cv-section {
        margin-bottom: 32px;
      }

      .wall-street .cv-section-title {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--cv-accent);
        margin-bottom: 18px;
        text-transform: uppercase;
        letter-spacing: 2px;
        border-bottom: 1px solid #ddd;
        padding-bottom: 8px;
      }

      .wall-street .cv-summary {
        font-size: 0.95rem;
        line-height: 1.8;
        color: #333;
        text-align: justify;
      }

      .wall-street .cv-experience-item,
      .wall-street .cv-education-item,
      .wall-street .cv-project-item {
        margin-bottom: 24px;
      }

      .wall-street .cv-item-header {
        margin-bottom: 6px;
      }

      .wall-street .cv-item-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1a1a1a;
        display: inline;
      }

      .wall-street .cv-item-company,
      .wall-street .cv-item-institution {
        font-size: 1rem;
        color: #555;
        font-weight: 600;
        display: inline;
      }

      .wall-street .cv-item-title:after {
        content: " | ";
        color: #999;
      }

      .wall-street .cv-item-date {
        font-size: 0.9rem;
        color: #777;
        font-style: italic;
        margin-top: 4px;
        display: block;
      }

      .wall-street .cv-item-description {
        font-size: 0.9rem;
        color: #444;
        line-height: 1.7;
        margin-top: 8px;
      }

      .wall-street .cv-item-description ul {
        margin: 6px 0 0 0;
        padding-left: 25px;
      }

      .wall-street .cv-item-description li {
        margin-bottom: 5px;
      }

      .wall-street .cv-skills-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px 20px;
        font-size: 0.9rem;
      }

      .wall-street .cv-skill-item {
        color: #333;
      }

      .wall-street .cv-languages-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        font-size: 0.9rem;
      }

      .wall-street .cv-language-item {
        display: flex;
        justify-content: space-between;
      }

      .wall-street .cv-language-level {
        color: #777;
        font-style: italic;
      }

      /* ===================================
   TEMPLATE 3: PORTFOLIO (CREATIVE)
   Grid-based, project-focused
   =================================== */
      .cv-preview.portfolio {
        --cv-accent: var(--primary-color, #ec4899);
        --cv-font-primary: "Inter", sans-serif;

        padding: 0;
      }

      .portfolio .cv-header {
        background: linear-gradient(135deg, var(--cv-accent), #db2777);
        color: white;
        padding: 50px 40px;
        position: relative;
        overflow: hidden;
      }

      .portfolio .cv-header:before {
        content: "";
        position: absolute;
        top: -50%;
        right: -10%;
        width: 400px;
        height: 400px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
      }

      .portfolio .cv-photo {
        width: 120px;
        height: 120px;
        border-radius: 20px;
        border: 4px solid rgba(255, 255, 255, 0.3);
        margin-bottom: 20px;
        overflow: hidden;
      }

      .portfolio .cv-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .portfolio .cv-name {
        font-size: 2.5rem;
        font-weight: 800;
        margin-bottom: 8px;
      }

      .portfolio .cv-title {
        font-size: 1.2rem;
        opacity: 0.95;
        margin-bottom: 25px;
      }

      .portfolio .cv-contact {
        display: flex;
        flex-wrap: wrap;
        gap: 25px;
        font-size: 0.9rem;
      }

      .portfolio .cv-contact-item {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .portfolio .cv-content {
        padding: 40px;
      }

      .portfolio .cv-section {
        margin-bottom: 40px;
      }

      .portfolio .cv-section-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--cv-accent);
        margin-bottom: 25px;
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .portfolio .cv-section-title:before {
        content: "";
        width: 5px;
        height: 30px;
        background: var(--cv-accent);
        border-radius: 3px;
      }

      .portfolio .cv-summary {
        font-size: 1.05rem;
        line-height: 1.8;
        color: #444;
      }

      .portfolio .cv-projects-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
      }

      .portfolio .cv-project-card {
        border: 2px solid #e5e5e5;
        border-radius: 12px;
        padding: 25px;
        transition: all 0.3s ease;
        background: #fafafa;
      }

      .portfolio .cv-project-card:hover {
        border-color: var(--cv-accent);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
      }

      .portfolio .cv-project-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 8px;
      }

      .portfolio .cv-project-link {
        font-size: 0.85rem;
        color: var(--cv-accent);
        margin-bottom: 12px;
        display: block;
        text-decoration: none;
      }

      .portfolio .cv-project-description {
        font-size: 0.9rem;
        color: #555;
        line-height: 1.6;
      }

      .portfolio .cv-experience-item,
      .portfolio .cv-education-item {
        margin-bottom: 30px;
        padding: 25px;
        background: #f9f9f9;
        border-radius: 12px;
        border-left: 4px solid var(--cv-accent);
      }

      .portfolio .cv-item-header {
        margin-bottom: 10px;
      }

      .portfolio .cv-item-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 5px;
      }

      .portfolio .cv-item-company,
      .portfolio .cv-item-institution {
        font-size: 1rem;
        color: var(--cv-accent);
        font-weight: 600;
      }

      .portfolio .cv-item-date {
        font-size: 0.85rem;
        color: #777;
        margin-top: 5px;
        display: block;
      }

      .portfolio .cv-item-description {
        font-size: 0.9rem;
        color: #555;
        line-height: 1.6;
      }

      .portfolio .cv-skills-flex {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
      }

      .portfolio .cv-skill-tag {
        padding: 8px 16px;
        background: var(--cv-accent);
        color: white;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 600;
      }

      /* ===================================
   TEMPLATE 4: ENTRY LEVEL
   Strategic whitespace, clean
   =================================== */
      .cv-preview.entry-level {
        --cv-accent: var(--primary-color, #10b981);
        --cv-font-primary: "Inter", sans-serif;

        padding: 45px 50px;
      }

      .entry-level .cv-header {
        text-align: center;
        margin-bottom: 40px;
        padding-bottom: 30px;
        border-bottom: 3px solid var(--cv-accent);
      }

      .entry-level .cv-photo {
        width: 110px;
        height: 110px;
        border-radius: 50%;
        border: 4px solid var(--cv-accent);
        margin: 0 auto 20px;
        overflow: hidden;
      }

      .entry-level .cv-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .entry-level .cv-name {
        font-size: 2.2rem;
        font-weight: 800;
        color: #1a1a1a;
        margin-bottom: 10px;
        letter-spacing: -0.5px;
      }

      .entry-level .cv-title {
        font-size: 1.15rem;
        color: var(--cv-accent);
        font-weight: 600;
        margin-bottom: 25px;
      }

      .entry-level .cv-contact {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 25px;
        font-size: 0.9rem;
        color: #555;
      }

      .entry-level .cv-contact-item {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .entry-level .cv-contact-item i {
        color: var(--cv-accent);
      }

      .entry-level .cv-section {
        margin-bottom: 45px;
      }

      .entry-level .cv-section-title {
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--cv-accent);
        margin-bottom: 25px;
        padding-bottom: 12px;
        border-bottom: 2px solid var(--cv-accent);
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .entry-level .cv-section-title i {
        font-size: 1.3rem;
      }

      .entry-level .cv-summary {
        font-size: 1rem;
        line-height: 1.9;
        color: #444;
        text-align: center;
        padding: 0 30px;
      }

      .entry-level .cv-experience-item,
      .entry-level .cv-education-item {
        margin-bottom: 35px;
        padding-left: 30px;
        position: relative;
      }

      .entry-level .cv-experience-item:before,
      .entry-level .cv-education-item:before {
        content: "";
        position: absolute;
        left: 0;
        top: 5px;
        width: 12px;
        height: 12px;
        background: var(--cv-accent);
        border-radius: 50%;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
      }

      .entry-level .cv-item-header {
        margin-bottom: 10px;
      }

      .entry-level .cv-item-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 5px;
      }

      .entry-level .cv-item-company,
      .entry-level .cv-item-institution {
        font-size: 1rem;
        color: #555;
        font-weight: 600;
      }

      .entry-level .cv-item-date {
        font-size: 0.9rem;
        color: #777;
        margin-top: 5px;
        display: block;
      }

      .entry-level .cv-item-description {
        font-size: 0.95rem;
        color: #555;
        line-height: 1.8;
        margin-top: 12px;
      }

      .entry-level .cv-item-description ul {
        margin: 10px 0 0 0;
        padding-left: 20px;
      }

      .entry-level .cv-item-description li {
        margin-bottom: 8px;
      }

      .entry-level .cv-skills-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
      }

      .entry-level .cv-skill-category {
        background: #f9f9f9;
        padding: 25px;
        border-radius: 12px;
        border-top: 4px solid var(--cv-accent);
      }

      .entry-level .cv-skill-category-title {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--cv-accent);
        margin-bottom: 15px;
      }

      .entry-level .cv-skill-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .entry-level .cv-skill-item {
        font-size: 0.9rem;
        color: #555;
        padding-left: 20px;
        position: relative;
      }

      .entry-level .cv-skill-item:before {
        content: "▸";
        position: absolute;
        left: 0;
        color: var(--cv-accent);
        font-weight: bold;
      }

      .entry-level .cv-project-item {
        margin-bottom: 30px;
        padding: 25px;
        background: #f9f9f9;
        border-radius: 12px;
        border-left: 4px solid var(--cv-accent);
      }

      .entry-level .cv-project-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 8px;
      }

      .entry-level .cv-project-link {
        font-size: 0.85rem;
        color: var(--cv-accent);
        margin-bottom: 12px;
        display: block;
      }

      .entry-level .cv-project-description {
        font-size: 0.9rem;
        color: #555;
        line-height: 1.7;
      }

      /* Font Pairings */
      [data-font="modern"] .cv-preview {
        --cv-font-primary: "Inter", -apple-system, sans-serif;
      }

      [data-font="serif"] .cv-preview {
        --cv-font-primary: "Merriweather", Georgia, serif;
      }

      [data-font="mono"] .cv-preview {
        --cv-font-primary: "Roboto Mono", "Courier New", monospace;
      }

      [data-font="elegant"] .cv-preview {
        --cv-font-primary: "Playfair Display", Georgia, serif;
      }

      /* Print Optimization */
      @media print {
        .cv-preview {
          width: 210mm;
          min-height: 297mm;
          margin: 0;
          box-shadow: none;
          page-break-after: always;
        }

        .cv-preview * {
          -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
        }
      }

      /* Second Page Handling */
      @page {
        size: A4;
        margin: 0;
      }

      .cv-preview {
        page-break-inside: avoid;
      }

      .cv-section {
        page-break-inside: avoid;
      }

      .cv-experience-item,
      .cv-education-item,
      .cv-project-item {
        page-break-inside: avoid;
      }
      .ats-toggle {
        margin-top: 20px;
        margin-bottom: 20px;
        margin-left: 50px;
        margin-right: auto;
        border-radius: 9px;
        background-color: #3dd1e7;
        border: 0 solid #e5e7eb;
        box-sizing: border-box;
        color: #000000;
        display: inline-flex; /* Changed to inline-flex to fit with other buttons */
        align-items: center; /* Centers icon vertically */
        gap: 10px; /* Adds space between Robot icon and Text */
        font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
        font-size: 1rem;
        font-weight: 700;
        justify-content: center;
        line-height: 1.75rem;
        padding: 0.75rem 1.65rem;
        position: relative;
        text-align: center;
        text-decoration: none;
        width: auto; /* Changed from 100% to auto for header use */
        max-width: 460px;
        cursor: pointer;
        transform: rotate(-2deg); /* The tilted effect */
        user-select: none;
        touch-action: manipulation;
      }

      .ats-toggle:focus {
        outline: 0;
      }

      /* The offset black border effect */
      .ats-toggle:after {
        content: "";
        position: absolute;
        border: 1px solid #000000;
        bottom: 4px;
        left: 4px;
        width: calc(100% - 1px);
        height: calc(100% - 1px);
        transition: all 0.2s ease; /* Smooth movement */
      }

      /* Hover Animation */
      .ats-toggle:hover:after {
        bottom: 2px;
        left: 2px;
      }

      @media (min-width: 768px) {
        .ats-toggle {
          padding: 0.75rem 3rem;
          font-size: 1.25rem;
        }
      }
      .btn-secondary {
        margin-top: 20px; /* Spacing above */

        background-color: #3dd1e7; /* Cyan color */
        border: 0 solid #e5e7eb;
        box-sizing: border-box;
        color: #000000;
        display: inline-flex;
        align-items: center;
        gap: 10px; /* Space between Search icon and Text */
        font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
        font-size: 1rem;
        font-weight: 700;
        justify-content: center;
        line-height: 1.75rem;
        padding: 0.75rem 1.65rem;
        position: relative;
        text-align: center;
        text-decoration: none;
        width: auto;
        max-width: 460px;
        cursor: pointer;
        transform: rotate(-2deg); /* The tilted effect */
        user-select: none;
        touch-action: manipulation;
      }

      .btn-secondary:focus {
        outline: 0;
      }

      /* The offset black border effect */
      .btn-secondary:after {
        content: "";
        position: absolute;
        border: 1px solid #000000;
        bottom: 4px;
        left: 4px;
        width: calc(100% - 1px);
        height: calc(100% - 1px);
        transition: all 0.2s ease;
      }

      /* Hover Animation */
      .btn-secondary:hover:after {
        bottom: 2px;
        left: 2px;
      }

      /* Mobile responsiveness */
      @media (min-width: 768px) {
        .btn-secondary {
          padding: 0.75rem 3rem;
          font-size: 1.25rem;
        }
      }
      /* Scoped styles specifically for the Notepad Textarea */
      #jobDescInput {
        /* Layout & Sizing */
        width: 100%; /* Adapts to your container */
        max-width: 600px; /* Optional: prevents it from getting too wide */
        min-height: 200px; /* Sets a default height */
        display: block;
        box-sizing: border-box; /* Ensures padding doesn't break layout */

        /* Typography */
        font-family: "Courier New", Courier, monospace; /* The Typewriter font */
        font-size: 24px;
        font-weight: normal;
        color: #222;
        line-height: 40px; /* CRITICAL: Must match background line spacing */

        /* Background Images (The Paper Effect) */
        background-color: #fff;
        background-image: url("./lines1.png"),
          /* Red Margin Line */ url("./paper1.png"); /* Blue Lines */
        background-repeat: repeat-y, repeat;
        background-attachment: local; /* Ensures lines scroll with text */

        /* Spacing - Aligns text to the lines */
        padding-top: 45px; /* Pushes first line to match blue line */
        padding-left: 100px; /* Pushes text right of the red margin line */
        padding-right: 50px;
        padding-bottom: 34px;

        /* Borders & Aesthetics */
        border: none; /* Removes default browser border */
        border-top: 1px solid #fff;
        border-bottom: 1px solid #fff;
        border-radius: 12px;
        box-shadow: 0px 2px 14px rgba(0, 0, 0, 0.5);
        outline: none; /* Removes blue focus glow */
        resize: vertical; /* Allows user to resize height only */
      }
      .btn-add {
        margin-top: 20px; /* Spacing above */

        background-color: #3dd1e7; /* Cyan color */
        border: 0 solid #e5e7eb;
        box-sizing: border-box;
        color: #000000;
        display: inline-flex;
        align-items: center;
        gap: 10px; /* Space between Plus icon and Text */
        font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
        font-size: 1rem;
        font-weight: 700;
        justify-content: center;
        line-height: 1.75rem;
        padding: 0.75rem 1.65rem;
        position: relative;
        text-align: center;
        text-decoration: none;
        width: auto;
        max-width: 460px;
        cursor: pointer;
        transform: rotate(-2deg); /* The tilted effect */
        user-select: none;
        touch-action: manipulation;
      }

      .btn-add:focus {
        outline: 0;
      }

      /* The offset black border effect */
      .btn-add:after {
        content: "";
        position: absolute;
        border: 1px solid #000000;
        bottom: 4px;
        left: 4px;
        width: calc(100% - 1px);
        height: calc(100% - 1px);
        transition: all 0.2s ease;
      }

      /* Hover Animation */
      .btn-add:hover:after {
        bottom: 2px;
        left: 2px;
      }

      /* Mobile responsiveness */
      @media (min-width: 768px) {
        .btn-add {
          padding: 0.75rem 3rem;
          font-size: 1.25rem;
        }
      }
      .btn-primary {
        margin-top: 20px;
        margin-bottom: 20px;
        margin-left: 50px;
        margin-right: auto;
        background-color: #3dd1e7; /* Cyan color */
        border: 0 solid #e5e7eb;
        box-sizing: border-box;
        color: #000000;
        display: inline-flex;
        align-items: center;
        gap: 10px; /* Space between PDF icon and Text */
        font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
        font-size: 1rem;
        font-weight: 700;
        justify-content: center;
        line-height: 1.75rem;
        padding: 0.75rem 1.65rem;
        position: relative;
        text-align: center;
        text-decoration: none;
        width: auto;
        max-width: 460px;
        cursor: pointer;
        transform: rotate(-2deg); /* The tilted effect */
        user-select: none;
        touch-action: manipulation;
      }

      .btn-primary:focus {
        outline: 0;
      }

      /* The offset black border effect */
      .btn-primary:after {
        content: "";
        position: absolute;
        border: 1px solid #000000;
        bottom: 4px;
        left: 4px;
        width: calc(100% - 1px);
        height: calc(100% - 1px);
        transition: all 0.2s ease;
      }

      /* Hover Animation */
      .btn-primary:hover:after {
        bottom: 2px;
        left: 2px;
      }

      /* Mobile responsiveness */
      @media (min-width: 768px) {
        .btn-primary {
          padding: 0.75rem 3rem;
          font-size: 1.25rem;
        }
      }