html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    /*width: 210mm;*/
    /*height: 297mm;*/
    display: flex;
    justify-content: center;
    align-items: center;
}

* {
    box-sizing: border-box;
}

.cv {
    /*border: 1px solid #ccc;*/
    width: 210mm;
    height: 297mm;
    /*background: #F7F5FF;*/
    display: flex;
}

.qr-code {
    display: none;
}


.skill-row {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;            /* ensures icons wrap instead of overflow */
    justify-content: center;    /* center the icons */
    gap: 1px;
    margin-bottom: 1px;
}

.skill-row a {
    width: calc(100% / 5); /* 5 icons per row with gap adjustment */
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.skill-row img {
    transition: all 0.2s ease-in-out;
    width: 100%;
    border-radius: 7px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0);
    border: 2px solid transparent;
}

.skill-row .tooltip:hover img {
    transform: scale(1.75);
    box-shadow: 0 0 20px rgb(0, 0, 0);
    position: relative;
    z-index: 100;
    border: 2px solid #fff;
    box-sizing: border-box;
}

@media print {
    body, html {
        margin: 0;
        padding: 0;
        width: 210mm;
        height: 297mm;
    }

    .qr-code {
        display: block;
    }

    .cv {
        background: #F7F5FF;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    @page {
        size: A4;
        margin: 0;
    }

    body > *:not(.cv) {
        display: none;
    }

    .cv {
        width: 210mm;
        height: 297mm;
        border: none;
    }
}

.left {
    width: 25%;
    height: calc(100% - 40px);
    background: #3674BF;
    top: 20px;
    left: 20px;
    position: relative;
    border-radius: 24px;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.title {
    margin-top: 16px;
    text-align: center;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    font-size: 2rem;
}

.subtitle {
    font-weight: 400;
    font-size: 1.25rem;
    margin-top: 5px;
    opacity: 0.8;
}

.section {
    margin-top: 25px;
    width: 100%;
}

.section h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.info-item {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
    opacity: 0.9;
}

.right {
    position: relative;
    left: 40px;
    top: 20px;
    height: calc(100% - 40px);
    width: calc(100% - 25% - 60px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #A7C1E3;
}

.box h3 {
    margin-top: 0;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    margin-bottom: 9px;
    font-size: 1.3rem;
    color: #3674BF;
}

.job {
    margin-bottom: 12px;
    /* margin-bottom: 4px; */
}

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

.job-dates {
    display: flex;
    align-items: center;
}

.job:last-child {
    margin-bottom: 4px;
}

.job-title {
    font-weight: 700;
    font-size: 1rem;
}

.job-company {
    font-style: italic;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.job-dates {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 4px;
}

.job-desc {
    font-size: 0.9rem;
    line-height: 1.3;
}

ul.skills-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    place-items: center;
    /*gap: 10px;*/
}

ul.skills-list li {
    background: #3674BF;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

ul.skills-list li i {
    font-size: 1.5rem;
}

.lang {
    margin-bottom: 12px;
}

.lang-label {
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    height: 12px;
    width: 100%;
}

.progress {
    background: white;
    height: 100%;
    border-radius: 12px;
}

.score-pix {
    background-image: url("assets/pix-score-hexagon.svg");
    width: 57px;
    height: 64px;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    color: #253859;
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.row img {
    width: 57px;
    height: 64px;
}

.education-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.box-distinctions {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

/* Custom Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: max-content;
    max-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1001;
    bottom: 160%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    border: 2px solid #fff;
}

/* Arrow pointing down */
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -7px;
    border-width: 7px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.tooltip .tooltiptext::before {
    content: "";
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}