/* Screen styles */
body {
    font-size: 0.95em; /* Overall slightly smaller default font for all pages */
}
.greenName {
    color: green !important;
}
.bold-header {
    font-weight: bold;
}
.papers-list li {
  margin-bottom: 5px; /* Spacing between papers */
}
/* Spacing between accordion items on Experience page */
.accordion#experienceAccordion .accordion-item {
    margin-bottom: 6px;
}
/* Spacing between accordion items on Skills page */
.accordion#skillAccordion .accordion-item {
    margin-bottom: 6px;
}
/* Goldenrod bar style */
.goldenrod-bar {
    border: 0;
    height: 4px; /* Thicker goldenrod bar */
    background-color: goldenrod;
    margin-top: 1.5rem; /* Reduced margin */
    margin-bottom: 1.5rem; /* Reduced margin */
}

/* Resume page specific styles */
/* Objective text font size */
.objective-text {
    font-size: 1em; /* Adjusted relative to body font-size */
    margin-bottom: 1rem; /* Standard margin */
}

/* Skills list to be 3 columns on screen */
.row .col-md-4 {
    flex: 0 0 auto;
    width: 33.333333%;
    max-width: 33.333333%;
    padding: 0 0.25rem; /* Small horizontal padding */
}
/* Adjust padding for the row containing skills to align with main headings */
.row:has(.skill-link) { /* Targets the row specifically containing skill links */
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5); /* Aligns to default Bootstrap container padding */
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5); /* Aligns to default Bootstrap container padding */
}
.skill-link {
    display: block;
    text-decoration: none;
    color: #007bff;
    margin-bottom: 5px;
}
.skill-link:hover {
    text-decoration: underline;
}

/* Job category coloring on resume page: ONLY on the header/button */
.resume-accordion .job-item-fulltime .accordion-button { /* For fulltime jobs */
    background-color: #e6e0f0 !important; /* Light purplish color */
}
.resume-accordion .job-item-parttime .accordion-button { /* For parttime jobs */
    background-color: #e0e8f0 !important; /* Light gray/blue color */
}
/* Ensure accordion body is white so it's not colored */
.resume-accordion .accordion-body {
    background-color: white !important; /* Force white background for body */
}
/* Education accordion item background color */
.education-accordion-item {
    background-color: #f8f8f8; /* Light grey background for each item */
}


.resume-accordion .accordion-item {
    margin-bottom: 3px; /* Small space between resume accordions */
    border: 1px solid #dee2e6; /* Add a subtle border for separation */
    border-radius: .25rem; /* Rounded corners */
    overflow: hidden; /* Ensure background colors and borders respect rounded corners */
}
.resume-accordion .accordion-header {
    background-color: transparent; /* No background for header button area */
}
.resume-accordion .accordion-button {
    background-color: transparent !important; /* Important to override default Bootstrap */
    color: black;
    font-weight: bold;
    padding: .1rem .5rem; /* Tighter padding for accordion title box (screen) */
}
.resume-accordion .accordion-body {
    padding: .3rem .75rem; /* Tighter padding for accordion body (screen) */
}

/* Custom + icon for resume page SECTION headers (Experience, Education) */
.resume-section-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.resume-toggle-icon {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.2s ease-in-out;
    padding-left: 0.5rem;
    display: inline-block;
    width: 1.5rem;
    text-align: center;
}

/* Hide Bootstrap's default accordion icon for individual items on resume page */
.resume-accordion .accordion-button.no-icon::after {
    display: none !important; /* This is the key to hide the default arrow */
}
/* Adjust padding for buttons where the default icon is removed */
.resume-accordion .accordion-button.no-icon {
    padding-right: .75rem; /* Match left padding for symmetry without icon */
}

/* --- New styles for job accordion header layout (Company | Title | Dates) --- */
/* (These were the ones you said looked good, so they are kept as is) */
/* The HTML change to use col-4, col-5, col-3 makes this previous custom flex setup redundant in a way,
   but keeping the classes if they were already used elsewhere or for clarity. */
