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

body {
    background: #f5f5f5;
    font-family: PingFang SC, -apple-system, Microsoft YaHei, sans-serif;
    font-size: 14px;
    color: #171717;
    line-height: 1.7;
}

/* ========== Pages ========== */

.pages {
    padding: 16px 0;
}

.page {
    width: 230mm;
    min-height: 297mm;
    margin: 0 auto 20px;
    padding: 12mm;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    page-break-after: always;
}

@media (min-width: 1920px) {
    .page {
        width: 283mm;
    }
}

.page:last-child {
    margin-bottom: 0;
}

/* ========== Header Table ========== */

.header-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6px;
}

.header-table td {
    padding: 4px 0;
    border: none;
    vertical-align: middle;
}

.ht-name {
    font-size: 26px;
    font-weight: 700;
    color: #0a0a0a;
    width: 30%;
    letter-spacing: 2px;
}

.ht-intent {
    font-size: 16px;
    font-weight: 700;
    color: #171717;
}

.ht-link {
    font-size: 13px;
    color: #737373;
    padding-top: 2px;
}

.ht-label {
    font-size: 13px;
    color: #737373;
    padding-right: 20px !important;
    white-space: nowrap;
}

/* ========== Divider ========== */

hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 8px 0;
}

/* 表格紧跟 hr 时，收紧 hr 的下边距，避免表头文字被推得靠下 */
hr.hr-tight {
    margin-bottom: 1px;
}

/* ========== Section Titles ========== */

h2 {
    font-size: 18px;
    font-weight: 700;
    color: #171717;
    margin: 22px 0 8px;
    border-left: 3px solid #d4d4d4;
    padding-left: 14px;
}

/* ========== Sub Headings ========== */

h3 {
    font-size: 16px;
    font-weight: 700;
    color: #171717;
    margin: 16px 0 6px;
}

/* ========== Body Text ========== */

p {
    margin: 6px 0;
    font-size: 14px;
    color: #171717;
    line-height: 1.7;
}

/* ========== Project Labels ========== */

.profile {
    font-size: 14px;
    color: #171717;
    line-height: 1.7;
    margin: 0 0 16px;
}

.tech-stack {
    font-size: 13px;
    color: #171717;
    margin: 4px 0 8px;
}

.project-label {
    font-size: 14px;
    color: #171717;
    margin: 4px 0 10px;
    line-height: 1.6;
}

.sub-title {
    font-size: 13px;
    font-weight: 700;
    color: #171717;
    margin: 16px 0 4px;
}

/* ========== Work Table ========== */

.work-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
}

.work-table td {
    padding: 4px 0;
    border: none;
    font-size: 14px;
    color: #171717;
    line-height: 1.6;
}

.wt-company {
    width: 40%;
    color: #171717;
}

.wt-role {
    width: 30%;
    color: #737373;
}

.wt-time {
    width: 30%;
    color: #737373;
    text-align: right;
}

/* ========== Skill Groups ==========
   标题独占一行，正文全宽；分组之间用细线分隔。
*/

.skill-groups {
    margin: 0 0 6px;
}

.skill-group {
    padding: 7px 0 9px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    line-height: 20px;
    color: #171717;
}

.skill-group:last-child {
    border-bottom: none;
}

.skill-group-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    color: #171717;
}

.skill-paragraph {
    margin: 0;
    font: inherit;
    color: inherit;
}

.skill-paragraph + .skill-paragraph {
    margin-top: 6px;
}

/* ========== Education Table ========== */

.edu-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
}

.edu-table td {
    padding: 4px 0;
    border: none;
    font-size: 14px;
    line-height: 1.6;
}

.et-school {
    width: 40%;
    color: #171717;
}

.et-degree {
    width: 30%;
    color: #737373;
}

.et-time {
    width: 30%;
    color: #737373;
    text-align: right;
}

/* ========== Lists ========== */

ul {
    list-style: none;
    padding: 0;
    margin: 4px 0;
}

ul li {
    margin: 4px 0;
    font-size: 14px;
    color: #171717;
    line-height: 1.7;
}

ul.numbered {
    counter-reset: item;
}

ul.numbered li {
    counter-increment: item;
    padding-left: 0;
}

ul.numbered li::before {
    content: counter(item) ". ";
    color: #171717;
}

ul li strong {
    font-weight: 700;
    color: #171717;
}

.mark {
    background: linear-gradient(to top, #d4d4d4 20%, #d4d4d4 46%, transparent 46%);
    padding: 0 2px;
}

/* ========== Export Toolbar ==========
   打印样式单独放在 css/print.css（media="print"），此处只管屏幕态。
*/

.export-toolbar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    opacity: 0;
    transition: opacity .2s ease;
}

/* 鼠标移到右上角控件区域、或键盘 Tab 聚焦时才淡入 */
.export-toolbar:hover,
.export-toolbar:focus-within {
    opacity: 1;
}

.export-button {
    appearance: none;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background: #fff;
    color: #171717;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 8px 16px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.export-button:hover {
    border-color: #737373;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.export-button:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 2px;
}

.export-button:active {
    transform: translateY(1px);
}

@media (max-width: 640px) {
    .export-toolbar {
        top: 10px;
        right: 10px;
    }

    .export-button {
        padding: 6px 12px;
        font-size: 12px;
    }
}
