:root {
    --accent: #ba0018;
    --text: #202020;
    --muted: #9a9a9a;
    --soft-text: #4a4a4a;
    --rule: #dddddd;
    --paper: #ffffff;
}

* { box-sizing: border-box; }

html { background: #ffffff; }

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: var(--text);
    font-family: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.36;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-radius: 2px;
    padding: 1px 3px;
    margin-left: -3px;
}

a:hover,
a:focus-visible {
    color: #fff !important;
    background: var(--accent);
    outline: none;
}

.resume-page {
    width: min(1000px, calc(100% - 40px));
    min-height: 29.7cm;
    margin: 1cm auto;
    padding: 20px 50px 36px;
    background: var(--paper);
}

.resume-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    column-gap: 1px;
}

.resume-header {
    align-items: start;
    padding: 8px 0 18px;
    border-bottom: 1px solid var(--rule);
}

.name-block h1 {
    width: 540px;
    margin: 0;
    color: var(--accent);
    font-family: Merriweather, Georgia, serif;
    font-size: 40px;
    line-height: 1.14;
    font-weight: 300;
    letter-spacing: -0.025em;
}

.headline {
    width: 540px;
    margin: 7px 0 0;
    color: #666;
    font-size: 15px;
    line-height: 1.3;
}

.header-side {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
}

.contact-info {
    text-align: right;
    font-size: 16px;
    line-height: 1.55;
}

.contact-info a { display: inline-block; }

.profile-photo {
    display: block;
    width: 84px;
    height: 106px;
    flex: 0 0 auto;
    object-fit: cover;
    object-position: center top;
    border: 1px solid #d6d6d6;
    background: #f4f4f4;
}

.resume-section {
    padding: 12px 0 15px;
    border-bottom: 1px solid var(--rule);
}

.resume-section:last-child { border-bottom: 0; }

.resume-label {
    margin: 3px 0 0;
    padding: 0 0 0 20px;
    color: var(--accent);
    font-family: Merriweather, Georgia, serif;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}

.section-text,
.entries {
    min-width: 0;
    padding: 0 10px;
}

.section-text {
    margin: 3px 0;
    font-size: 18px;
    line-height: 1.42;
}

.interest-inline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0;
    line-height: 1.8;
}

.interest-item { white-space: normal; }

.interest-separator {
    margin: 0 10px;
    color: #555;
    font-size: 0.62em;
    line-height: 1;
    transform: translateY(-0.08em);
}

.interest-list {
    margin: 0;
    padding-left: 20px;
}

.interest-list li { margin: 2px 0; }

