/* ==========================================================================
   SMARTCV 5-LAYER TEMPLATE & DESIGN SYSTEM ENGINE
   Core CSS controlling Structure, Components, Typography, Themes & Density
   ========================================================================== */

/* --------------------------------------------------------------------------
   BASE CANVAS & A4 DIMENSIONS
   -------------------------------------------------------------------------- */
.smart-resume-canvas {
    --theme-primary: #1e3a8a;
    --theme-accent: #2563eb;
    --theme-text-dark: #0f172a;
    --theme-text-muted: #64748b;
    --theme-border: #e2e8f0;
    --theme-surface: #ffffff;
    --theme-sidebar-bg: #f8fafc;
    --theme-font-head: 'Inter', sans-serif;
    --theme-font-body: 'Inter', sans-serif;
    --space-page: 14mm;
    --space-section: 4mm;
    --space-item: 3mm;
    --font-scale-name: 20pt;
    --font-scale-head: 10pt;
    --font-scale-sub: 9pt;
    --font-scale-body: 9pt;
    --font-scale-meta: 8pt;

    width: 210mm;
    min-height: 297mm;
    background: #ffffff;
    color: var(--theme-text-dark);
    font-family: var(--theme-font-body);
    font-size: var(--font-scale-body);
    line-height: 1.45;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   LAYER 1 — STRUCTURE / LAYOUTS (50+ DEFINITIONS)
   -------------------------------------------------------------------------- */
/* 1. Single Column */
.smart-resume-canvas.layout-single-column {
    padding: var(--space-page);
    display: flex;
    flex-direction: column;
}

/* 2. Sidebar Left */
.smart-resume-canvas.layout-sidebar-left,
.smart-resume-canvas.layout-two-column-left {
    display: grid;
    grid-template-columns: 68mm 1fr;
    padding: 0;
}
.smart-resume-canvas.layout-sidebar-left .engine-sidebar,
.smart-resume-canvas.layout-two-column-left .engine-sidebar {
    background: var(--theme-sidebar-bg);
    border-right: 1.5px solid var(--theme-border);
    padding: var(--space-page) 8mm;
}
.smart-resume-canvas.layout-sidebar-left .engine-main,
.smart-resume-canvas.layout-two-column-left .engine-main {
    padding: var(--space-page) 10mm;
}

/* 3. Sidebar Right */
.smart-resume-canvas.layout-sidebar-right,
.smart-resume-canvas.layout-two-column-right {
    display: grid;
    grid-template-columns: 1fr 68mm;
    padding: 0;
}
.smart-resume-canvas.layout-sidebar-right .engine-main,
.smart-resume-canvas.layout-two-column-right .engine-main {
    padding: var(--space-page) 10mm;
}
.smart-resume-canvas.layout-sidebar-right .engine-sidebar,
.smart-resume-canvas.layout-two-column-right .engine-sidebar {
    background: var(--theme-sidebar-bg);
    border-left: 1.5px solid var(--theme-border);
    padding: var(--space-page) 8mm;
}

/* 4. Three Column */
.smart-resume-canvas.layout-three-column {
    display: grid;
    grid-template-columns: 50mm 1fr 50mm;
    padding: var(--space-page);
    gap: 6mm;
}

/* 5. Split Header */
.smart-resume-canvas.layout-split-header {
    display: flex;
    flex-direction: column;
    padding: 0;
}
.smart-resume-canvas.layout-split-header .engine-header {
    background: var(--theme-primary);
    color: #ffffff;
    padding: var(--space-page) var(--space-page) 8mm var(--space-page);
    border-bottom: 3.5px solid var(--theme-accent);
}
.smart-resume-canvas.layout-split-header .engine-body {
    padding: 8mm var(--space-page);
}

/* 6. Asymmetric Left */
.smart-resume-canvas.layout-asymmetric-left {
    display: grid;
    grid-template-columns: 55mm 1fr;
    padding: var(--space-page);
    gap: 8mm;
}

/* 7. Asymmetric Right */
.smart-resume-canvas.layout-asymmetric-right {
    display: grid;
    grid-template-columns: 1fr 55mm;
    padding: var(--space-page);
    gap: 8mm;
}

/* 8. Grid 2 Columns */
.smart-resume-canvas.layout-grid-2 .engine-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7mm;
}

