
/* ==========================
   GENERAL PAGE STYLING
========================== */

* {
    box-sizing: border-box;
}

:root {
    --navy: #0b3569;
    --blue: #1d5d8e;
    --light-blue: #dceaf7;
    --sidebar-blue: #d7e8f7;
    --border-blue: #a6c8e7;
    --text-color: #092e60;
}

body {
    margin: 0;
    padding: 20px;
    background: #edf1f5;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.45;
}

/* ==========================
   CV TWO-COLUMN LAYOUT
========================== */

.cv-container {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: 31% 69%;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ==========================
   LEFT SIDEBAR
========================== */

.sidebar {
    background: linear-gradient(
        to bottom,
        #d7e8f7,
        #cbdff1
    );
    padding: 0 18px 25px;
}
/*
.profile-picture {
    background: linear-gradient(135deg, #32668f, #4d83b2);
    margin: 0 -18px 25px;
    padding: 25px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-picture img {
    width: 190px;
    height: 190px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 0 0 3px #a9c8eb;
}
*/
/* Sidebar sections */

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    background: linear-gradient(
        to right,
        #1d5d8e,
        #15517e
    );
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    padding: 9px 10px;
    margin: 0 0 13px -4px;
    border-radius: 0 9px 9px 0;
}

.icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin: -8px 0 -8px -13px;
    border-radius: 50%;
    border: 3px solid white;
    background: #205c89;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 16px;
}

.sidebar-section p {
    margin: 10px 0;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.sidebar-section ul {
    padding-left: 20px;
    margin: 8px 0;
}

.sidebar-section li {
    margin-bottom: 7px;
    font-size: 12px;
}

/* ==========================
   MAIN CONTENT
========================== */

.main-content {
    padding: 25px 27px;
    background: #ffffff;
    min-width: 0;
}

/* Name and professional title */

.cv-header {
    padding: 0 0 15px 8px;
    border-bottom: 2px solid #2873ac;
    margin-bottom: 20px;
}

.cv-header h1 {
    font-size: clamp(25px, 3vw, 39px);
    line-height: 1.15;
    margin: 0;
    color: var(--navy);
    font-weight: 800;
}

.cv-header h3 {
    font-size: 21px;
    font-weight: normal;
    letter-spacing: 1px;
    color: #2a6798;
    margin: 5px 0 10px;
}

.tagline {
    font-size: 12px;
    font-style: italic;
    margin: 0;
}

.tagline span {
    color: #2873ac;
    margin: 0 7px;
}

/* ==========================
   SECTION HEADINGS
========================== */

.content-section {
    margin-bottom: 20px;
}

.content-section > h2 {
    background: linear-gradient(
        to right,
        #d6e6f5,
        #e8f1f9
    );
    color: var(--navy);
    font-size: 14px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px 7px 0;
    margin: 0 0 12px;
    border-radius: 0 6px 6px 0;
}

.heading-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    margin: -8px 0 -8px -4px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: white;
    background: var(--blue);
    border: 3px solid white;
    box-shadow: 0 0 0 1px var(--border-blue);
    font-size: 15px;
}

.content-section > p {
    margin: 8px 3px;
    font-size: 12px;
    text-align: justify;
}

/* ==========================
   EDUCATION
========================== */

.education-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 5px;
    border-bottom: 1px solid #d7e7f5;
}

.education-item strong {
    font-size: 12px;
}

.education-item p {
    font-size: 11px;
    margin: 3px 0 0;
}

.date {
    white-space: nowrap;
    font-size: 11px;
    color: #205c89;
    font-weight: bold;
}

/* ==========================
   WORK EXPERIENCE
========================== */

.experience-item {
    padding-left: 11px;
    border-left: 2px solid #b8d2e9;
    margin: 14px 0;
}

.experience-item h3 {
    font-size: 12px;
    margin: 0 0 3px;
    color: var(--navy);
}

.workplace {
    font-size: 11px;
    font-weight: bold;
    margin: 0 0 5px;
    color: #205c89;
}