.entry {
    padding: 5px 0 13px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.entry:last-child { padding-bottom: 2px; }
.entry + .entry { padding-top: 10px; }

h3 {
    margin: 0 0 2px;
    font-family: Merriweather, Georgia, serif;
    font-size: 18px;
    line-height: 1.48;
    font-weight: 700;
}

h3 a { padding-top: 0; padding-bottom: 0; }
.emph { font-weight: 600; }

.entry-meta,
.entry-subrow {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
}

.entry-meta {
    margin-top: 1px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.entry-meta > :last-child,
.entry-subrow > :last-child {
    flex: 0 0 auto;
    text-align: right;
}

.entry-subrow { margin: 4px 0 1px; }

.light {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.location-line { margin-top: 1px; }

.desc {
    margin-top: 7px;
    color: var(--soft-text);
    font-size: 16px;
    line-height: 1.45;
}

.rich-text p { margin: 0 0 7px; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text ul,
.rich-text ol { margin: 5px 0 2px; padding-left: 19px; }
.rich-text li { margin: 2px 0; }

/* Education: quiet four-corner header + fixed four-character labels. */
.education-entry {
    padding: 6px 0 19px;
}

.education-entry + .education-entry {
    padding-top: 14px;
}

.education-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 28px;
    align-items: start;
}

.education-head-left,
.education-head-right {
    min-width: 0;
}

.education-school {
    margin: 0;
    color: var(--text);
    font-family: Merriweather, Georgia, serif;
    font-size: 22px;
    line-height: 1.32;
    font-weight: 700;
}

.education-school a {
    color: inherit;
    padding-top: 0;
    padding-bottom: 0;
}

.education-degree {
    margin-top: 1px;
    color: #444;
    font-size: 15px;
    line-height: 1.5;
}

.education-degree-separator {
    color: #777;
}

.education-head-right {
    padding-top: 2px;
    text-align: right;
    white-space: nowrap;
}

.education-date {
    color: #858585;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.education-location {
    margin-top: 3px;
    color: #777;
    font-size: 14px;
    line-height: 1.45;
}

.education-notes {
    margin-top: 9px;
    color: #555;
    font-size: 14.5px;
    line-height: 1.52;
}

.education-notes p {
    margin: 0;
}

.education-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 9px;
    padding: 1px 0 1px 14px;
    border-left: 3px solid var(--education-stage-color, var(--accent));
    color: var(--soft-text);
    font-size: 14.5px;
    line-height: 1.55;
}

.education-detail-row {
    display: block;
    margin: 0;
}

.education-detail-label {
    display: inline;
    width: auto;
    color: #2f2f2f;
    font-weight: 650;
    white-space: normal;
}

.education-detail-label-text,
.education-detail-label-text.is-latin {
    display: inline;
    width: auto;
    text-align: left;
    text-align-last: auto;
    letter-spacing: normal;
}

.education-detail-colon {
    display: inline;
    width: auto;
    text-align: left;
}

.education-detail-value {
    display: inline;
    min-width: 0;
    color: #333;
}

.education-detail-value p {
    display: inline;
    margin: 0;
}

.education-detail-value ul,
.education-detail-value ol {
    margin: 2px 0 2px 18px;
    padding: 0;
}

.publication-entry .entry-meta { margin-top: 3px; }

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

@media print {
    body {
        font-size: 12pt;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .resume-page {
        width: 21cm;
        min-height: auto;
        margin: 0;
        padding: 18mm 15mm 15mm;
    }

    .resume-row {
        grid-template-columns: 3.3cm minmax(0, 1fr);
        column-gap: 0.5cm;
    }

    .name-block h1 {
        width: 12.5cm;
        font-size: 23pt;
    }

    .headline { width: 12.5cm; font-size: 8.5pt; }
    .header-side { gap: 0.35cm; }
    .contact-info { font-size: 9pt; }
    .profile-photo { width: 1.9cm; height: 2.4cm; }
    .resume-label { padding-left: 0.25cm; font-size: 10pt; }
    .section-text { font-size: 9pt; line-height: 14pt; }
    h3 { font-size: 10pt; line-height: 13pt; }
    .desc { font-size: 9pt; line-height: 13pt; }
    .education-school { font-size: 11pt; line-height: 13pt; }
    .education-degree { font-size: 8.5pt; line-height: 11pt; }
    .education-date { font-size: 7pt; }
    .education-location { font-size: 8pt; }
    .education-notes { margin-top: 4px; font-size: 8.3pt; line-height: 11pt; }
    .education-details { margin-top: 4px; padding-left: 3mm; border-left-width: 1.6pt; gap: 1px; font-size: 8.3pt; line-height: 11pt; }
    .light,
    .entry-meta { font-size: 7.5pt; line-height: 12pt; }
    .resume-section { padding: 5px 0 8px; }
    .entry { padding-bottom: 7px; }

    a { color: var(--accent); }
    a:hover,
    a:focus-visible { color: var(--accent); background: transparent; }
}

@media (max-width: 760px) {
    body { font-size: 17px; }

    .resume-page {
        width: min(100% - 24px, 680px);
        margin: 16px auto;
        padding: 24px 20px 30px;
    }

    .resume-row {
        grid-template-columns: 1fr;
        row-gap: 9px;
    }

    .resume-header { row-gap: 16px; }

    .name-block h1,
    .headline { width: auto; }

    .name-block h1 { font-size: clamp(34px, 10vw, 46px); }

    .header-side {
        justify-content: flex-start;
        flex-direction: row;
        gap: 16px;
    }

    .contact-info {
        text-align: left;
        font-size: 15px;
    }

    .profile-photo { width: 76px; height: 96px; }
    .resume-label { padding-left: 0; }
    .section-text,
    .entries { padding: 0; }
    .resume-section { padding: 16px 0 18px; }

    .education-head { grid-template-columns: 1fr; gap: 5px; }
    .education-head-right { padding-top: 0; text-align: left; white-space: normal; }
    .education-date, .education-location { display: inline; }
    .education-location { margin-left: 8px; }
    .education-location::before { content: "· "; color: #aaa; }
    .education-school { font-size: 20px; }
    .education-details { padding-left: 12px; }

    .entry-meta,
    .entry-subrow {
        align-items: flex-start;
        flex-direction: column;
        gap: 1px;
    }

    .entry-meta > :last-child,
    .entry-subrow > :last-child { text-align: left; }

    .interest-separator { margin: 0 8px; }
}

/* Publications: APA-style bibliography on the resume, journal-like detail dialog on click. */
.publication-list {
    min-width: 0;
    padding: 0 10px;
}

.publication-entry {
    padding: 4px 0 10px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.publication-entry + .publication-entry { padding-top: 5px; }

.publication-citation-button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 2px 4px 2px 1.35em;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: var(--text);
    font: inherit;
    line-height: 1.48;
    text-align: left;
    text-indent: -1.35em;
    cursor: pointer;
}

.publication-citation-button:hover,
.publication-citation-button:focus-visible {
    background: #f7f7f7;
    color: var(--accent);
    outline: 1px solid #ececec;
}

.apa-citation em { font-style: italic; }

.publication-dialog {
    width: min(820px, calc(100% - 32px));
    max-height: min(86vh, 900px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 18px 65px rgba(0, 0, 0, 0.22);
}

.publication-dialog::backdrop { background: rgba(22, 22, 22, 0.48); }

.journal-article { background: #fff; }

.journal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 19px 26px 17px;
    border-top: 5px solid var(--accent);
    border-bottom: 1px solid var(--rule);
}

.journal-name {
    color: var(--accent);
    font-family: Merriweather, Georgia, serif;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
}

.journal-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 6px;
    color: #777;
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dialog-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid #d7d7d7;
    border-radius: 0;
    background: #fff;
    color: #555;
    font: 300 27px/1 Arial, sans-serif;
    cursor: pointer;
}

.dialog-close:hover,
.dialog-close:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.journal-body { padding: 28px 34px 32px; }

.journal-title {
    margin: 0;
    color: #181818;
    font-family: Merriweather, Georgia, serif;
    font-size: clamp(25px, 4vw, 35px);
    line-height: 1.25;
    font-weight: 700;
}

.journal-authors {
    margin-top: 13px;
    color: var(--accent);
    font-size: 17px;
    line-height: 1.5;
}

.journal-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
}

.journal-section h4 {
    margin: 0 0 10px;
    color: #222;
    font-family: Merriweather, Georgia, serif;
    font-size: 17px;
    line-height: 1.3;
}

.journal-abstract {
    margin: 0;
    color: #333;
    font-size: 16px;
    line-height: 1.65;
    white-space: pre-line;
}

.journal-keywords p {
    margin: 0;
    color: #555;
    line-height: 1.55;
}

.article-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 26px 0 0;
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}

.article-details > div {
    min-width: 0;
    padding: 12px 14px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.article-details dt {
    margin: 0 0 4px;
    color: #888;
    font-size: 12px;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.article-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #292929;
    font-size: 15px;
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.article-actions a {
    display: inline-block;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--accent);
    border-radius: 0;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.article-actions a:hover,
.article-actions a:focus-visible {
    background: var(--accent);
    color: #fff;
}

.citation-panel .apa-citation {
    margin: 0;
    padding-left: 1.35em;
    color: #444;
    font-size: 14px;
    line-height: 1.55;
    text-indent: -1.35em;
}

@media print {
    .publication-list { padding: 0; }
    .publication-entry { padding: 2px 0 5px; }
    .publication-citation-button {
        padding: 0 0 0 1.25em;
        color: var(--text);
        font-size: 8.7pt;
        line-height: 12pt;
        text-indent: -1.25em;
        pointer-events: none;
    }
    .publication-citation-button:hover,
    .publication-citation-button:focus-visible {
        background: transparent;
        color: var(--text);
        outline: none;
    }
    .publication-dialog { display: none !important; }
}

@media (max-width: 760px) {
    .publication-list { padding: 0; }
    .publication-citation-button { padding-right: 0; }
    .publication-dialog { width: calc(100% - 20px); max-height: 90vh; }
    .journal-header { padding: 16px 18px 14px; }
    .journal-body { padding: 22px 20px 26px; }
    .journal-title { font-size: 25px; }
    .article-details { grid-template-columns: 1fr; }
}

/* V5: project grouping and lightweight inline supporting evidence. */
.project-group + .project-group {
    margin-top: 15px;
    padding-top: 11px;
    border-top: 1px solid #eeeeee;
}

.project-group-title {
    margin: 0 0 7px;
    color: #777;
    font-family: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.project-entry { padding-bottom: 10px; }

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: .025em;
}

.evidence-trigger,
.evidence-link {
    display: inline;
    margin: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-align: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease;
}

.evidence-trigger {
    padding: 0 .11em;
}

.evidence-trigger-label {
    text-decoration-line: underline;
    text-decoration-style: dotted;
    text-decoration-color: #858585;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color 150ms ease;
}

.evidence-link {
    padding: 0 0 1px;
    border-bottom: 1px dotted #777;
}

.evidence-attachment-icon {
    display: inline-block;
    width: .76em;
    height: .76em;
    margin-left: .26em;
    color: #858585;
    vertical-align: -.07em;
    transition: color 150ms ease;
}

.evidence-trigger:hover,
.evidence-trigger:focus-visible {
    background: rgba(154, 42, 58, .045);
    color: var(--accent);
    outline: none;
}

.evidence-trigger:hover .evidence-trigger-label,
.evidence-trigger:focus-visible .evidence-trigger-label {
    text-decoration-color: var(--accent);
}

.evidence-trigger:hover .evidence-attachment-icon,
.evidence-trigger:focus-visible .evidence-attachment-icon {
    color: var(--accent);
}

.evidence-link:hover,
.evidence-link:focus-visible {
    border-bottom-color: var(--accent);
    background: transparent;
    color: var(--accent);
    outline: none;
}

.evidence-external {
    margin-left: 3px;
    color: var(--accent);
    font-size: .72em;
    vertical-align: .13em;
}

.evidence-dialog {
    width: min(900px, calc(100% - 32px));
    max-height: 90vh;
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 18px 65px rgba(0, 0, 0, .22);
}

.evidence-dialog::backdrop { background: rgba(22, 22, 22, .48); }

.evidence-viewer { background: #fff; }

.evidence-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 19px 26px 17px;
    border-top: 4px solid var(--accent);
    border-bottom: 1px solid var(--rule);
}

.evidence-kicker {
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.evidence-header h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
}

.evidence-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 13px;
    margin-top: 6px;
    color: #777;
    font-size: 13px;
}

.evidence-body { padding: 24px 28px 30px; }

.evidence-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    max-height: 610px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
}

.evidence-main-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 570px;
    object-fit: contain;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.evidence-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 2px;
    overflow-x: auto;
}

.evidence-thumbnail {
    width: 72px;
    height: 54px;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid #d5d5d5;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
}

.evidence-thumbnail.is-active,
.evidence-thumbnail:hover,
.evidence-thumbnail:focus-visible {
    border-color: var(--accent);
    outline: none;
}

.evidence-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f4f4f4;
}