/* 9. Card Grid */
.smart-resume-canvas.layout-card-grid {
    padding: var(--space-page);
}
.smart-resume-canvas.layout-card-grid .engine-section {
    background: #f8fafc;
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    padding: 3.5mm 5mm;
    margin-bottom: 4mm;
}

/* 10. Magazine / Editorial */
.smart-resume-canvas.layout-editorial,
.smart-resume-canvas.layout-magazine {
    padding: var(--space-page);
    border-top: 6px solid var(--theme-primary);
}

/* 11. Timeline Center */
.smart-resume-canvas.layout-timeline-center .engine-timeline-wrap {
    position: relative;
    padding: 0 4mm;
}

/* 12. Full Width Header Banner */
.smart-resume-canvas.layout-full-width-header .engine-header {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
    color: #ffffff;
    padding: 12mm 14mm;
}

/* --------------------------------------------------------------------------
   LAYER 2 — COMPONENTS & VARIATIONS
   -------------------------------------------------------------------------- */

/* ==========================================================================
   PROFILE PHOTO SYSTEM (SECTION 8)
   ========================================================================== */

/* Universal Profile Photo Wrapper */
.profile-photo-wrap,
.photo-wrapper {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    width: 28mm;
    height: 28mm;
    max-width: 105px;
    max-height: 105px;
    min-width: 75px;
    min-height: 75px;
    line-height: 0;
    margin: 0;
}

/* Universal Profile Photo Image */
.profile-photo-wrap img,
.photo-wrapper img,
.photo-img,
.profile-photo {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center 20% !important; /* Keep head and face in focal view */
    display: block !important;
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box;
}

/* Shape 1: Circle */
.photo-circle,
.profile-photo-wrap.photo-circle,
.photo-wrapper.photo-circle {
    border-radius: 50% !important;
    overflow: hidden;
}
.photo-circle img,
.profile-photo-wrap.photo-circle img,
.photo-wrapper.photo-circle img {
    border-radius: 50% !important;
}

/* Shape 2: Small Circle */
.photo-small-circle,
.profile-photo-wrap.photo-small-circle {
    width: 22mm !important;
    height: 22mm !important;
    min-width: 65px !important;
    min-height: 65px !important;
    border-radius: 50% !important;
    overflow: hidden;
}
.photo-small-circle img,
.profile-photo-wrap.photo-small-circle img {
    border-radius: 50% !important;
}

/* Shape 3: Large Circle */
.photo-large-circle,
.profile-photo-wrap.photo-large-circle {
    width: 35mm !important;
    height: 35mm !important;
    min-width: 115px !important;
    min-height: 115px !important;
    border-radius: 50% !important;
    overflow: hidden;
}
.photo-large-circle img,
.profile-photo-wrap.photo-large-circle img {
    border-radius: 50% !important;
}

/* Shape 4: Square */
.photo-square,
.profile-photo-wrap.photo-square {
    border-radius: 2px !important;
    overflow: hidden;
}
.photo-square img,
.profile-photo-wrap.photo-square img {
    border-radius: 2px !important;
}

/* Shape 5: Rounded Square / Squircle */
.photo-rounded-square,
.profile-photo-wrap.photo-rounded-square {
    border-radius: 14px !important;
    overflow: hidden;
}
.photo-rounded-square img,
.profile-photo-wrap.photo-rounded-square img {
    border-radius: 14px !important;
}

/* Shape 6: Soft Rectangle (Portrait 3:4) */
.photo-soft-rectangle,
.profile-photo-wrap.photo-soft-rectangle {
    width: 26mm !important;
    height: 34mm !important;
    max-width: 96px !important;
    max-height: 126px !important;
    border-radius: 10px !important;
    overflow: hidden;
}
.photo-soft-rectangle img,
.profile-photo-wrap.photo-soft-rectangle img {
    aspect-ratio: 3 / 4 !important;
    border-radius: 10px !important;
}

/* Shape 7: Hexagon */
.photo-hexagon,
.profile-photo-wrap.photo-hexagon,
.photo-hexagon img,
.profile-photo-wrap.photo-hexagon img {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
}

/* Shape 8: Photo Frame */
.photo-frame,
.profile-photo-wrap.photo-frame {
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    border-radius: 8px;
    background: #ffffff;
    padding: 2px;
}
.photo-frame img,
.profile-photo-wrap.photo-frame img {
    border-radius: 6px !important;
}

