
.tmpl-modern-1 {
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    line-height: 1.5;
}

.tmpl-modern-1 .personal-info-block {
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #334155;
}

.tmpl-modern-1 .personal-info-block p {
    margin-bottom: 0.25rem;
}

.tmpl-modern-1 .tmpl-header {
    border-bottom: 3px solid var(--primary, #1e3a8a);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.tmpl-modern-1 .header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.tmpl-modern-1 .header-text {
    flex: 1;
}

.tmpl-modern-1 .header-photo {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary, #1e3a8a);
    margin-left: 1rem;
}

.tmpl-modern-1 .header-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tmpl-modern-1 .section-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #1e3a8a;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 0.4rem;
    margin: 2rem 0 1rem;
    font-weight: 800;
}

.tmpl-modern-1 .list-simple p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.tmpl-modern-1 .item-award {
    font-weight: 500;
    color: #475569;
}

.tmpl-modern-1 .name {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    color: #1e3a8a;
}

.tmpl-modern-1 .title {
    font-size: 1.25rem;
    color: #475569;
    font-weight: 600;
    margin-top: 0.25rem;
}

.tmpl-modern-1 .contact-info {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #64748b;
}

.tmpl-modern-1 .contact-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tmpl-modern-1 .contact-info i {
    color: #4f46e5;
}

.tmpl-modern-1 .section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4f46e5;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    font-weight: 700;
}

.tmpl-modern-1 .tmpl-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
}

.tmpl-modern-1 .list-item {
    margin-bottom: 1.5rem;
}

