/* filepath: /Users/tdupoiron/Documents/github/repositories/cv-stephanie/stephanie-resume/css/styles.css */
:root {
    /* Biotechnology/Bioinformatics color palette */
    --primary-color: #4472C4; /* Blue - representing biotechnology */
    --secondary-color: #70AD47; /* Green - representing life sciences */
    --accent-color: #5B9BD5; /* Light blue - representing laboratory */
    --text-color: #2F5597; /* Dark blue - for headings */
    --text-body-color: #333333; /* Dark gray - for body text */
    --background-color: #F9F9F9; /* Light gray - background */
    --border-color: #E0E0E0; /* Light gray - borders */
    --highlight-color: #FFC000; /* Gold - for highlights */
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-body-color);
    line-height: 1.6;
}

.container {
    max-width: 21cm; /* A4 width */
    margin: auto;
    background: white;
    padding: 30px;
    padding-top: 60px; /* Added padding to account for fixed controls */
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

.job-title {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.contact-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 14px;
}

.left-contact, .right-contact {
    flex: 1;
}

.left-contact {
    text-align: left;
}

.right-contact {
    text-align: right;
}

/* Personal qualities section */
.qualities {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 15px 0;
    font-size: 14px;
}

.quality {
    margin: 0 10px;
}

/* Main sections */
.main-section {
    margin-bottom: 20px;
}

.section-header {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 1px;
}

/* Competence section */
.competence-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 5px 20px;
    margin-bottom: 15px;
}

.competence-category {
    font-weight: bold;
    color: var(--text-color);
}

.competence-details {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 5px;
}

.competence-subcategory {
    font-style: italic;
}

.competence-description {
    color: var(--text-body-color);
}

.equipment-brands {
    text-align: center;
    color: var(--accent-color);
    margin: 5px 0;
    font-size: 14px;
}

/* Experience section */
.experience-item {
    margin-bottom: 15px;
    position: relative;
    padding-left: 80px;
}

.company-logo {
    width: 60px;
    height: 60px;
    position: absolute;
    left: 0;
    top: 0;
    object-fit: contain;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.job-position {
    font-weight: bold;
    color: var(--text-color);
    font-size: 15px;
    margin-bottom: 2px;
}

.job-duration-location {
    font-style: italic;
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.job-description {
    font-size: 14px;
    text-align: justify;
    line-height: 1.4;
}

/* Education section */
.education-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.education-item {
    display: grid;
    grid-template-columns: 80px 80px 120px 1fr;
    gap: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.education-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.education-year {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 15px;
    display: flex;
    align-items: center;
}

.education-location {
    font-weight: 500;
    color: var(--text-color);
    font-size: 15px;
    display: flex;
    align-items: center;
}

.education-degree {
    font-weight: bold;
    color: var(--text-color);
    font-size: 15px;
    display: flex;
    align-items: center;
}

.education-field {
    font-size: 14px;
    color: var(--text-body-color);
    line-height: 1.4;
    display: flex;
    align-items: center;
}

/* References section */
.references {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.reference-person {
    font-size: 14px;
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.reference-person::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.reference-person:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reference-person:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Footer / "Pour mieux me connaître" section */
.footer {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px 0;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-title {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 16px;
    text-align: center;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.footer-section:hover .footer-title::after {
    width: 100%;
}

/* Hobbies section */
.hobbies {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hobby {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.hobby:hover {
    transform: translateY(-5px);
}

.hobby-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.hobby-name {
    font-size: 14px;
    color: var(--text-color);
    text-align: center;
}

/* Languages section */
.languages {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.language {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.language:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.language-flag {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.language-name {
    font-size: 14px;
    color: var(--text-color);
}

.language-level {
    font-size: 12px;
    color: var(--accent-color);
    font-style: italic;
}



/* Hide original language picker label */
#language-picker-label {
    display: none;
}

/* Footer icons */
.footer-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.footer-icon {
    width: 32px;
    height: 32px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.footer-icon:hover {
    opacity: 1;
}

/* Top controls */
.top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-select {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    color: var(--text-color);
    outline: none;
    line-height: 1;
    border-radius: 4px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.language-select:hover {
    transform: scale(1.1);
    background-color: var(--background-color);
}

.language-select:focus {
    transform: scale(1.1);
    background-color: var(--background-color);
}

.language-select:focus {
    background-color: var(--background-color);
    border-radius: 4px;
}

.control-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.control-link, .print-button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.control-link {
    text-decoration: none;
    font-size: 16px;
    color: var(--text-color);
    transition: transform 0.2s ease;
}

.control-link:hover, .print-button:hover {
    transform: scale(1.1);
    background-color: var(--background-color);
    color: var(--primary-color);
}

.print-button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    color: var(--text-color);
    transition: transform 0.2s ease;
}

.print-button:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.05);
}

.print-button:active {
    transform: scale(0.95);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        padding-top: 60px; /* Keep space for fixed controls */
    }

    .top-controls {
        left: 0;
        right: 0;
        top: 0;
        border-radius: 0;
        padding: 8px 15px;
    }
    
    .competence-grid,
    .competence-details,
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-item {
        padding-left: 0;
    }
    
    .company-logo {
        position: static;
        margin-bottom: 10px;
    }
    
    .contact-info,
    .experience-header {
        flex-direction: column;
    }
    
    .right-contact {
        text-align: left;
        margin-top: 10px;
    }

    .education-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 15px;
    }

    .education-year-location {
        display: flex;
        gap: 10px;
        color: var(--primary-color);
        margin-bottom: 2px;
        align-items: center;
    }

    .education-year {
        color: var(--primary-color);
    }

    .education-location {
        color: var(--accent-color);
        font-weight: normal;
    }

    .education-degree {
        font-size: 14px;
    }

    .education-field {
        font-size: 13px;
    }

    .footer {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .languages {
        flex-direction: column;
        gap: 15px;
    }

    .hobbies {
        flex-wrap: wrap;
    }
}

/* Print styles */
@media print {
    body {
        padding: 0;
        margin: 0;
        background-color: white;
        font-size: 11pt;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
        padding: 10mm;
        max-width: 100%;
        margin: 0;
        height: 297mm; /* A4 height */
        width: 210mm; /* A4 width */
    }
    
    .print-button {
        display: none;
    }
    
    .top-controls {
        display: none;
    }
    
    /* Ensure page breaks don't happen in the middle of sections */
    .experience-item,
    .education-grid {
        page-break-inside: avoid;
    }
    
    /* Color adjustments for printing */
    .section-header {
        background-color: #4472C4 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Scale down elements to fit on one page */
    .competence-grid {
        font-size: 10pt;
    }
    
    .job-description {
        font-size: 10pt;
    }
    
    .footer-icons {
        margin-top: 5mm;
    }
    
    /* Ensure we don't waste space with large margins when printing */
    .main-section {
        margin-bottom: 8mm;
    }
}