/* Shape 9: Photo with Border */
.photo-border,
.profile-photo-wrap.photo-border {
    border: 3px solid var(--theme-primary);
    border-radius: 50%;
    padding: 2px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.photo-border img,
.profile-photo-wrap.photo-border img {
    border-radius: 50% !important;
}

/* Shape 10: Photo with Accent Background */
.photo-accent-bg,
.profile-photo-wrap.photo-accent-bg {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
    padding: 3.5px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.photo-accent-bg img,
.profile-photo-wrap.photo-accent-bg img {
    border-radius: 50% !important;
    border: 2px solid #ffffff;
}

/* Shape 11: Photo Inside Card */
.photo-inside-card,
.profile-photo-wrap.photo-inside-card {
    background: #ffffff;
    border: 1px solid var(--theme-border);
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.photo-inside-card img,
.profile-photo-wrap.photo-inside-card img {
    border-radius: 8px !important;
}

/* --- User Photo Alignment Overrides --- */
.photo-align-left {
    order: -1;
    margin-right: 5mm;
}
.photo-align-center {
    order: 0;
    margin: 0 auto 3.5mm auto;
}
.photo-align-right {
    order: 2;
    margin-left: auto;
}

/* --- B. HEADERS (25+ STYLES WITH PHOTO FLEX ALIGNMENT) --- */
.engine-header {
    display: flex;
    align-items: center;
    gap: 6mm;
    margin-bottom: var(--space-section);
    position: relative;
}

/* Text group occupies remaining width and wraps gracefully */
.engine-header .header-text-group {
    flex: 1;
    min-width: 0;
}

/* 1. Left Aligned Header */
.engine-header.hdr-left-aligned,
.engine-header.hdr-profile-left,
.engine-header.hdr-minimal-line,
.engine-header.hdr-large-typography {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    border-bottom: 1.5px solid var(--theme-border);
    padding-bottom: 4mm;
}
.engine-header.hdr-left-aligned .profile-photo-wrap,
.engine-header.hdr-profile-left .profile-photo-wrap {
    margin-right: 1mm;
}

/* 2. Centered Header */
.engine-header.hdr-simple-centered,
.engine-header.hdr-centered,
.engine-header.hdr-profile-centered,
.engine-header.hdr-editorial,
.engine-header.hdr-executive {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 2px solid var(--theme-primary);
    padding-bottom: 4mm;
    gap: 3.5mm;
}
.engine-header.hdr-simple-centered .header-text-group,
.engine-header.hdr-centered .header-text-group,
.engine-header.hdr-profile-centered .header-text-group,
.engine-header.hdr-editorial .header-text-group,
.engine-header.hdr-executive .header-text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.engine-header.hdr-simple-centered .contact-wrap,
.engine-header.hdr-centered .contact-wrap,
.engine-header.hdr-profile-centered .contact-wrap,
.engine-header.hdr-editorial .contact-wrap,
.engine-header.hdr-executive .contact-wrap {
    justify-content: center;
}

/* 3. Right Aligned Header */
.engine-header.hdr-right-aligned,
.engine-header.hdr-profile-right {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    border-bottom: 1.5px solid var(--theme-border);
    padding-bottom: 4mm;
}
.engine-header.hdr-right-aligned .contact-wrap,
.engine-header.hdr-profile-right .contact-wrap {
    justify-content: flex-end;
}

/* 4. Split Header */
.engine-header.hdr-split {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--theme-primary);
    padding-bottom: 4mm;
}

/* 5. Color Block Header */
.engine-header.hdr-color-block {
    display: flex;
    align-items: center;
    gap: 6mm;
    background: var(--theme-primary);
    color: #ffffff;
    padding: 6mm 8mm;
    border-radius: 4px;
}
.engine-header.hdr-color-block .resume-name { color: #ffffff !important; }
.engine-header.hdr-color-block .resume-title { color: #e2e8f0 !important; }
.engine-header.hdr-color-block .contact-wrap,
.engine-header.hdr-color-block .contact-strip { color: #cbd5e1 !important; }
.engine-header.hdr-color-block .profile-photo-wrap {
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 6. Dark Header */
.engine-header.hdr-dark,
.engine-header.hdr-dark-header {
    display: flex;
    align-items: center;
    gap: 6mm;
    background: #0f172a;
    color: #ffffff;
    padding: 8mm 10mm;
    border-left: 4px solid var(--theme-accent);
}
.engine-header.hdr-dark .resume-name,
.engine-header.hdr-dark-header .resume-name { color: #ffffff !important; }
.engine-header.hdr-dark .resume-title,
.engine-header.hdr-dark-header .resume-title { color: var(--theme-accent) !important; }
.engine-header.hdr-dark .profile-photo-wrap,
.engine-header.hdr-dark-header .profile-photo-wrap {
    border: 3px solid var(--theme-accent);
}

/* 7. Executive Header Bar */
.engine-header.hdr-executive::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--theme-accent);
    margin: 2mm auto 0;
}

/* 8. Photo in Sidebar Alignment (Layouts with Sidebar) */
.engine-sidebar .profile-photo-wrap,
.engine-sidebar .photo-wrapper,
.smart-resume-canvas.layout-sidebar-left .engine-sidebar .profile-photo-wrap,
.smart-resume-canvas.layout-sidebar-right .engine-sidebar .profile-photo-wrap,
.smart-resume-canvas.layout-two-column-left .engine-sidebar .profile-photo-wrap,
.smart-resume-canvas.layout-two-column-right .engine-sidebar .profile-photo-wrap {
    display: flex;
    margin: 0 auto 5mm auto;
    width: 32mm;
    height: 32mm;
    max-width: 120px;
    max-height: 120px;
}

.resume-name {
    font-family: var(--theme-font-head);
    font-size: var(--font-scale-name);
    font-weight: 800;
    color: var(--theme-primary);
    line-height: 1.15;
    margin: 0 0 1mm 0;
    letter-spacing: -0.01em;
}

.resume-title {
    font-family: var(--theme-font-head);
    font-size: var(--font-scale-head);
    font-weight: 600;
    color: var(--theme-accent);
    margin: 0 0 2mm 0;
}

/* --- B. PROFILE PHOTO STYLES (10+ STYLES) --- */
.profile-photo-wrap {
    margin-bottom: 3mm;
}
.profile-photo-wrap.photo-none { display: none !important; }
.profile-photo-wrap.photo-circle .photo-img {
    width: 26mm;
    height: 26mm;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--theme-accent);
}
.profile-photo-wrap.photo-large-circle .photo-img {
    width: 32mm;
    height: 32mm;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--theme-primary);
}
.profile-photo-wrap.photo-square .photo-img {
    width: 26mm;
    height: 26mm;
    border-radius: 0;
    object-fit: cover;
    border: 1.5px solid var(--theme-border);
}
.profile-photo-wrap.photo-rounded-square .photo-img {
    width: 26mm;
    height: 26mm;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid var(--theme-primary);
}
.profile-photo-wrap.photo-frame .photo-img {
    width: 24mm;
    height: 24mm;
    border-radius: 4px;
    padding: 1.5mm;
    background: #ffffff;
    border: 1.5px solid var(--theme-accent);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* --- C. CONTACT SECTION (10+ STYLES) --- */
.contact-wrap {
    font-size: var(--font-scale-meta);
    color: var(--theme-text-muted);
}
.contact-wrap.contact-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5mm 3.5mm;
}
.contact-wrap.contact-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5mm;
}
.contact-wrap.contact-icon-list .contact-item {
    display: flex;
    align-items: center;
    gap: 2mm;
    margin-bottom: 1.5mm;
}
.contact-wrap.contact-pill-box .contact-item {
    background: #f1f5f9;
    padding: 0.8mm 2mm;
    border-radius: 3px;
    display: inline-block;
}
.contact-item .icon {
    color: var(--theme-accent);
    font-size: 8pt;
}

/* --- D. SECTION TITLES (20+ STYLES) --- */
.section-title-wrap {
    margin: var(--space-section) 0 2mm 0;
}
.section-title-wrap .sec-title {
    font-family: var(--theme-font-head);
    font-size: var(--font-scale-head);
    font-weight: 700;
    color: var(--theme-primary);
    margin: 0;
    line-height: 1.2;
}

.section-title-wrap.title-simple-uppercase .sec-title {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-title-wrap.title-underline .sec-title {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1.5px solid var(--theme-primary);
    padding-bottom: 1mm;
}

.section-title-wrap.title-double-line .sec-title {
    border-bottom: 3px double var(--theme-primary);
    padding-bottom: 1mm;
}

.section-title-wrap.title-left-border {
    border-left: 3.5px solid var(--theme-accent);
    padding-left: 2.5mm;
}

.section-title-wrap.title-colored-block {
    background: var(--theme-primary);
    color: #ffffff !important;
    padding: 1.2mm 3mm;
    border-radius: 2px;
}
.section-title-wrap.title-colored-block .sec-title {
    color: #ffffff !important;
    font-size: 8.5pt;
    letter-spacing: 0.05em;
}

.section-title-wrap.title-capsule {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid var(--theme-border);
    padding: 1mm 3mm;
    border-radius: 12px;
}

.section-title-wrap.title-editorial .sec-title {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 11pt;
    border-bottom: 1px solid var(--theme-border);
    padding-bottom: 1mm;
}

/* --- E. EXPERIENCE COMPONENTS (20+ STYLES) --- */
.exp-item {
    margin-bottom: var(--space-item);
    page-break-inside: avoid;
}
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5mm;
}
.exp-role {
    font-weight: 700;
    color: var(--theme-text-dark);
    font-size: var(--font-scale-body);
}
.exp-company {
    font-weight: 600;
    color: var(--theme-primary);
    font-size: 8.5pt;
}
.exp-date {
    font-size: var(--font-scale-meta);
    color: var(--theme-text-muted);
}
.exp-bullets {
    margin: 1mm 0 0 0;
    padding-left: 4.5mm;
    font-size: 8.5pt;
    color: #334155;
}
.exp-bullets li {
    margin-bottom: 0.8mm;
}

/* Timeline experience */
.exp-style-timeline {
    position: relative;
    padding-left: 5mm;
    border-left: 1.5px solid var(--theme-border);
}
.exp-style-timeline .exp-item {
    position: relative;
}
.exp-style-timeline .exp-item::before {
    content: '';
    position: absolute;
    left: -5.75mm;
    top: 1mm;
    width: 2mm;
    height: 2mm;
    border-radius: 50%;
    background: var(--theme-accent);
    border: 1px solid #ffffff;
}

/* Cards experience */
.exp-style-cards .exp-item {
    background: #f8fafc;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    padding: 2.5mm 3.5mm;
}

/* Border Left experience */
.exp-style-border-left .exp-item {
    border-left: 2.5px solid var(--theme-accent);
    padding-left: 3mm;
}

/* Compact ATS experience */
.exp-style-compact-ats .exp-item {
    margin-bottom: 2mm;
}
.exp-style-compact-ats .exp-header {
    margin-bottom: 0;
}

/* --- F. EDUCATION COMPONENTS (12+ STYLES) --- */
.edu-item {
    margin-bottom: 2.5mm;
    page-break-inside: avoid;
}
.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.edu-degree {
    font-weight: 700;
    color: var(--theme-text-dark);
    font-size: 9pt;
}
.edu-institution {
    font-weight: 600;
    color: var(--theme-primary);
    font-size: 8.5pt;
}
.edu-date {
    font-size: 8pt;
    color: var(--theme-text-muted);
}
.edu-style-cards .edu-item {
    background: #f8fafc;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    padding: 2mm 3mm;
}

/* --- G. SKILLS COMPONENTS (15+ STYLES) --- */
.skills-wrap {
    margin-top: 1mm;
}

/* Tags & Pills */
.skills-wrap.skills-tags,
.skills-wrap.skills-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5mm;
}
.skills-wrap.skills-tags .skill-badge {
    background: #ffffff;
    border: 1px solid var(--theme-border);
    padding: 0.8mm 2.2mm;
    border-radius: 2px;
    font-size: 8pt;
    font-weight: 600;
    color: var(--theme-primary);
}
.skills-wrap.skills-pills .skill-badge {
    background: #f1f5f9;
    padding: 0.8mm 2.5mm;
    border-radius: 10px;
    font-size: 8pt;
    font-weight: 600;
    color: var(--theme-text-dark);
    border-left: 2px solid var(--theme-accent);
}

/* Progress Bars */
.skills-wrap.skills-progress-bars .skill-bar-row {
    margin-bottom: 1.8mm;
}
.skills-wrap.skills-progress-bars .skill-name-row {
    display: flex;
    justify-content: space-between;
    font-size: 8pt;
    font-weight: 600;
    margin-bottom: 0.5mm;
}
.skills-wrap.skills-progress-bars .bar-track {
    width: 100%;
    height: 1.5mm;
    background: #e2e8f0;
    border-radius: 1mm;
    overflow: hidden;
}
.skills-wrap.skills-progress-bars .bar-fill {
    height: 100%;
    background: var(--theme-primary);
    border-radius: 1mm;
}

/* Rating Dots */
.skills-wrap.skills-rating-dots .skill-dot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 8pt;
    margin-bottom: 1.2mm;
}
.skills-wrap.skills-rating-dots .dot-group {
    display: flex;
    gap: 1mm;
}
.skills-wrap.skills-rating-dots .dot {
    width: 2mm;
    height: 2mm;
    border-radius: 50%;
    background: #cbd5e1;
}
.skills-wrap.skills-rating-dots .dot.filled {
    background: var(--theme-accent);
}

