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

/* Typography and Color Variables */
:root {
    --primary-color: #023047;
    /* Deep navy blue */
    --secondary-color: #219EBC;
    /* Bright blue */
    --accent-color: #8ECAE6;
    /* Light blue */
    --highlight-color: #FFB703;
    /* Golden yellow */
    --accent-orange: #FB8500;
    /* Orange */
    --text-color: #333;
    --light-text-color: #666;
    --border-color: #e0e0e0;
    --background-color: #fff;
    --section-spacing: 1.5rem;
    --font-primary: 'Georgia', serif;
    --font-secondary: 'Arial', sans-serif;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 14px;
}

/* Resume Container */
.resume-container {
    max-width: 8.5in;
    margin: 0 auto;
    padding: 0.52in;
    background-color: var(--background-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-height: 11in;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.name-section .name {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

.contact-section {
    flex-shrink: 0;
    text-align: right;
}

.contact-info {
    list-style: none;
    font-size: 0.9rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.contact-icon {
    width: 16px;
    height: 16px;
    color: var(--secondary-color);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

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

.contact-link:hover {
    text-decoration: underline;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    gap: 2rem;
}

/* Primary Content (3/4 width) */
.primary-content {
    flex: 3;
    min-width: 0;
    /* Allows flex item to shrink below content size */
}

/* Sidebar Content (1/4 width) */
.sidebar-content {
    flex: 1.5;
    min-width: 0;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

/* Section Titles */
.section-title {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-top: 0.4rem;
}

/* Professional Summary */
.summary-section {
    margin-bottom: var(--section-spacing);
}

.summary-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Work Experience */
.experience-section {
    margin-bottom: var(--section-spacing);
}

.job {
    margin-bottom: 1.5rem;
    /* break-inside: avoid; */
}

.job-header {
    margin-bottom: 0.5rem;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.job-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--light-text-color);
}

.clients {
    color: var(--secondary-color)
}

.company {
    font-weight: 500;
    color: var(--text-color);
}

.dates {
    font-style: italic;
}

.job-location {
    font-size: 0.9rem;
    color: var(--light-text-color);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.job-responsibilities {
    list-style-position: outside;
    margin-left: 1.2rem;
}

.job-responsibilities li {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Education */
.education-section {
    margin-bottom: var(--section-spacing);
}

.education-item {
    margin-bottom: 1rem;
    /* break-inside: avoid; */
}

.education-header {
    margin-bottom: 0.25rem;
}

.degree {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.education-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--light-text-color);
}

.institution {
    font-weight: 500;
    color: var(--text-color);
}

.graduation-date {
    font-style: italic;
}

.education-details {
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin-top: 0.25rem;
}

/* Sidebar Sections */
.sidebar-content section {
    margin-bottom: 1.5rem;
    /* break-inside: avoid; */
}

/* Skills */
.skills-category {
    margin-bottom: 1rem;
}

.skills-category-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.aside-list {
    list-style: none;
}

.aside-list li {
    position: relative;
    padding-left: 0rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    line-height: 1.4;
}


/* Certifications and Professional Development */
.cert-category {
    margin-bottom: 1rem;
}

.cert-category-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.cert-list {
    list-style: none;
}

.cert-list li {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.4rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cert-name {
    /* font-size: 0.9rem; */
    margin-bottom: 0.1rem;
}

.cert-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cert-date {
    font-size: 0.8rem;
    color: var(--light-text-color);
    font-style: italic;
}

.cert-issuer {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Print Styles */
@media print {
    @page {
        size: letter;
        /* margin: 0.5in; */
    }

    /* @page :first {
        margin-top: 0.5in;
    }
    
    @page :left {
        margin-top: 0.5in;
    }
    
    @page :right {
        margin-top: 0.5in;
    } */

    body {
        font-size: 12px;
        line-height: 1.4;
        color: black;
        background: white;
    }

    .resume-container {
        max-width: none;
        width: 100%;
        margin: 0;
        /* padding: 0.75in; */
        box-shadow: none;
        min-height: auto;
        /* page-break-inside: avoid; */
    }

    .header {
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid black;
        /* page-break-after: avoid; */
    }

    .name {
        font-size: 2rem !important;
    }

    .contact-info {
        font-size: 0.8rem;
    }

    .contact-icon {
        width: 14px;
        height: 14px;
        color: black !important;
    }

    .content-wrapper {
        gap: 1.5rem;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid black;
        /* page-break-after: avoid; */
    }

    .sidebar-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid black;
        /* page-break-after: avoid; */
    }

    .job,
    .education-item {
        /* page-break-inside: avoid; */
        margin-bottom: 1rem;
    }

    .job-title,
    .degree {
        font-size: 0.95rem;
    }

    .job-responsibilities,
    .highlights-list,
    .skills-list,
    .cert-list {
        /* page-break-inside: avoid; */
    }

    .job-responsibilities li {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }

    .skills-list li {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
        padding-left: 1rem;
    }

    .highlights-list li,
    .cert-list li {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    /* Ensure links are visible in print */
    .contact-link {
        color: black !important;
        text-decoration: underline;
    }

    /* Prevent orphans and widows */
    p,
    li {
        orphans: 2;
        widows: 2;
    }

    /* Adjust section spacing for print */
    :root {
        --section-spacing: 1rem;
    }
}

/* Screen-only enhancements */
@media screen {
    .resume-container {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .contact-link:hover {
        color: var(--primary-color);
        transition: color 0.2s ease;
    }
}

/* Responsive Design for smaller screens */
@media screen and (max-width: 768px) {
    .resume-container {
        max-width: 100%;
        margin: 1rem;
        padding: 1rem;
    }

    .header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .contact-section {
        text-align: center;
    }

    .content-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .job-meta,
    .education-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .name {
        font-size: 2rem !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}