:root {
    --accent: #0f766e;
    --accent-strong: #134e4a;
    --accent-warm: #a16207;
    --accent-soft: #f5fbf8;
    --accent-muted: #b7d8d0;
    --ink: #263432;
    --ink-strong: #172321;
    --muted: #71817d;
    --rule: #d5e2dd;
    --paper: #ffffff;
    --screen: #eef5f2;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    background: var(--screen);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--screen);
    font-family: "IBM Plex Sans", Helvetica, sans-serif;
    font-size: 1.3rem;
    line-height: 1.55;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.document {
    width: 210mm;
    min-height: 297mm;
    margin: 2.4rem auto;
    padding: 13mm 11mm 14mm 11mm;
    background: var(--paper);
    box-shadow: 0 1.2rem 4.8rem rgba(23, 35, 33, 0.14);
}

.masthead {
    display: grid;
    grid-template-columns: 46mm 1fr;
    align-items: center;
    gap: 7mm;
    margin-bottom: 9mm;
}

.profile-pic {
    box-shadow: 0 0 1.0rem rgba(0,0, 0, 0.25);
    width: 40mm;
    height: 40mm;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

h1 {
    margin: 0;
    font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
    font-size: 4.6rem;
    line-height: 0.95;
    color: var(--ink-strong);
    font-weight: 800;
    letter-spacing: 0;
}

.role {
    font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 2.7rem;
    line-height: 1.1;
    font-weight: 500;
}

.intro-grid {
    display: grid;
    grid-template-columns: 48mm 1fr;
    gap: 7mm;
    margin-bottom: 17mm;
}

.side {
    border-right: 0.1rem solid var(--rule);
    padding-right: 1rem;
}

.section-label {
    margin: 0 0 1rem;
    color: var(--accent);
    font-size: 1.1rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.14rem;
    font-weight: 800;
}

.side-block {
    margin-bottom: 8mm;
}

.side-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-block li {
    margin: 0.6rem 0;
}

.side p,
.body-copy p {
    margin: 0 0 1.3rem;
}

.body-copy p:last-child {
    margin-bottom: 0;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.chip {
    align-items: center;
    padding: 0.2rem 0.6rem 0.2rem 0.6rem;
    border: 0.1rem solid #b9d4cc;
    border-radius: 0.3rem;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

.section {
    margin-top: 17mm;
    margin-bottom: 17mm;
}

.section-small-margin-top {
    margin-top: -8mm;
}

.section-title {
    margin: 0 0 6mm 0;
    padding-bottom: 3mm;
    border-bottom: 0.1rem solid var(--rule);
    color: var(--accent-muted);
    font-family: "Space Grotesk", Helvetica, sans-serif;
    font-size: 4rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
}

.timeline {
    position: relative;
}

.timeline-item {
    display: grid;
    grid-template-columns: 31mm 1fr;
    gap: 0;
    margin: 0;
}

.timeline-date {
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1.45;
    text-align: left;
    padding: 0.2rem 2.2rem 0 1rem;
}

.timeline-body {
    position: relative;
    border-left: 0.1rem solid var(--rule);
    padding: 0 0 7mm 7.5mm;
}

.timeline-body::before {
    content: "";
    position: absolute;
    left: -0.5rem;
    top: 0.6rem;
    width: 0.9rem;
    height: 0.9rem;
    border: 0.2rem solid var(--paper);
    border-radius: 0.2rem;
    background: var(--accent);
    transform: rotate(45deg);
}

.timeline-item:last-child .timeline-body {
    padding-bottom: 0;
}

h2,
h3,
h4 {
    margin: 0;
    line-height: 1.25;
    letter-spacing: 0;
}

.item-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.7rem;
    align-items: baseline;
    margin-bottom: 0.4rem;
    font-size: 1.6rem;
    line-height: 1.25;
}

.organization {
    color: var(--ink-strong);
    font-weight: 800;
}

.divider {
    color: var(--muted);
}

.item-title {
    font-weight: 400;
}

.item-role {
    color: var(--accent);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.timeline-body p,
.endorsement p {
    margin: 0 0 1rem;
}

.timeline-body p:last-child,
.endorsement p:last-of-type {
    margin-bottom: 0;
}

.endorsements {
    display: grid;
    gap: 7mm;
}

.endorsement {
    position: relative;
    break-inside: avoid;
    page-break-inside: avoid;
    padding-left: 8mm;
    border-left: 0.1rem solid var(--rule);
}

.page-break-before {
    page-break-before: always;
}

.endorsement::before {
    content: "";
    position: absolute;
    left: -0.5rem;
    top: 0.4rem;
    width: 0.9rem;
    height: 0.9rem;
    border: 0.2rem solid var(--paper);
    border-radius: 0.2rem;
    background: var(--accent);
    transform: rotate(45deg);
}

.endorsement cite {
    display: block;
    margin-top: 1.2rem;
    color: var(--ink-strong);
    font-style: normal;
    font-weight: 800;
}

.skill-section {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 6mm;
}

.skill-heading {
    color: var(--ink-strong);
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0 0 0.8rem;
}

.skill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 12mm;
    row-gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.skill-grid li {
    min-height: 2rem;
}

.icon {
    width: 1.6rem;
    height: 1.6rem;
    vertical-align: center;
    margin-right: 0.4rem;
}

@page {
    size: A4;
    margin: 2mm 0 1mm 0;
}

@media print {
    html,
    body {
        width: 210mm;
        min-height: 297mm;
        background: #ffffff;
    }

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

    .document {
        width: auto;
        min-height: 0;
        margin: 0;
        padding: 8mm 11mm 14mm;
        box-shadow: none;
    }

    a {
        text-decoration: none;
    }

    section {
        padding-bottom: 0;
    }

    .section-title {
        padding-top: 8mm;
    }

    .timeline-item {
        display: block;
        position: relative;
        padding-left: 31mm;
    }

    .timeline-date {
        position: absolute;
        left: 0;
        top: 0;
        width: 31mm;
    }
}

@media screen and (max-width: 76rem) {
    body {
        font-size: 1.5rem;
    }

    .document {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 2.4rem 1.8rem 3.6rem;
        box-shadow: none;
    }

    .masthead,
    .intro-grid,
    .timeline-item,
    .skill-grid {
        grid-template-columns: 1fr;
    }

    .masthead {
        gap: 1.8rem;
        margin-bottom: 3.2rem;
    }

    .profile-pic {
        width: 13.2rem;
        height: 13.2rem;
    }

    h1 {
        font-size: 4.2rem;
    }

    .section-title {
        font-size: 3.6rem;
    }

    .role {
        font-size: 2.4rem;
    }

    .side {
        border-right: 0;
        border-bottom: 0.1rem solid var(--rule);
        padding: 0 0 2rem;
    }

    .timeline-date {
        text-align: left;
        padding-top: 0;
    }
}