/* ATS Plain Text */
.skills-wrap.skills-ats-plain {
    font-size: 8.5pt;
    color: #334155;
    line-height: 1.5;
}

/* --- H. PROJECTS, CERTS & LANGUAGES --- */
.project-item {
    margin-bottom: 2.5mm;
    page-break-inside: avoid;
}
.project-name {
    font-weight: 700;
    font-size: 9pt;
    color: var(--theme-text-dark);
}
.project-desc {
    font-size: 8.5pt;
    color: #334155;
    margin: 0.5mm 0 0 0;
}
.badge-cert, .badge-lang {
    font-size: 8pt;
    color: var(--theme-text-dark);
    margin-bottom: 1.2mm;
}

/* --------------------------------------------------------------------------
   LAYER 3 — TYPOGRAPHY SYSTEMS (FONT PAIRINGS)
   -------------------------------------------------------------------------- */
.smart-resume-canvas.font-inter { --theme-font-head: 'Inter', sans-serif; --theme-font-body: 'Inter', sans-serif; }
.smart-resume-canvas.font-outfit-inter { --theme-font-head: 'Outfit', sans-serif; --theme-font-body: 'Inter', sans-serif; }
.smart-resume-canvas.font-playfair-inter { --theme-font-head: 'Playfair Display', Georgia, serif; --theme-font-body: 'Inter', sans-serif; }
.smart-resume-canvas.font-montserrat-roboto { --theme-font-head: 'Montserrat', sans-serif; --theme-font-body: 'Roboto', sans-serif; }
.smart-resume-canvas.font-georgia { --theme-font-head: 'Georgia', serif; --theme-font-body: 'Georgia', serif; }
.smart-resume-canvas.font-times { --theme-font-head: 'Times New Roman', serif; --theme-font-body: 'Times New Roman', serif; }
.smart-resume-canvas.font-jetbrains-inter { --theme-font-head: 'JetBrains Mono', monospace; --theme-font-body: 'Inter', sans-serif; }
.smart-resume-canvas.font-poppins-lato { --theme-font-head: 'Poppins', sans-serif; --theme-font-body: 'Lato', sans-serif; }

