/* Base styles for proper PDF rendering */
body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.4;
    color: #000;
    margin: 0;
    padding: 15px;
}

/* Header styles - left/right layout */
.header {
    display: table;
    width: 100%;
    margin-bottom: 15px;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
}

.header-left {
    display: table-cell;
    width: 65%;
    vertical-align: top;
}

.header-right {
    display: table-cell;
    width: 35%;
    vertical-align: top;
    text-align: right;
    font-size: 9pt;
    padding-top: 16px;
}

.name {
    font-size: 22pt;
    font-weight: bold;
    margin-bottom: 3px;
    line-height: 1;
}

.contact-email {
    font-size: 10pt;
    margin-bottom: 6px;
}

.header .summary {
    font-size: 10pt;
    text-align: justify;
    margin-top: 6px;
}

.contact-item {
    margin-bottom: 2px;
    color: #333;
    font-size: 9pt;
}

/* Section styles */
section {
    margin-bottom: 20px;
}

h2 {
    font-size: 13pt;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
    margin: 20px 0 12px 0;
}

/* Experience styles - Single line layout */
.job {
    margin-bottom: 15px;
}

.job-header {
    margin-bottom: 8px;
}

.company-name {
    font-size: 11pt;
    font-weight: bold;
    color: #10b981;
    display: inline;
}

.position-dates {
    display: inline;
    margin-left: 8px;
}

.position-title {
    font-size: 11pt;
    color: #333;
    display: inline;
}

.separator {
    color: #666;
    font-size: 11pt;
    margin: 0 6px;
    display: inline;
}

.dates {
    font-size: 11pt;
    color: #666;
    display: inline;
}

.job-description {
    font-size: 10pt;
    margin: 6px 0;
    text-align: justify;
}

/* Technologies and skills inline items */
.tech-tag, .skill-item {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 6px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 9pt;
}

/* Consistent bullet styles */
ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Print styles */
@media print {
    @page {
        size: letter;
        margin: 0.5in;
    }
    
    body {
        margin: 0;
        padding: 0;
    }
    
    /* Keep entire positions together on same page */
    .job {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Allow page breaks between positions if needed */
    .job + .job {
        page-break-before: auto;
    }
    
    /* Force page break after every 2-3 positions if they're short */
    .job:nth-child(3n) {
        page-break-after: auto;
    }
    
    /* Keep education items together */
    .degree {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Keep projects together */
    .project {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Keep section headers with content */
    h2 {
        page-break-after: avoid;
        break-after: avoid;
    }
    
    /* Prevent orphaned list items */
    ul {
        page-break-inside: avoid;
    }
    
    .tech-tag, .skill-item {
        page-break-inside: avoid;
    }
    
    /* Page break before Skills section */
    #skills {
        page-break-before: always;
    }
}