/* ==================== RESUME PAGE BASE ==================== */
.resume-page {
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    line-height: 1.4;
    color: #1f2937;
    background: white;
    width: 210mm;
    min-height: 297mm;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

/* ==================== TEMPLATE WRAPPERS ==================== */
.template-professional,
.template-minimal,
.template-modern {
    width: 100%;
    min-height: 297mm;
    display: flex;
    flex-direction: column;
}

/* ==================== RESUME HEADER ==================== */
.resume-header {
    padding: 28px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.header-info {
    flex: 1;
}

.resume-name {
    font-size: 24pt;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}

.resume-title {
    font-size: 11pt;
    font-weight: 500;
    margin: 0 0 12px 0;
    opacity: 0.9;
}

.resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 8.5pt;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.contact-icon {
    font-size: 10pt;
}

/* Photo */
.resume-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    margin-left: 20px;
}

/* ==================== BODY ROW (Sidebar + Main) ==================== */
/* Use table layout — most reliable for PDF rendering */
.resume-body {
    display: table;
    width: 100%;
    flex: 1;
    table-layout: fixed;
}

/* ==================== SIDEBAR ==================== */
.resume-sidebar {
    display: table-cell;
    width: 32%;
    padding: 24px 20px;
    vertical-align: top;
    box-sizing: border-box;
}

/* ==================== MAIN CONTENT ==================== */
.resume-main {
    display: table-cell;
    width: 68%;
    padding: 28px 36px;
    vertical-align: top;
    background: white;
    box-sizing: border-box;
}

/* ==================== SECTION STYLING ==================== */
.section {
    margin-bottom: 18px;
}

.section-heading {
    font-size: 10pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid currentColor;
}

/* Experience/Education Items */
.item {
    margin-bottom: 12px;
}

.item:last-child {
    margin-bottom: 0;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3px;
}

.item-title {
    font-size: 10pt;
    font-weight: 700;
}

.item-date {
    font-size: 8pt;
    color: #6b7280;
    white-space: nowrap;
    margin-left: 8px;
}

.item-subtitle {
    font-size: 9pt;
    color: #4b5563;
    margin: 2px 0;
}

.item-description {
    font-size: 8.5pt;
    color: #374151;
    margin: 3px 0 0 0;
    line-height: 1.5;
}

/* Skills */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.skill-tag {
    padding: 3px 8px;
    font-size: 8pt;
    font-weight: 500;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
}

/* Summary */
.summary-text {
    font-size: 9pt;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

/* Simple List */
.simple-list {
    font-size: 9pt;
    line-height: 1.8;
}

/* Custom Section */
.custom-section-list {
    margin: 0;
    padding-left: 16px;
}

.custom-section-item {
    font-size: 9pt;
    line-height: 1.7;
    color: #374151;
}

/* Resume Footer — name signature */
.resume-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 36px 14px;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.resume-footer-signature {
    font-size: 10pt;
    font-style: italic;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.3px;
}


/* ==================== TEMPLATE 1: PROFESSIONAL ==================== */
.template-professional .resume-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
}

.template-professional .resume-sidebar {
    background: #1e3a8a;
    color: white;
}

.template-professional .resume-sidebar .section-heading {
    color: #93c5fd;
    border-color: #93c5fd;
}

.template-professional .resume-sidebar .skill-tag {
    background: rgba(147, 197, 253, 0.2);
    color: #dbeafe;
}

.template-professional .resume-sidebar .simple-list {
    color: #dbeafe;
}

.template-professional .resume-sidebar .item-subtitle {
    color: #bfdbfe;
}

.template-professional .resume-sidebar .item-date {
    color: #93c5fd;
}

.template-professional .resume-main {
    background: white;
}

.template-professional .resume-main .section-heading {
    color: #1e40af;
    border-color: #1e40af;
}

/* ==================== TEMPLATE 2: MINIMAL ==================== */
.template-minimal {
    background: white;
}

.template-minimal .resume-header {
    background: #f9fafb;
    border-bottom: 3px solid #111827;
    color: #111827;
}

.template-minimal .resume-name {
    color: #111827;
}

.template-minimal .resume-title {
    color: #4b5563;
}

.template-minimal .resume-contact {
    color: #374151;
}

.template-minimal .resume-sidebar {
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    color: #111827;
}

.template-minimal .resume-sidebar .section-heading {
    color: #111827;
    border-color: #111827;
}

.template-minimal .resume-sidebar .skill-tag {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.template-minimal .resume-main {
    background: white;
}

.template-minimal .resume-main .section-heading {
    color: #111827;
    border-color: #111827;
}

/* ==================== TEMPLATE 3: MODERN ==================== */
.template-modern .resume-header {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
}

.template-modern .resume-photo {
    border-color: white;
}

.template-modern .resume-sidebar {
    background: #f0fdfa;
    color: #134e4a;
}

.template-modern .resume-sidebar .section-heading {
    color: #0f766e;
    border-color: #0f766e;
}

.template-modern .resume-sidebar .skill-tag {
    background: #ccfbf1;
    color: #0f766e;
}

.template-modern .resume-main {
    background: white;
}

.template-modern .resume-main .section-heading {
    color: #0f766e;
    border-color: #0f766e;
}

/* ==================== COLOR SCHEME OVERRIDES ==================== */
/* Teal */
.color-teal .template-professional .resume-header {
    background: linear-gradient(135deg, #0d9488, #0f766e);
}

.color-teal .template-professional .resume-sidebar {
    background: #0f766e;
}

.color-teal .template-professional .resume-sidebar .section-heading {
    color: #5eead4;
    border-color: #5eead4;
}

.color-teal .template-professional .resume-main .section-heading {
    color: #0f766e;
    border-color: #0f766e;
}

/* Purple */
.color-purple .template-professional .resume-header {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.color-purple .template-professional .resume-sidebar {
    background: #5b21b6;
}

.color-purple .template-professional .resume-sidebar .section-heading {
    color: #c4b5fd;
    border-color: #c4b5fd;
}

.color-purple .template-professional .resume-main .section-heading {
    color: #7c3aed;
    border-color: #7c3aed;
}

/* Red */
.color-red .template-professional .resume-header {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.color-red .template-professional .resume-sidebar {
    background: #b91c1c;
}

.color-red .template-professional .resume-sidebar .section-heading {
    color: #fca5a5;
    border-color: #fca5a5;
}

.color-red .template-professional .resume-main .section-heading {
    color: #dc2626;
    border-color: #dc2626;
}

/* Gray */
.color-gray .template-professional .resume-header {
    background: linear-gradient(135deg, #4b5563, #374151);
}

.color-gray .template-professional .resume-sidebar {
    background: #374151;
}

.color-gray .template-professional .resume-sidebar .section-heading {
    color: #d1d5db;
    border-color: #d1d5db;
}

.color-gray .template-professional .resume-main .section-heading {
    color: #4b5563;
    border-color: #4b5563;
}

/* ==================== TEMPLATE WRAPPERS (all 7) ==================== */
.template-professional,
.template-minimal,
.template-modern,
.template-crimson,
.template-executive,
.template-forest,
.template-rosegold {
    width: 100%;
    min-height: 297mm;
    display: flex;
    flex-direction: column;
}

/* ==================== TEMPLATE 4: CRIMSON ==================== */
.template-crimson .resume-header {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

.template-crimson .resume-photo {
    border-color: #fca5a5;
}

.template-crimson .resume-sidebar {
    background: #7f1d1d;
    color: white;
}

.template-crimson .resume-sidebar .section-heading {
    color: #fca5a5;
    border-color: #fca5a5;
}

.template-crimson .resume-sidebar .skill-tag {
    background: rgba(252, 165, 165, 0.2);
    color: #fecaca;
}

.template-crimson .resume-sidebar .simple-list {
    color: #fecaca;
}

.template-crimson .resume-sidebar .item-subtitle {
    color: #fca5a5;
}

.template-crimson .resume-sidebar .item-date {
    color: #fca5a5;
}

.template-crimson .resume-main {
    background: white;
}

.template-crimson .resume-main .section-heading {
    color: #dc2626;
    border-color: #dc2626;
}

.template-crimson .resume-main .item-title {
    color: #1f2937;
}

/* ==================== TEMPLATE 5: EXECUTIVE ==================== */
.template-executive .resume-header {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: white;
}

.template-executive .resume-photo {
    border-color: #d1d5db;
    border-width: 2px;
}

.template-executive .resume-sidebar {
    background: #1f2937;
    color: #e5e7eb;
}

.template-executive .resume-sidebar .section-heading {
    color: #f59e0b;
    border-color: #f59e0b;
}

.template-executive .resume-sidebar .skill-tag {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.template-executive .resume-sidebar .simple-list {
    color: #d1d5db;
}

.template-executive .resume-sidebar .item-subtitle {
    color: #9ca3af;
}

.template-executive .resume-sidebar .item-date {
    color: #9ca3af;
}

.template-executive .resume-main {
    background: #f9fafb;
}

.template-executive .resume-main .section-heading {
    color: #111827;
    border-color: #f59e0b;
}

.template-executive .resume-main .item-title {
    color: #111827;
}

.template-executive .resume-footer {
    background: #1f2937;
    border-top: 1px solid #374151;
}

.template-executive .resume-footer-signature {
    color: #f59e0b;
}

/* ==================== TEMPLATE 6: FOREST ==================== */
.template-forest .resume-header {
    background: linear-gradient(135deg, #166534 0%, #14532d 100%);
    color: white;
}

.template-forest .resume-photo {
    border-color: #86efac;
}

.template-forest .resume-sidebar {
    background: #14532d;
    color: white;
}

.template-forest .resume-sidebar .section-heading {
    color: #86efac;
    border-color: #86efac;
}

.template-forest .resume-sidebar .skill-tag {
    background: rgba(134, 239, 172, 0.15);
    color: #bbf7d0;
}

.template-forest .resume-sidebar .simple-list {
    color: #bbf7d0;
}

.template-forest .resume-sidebar .item-subtitle {
    color: #86efac;
}

.template-forest .resume-sidebar .item-date {
    color: #86efac;
}

.template-forest .resume-main {
    background: white;
}

.template-forest .resume-main .section-heading {
    color: #166534;
    border-color: #166534;
}

/* ==================== TEMPLATE 7: ROSE GOLD ==================== */
.template-rosegold .resume-header {
    background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
    color: white;
}

.template-rosegold .resume-photo {
    border-color: #fbcfe8;
}

.template-rosegold .resume-sidebar {
    background: #fdf2f8;
    color: #831843;
    border-right: 3px solid #f9a8d4;
}

.template-rosegold .resume-sidebar .section-heading {
    color: #be185d;
    border-color: #f9a8d4;
}

.template-rosegold .resume-sidebar .skill-tag {
    background: #fce7f3;
    color: #9d174d;
    border: 1px solid #f9a8d4;
}

.template-rosegold .resume-sidebar .simple-list {
    color: #9d174d;
}

.template-rosegold .resume-sidebar .item-subtitle {
    color: #be185d;
}

.template-rosegold .resume-sidebar .item-date {
    color: #9d174d;
}

.template-rosegold .resume-main {
    background: white;
}

.template-rosegold .resume-main .section-heading {
    color: #be185d;
    border-color: #f9a8d4;
}

/* ==================== PRINT / PDF OVERRIDES ==================== */
@media print {
    .resume-page {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding: 0;
        box-shadow: none;
        transform: none !important;
    }

    .resume-sidebar,
    .resume-main,
    .resume-header,
    .resume-body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
}