/* --------------------------------------------------------------------------
   LAYER 4 — THEME & COLOR PALETTES (50+ CURATED PALETTES)
   -------------------------------------------------------------------------- */
.theme-corporate-blue { --theme-primary: #1e40af; --theme-accent: #3b82f6; --theme-sidebar-bg: #eff6ff; }
.theme-navy { --theme-primary: #1e293b; --theme-accent: #0284c7; --theme-sidebar-bg: #f8fafc; }
.theme-midnight { --theme-primary: #0f172a; --theme-accent: #6366f1; --theme-sidebar-bg: #f1f5f9; }
.theme-slate { --theme-primary: #334155; --theme-accent: #64748b; --theme-sidebar-bg: #f8fafc; }
.theme-charcoal { --theme-primary: #18181b; --theme-accent: #3f3f46; --theme-sidebar-bg: #fafafa; }
.theme-black { --theme-primary: #000000; --theme-accent: #262626; --theme-sidebar-bg: #f5f5f5; }
.theme-emerald { --theme-primary: #064e3b; --theme-accent: #059669; --theme-sidebar-bg: #ecfdf5; }
.theme-teal { --theme-primary: #0f766e; --theme-accent: #14b8a6; --theme-sidebar-bg: #f0fdfa; }
.theme-cyan { --theme-primary: #0891b2; --theme-accent: #06b6d4; --theme-sidebar-bg: #ecfeff; }
.theme-ocean { --theme-primary: #0369a1; --theme-accent: #0284c7; --theme-sidebar-bg: #f0f9ff; }
.theme-royal-blue { --theme-primary: #1d4ed8; --theme-accent: #2563eb; --theme-sidebar-bg: #eff6ff; }
.theme-indigo { --theme-primary: #4338ca; --theme-accent: #6366f1; --theme-sidebar-bg: #eef2ff; }
.theme-purple { --theme-primary: #6b21a8; --theme-accent: #9333ea; --theme-sidebar-bg: #faf5ff; }
.theme-violet { --theme-primary: #581c87; --theme-accent: #7c3aed; --theme-sidebar-bg: #f5f3ff; }
.theme-burgundy { --theme-primary: #881337; --theme-accent: #e11d48; --theme-sidebar-bg: #fff1f2; }
.theme-wine { --theme-primary: #701a75; --theme-accent: #c026d3; --theme-sidebar-bg: #fdf4ff; }
.theme-crimson { --theme-primary: #991b1b; --theme-accent: #dc2626; --theme-sidebar-bg: #fef2f2; }
.theme-coral { --theme-primary: #c2410c; --theme-accent: #ea580c; --theme-sidebar-bg: #fff7ed; }
.theme-amber { --theme-primary: #92400e; --theme-accent: #d97706; --theme-sidebar-bg: #fffbeb; }
.theme-gold { --theme-primary: #854d0e; --theme-accent: #ca8a04; --theme-sidebar-bg: #fefce8; }
.theme-forest { --theme-primary: #14532d; --theme-accent: #16a34a; --theme-sidebar-bg: #f0fdf4; }
.theme-olive { --theme-primary: #3f6212; --theme-accent: #65a30d; --theme-sidebar-bg: #f7fee7; }
.theme-sage { --theme-primary: #2e4a3e; --theme-accent: #4d7a66; --theme-sidebar-bg: #f3f7f5; }
.theme-graphite { --theme-primary: #27272a; --theme-accent: #71717a; --theme-sidebar-bg: #fafafa; }
.theme-monochrome { --theme-primary: #171717; --theme-accent: #525252; --theme-sidebar-bg: #fafafa; }
.theme-navy-gold { --theme-primary: #0f172a; --theme-accent: #d97706; --theme-sidebar-bg: #f8fafc; }
.theme-black-gold { --theme-primary: #0a0a0a; --theme-accent: #ca8a04; --theme-sidebar-bg: #fdfbf7; }
.theme-emerald-gold { --theme-primary: #064e3b; --theme-accent: #d97706; --theme-sidebar-bg: #f0fdf4; }

/* --------------------------------------------------------------------------
   LAYER 5 — SPACING & DENSITY MODES
   -------------------------------------------------------------------------- */
.smart-resume-canvas.density-ultra-compact {
    --space-page: 8mm;
    --space-section: 2.5mm;
    --space-item: 1.8mm;
    --font-scale-body: 8pt;
    --font-scale-name: 17pt;
    --font-scale-head: 8.5pt;
    line-height: 1.3;
}
.smart-resume-canvas.density-compact {
    --space-page: 10mm;
    --space-section: 3mm;
    --space-item: 2.2mm;
    --font-scale-body: 8.5pt;
    --font-scale-name: 18pt;
    --font-scale-head: 9pt;
    line-height: 1.35;
}
.smart-resume-canvas.density-balanced {
    --space-page: 13mm;
    --space-section: 4mm;
    --space-item: 3mm;
    --font-scale-body: 9pt;
    --font-scale-name: 20pt;
    --font-scale-head: 9.5pt;
    line-height: 1.45;
}
.smart-resume-canvas.density-comfortable {
    --space-page: 16mm;
    --space-section: 5mm;
    --space-item: 3.5mm;
    --font-scale-body: 9.5pt;
    --font-scale-name: 21pt;
    --font-scale-head: 10pt;
    line-height: 1.5;
}
.smart-resume-canvas.density-airy {
    --space-page: 19mm;
    --space-section: 6mm;
    --space-item: 4mm;
    --font-scale-body: 10pt;
    --font-scale-name: 23pt;
    --font-scale-head: 10.5pt;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   PRINT ENGINE (A4 DIMENSIONS & PDF OPTIMIZATION)
   -------------------------------------------------------------------------- */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .smart-resume-canvas {
        width: 210mm !important;
        min-height: 297mm !important;
        height: auto !important;
        box-shadow: none !important;
        margin: 0 !important;
    }
    .exp-item, .edu-item, .project-item, .engine-section {
        page-break-inside: avoid !important;
    }
    .sr-only, .no-print {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
}
