/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Color Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #333;
    --light-gray: #ecf0f1;
    --border-color: #bdc3c7;
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background: #f5f5f5;
}

/* Screen Styles */
@media screen {
    .resume-container {
        width: 210mm;
        min-height: 297mm;
        margin: 20px auto;
        padding: 20mm;
        background: white;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
}

/* Header */
header {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-text {
    flex: 1;
    padding-right: 20px;
}

.profile-image-container {
    flex-shrink: 0;
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

h1 {
    font-size: 32px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.contact-info {
    font-size: 14px;
    color: var(--secondary-color);
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact-info .separator {
    margin: 0 10px;
    color: var(--border-color);
}

/* Section Headers */
h2 {
    font-size: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 5px;
    margin-bottom: 15px;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 600;
}

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

.summary p {
    text-align: justify;
    font-size: 14px;
    line-height: 1.6;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    font-size: 13px;
}

.skill-category {
    margin-bottom: 5px;
}

.skill-category strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Experience */
.job {
    margin-bottom: 18px;
}

.job-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 8px;
    gap: 8px;
}

.job-header h3 {
    margin-right: 10px;
    flex: 0 0 auto;
}

.job-header .company {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 15px;
    flex: 1 1 auto;
}

.job-header .dates {
    color: var(--secondary-color);
    font-size: 13px;
    font-style: italic;
    margin-left: auto;
}

.job ul {
    margin-left: 20px;
    font-size: 13px;
    line-height: 1.5;
}

.job ul li {
    margin-bottom: 3px;
    list-style-type: disc;
}

/* Accomplishments */
.accomplishments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    font-size: 13px;
}

.accomplishment h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.accomplishment p {
    line-height: 1.4;
}

/* Education */
.education-item {
    margin-bottom: 8px;
    font-size: 13px;
}

/* Print Styles */
@media print {
    /* Page Setup */
    @page {
        size: A4;
        margin: 12mm;
    }
    
    * {
        box-sizing: border-box;
    }
    
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 10pt;
        line-height: 1.3;
        color: black;
        background: white;
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .resume-container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
        box-shadow: none;
        overflow: visible;
    }
    
    /* Header - compact for print */
    header {
        border-bottom: 2px solid black;
        padding-bottom: 8px;
        margin-bottom: 12px;
        page-break-inside: avoid;
    }
    
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-text {
        flex: 1;
        min-width: 0;
    }
    
    .profile-image-container {
        flex-shrink: 0;
    }
    
    .profile-image {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid black;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    h1 {
        font-size: 20pt;
        color: black;
        font-weight: 700;
        margin: 0 0 2px 0;
        letter-spacing: -0.3px;
    }
    
    .tagline {
        font-size: 12pt;
        color: #333;
        font-weight: 500;
        margin: 0 0 6px 0;
    }
    
    .contact-info {
        font-size: 9pt;
        color: #333;
        margin: 0;
    }
    
    .contact-info a {
        color: black;
        text-decoration: none;
    }
    
    .contact-info .separator {
        margin: 0 8px;
        color: #999;
    }
    
    /* Section headers - compact */
    h2 {
        font-size: 12pt;
        color: black;
        border-bottom: 1px solid #ccc;
        padding-bottom: 2px;
        margin: 10px 0 6px 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
        page-break-after: avoid;
    }
    
    h3 {
        font-size: 10pt;
        color: black;
        margin: 0 0 3px 0;
        font-weight: 600;
        page-break-after: avoid;
    }
    
    /* Content - more compact */
    section {
        margin-bottom: 8px;
        page-break-inside: avoid;
    }
    
    .summary p {
        font-size: 9pt;
        line-height: 1.2;
        text-align: justify;
        margin: 0;
    }
    
    .skills-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 10px;
        font-size: 8pt;
        margin: 0;
    }
    
    .skill-category {
        margin-bottom: 2px;
    }
    
    .skill-category strong {
        color: #333;
        font-weight: 600;
    }
    
    /* Experience - compact layout */
    .job {
        margin-bottom: 6px;
        page-break-inside: avoid;
    }
    
    .job-header {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        margin-bottom: 2px;
        gap: 6px;
    }
    
    .job-header h3 {
        margin-right: 8px;
        flex: 0 0 auto;
    }
    
    .job-header .company {
        color: #555;
        font-weight: 500;
        font-size: 9pt;
        flex: 1 1 auto;
    }
    
    .job-header .dates {
        color: #666;
        font-size: 8pt;
        font-style: italic;
        margin-left: auto;
    }
    
    .job ul {
        font-size: 8pt;
        margin: 0 0 0 12px;
        line-height: 1.2;
        padding: 0;
    }
    
    .job ul li {
        margin-bottom: 1px;
        list-style-type: disc;
    }
    
    /* Accomplishments - compact grid */
    .accomplishments-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        font-size: 8pt;
        margin: 0;
    }
    
    .accomplishment h3 {
        font-size: 9pt;
        margin: 0 0 2px 0;
        color: #333;
    }
    
    .accomplishment p {
        line-height: 1.2;
        margin: 0;
    }
    
    .education-item {
        font-size: 8pt;
        margin-bottom: 2px;
    }
    
    /* Preserve colors and styling */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Links - no URL display needed */
    a[href]:after {
        content: "";
    }
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .resume-container {
        width: 100%;
        padding: 20px;
        margin: 0;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .header-text {
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .skills-grid,
    .accomplishments-grid {
        grid-template-columns: 1fr;
    }
    
    .job-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .job-header .dates {
        margin-left: 0;
    }
}

/* Download Section */
.download-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--light-gray);
}

.download-link {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.download-link:hover {
    background: #2980b9;
    color: white;
}

/* Hide download section when printing */
@media print {
    .no-print {
        display: none !important;
    }
}