* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #ffffff;
    color: #222222;
    line-height: 1.4;
    font-size: 14px;
}

.page {
    width: 794px;
    min-height: 1123px;
    margin: 0 auto;
    padding: 12px 22px;
    background: #ffffff;
}

/* Header */
.header {
    margin-bottom: 8px;
    position: relative;
    /* 为右侧证件照预留宽度 */
    padding-right: 102px;
}

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

.id-photo {
    position: absolute;
    top: 0;
    right: 0;
    width: 78px;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border: 1px solid #e2e2e2;
}

.name {
    font-size: 30px;
    font-weight: 800;
    color: #222222;
    margin-bottom: 3px;
    letter-spacing: 1px;
}

.contact-info {
    font-size: 14px;
    color: #222;
    line-height: 1.45;
}

.contact-line {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 1px;
}

.contact-item {
    display: flex;
    align-items: center;
}

.position-line {
    display: flex;
    align-items: center;
    margin-top: 1px;
}

.website-line {
    display: flex;
    align-items: center;
    margin-top: 1px;
}

/* Section */
.section {
    margin-bottom: 6px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #4478DF;
    padding: 3px 10px;
    border-left: 3px solid #4478DF;
    background-color: #EEF3FF;
    margin-bottom: 4px;
    line-height: 1.3;
}

/* Education */
.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3px;
}

.edu-school {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.edu-badge {
    display: inline-block;
    font-size: 12px;
    color: #4478DF;
    border: 1px solid #4478DF;
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.4;
}

.edu-major {
    font-size: 15px;
    color: #888;
    margin-left: 10px;
}

.edu-degree {
    font-size: 15px;
    color: #888;
    margin-left: 10px;
}

.edu-date {
    font-size: 15px;
    color: #888;
    white-space: nowrap;
}

/* Campus */
.campus-line {
    margin-left: 12px;
    font-size: 15px;
    color: #252525;
    line-height: 1.3;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.campus-name {
    white-space: nowrap;
}

.campus-sep {
    color: #888;
    margin: 0 8px;
}

.campus-featured {
    margin-left: 12px;
    margin-top: 4px;
}

.campus-featured .exp-date {
    margin-left: auto;
}

/* 金山条目要点：左侧虚线连贯分割 */
.campus-featured .exp-items {
    margin-left: 6px;
    padding-left: 18px;
    border-left: 1px dashed #b0b0b0;
    line-height: 1.35;
}

/* Honors */
.honor-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 2px;
    font-size: 15px;
    line-height: 1.45;
}

.honor-content {
    color: #222;
    flex: 1;
    min-width: 0;
}

.honor-name {
    color: #222;
}

.honor-badge {
    display: inline-block;
    min-width: 52px;
    text-align: right;
    margin-left: 4px;
    font-size: 14px;
    color: #888;
    white-space: nowrap;
}

.honor-date {
    font-size: 15px;
    color: #888;
    white-space: nowrap;
    margin-left: 4px;
    min-width: 56px;
    text-align: right;
}

/* Experience */
.exp-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 1px;
}

.exp-company {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.exp-date {
    font-size: 15px;
    color: #888;
    white-space: nowrap;
    margin-left: 12px;
}

.exp-position {
    font-size: 15px;
    color: #888;
    flex: 1;
    margin-left: 10px;
}

.exp-items {
    margin-left: 12px;
    font-size: 15px;
    color: #252525;
    line-height: 1.45;
}

.exp-items li {
    list-style-type: disc;
    margin-left: 6px;
    margin-bottom: 0px;
}

/* 单位简介 */
.exp-intro {
    margin: 3px 0 4px 12px;
    padding: 3px 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #656464;
    background: #F5F7FB;
    border-left: 2px solid #B9C9EC;
    border-radius: 2px;
}

.exp-intro-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #4478DF;
    margin-right: 6px;
    white-space: nowrap;
}

/* Project */
.proj-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1px;
}

.proj-title-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.proj-name {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.proj-role {
    font-size: 14px;
    color: #888;
}

.proj-date {
    font-size: 15px;
    color: #888;
    white-space: nowrap;
}

.proj-link-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 2px;
}

.proj-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.proj-tag {
    display: inline-block;
    font-size: 12px;
    color: #4478DF;
    border: 1px solid #4478DF;
    border-radius: 3px;
    padding: 0px 4px;
    line-height: 1.4;
}

.proj-link {
    color: #4478DF;
    text-decoration: none;
}

.proj-intro {
    font-size: 15px;
    color: #252525;
    line-height: 1.45;
    margin-bottom: 3px;
    border: 1px dashed #808080;
    border-radius: 4px;
    padding: 4px 8px;
    text-align: center;
}

.proj-desc {
    color: #656464;
    display: block;
    text-indent: 24px;
}

.proj-work-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-bottom: 2px;
}

.proj-work-items {
    margin-left: 12px;
    font-size: 15px;
    color: #252525;
    line-height: 1.45;
}

.proj-work-items li {
    list-style-type: decimal;
    margin-left: 12px;
    margin-bottom: 0px;
}

/* Skills */
.skill-items {
    margin-left: 12px;
    font-size: 15px;
    color: #252525;
    line-height: 1.45;
}

.skill-items li {
    list-style-type: disc;
    margin-left: 6px;
    margin-bottom: 0px;
}

/* SVG Icons */
.svg-icon {
    width: 14px;
    height: 14px;
    fill: #4478DF;
    vertical-align: middle;
    margin-right: 5px;
    flex-shrink: 0;
}

/* Company Logo */
.company-logo {
    height: 16px;
    vertical-align: middle;
    margin-left: 4px;
}

.company-logo.small {
    height: 10px;
}

.company-logo.icpc {
    height: 22px;
}

.company-logo.hust {
    height: 22px;
}

.company-logo.qiniu {
    height: 14px;
}

.company-logo.bilibili {
    height: 13px;
}

/* Print styles - force background colors to display */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* 两页双面排版：标题不落单在页尾，条目不跨页截断 */
    .section-title,
    .edu-header,
    .exp-header,
    .proj-header,
    .proj-work-title {
        break-after: avoid;
    }

    .honor-item,
    .campus-line,
    .proj-intro,
    .exp-intro,
    .exp-items li,
    .proj-work-items li,
    .skill-items li {
        break-inside: avoid;
    }
}