.evidence-empty {
    padding: 34px 20px;
    border: 1px solid #e1e1e1;
    background: #f7f7f7;
    color: #777;
    text-align: center;
}

.evidence-note {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
}

.evidence-note h4 {
    margin: 0 0 7px;
    font-family: Merriweather, Georgia, serif;
    font-size: 15px;
}

.evidence-note p {
    margin: 0;
    color: #444;
    font-size: 15px;
    line-height: 1.55;
}

.evidence-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 20px 0 0;
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}

.evidence-details > div {
    min-width: 0;
    padding: 10px 12px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.evidence-details dt {
    margin-bottom: 3px;
    color: #888;
    font-size: 11px;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.evidence-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.evidence-details a {
    margin: 0;
    padding: 0;
}

@media print {
    .evidence-trigger,
    .evidence-link {
        border-bottom: 0;
        padding-inline: 0;
        background: transparent;
        color: inherit;
        pointer-events: none;
    }

    .evidence-trigger-label {
        text-decoration: none;
    }

    .evidence-external,
    .evidence-attachment-icon,
    .evidence-dialog { display: none !important; }

    .project-group + .project-group {
        margin-top: 7px;
        padding-top: 6px;
    }

    .project-group-title { font-size: 7pt; margin-bottom: 3px; }
    .project-meta { font-size: 7.5pt; }
}

@media (max-width: 760px) {
    .project-meta {
        flex-direction: column;
        gap: 1px;
    }

    .evidence-dialog { width: calc(100% - 20px); }
    .evidence-header { padding: 16px 18px 14px; }
    .evidence-body { padding: 18px 16px 22px; }
    .evidence-canvas { min-height: 190px; padding: 10px; }
    .evidence-main-image { max-height: 68vh; }
    .evidence-details { grid-template-columns: 1fr; }
}

/* Endnotes: restrained superscript references and a simple full-width notes area. */
html {
    scroll-behavior: smooth;
}

.endnote-ref {
    display: inline;
    margin-left: 0.18em;
    font-size: 0.7em;
    line-height: 0;
    vertical-align: super;
}

.endnote-ref a {
    color: #686868;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    margin: 0;
    padding: 0;
    transition: color 150ms ease;
}

.endnote-ref a:hover,
.endnote-ref a:focus-visible {
    color: #9b2533 !important;
    background: transparent;
    outline: none;
}

/* Endnotes deliberately do not use the resume's left-label/right-content grid.
   A single rule separates them from the main CV, keeping them visually secondary. */
.endnotes-section {
    margin-top: 22px;
    padding: 17px 10px 0;
    border-top: 1px solid rgba(32, 32, 32, 0.16);
    border-bottom: 0;
    background: transparent;
    scroll-margin-top: 20px;
}

.endnotes-content {
    width: 100%;
    min-width: 0;
    font-size: 12.75px;
    line-height: 1.62;
}

.endnotes-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: resume-endnote;
}

.endnote-item {
    counter-increment: resume-endnote;
    display: grid;
    grid-template-columns: 1.35em minmax(0, 1fr);
    column-gap: 0.48em;
    align-items: start;
    margin: 0 0 8px;
    padding: 0;
    scroll-margin-top: 20px;
}

.endnote-item::before {
    content: counter(resume-endnote);
    color: #3f3f3f;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: left;
}

.endnote-item:last-child {
    margin-bottom: 0;
}

.endnote-item:target::before {
    color: #9b2533;
}

.endnote-note {
    min-width: 0;
    color: #555;
}

.endnote-note p {
    margin: 0 0 0.2em;
}

.endnote-note p:last-child {
    margin-bottom: 0;
}

.endnote-meta {
    grid-column: 2;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.45em;
    margin-top: 1px;
    color: #929292;
    font-size: 11.5px;
    line-height: 1.45;
}

.endnote-source,
.endnote-back {
    color: #888;
    text-decoration: none;
    margin: 0;
    padding: 0;
}

.endnote-source:hover,
.endnote-source:focus-visible,
.endnote-back:hover,
.endnote-back:focus-visible {
    color: #9b2533;
    background: transparent;
}

.endnote-back {
    font-size: 0.95em;
}

@media print {
    html {
        scroll-behavior: auto;
    }

    .endnote-ref a {
        color: inherit;
        background: none;
        text-decoration: none;
    }

    .endnote-back {
        display: none !important;
    }

    .endnotes-section {
        margin-top: 12pt;
        padding: 8pt 0 0;
        border-top: 0.5pt solid #bdbdbd;
    }

    .endnotes-content {
        font-size: 7.6pt;
        line-height: 10.2pt;
    }

    .endnote-item {
        margin-bottom: 3.2pt;
    }

    .endnote-meta {
        font-size: 6.8pt;
        line-height: 8.5pt;
    }
}

/* BEGIN EXPERIENCE FOUR-CORNER TYPOGRAPHY */
/* Match the Education hierarchy: large organisation, smaller role, quiet meta. */
.experience-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "company location"
        "position date"
        "description description";
    column-gap: 28px;
    row-gap: 1px;
    padding: 5px 0 18px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.experience-entry + .experience-entry {
    padding-top: 10px;
}

.experience-entry > h3 {
    grid-area: company;
    margin: 0;
    color: var(--text);
    font-family: Merriweather, Georgia, serif;
    font-size: 22px;
    line-height: 1.32;
    font-weight: 700;
}

.experience-entry > h3 a {
    color: inherit;
    padding-top: 0;
    padding-bottom: 0;
}

/* Let the position/date children participate directly in the four-corner grid. */
.experience-entry > .entry-subrow {
    display: contents;
}

.experience-entry > .entry-subrow > .emph {
    grid-area: position;
    margin-top: 1px;
    color: #444;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
}

.experience-entry > .location-line {
    grid-area: location;
    align-self: start;
    margin: 3px 0 0;
    color: #777;
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: normal;
    text-align: right;
    text-transform: none;
    white-space: nowrap;
}

.experience-entry > .entry-subrow > .light {
    grid-area: date;
    align-self: start;
    margin-top: 3px;
    color: #858585;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.09em;
    text-align: right;
    text-transform: uppercase;
    white-space: nowrap;
}

.experience-entry > .desc {
    grid-area: description;
    margin-top: 9px;
    color: #333;
    font-size: 14.5px;
    line-height: 1.55;
}

.experience-entry > .desc p {
    margin: 0 0 5px;
}

.experience-entry > .desc p:last-child {
    margin-bottom: 0;
}

.experience-entry > .desc ul,
.experience-entry > .desc ol {
    margin: 3px 0 0;
    padding-left: 18px;
}

.experience-entry > .desc li {
    margin: 1px 0;
    padding-left: 1px;
}

@media (max-width: 640px) {
    .experience-entry {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "company company"
            "position position"
            "location location"
            "date date"
            "description description";
        column-gap: 0;
        row-gap: 1px;
    }

    .experience-entry > .location-line,
    .experience-entry > .entry-subrow > .light {
        text-align: left;
        white-space: normal;
    }

    .experience-entry > .location-line {
        margin-top: 5px;
    }

    .experience-entry > .entry-subrow > .light {
        margin-top: 0;
    }
}

@media print {
    .experience-entry {
        column-gap: 0.5cm;
        row-gap: 0;
        padding: 2px 0 7px;
    }

    .experience-entry + .experience-entry {
        padding-top: 5px;
    }

    .experience-entry > h3 {
        font-size: 11pt;
        line-height: 13pt;
    }

    .experience-entry > .entry-subrow > .emph {
        font-size: 8.5pt;
        line-height: 11pt;
    }

    .experience-entry > .location-line {
        font-size: 8pt;
        line-height: 10pt;
    }

    .experience-entry > .entry-subrow > .light {
        font-size: 7pt;
        line-height: 10pt;
    }

    .experience-entry > .desc {
        margin-top: 4px;
        font-size: 8.3pt;
        line-height: 11pt;
    }
}
/* END EXPERIENCE FOUR-CORNER TYPOGRAPHY */

/* BEGIN PROJECT TYPOGRAPHY ALIGNMENT */
/* Keep project titles prominent while matching Education / Experience body typography. */
.project-entry {
    padding: 5px 0 18px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.project-entry + .project-entry {
    padding-top: 9px;
}

.project-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: baseline;
}

.project-title {
    min-width: 0;
    margin: 0;
}

.project-title a {
    color: inherit;
    padding-top: 0;
    padding-bottom: 0;
}

.project-date {
    align-self: baseline;
    color: #858585;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.09em;
    text-align: right;
    text-transform: uppercase;
    white-space: nowrap;
}

.project-subtitle {
    margin-top: 3px;
    color: #454545;
    font-size: 14.5px;
    line-height: 1.5;
    font-weight: 500;
}

.project-secondary-meta {
    margin-top: 5px;
    color: #858585;
    font-size: 13px;
    line-height: 1.45;
}

.project-description {
    margin-top: 9px;
    color: #333;
    font-size: 14.5px;
    line-height: 1.55;
}

.project-description p {
    margin: 0 0 5px;
}

.project-description p:last-child {
    margin-bottom: 0;
}

.project-description ul,
.project-description ol {
    margin: 3px 0 0;
    padding-left: 18px;
}

.project-description li {
    margin: 1px 0;
    padding-left: 1px;
}

.project-tags {
    margin-top: 5px;
    font-size: 12.5px;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .project-heading-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .project-date {
        text-align: left;
        white-space: normal;
    }
}

@media print {
    .project-entry {
        padding: 2px 0 7px;
    }

    .project-entry + .project-entry {
        padding-top: 5px;
    }

    .project-heading-row {
        gap: 0.5cm;
    }

    .project-date {
        font-size: 7pt;
        line-height: 10pt;
    }

    .project-subtitle {
        margin-top: 1px;
        font-size: 8.5pt;
        line-height: 11pt;
    }

    .project-secondary-meta {
        margin-top: 2px;
        font-size: 7.5pt;
        line-height: 10pt;
    }

    .project-description {
        margin-top: 4px;
        font-size: 8.3pt;
        line-height: 11pt;
    }

    .project-tags {
        margin-top: 2px;
        font-size: 7pt;
        line-height: 9pt;
    }
}
/* END PROJECT TYPOGRAPHY ALIGNMENT */

/* === Honors: scholarships + competition awards === */
.honors-groups {
    display: flex;
    flex-direction: column;
    gap: 1.65rem;
}

.honors-group-title {
    margin: 0 0 0.72rem;
    font-family: var(--font-sans, inherit);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6f6f6f;
}

.honors-list {
    display: flex;
    flex-direction: column;
    gap: 0.52rem;
}

.honor-item {
    display: grid;
    align-items: start;
    column-gap: 1rem;
    row-gap: 0.16rem;
    font-size: 14.5px;
    line-height: 1.48;
}

.scholarship-item {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.58fr) 7.2rem;
}