.tmpl-modern-1 .item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.tmpl-modern-1 .company {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.tmpl-modern-1 .skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tmpl-modern-1 .skills-tags span {
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tmpl-corp-1 {
    font-family: 'Playfair Display', serif;
    position: relative;
    padding-left: 10mm;
}

.tmpl-corp-1 .sidebar-stripe {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5mm;
    background: #0f172a;
}

.tmpl-corp-1 .name {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.tmpl-corp-1 .title-strip {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

.tmpl-corp-1 .contact-bar {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    color: #64748b;
}

.tmpl-corp-1 .section-heading {
    font-size: 1.25rem;
    border-left: 3px solid #0f172a;
    padding-left: 1rem;
    margin: 1.5rem 0 1rem;
}

/* Template: Modern Beta (modern-2) */
.tmpl-modern-2 .header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 2rem;
    border-radius: 8px;
}

.tmpl-modern-2 .name {
    font-size: 2.25rem;
    color: #1e293b;
}

.tmpl-modern-2 .contact-grid {
    text-align: right;
    font-size: 0.85rem;
}

.tmpl-modern-2 .section-title {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin: 1.5rem 0 1rem;
    font-size: 1.1rem;
}

/* Template: Dev Mono (tech-1) */
.tmpl-tech-1 {
    font-family: 'JetBrains Mono', monospace;
    background: #0f172a;
    color: #94a3b8;
    padding: 1.5rem;
}

.tmpl-tech-1 .name {
    color: #38bdf8;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tmpl-tech-1 h3 {
    color: #fbbf24;
    font-size: 1rem;
    margin: 1.5rem 0 1rem;
}

.tmpl-tech-1 .code-item {
    margin-bottom: 1rem;
    border-left: 1px solid #1e293b;
    padding-left: 1rem;
}

.tmpl-tech-1 .line {
    font-size: 0.85rem;
}

.tmpl-tech-1 .indent {
    padding-left: 1.5rem;
}

.tmpl-tech-1 .desc {
    color: #f8fafc;
    margin-top: 0.5rem;
}

.tmpl-tech-1 code {
    background: #1e293b;
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Template: Artisan Bold (creative-1) */
.tmpl-creative-1 {
    position: relative;
    overflow: hidden;
}

.tmpl-creative-1 .bg-shape {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: #f472b6;
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

.tmpl-creative-1 .name {
    font-size: 3.5rem;
    color: #db2777;
    font-weight: 900;
}

.tmpl-creative-1 .main-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 2rem;
}

.tmpl-creative-1 h2 {
    color: #db2777;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Template: Scholar Standard (academic-1) */
.tmpl-academic-1 {
    font-family: 'Times New Roman', serif;
    padding: 0;
    line-height: 1.4;
}

.tmpl-academic-1 .header {
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tmpl-academic-1 .name {
    font-size: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.tmpl-academic-1 .contact {
    font-size: 0.9rem;
}

.tmpl-academic-1 .cv-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    margin: 1.5rem 0 0.5rem;
}

.tmpl-academic-1 .cv-item {
    margin-bottom: 0.75rem;
}

.tmpl-academic-1 .row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

.tmpl-academic-1 .date {
    font-style: italic;
}

/* Variant Styling */
.tmpl-variant-2 {
    --primary: #059669;
}

.tmpl-variant-3 {
    --primary: #dc2626;
}

.tmpl-variant-4 {
    --primary: #d97706;
}

.tmpl-variant-5 {
    --primary: #7c3aed;
}

.tmpl-variant-6 {
    --primary: #2563eb;
}

.tmpl-variant-7 {
    --primary: #db2777;
}

.tmpl-variant-8 {
    --primary: #0891b2;
}

.tmpl-variant-9 {
    --primary: #4b5563;
}

.tmpl-variant-10 {
    --primary: #000000;
}

.tmpl-variant-2 {
    font-family: 'Outfit', sans-serif !important;
}

.tmpl-variant-4 {
    font-family: 'Playfair Display', serif !important;
}

.tmpl-variant-6 {
    font-family: 'Inter', sans-serif !important;
}

/* Common/Placeholder styles */
.placeholder {
    color: #cbd5e1;
    font-style: italic;
    font-size: 0.9rem;
}

/* Print and Page Break Optimization */
@media print {
    @page {
        size: A4;
        margin: 20mm 10mm 10mm 10mm; /* top, right, bottom, left - 20mm top for page 2+ spacing */
    }

    body {
        margin: 0;
        padding: 0;
    }

    .resume-paper {
        box-shadow: none;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* Ensure headers maintain size on all pages */
    .name,
    .tmpl-header,
    .header,
    h1,
    h2,
    h3 {
        font-size: inherit !important;
        transform: scale(1) !important;
    }
}

/* Prevent awkward page breaks */
.cv-section,
.tmpl-section,
.section-content {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* Keep headers intact and maintain sizing across pages */
.tmpl-header,
.header,
.header-content,
.header-text,
.header-photo {
    page-break-inside: avoid;
    break-inside: avoid;
}



/* Individual CV items should avoid breaking */
.cv-item,
.tmpl-item,
.experience-item,
.education-item,
.project-item,
.item-experience,
.item-education,
.item-project,
.item-skill,
.item-award,
.item-reference {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 1rem;
}

/* Ensure proper spacing after page breaks */
.cv-section:not(:first-child),
.tmpl-section:not(:first-child) {
    padding-top: 0;
}

/* For content that appears after a page break */
* {
    page-break-after: auto;
    break-after: auto;
}

.cv-section {
    position: relative;
}

@media print {

    /* Add space at top of each new page */
    .cv-section,
    .tmpl-section {
        page-break-before: auto;
        break-before: auto;
        padding-top: 0;
    }
}

/* Headers should stay with their content */
.section-title,
.cv-title,
h2,
h3 {
    page-break-after: avoid;
    break-after: avoid;
}

/* Orphan and widow control for better text flow */
p,
.cv-description,
.tmpl-description {
    orphans: 3;
    widows: 3;
}

/* For multi-page documents, allow sections to break only at logical points */
.cv-section:not(:last-child),
.tmpl-section:not(:last-child) {
    page-break-after: auto;
    break-after: auto;
}

/* Force page breaks before major sections if needed (commented out by default) */
/* 
.cv-section.force-new-page {
    page-break-before: always;
    break-before: page;
}
*/