.workplace span {
    margin: 0 5px;
    color: #2873ac;
}

.experience-item ul {
    padding-left: 17px;
    margin: 4px 0;
}

.experience-item li {
    font-size: 11px;
    margin-bottom: 3px;
}

/* ==========================
   TRAINING
========================== */

.training-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.training-grid ul {
    margin: 0;
    padding-left: 18px;
}

.training-grid ul + ul {
    border-left: 1px solid var(--border-blue);
    padding-left: 23px;
}

.training-grid li {
    font-size: 10.5px;
    margin-bottom: 6px;
}

/* ==========================
   REFEREES
========================== */

.referees-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.referee {
    font-size: 11px;
    overflow-wrap: anywhere;
}

.referee + .referee {
    border-left: 1px solid var(--border-blue);
    padding-left: 15px;
}

.referee strong {
    font-size: 11px;
}

.referee p {
    margin: 4px 0;
}

/* ==========================
   RESPONSIVE / MOBILE
========================== */

@media screen and (max-width: 760px) {
    body {
        padding: 0;
    }

    .cv-container {
        display: block;
        box-shadow: none;
    }

    .sidebar {
        padding-bottom: 10px;
    }

    .main-content {
        padding: 20px 16px;
    }
/*
    .profile-picture img {
        width: 160px;
        height: 160px;
    }
*/
    .training-grid,
    .referees-grid {
        grid-template-columns: 1fr;
    }

    .training-grid ul + ul,
    .referee + .referee {
        border-left: none;
        padding-left: 18px;
    }

    .education-item {
        flex-wrap: wrap;
    }
}

/* ==========================
   PRINT / SAVE AS PDF
========================== */

@media print {
    @page {
        size: A4;
        margin: 8mm;
    }

    body {
        padding: 0;
        background: white;
        font-size: 10px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cv-container {
        max-width: none;
        width: 100%;
        margin: 0;
        box-shadow: none;
        grid-template-columns: 31% 69%;
    }

    .main-content {
        padding: 12px;
    }

    .sidebar {
        padding-left: 12px;
        padding-right: 12px;
    }
/*
    .profile-picture {
        margin-left: -12px;
        margin-right: -12px;
    }

    .profile-picture img {
        width: 130px;
        height: 130px;
    }
*/
    .content-section,
    .experience-item,
    .education-item {
        break-inside: avoid;
    }
}

/* PRINT BUTTON */

.print-controls {
    max-width: 1100px;
    margin: 0 auto 15px;
    text-align: right;
}

.print-controls button {
    background: #1d5d8e;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.print-controls button:hover {
    background: #0b3569;
}

/* Hide the print button when printing or saving as PDF */

@media print {
    .print-controls {
        display: none !important;
    }
}

/* ==========================
   PROFILE SECTION
========================== */

.profile-picture {
    position: relative;
    background: linear-gradient(135deg, #32668f, #4d83b2);
    margin: 0 -18px 25px;
    padding: 25px 10px 0;
    min-height: 205px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

/* Curved bottom edge */
.profile-picture::after {
    content: "";
    position: absolute;
    left: -15%;
    right: -15%;
    bottom: -72px;
    height: 145px;
    background: #edf1f5;
    border-radius: 50%;
    z-index: 0;
}

/* Profile name */
.profile-picture::before {
    content: "";
}

/* Profile photograph */
.profile-picture img {
    position: relative;
    z-index: 1;
    width: 155px;
    height: 155px;
    max-width: 90%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 0 0 3px #a9c8eb;
    display: block;
    margin: 0 auto -45px;
}

/* Mobile */
@media screen and (max-width: 760px) {
    .profile-picture {
        margin-left: -18px;
        margin-right: -18px;
    }

    .profile-picture img {
        width: 150px;
        height: 150px;
    }
}

/* Print */
@media print {
    .profile-picture {
        margin-left: -12px;
        margin-right: -12px;
    }

    .profile-picture img {
        width: 130px;
        height: 130px;
    }
}