.competition-item {
    grid-template-columns: minmax(0, 1fr) 7.2rem;
}

.honor-main {
    min-width: 0;
}

.honor-title {
    font-size: 14.5px;
    font-weight: 560;
    color: #222;
}

.honor-issuer {
    margin-top: 0.05rem;
    font-size: 13px;
    line-height: 1.4;
    color: #777;
}

.honor-value {
    min-width: 0;
    font-size: 13.5px;
    color: #555;
}

.honor-date {
    padding-top: 0.08rem;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.08em;
    text-align: right;
    white-space: nowrap;
    color: #858585;
}

.honor-description {
    grid-column: 1 / -1;
    margin: 0.12rem 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #555;
}

.honor-description > :first-child { margin-top: 0; }
.honor-description > :last-child { margin-bottom: 0; }

@media (max-width: 760px) {
    .scholarship-item,
    .competition-item {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .scholarship-item .honor-value {
        grid-column: 1;
        grid-row: 2;
    }

    .scholarship-item .honor-date {
        grid-column: 2;
        grid-row: 1;
    }

    .honor-description {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .scholarship-item,
    .competition-item {
        grid-template-columns: 1fr;
        gap: 0.12rem;
    }

    .scholarship-item .honor-value,
    .scholarship-item .honor-date,
    .competition-item .honor-date {
        grid-column: 1;
        grid-row: auto;
        text-align: left;
    }
}

@media print {
    .honors-groups { gap: 1.1rem; }
    .honors-list { gap: 0.3rem; }
    .honor-item { font-size: 10pt; }
    .honor-title { font-size: 10pt; }
    .honor-value { font-size: 9.2pt; }
    .honor-date { font-size: 8.4pt; }
    .honor-issuer, .honor-description { font-size: 9pt; }
}
/* === /Honors === */

/* === Honor detail icon + lightweight interaction tooltips === */
.honor-title-line {
    display: flex;
    align-items: baseline;
    gap: 0.34rem;
    min-width: 0;
}

.honor-title-line .honor-title {
    min-width: 0;
}

.honor-detail-link {
    position: relative;
    display: inline-flex;
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 2px;
    color: #8a8a8a;
    vertical-align: -0.1em;
    transition: color 150ms ease, transform 150ms ease;
}

.honor-detail-icon-svg {
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    stroke-width: 1.65;
}

.honor-detail-link:hover,
.honor-detail-link:focus-visible {
    background: transparent;
    color: var(--accent) !important;
    outline: none;
    transform: translateY(-1px);
}

[data-ui-tooltip] {
    position: relative;
}

[data-ui-tooltip]::after {
    content: attr(data-ui-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 7px);
    z-index: 1200;
    width: max-content;
    max-width: min(230px, 74vw);
    padding: 5px 7px;
    border-radius: 3px;
    background: rgba(28, 28, 28, 0.94);
    color: #fff;
    font-family: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    white-space: normal;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 3px);
    transition: opacity 120ms ease, transform 120ms ease;
}

@media (hover: hover) and (pointer: fine) {
    [data-ui-tooltip]:hover::after {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

[data-ui-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 520px) {
    .honor-title-line { align-items: center; }
}

@media print {
    .honor-detail-link { display: none !important; }
    [data-ui-tooltip]::after { display: none !important; }
}
/* === /Honor detail icon + tooltips === */

/* === Student Leadership: project-style layout refinement === */
.leadership-section .leadership-entry {
    break-inside: avoid;
    page-break-inside: avoid;
}

.leadership-section .leadership-organization a {
    color: inherit;
}

.leadership-heading-row > :first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Top-right corner: location first, period underneath. */
.leadership-corner-meta {
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    min-width: max-content;
    text-align: right;
}

.leadership-location {
    color: #858585;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}

.leadership-date {
    margin: 0;
}

/* Team / scope and role share one line: “Executive Committee · Secretary-General”. */
.leadership-role-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.38em;
    margin-top: 4px;
}

.leadership-scope,
.leadership-position {
    margin: 0;
}

.leadership-role-separator {
    color: #858585;
    font-weight: 400;
}

@media (max-width: 640px) {
    .leadership-corner-meta {
        align-items: flex-start;
        min-width: 0;
        text-align: left;
    }

    .leadership-location {
        white-space: normal;
    }
}

@media print {
    .leadership-section .leadership-entry {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .leadership-location {
        font-size: 7.5pt;
        line-height: 10pt;
    }
}
/* === /Student Leadership === */

/* BEGIN RESUME PRIMARY ENTRY TYPOGRAPHY */
/* One shared hierarchy for the main résumé-entry titles. Honors intentionally stays untouched. */
:root {
    --resume-primary-entry-title-size: 20px;
    --resume-primary-entry-title-line-height: 1.34;
}

.education-school,
.experience-entry > h3,
.project-title,
.leadership-organization {
    font-family: Merriweather, Georgia, serif;
    font-size: var(--resume-primary-entry-title-size);
    line-height: var(--resume-primary-entry-title-line-height);
    font-weight: 700;
}

@media print {
    .education-school,
    .experience-entry > h3,
    .project-title,
    .leadership-organization {
        font-size: 11pt;
        line-height: 13pt;
    }
}
/* END RESUME PRIMARY ENTRY TYPOGRAPHY */

/* === Resume hero header V3: compact bilingual identity + integrated profile/interests === */
.resume-hero-header.resume-hero-v3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: 42px;
    align-items: start;
    padding: 8px 0 26px;
    border-bottom: 1px solid var(--rule);
}

.resume-hero-v3 .resume-hero-identity { min-width: 0; }

.resume-hero-v3 .resume-hero-kicker {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.resume-hero-v3 .resume-hero-name {
    width: auto;
    margin: 0;
    font-family: "Source Sans 3", "Source Sans Pro", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0;
}

.resume-hero-v3 .resume-hero-name-cn,
.resume-hero-v3 .resume-hero-name-en { display: block; }

.resume-hero-v3 .resume-hero-name-cn {
    color: var(--accent);
    font-family: "Source Sans 3", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    font-size: 36px;
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -.035em;
}

.resume-hero-v3 .resume-hero-name-en {
    margin-top: 4px;
    color: #333;
    font-family: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
    font-size: 19px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: .025em;
}

.resume-hero-v3 .resume-hero-name-single {
    font-size: 34px;
    letter-spacing: -.02em;
}

.resume-hero-v3 .resume-hero-headline {
    width: auto;
    margin: 9px 0 0;
    color: #6a6a6a;
    font-family: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: .01em;
}

.resume-hero-v3 .resume-hero-profile {
    max-width: 660px;
    margin-top: 20px;
    color: #3d3d3d;
    font-size: 15.5px;
    line-height: 1.62;
}

.resume-hero-v3 .resume-hero-profile p { margin: 0 0 7px; }
.resume-hero-v3 .resume-hero-profile p:last-child { margin-bottom: 0; }

.resume-hero-v3 .resume-hero-interests {
    max-width: 720px;
    margin-top: 17px;
}

.resume-hero-v3 .resume-hero-interests-label {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.resume-hero-v3 .resume-hero-interest-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    color: #454545;
    font-size: 13.5px;
    line-height: 1.6;
}

.resume-hero-v3 .resume-hero-interest-item { white-space: normal; }

.resume-hero-v3 .resume-hero-interest-separator {
    margin: 0 9px;
    color: #999;
    font-size: .62em;
    line-height: 1;
    transform: translateY(-.08em);
}

.resume-hero-v3 .resume-hero-interest-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #454545;
    font-size: 13.5px;
    line-height: 1.6;
}

.resume-hero-v3 .resume-hero-interest-list li::before {
    content: "·";
    margin-right: 6px;
    color: #999;
}

.resume-hero-v3 .resume-hero-side {
    display: flex;
    justify-self: end;
    align-items: flex-start;
    gap: 13px;
    width: max-content;
    min-width: 0;
}

.resume-hero-v3 .resume-hero-meta {
    display: grid;
    grid-template-columns: 64px minmax(126px, 168px);
    column-gap: 9px;
    row-gap: 8px;
    margin: 3px 0 0;
    padding: 0;
}

.resume-hero-v3 .resume-hero-meta dt,
.resume-hero-v3 .resume-hero-meta dd {
    margin: 0;
    min-width: 0;
}

.resume-hero-v3 .resume-hero-meta dt {
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: .085em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.resume-hero-v3 .resume-hero-meta dd {
    color: #3b3b3b;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.resume-hero-v3 .resume-hero-meta a {
    display: inline;
    margin: 0;
    padding: 0;
    color: inherit;
    border-radius: 1px;
    overflow-wrap: anywhere;
}

.resume-hero-v3 .resume-hero-meta a:hover,
.resume-hero-v3 .resume-hero-meta a:focus-visible {
    color: var(--accent);
    background: transparent;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.resume-hero-v3 .resume-hero-meta .resume-hero-meta-accent { color: var(--accent); }

.resume-hero-v3 .resume-hero-photo {
    width: 88px;
    height: 110px;
    flex: 0 0 88px;
    object-fit: cover;
    object-position: center top;
    border: 1px solid #d7d7d7;
    background: #f4f4f4;
}

@media (max-width: 900px) {
    .resume-hero-header.resume-hero-v3 {
        grid-template-columns: 1fr;
        row-gap: 23px;
    }
    .resume-hero-v3 .resume-hero-side { justify-self: start; }
    .resume-hero-v3 .resume-hero-profile { max-width: 720px; }
}

@media (max-width: 760px) {
    .resume-hero-header.resume-hero-v3 {
        row-gap: 20px;
        padding: 3px 0 21px;
    }
    .resume-hero-v3 .resume-hero-name-cn { font-size: 33px; }
    .resume-hero-v3 .resume-hero-name-en { font-size: 18px; }
    .resume-hero-v3 .resume-hero-headline { font-size: 13.5px; }
    .resume-hero-v3 .resume-hero-profile {
        margin-top: 17px;
        font-size: 15px;
        line-height: 1.58;
    }
    .resume-hero-v3 .resume-hero-meta { grid-template-columns: 62px minmax(0, 1fr); }
    .resume-hero-v3 .resume-hero-side { max-width: 100%; }
    .resume-hero-v3 .resume-hero-photo {
        width: 80px;
        height: 100px;
        flex-basis: 80px;
    }
}

@media (max-width: 480px) {
    .resume-hero-v3 .resume-hero-side {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 74px;
        gap: 11px;
        width: 100%;
    }
    .resume-hero-v3 .resume-hero-photo { width: 74px; height: 93px; }
}

@media print {
    .resume-hero-header.resume-hero-v3 {
        grid-template-columns: minmax(0, 1fr) max-content;
        column-gap: .45cm;
        padding: 1.5mm 0 3.5mm;
    }
    .resume-hero-v3 .resume-hero-kicker { margin-bottom: 1mm; font-size: 6pt; }
    .resume-hero-v3 .resume-hero-name-cn { font-size: 18pt; }
    .resume-hero-v3 .resume-hero-name-en { font-size: 10pt; margin-top: .6mm; }
    .resume-hero-v3 .resume-hero-headline { margin-top: 1mm; font-size: 7.5pt; }
    .resume-hero-v3 .resume-hero-profile { max-width: 12cm; margin-top: 2.5mm; font-size: 8pt; line-height: 11.5pt; }
    .resume-hero-v3 .resume-hero-interests { margin-top: 2mm; }
    .resume-hero-v3 .resume-hero-interests-label { margin-bottom: .8mm; font-size: 5.7pt; }
    .resume-hero-v3 .resume-hero-interest-inline,
    .resume-hero-v3 .resume-hero-interest-list { font-size: 7pt; line-height: 10pt; }
    .resume-hero-v3 .resume-hero-side { gap: .22cm; }
    .resume-hero-v3 .resume-hero-meta { grid-template-columns: 1.3cm 3.2cm; column-gap: .16cm; row-gap: .7mm; margin-top: .5mm; }
    .resume-hero-v3 .resume-hero-meta dt { font-size: 6pt; }
    .resume-hero-v3 .resume-hero-meta dd { font-size: 7.2pt; }
    .resume-hero-v3 .resume-hero-photo { width: 1.65cm; height: 2.06cm; flex-basis: 1.65cm; }
}
/* === /Resume hero header V3 === */

/* === Resume hero header V4 SAFE: serif identity + custom metadata === */
.resume-hero-header.resume-hero-v4-safe {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: 42px;
    align-items: start;
    padding: 8px 0 26px;
    border-bottom: 1px solid var(--rule);
}

.resume-hero-v4-safe .resume-hero-identity { min-width: 0; }

.resume-hero-v4-safe .resume-hero-kicker {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .115em;
    text-transform: uppercase;
}

.resume-hero-v4-safe .resume-hero-name {
    width: auto;
    margin: 0;
    font-family: Merriweather, Georgia, "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
    font-weight: 400;
    letter-spacing: 0;
}

.resume-hero-v4-safe .resume-hero-name-cn,
.resume-hero-v4-safe .resume-hero-name-en { display: block; }

.resume-hero-v4-safe .resume-hero-name-cn {
    color: var(--accent);
    font-family: Merriweather, Georgia, "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
    font-size: 38px;
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: .075em;
}

.resume-hero-v4-safe .resume-hero-name-en {
    margin-top: 4px;
    color: #343434;
    font-family: Merriweather, Georgia, serif;
    font-size: 20px;
    line-height: 1.28;
    font-weight: 400;
    letter-spacing: .018em;
}

.resume-hero-v4-safe .resume-hero-name-single {
    font-size: 36px;
    letter-spacing: .035em;
}

.resume-hero-v4-safe .resume-hero-headline {
    width: auto;
    margin: 9px 0 0;
    color: #6a6a6a;
    font-family: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: .01em;
}

.resume-hero-v4-safe .resume-hero-profile {
    max-width: 680px;
    margin-top: 19px;
    color: #3d3d3d;
    font-size: 15.5px;
    line-height: 1.62;
}

.resume-hero-v4-safe .resume-hero-profile p { margin: 0 0 7px; }
.resume-hero-v4-safe .resume-hero-profile p:last-child { margin-bottom: 0; }

.resume-hero-v4-safe .resume-hero-interests {
    max-width: 740px;
    margin-top: 16px;
}

.resume-hero-v4-safe .resume-hero-interests-label {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.resume-hero-v4-safe .resume-hero-interest-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    color: #474747;
    font-size: 13.5px;
    line-height: 1.65;
}

.resume-hero-v4-safe .resume-hero-interest-item { white-space: normal; }

.resume-hero-v4-safe .resume-hero-interest-separator {
    margin: 0 9px;
    color: #999;
    font-size: .68em;
    line-height: 1;
}

.resume-hero-v4-safe .resume-hero-interest-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #474747;
    font-size: 13.5px;
    line-height: 1.65;
}

.resume-hero-v4-safe .resume-hero-interest-list li::before {
    content: "·";
    margin-right: 6px;
    color: #999;
}

.resume-hero-v4-safe .resume-hero-side {
    display: flex;
    justify-self: end;
    align-items: flex-start;
    gap: 13px;
    width: max-content;
    min-width: 0;
}

.resume-hero-v4-safe .resume-hero-meta {
    display: grid;
    grid-template-columns: 64px minmax(126px, 172px);
    column-gap: 9px;
    row-gap: 8px;
    margin: 3px 0 0;
    padding: 0;
}

.resume-hero-v4-safe .resume-hero-meta dt,
.resume-hero-v4-safe .resume-hero-meta dd {
    margin: 0;
    min-width: 0;
}

.resume-hero-v4-safe .resume-hero-meta dt {
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: .085em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.resume-hero-v4-safe .resume-hero-meta dd {
    color: #3b3b3b;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.resume-hero-v4-safe .resume-hero-meta a {
    display: inline;
    margin: 0;
    padding: 0;
    color: inherit;
    border-radius: 1px;
    overflow-wrap: anywhere;
}

.resume-hero-v4-safe .resume-hero-meta a:hover,
.resume-hero-v4-safe .resume-hero-meta a:focus-visible {
    color: var(--accent) !important;
    background: transparent;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.resume-hero-v4-safe .resume-hero-photo {
    width: 88px;
    height: 110px;
    flex: 0 0 88px;
    object-fit: cover;
    object-position: center top;
    border: 1px solid #d7d7d7;
    background: #f4f4f4;
}

@media (max-width: 900px) {
    .resume-hero-header.resume-hero-v4-safe {
        grid-template-columns: 1fr;
        row-gap: 23px;
    }
    .resume-hero-v4-safe .resume-hero-side { justify-self: start; }
    .resume-hero-v4-safe .resume-hero-profile { max-width: 720px; }
}

@media (max-width: 760px) {
    .resume-hero-header.resume-hero-v4-safe {
        row-gap: 20px;
        padding: 3px 0 21px;
    }
    .resume-hero-v4-safe .resume-hero-name-cn { font-size: 34px; letter-spacing: .065em; }
    .resume-hero-v4-safe .resume-hero-name-en { font-size: 18px; }
    .resume-hero-v4-safe .resume-hero-headline { font-size: 13.5px; }
    .resume-hero-v4-safe .resume-hero-profile {
        margin-top: 17px;
        font-size: 15px;
        line-height: 1.58;
    }
    .resume-hero-v4-safe .resume-hero-meta { grid-template-columns: 62px minmax(0, 1fr); }
    .resume-hero-v4-safe .resume-hero-side { max-width: 100%; }
    .resume-hero-v4-safe .resume-hero-photo {
        width: 80px;
        height: 100px;
        flex-basis: 80px;
    }
}

@media (max-width: 480px) {
    .resume-hero-v4-safe .resume-hero-side {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 74px;
        gap: 11px;
        width: 100%;
    }
    .resume-hero-v4-safe .resume-hero-photo { width: 74px; height: 93px; }
}

@media print {
    .resume-hero-header.resume-hero-v4-safe {
        grid-template-columns: minmax(0, 1fr) max-content;
        column-gap: .45cm;
        padding: 1.5mm 0 3.5mm;
    }
    .resume-hero-v4-safe .resume-hero-kicker { margin-bottom: 1mm; font-size: 6pt; }
    .resume-hero-v4-safe .resume-hero-name-cn { font-size: 18pt; letter-spacing: .06em; }
    .resume-hero-v4-safe .resume-hero-name-en { font-size: 10pt; margin-top: .6mm; }
    .resume-hero-v4-safe .resume-hero-headline { margin-top: 1mm; font-size: 7.5pt; }
    .resume-hero-v4-safe .resume-hero-profile { max-width: 12cm; margin-top: 2.5mm; font-size: 8pt; line-height: 11.5pt; }
    .resume-hero-v4-safe .resume-hero-interests { margin-top: 2mm; }
    .resume-hero-v4-safe .resume-hero-interests-label { margin-bottom: .8mm; font-size: 5.7pt; }
    .resume-hero-v4-safe .resume-hero-interest-inline,
    .resume-hero-v4-safe .resume-hero-interest-list { font-size: 7pt; line-height: 10pt; }
    .resume-hero-v4-safe .resume-hero-side { gap: .22cm; }
    .resume-hero-v4-safe .resume-hero-meta { grid-template-columns: 1.3cm 3.2cm; column-gap: .16cm; row-gap: .7mm; margin-top: .5mm; }
    .resume-hero-v4-safe .resume-hero-meta dt { font-size: 6pt; }
    .resume-hero-v4-safe .resume-hero-meta dd { font-size: 7.2pt; }
    .resume-hero-v4-safe .resume-hero-photo { width: 1.65cm; height: 2.06cm; flex-basis: 1.65cm; }
}
/* === /Resume hero header V4 SAFE === */

/* === Resume hero header V4.1: visual alignment refinement === */
.resume-hero-v4-safe .resume-hero-side {
    margin-top: 24px;
}

@media (max-width: 900px) {
    .resume-hero-v4-safe .resume-hero-side {
        margin-top: 0;
    }
}

@media print {
    .resume-hero-v4-safe .resume-hero-side {
        margin-top: 3.6mm;
    }
}
/* === /Resume hero header V4.1 === */

/* BEGIN ACADEMIC STAGE DATE MARKERS */
.stage-date-line {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.stage-date-text {
    min-width: 0;
}

.academic-stage-marker {
    --stage-marker-color: #9AA0A6;
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 12px;
    height: 10px;
    border-radius: 2px;
    background: var(--stage-marker-color);
    vertical-align: middle;
    cursor: help;
    outline: none;
}

.academic-stage-marker::after {
    content: attr(data-stage-tooltip);
    position: absolute;
    right: -4px;
    bottom: calc(100% + 8px);
    z-index: 30;
    width: max-content;
    max-width: 240px;
    padding: 5px 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    background: rgba(30, 30, 30, 0.96);
    color: #fff;
    font-family: "Source Sans 3", "Noto Sans SC", Arial, sans-serif;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(3px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.academic-stage-marker::before {
    content: "";
    position: absolute;
    right: 1px;
    bottom: calc(100% + 4px);
    z-index: 31;
    width: 7px;
    height: 7px;
    background: rgba(30, 30, 30, 0.96);
    opacity: 0;
    pointer-events: none;
    transform: rotate(45deg);
    transition: opacity 120ms ease;
}

.academic-stage-marker:hover::after,
.academic-stage-marker:hover::before,
.academic-stage-marker:focus-visible::after,
.academic-stage-marker:focus-visible::before {
    opacity: 1;
}

.academic-stage-marker:hover::after,
.academic-stage-marker:focus-visible::after {
    transform: translateY(0);
}

.academic-stage-marker:focus-visible {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--stage-marker-color);
}

@media (max-width: 640px) {
    .experience-entry > .entry-subrow > .stage-date-line,
    .project-date.stage-date-line,
    .leadership-date.stage-date-line {
        justify-content: flex-start;
    }
}

@media print {
    .stage-date-line {
        gap: 1.5mm;
    }

    .academic-stage-marker {
        width: 2.1mm;
        height: 2.1mm;
        border-radius: 0.45mm;
    }

    .academic-stage-marker::before,
    .academic-stage-marker::after {
        display: none !important;
    }
}
/* END ACADEMIC STAGE DATE MARKERS */

/* BEGIN HONOR YEAR COLORS + COLOR KEY */
.honor-date.stage-date-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.honor-year-marker {
    cursor: help;
}

.resume-color-key {
    margin-top: 22px;
    padding: 0 10px 1px;
    color: #686868;
}

.resume-color-key-title {
    margin: 0 0 7px;
    font-family: var(--font-sans, "Source Sans 3", Arial, sans-serif);
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #767676;
}

.resume-color-key-groups {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.resume-color-key-group {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-family: var(--font-sans, "Source Sans 3", Arial, sans-serif);
    font-size: 11.5px;
    line-height: 1.45;
}

.resume-color-key-group-label {
    font-weight: 600;
    color: #555;
}

.resume-color-key-items {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px 14px;
}

.resume-color-key-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.resume-color-key-swatch {
    --key-color: #9AA0A6;
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 2px;
    background: var(--key-color);
}

@media (max-width: 640px) {
    .honor-date.stage-date-line {
        justify-content: flex-start;
    }

    .resume-color-key {
        padding-left: 0;
        padding-right: 0;
    }

    .resume-color-key-group {
        display: block;
    }

    .resume-color-key-group-label {
        display: block;
        margin-bottom: 3px;
    }

    .resume-color-key-items {
        gap: 4px 11px;
    }
}

@media print {
    .honor-date.stage-date-line {
        gap: 1.5mm;
    }

    .resume-color-key {
        margin-top: 4.5mm;
        padding: 0 2mm 0.5mm;
        break-inside: avoid;
    }

    .resume-color-key-title {
        margin-bottom: 1.4mm;
        font-size: 7.2pt;
    }

    .resume-color-key-groups {
        gap: 1mm;
    }

    .resume-color-key-group {
        gap: 1.3mm 3mm;
        font-size: 7.8pt;
    }

    .resume-color-key-items {
        gap: 1mm 3mm;
    }

    .resume-color-key-swatch {
        width: 2.1mm;
        height: 2.1mm;
        border-radius: 0.45mm;
    }
}
/* END HONOR YEAR COLORS + COLOR KEY */

/* === Bilingual resume language switch === */
.resume-language-switch {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    margin: -3px 0 7px;
    color: #9a9a9a;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.resume-language-switch a {
    margin: 0;
    padding: 1px 3px;
    color: #8a8a8a;
}

.resume-language-switch a.is-active {
    color: var(--accent);
    font-weight: 600;
}

.resume-language-switch a:hover,
.resume-language-switch a:focus-visible {
    color: var(--accent) !important;
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media print {
    .resume-language-switch { display: none !important; }
}