.job-header-layout {
    padding: 0;
    width: 100%;
    display: flex;
    align-items: center;
}
/* No explicit .job-header-part styling needed if using col- classes directly now. */
/* If you still had these: */
/*
.job-header-part {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.25rem;
}
.job-header-company { flex: 0 0 35%; text-align: left; }
.job-header-title { flex: 1 1 auto; text-align: left; }
.job-header-dates { flex: 0 0 25%; text-align: right; }
*/


.resume-details-link {
    margin-top: 0.5rem; /* Space above details link if needed */
    display: inline-block; /* Allows margins/padding */
    font-size: 0.9em; /* Slightly smaller than main text */
}

/* Certifications text size */
.certifications-list-print { /* Renamed to be more generic, affects screen and print */
    font-size: 1.2em; /* Consistent with other lists */
}
.certifications-list-print li {
    margin-bottom: 0.25em; /* Reduced margin between list items */
}


/* Hide the open/close buttons for Experience/Skills page when printing */
.float-end {
    display: none !important;
}

/* --- Print-only styles --- */
@media print {
    body {
        line-height: 1.15 !important;
        color: black !important;
        background-color: white !important;
        padding: 0 !important; /* No padding on body */
        margin: 0 !important; /* No margin on body */
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    /* Ensure .container takes full width and manage its own padding */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        /* Replicate typical screen padding for print */
        padding-left: 0.75rem !important; /* Adjust as needed */
        padding-right: 0.75rem !important; /* Adjust as needed */
    }
    /* Adjust margin-top for the main content container in print, when nav is hidden */
    main.container.mt-4 { /* Target the main container on print */
        margin-top: 0.5rem !important; /* Reduced top margin for the content area */
    }
    /* Specifically target the main resume heading on print */
    .resume-main-heading.mt-4 {
        margin-top: 0.5rem !important;
        font-size: 1.05rem !important;
    }

    .container-fluid, .row, [class*="col-"] {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Header and Footer Bars */
    header::before {
        content: '';
        display: block;
        height: 2px;
        background-color: #205493;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    footer::after {
        content: '';
        display: block;
        height: 2px;
        background-color: #205493;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    /* Ensure header/footer background is transparent on print */
    header, footer {
        background-color: transparent !important;
    }
    .py-4 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Print font sizes - Adjusted for Resume Job Accordions */
    h1 { font-size: 1.1rem !important; }
    h2 { font-size: 0.95rem !important; }
    h3 { font-size: 0.85rem !important; }
    
    /* --- Explicitly target job accordion text for print --- */
    /* Text within the job accordion headers (Company, Title, Dates) */
    .resume-accordion .accordion-button { /* Applying to the button itself as you adjusted */
        font-size: 0.55em !important; /* Your chosen font size for accordion buttons */
        line-height: 1.2 !important; /* Keep line height for tightness */
    }
    /* Text within the job accordion body (summary text) */
    .resume-accordion .accordion-body p {
        font-size: 0.7em !important; /* Or adjust as needed, e.g., 0.75em */
        line-height: 1.2 !important; /* Adjust line height for tightness */
        margin-bottom: 0.1em !important; /* Tighter margins for paragraphs in body */
    }
    /* --- End explicit job accordion text targeting --- */

    p, li, small, a { font-size: 0.75em !important; } /* General text font size for other parts */

    .objective-text {
        font-size: 0.8em !important; /* Print size for objective */
        margin-bottom: 0.3em !important; /* Reduced margin below objective */
    }
    .goldenrod-bar {
        height: 2px !important; /* Thinner for print */
        background-color: goldenrod !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
        margin-top: 0.2rem !important;
        margin-bottom: 0.2rem !important;
    }
    /* Reduce/remove top margin for headings that immediately follow a goldenrod bar */
    .goldenrod-bar + h3 { /* Selects an h3 that immediately follows a .goldenrod-bar */
        margin-top: 0.3rem !important; /* Reduce the top margin for these specific h3s */
    }
    .goldenrod-bar + .resume-section-header { /* Also for the resume section headers if they follow a bar */
        margin-top: 0.3rem !important;
    }
    .goldenrod-bar + .cert-edu-row h3 { /* bottom area */
        margin-top: 0.1rem !important;
    }

    /* Skills list: Force 3 columns for print */
    .row > .col-md-4 {
        width: 33.333333% !important;
        flex: 0 0 auto !important;
        max-width: 33.333333% !important;
        padding: 0 0.05rem !important; /* Very tiny horizontal padding */
    }
    .skill-link {
        margin-bottom: 0.2em !important; /* Tighter vertical spacing */
    }


    /* Accordion styles for resume page printout (closed by default) */
    .resume-accordion .accordion-collapse.collapse {
        display: none !important; /* Hide content if not open on screen */
    }
    .resume-accordion .accordion-collapse.collapse.show {
        display: block !important; /* Show content if it was open on screen */
    }
    .resume-accordion .accordion-button::after {
        display: none !important; /* Hide default Bootstrap arrow icon */
    }
    .resume-accordion .accordion-item {
        border: 1px solid #dee2e6 !important;
        margin-bottom: 1px !important;
        overflow: hidden; /* Ensure backgrounds/borders clip correctly */
        /* Preserve background colors for print on accordion-item for jobs and education */
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }

    /* Job category coloring for print: apply directly to button (header) */
    .resume-accordion .job-item-fulltime .accordion-button {
        background-color: #e6e0f0 !important;
    }
    .resume-accordion .job-item-parttime .accordion-button {
        background-color: #e0e8f0 !important;
    }
    /* Ensure body is white for print too */
    .resume-accordion .accordion-body {
        background-color: white !important;
        padding: 0.05rem 0.1rem 0.1rem 0.1rem !important; /* Tighter padding inside body */
    }
    /* Education accordion item background color for print */
    .education-accordion-item {
        background-color: #f8f8f8 !important;
    }


    /* Hide "Details" link button on print */
    .resume-details-link {
        display: none !important;
    }

    /* Print styles for Certifications and Education columns to keep them side-by-side */
    .row > .col-md-6 {
        width: 50% !important;
        flex: 0 0 auto !important;
        max-width: 50% !important;
        padding: 0 0.1rem !important;
    }

    /* Certifications specific print style */
    .certifications-list-print {
        font-size: 1.2em !important; /* Still want this slightly larger for readability */
        line-height: 1.3 !important;
        margin-bottom: 0.25em !important;
    }
    .certifications-list-print li {
        margin-bottom: 0.1em !important;
    }
    /* Make links within certifications larger for print */
    .certifications-list-print li a {
        font-size: 1.0em !important; /* Adjust as needed for readability */
        line-height: 1.2 !important;
    }

    /* Reduce margin/padding for the main row of Certs/Edu */
    .row:has(div.col-md-6) {
        margin-top: 0.2rem !important;
        margin-bottom: 0.2rem !important;
    }

    /* Header/Footer bar print settings */
    header::before, footer::after {
        content: '';
        display: block;
        height: 2px;
        background-color: #205493;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    header, footer {
        background-color: transparent !important;
    }
    .py-4 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    .print-small-text { font-size: 0.65rem !important; }
    .print-extra-small-text { font-size: 0.45rem !important; }

    /* General print overrides */
    nav.navbar { display: none !important; }
    .float-end { display: none !important; } /* Hide toggle buttons on other pages too */

    /* Ensure all links and text are black unless specified exact */
    a, p, h1, h2, h3, h4, h5, h6 { color: black !important; }
    .text-white { color: black !important; }
    .text-muted { color: black !important; }
    .greenName {
        color: green !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    .navbar a { color: black !important; }

    /* Add space above the footer when printing */
    footer {
        margin-top: 0.5in !important; /* Add half an inch of space above the footer */
        page-break-before: auto; /* Allow page break before footer if needed */
        position: relative; /* Ensure margin-top is respected */
    }
}
