:root {
  --navy: #233f63;
  --ink: #29384b;
  --muted: #718096;
  --line: #e4e9ef;
  --canvas: #f4f6f8;
  --sidebar: 198px;
  --sans: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "Noto Serif CJK SC", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.7 var(--sans); }
a { color: inherit; }
button, textarea { font: inherit; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; border: 1px solid #dce3eb; border-radius: 6px; padding: 9px 13px; background: #fff; color: var(--ink); transition: background .18s, border-color .18s; }
button:hover { background: #edf2f7; border-color: #bccbdb; }
button:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #7396bc; outline-offset: 4px; }
button svg, [data-icon] svg { display: block; width: 17px; height: 17px; flex-shrink: 0; }
.primary { background: var(--navy); color: white; border-color: var(--navy); }
.primary:hover { background: #162e4d; border-color: #162e4d; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -80px; left: 15px; z-index: 20; padding: 10px 15px; background: #fff; }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 4; width: var(--sidebar); display: flex; flex-direction: column; background: #fcfdfe; border-right: 1px solid var(--line); padding: 28px 18px 22px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 0 6px; }
.brand-icon { display: grid; place-items: center; width: 38px; height: 41px; border-radius: 6px; color: #fff; background: var(--navy); font: 26px var(--serif); }
.brand-name { color: var(--navy); font-size: 18px; font-weight: 600; letter-spacing: 2px; }
.brand-name small { display: block; font-size: 7px; color: var(--muted); letter-spacing: .8px; font-weight: 400; margin-top: 4px; }
.nav-caption { margin: 46px 12px 13px; color: #8894a5; font-size: 10px; letter-spacing: 2px; }
#outline { display: flex; flex-direction: column; gap: 7px; }
#outline a { display: flex; align-items: center; gap: 13px; padding: 11px 14px; border-radius: 6px; font-size: 12px; text-decoration: none; color: #68778b; }
#outline svg { width: 17px; height: 17px; }
#outline a:hover { color: var(--navy); background: #f0f4f8; }
#outline a[aria-current] { color: var(--navy); background: #e9eff6; font-weight: 600; }
.sidebar-project-link { justify-content: flex-start; margin: 27px 2px 0; padding: 17px 10px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 11px; color: #6d7e94; }
.sidebar-project-link > span:last-child { margin-left: auto; }
.sidebar-footer { margin-top: auto; padding: 45px 12px 0; font-size: 10px; color: #8691a0; }
.sidebar-footer p { display: flex; align-items: center; gap: 7px; color: #5d6f85; margin: 0 0 8px; font-size: 12px; }
.sidebar-footer small { display: block; margin-top: 18px; font-size: 9px; letter-spacing: .5px; }
.page { margin-left: var(--sidebar); }
.toolbar { position: sticky; top: 0; z-index: 3; min-height: 83px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; border-bottom: 1px solid var(--line); background: rgba(244,246,248,.97); backdrop-filter: blur(12px); }
.toolbar-title { display: flex; align-items: center; gap: 17px; }
.toolbar h1 { font-size: 17px; font-weight: 600; margin: 0; white-space: nowrap; }
.view-state { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: #7d8999; white-space: nowrap; }
.view-state i { display: block; width: 5px; height: 5px; background: #548676; border-radius: 50%; }
.actions { display: flex; gap: 9px; }
.actions button { font-size: 11px; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) 290px; align-items: start; gap: 24px; max-width: 1500px; margin: 0 auto; padding: 30px 32px 40px; }
.reading-column { min-width: 0; }
.resume { padding: 39px 40px 43px; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 5px 20px #263f5d04; font-size: 12.5px; line-height: 1.95; overflow-wrap: anywhere; }
.resume h1 { color: var(--navy); font: 700 46px/1.3 var(--serif); letter-spacing: 5px; margin: 0 0 10px; }
.resume p { margin: 7px 0; }
.resume .role-line { font-size: 13px; font-weight: 500; color: var(--navy); letter-spacing: .3px; margin: 0 0 10px; }
.resume .contact-line { color: #738094; font-size: 10.5px; line-height: 1.9; margin: 0 0 20px; }
.resume .summary-heading { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.resume .intro-summary { list-style: none; padding: 0; margin: 0; color: #566578; font-size: 12px; }
.resume .intro-summary li { margin: 8px 0; padding: 0; }
.resume strong { color: #304c6e; font-weight: 600; }
.highlights { display: grid; grid-template-columns: 1fr 1.35fr 1fr; margin: 25px 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.highlights > div { display: flex; flex-direction: column; padding: 0 15px; border-right: 1px solid var(--line); }
.highlights > div:first-child { padding-left: 0; }
.highlights > div:last-child { border: 0; }
.highlights strong { font-size: 18px; font-weight: 500; line-height: 1.6; letter-spacing: -.5px; white-space: nowrap; }
.highlights span { font-size: 9.5px; color: #7d8999; margin-top: 2px; }
.resume h2 { display: flex; align-items: center; gap: 16px; font-size: 17px; color: var(--navy); letter-spacing: 1px; font-weight: 600; margin: 29px 0 17px; break-after: avoid; }
.resume h2::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.resume h3 { font-size: 13.5px; font-weight: 600; color: var(--navy); margin: 24px 0 9px; break-after: avoid; }
.resume ul { padding-left: 17px; margin: 8px 0 13px; }
.resume li { margin: 6px 0; padding-left: 2px; }
.resume li::marker { color: #8195ad; font-size: 8px; }
.resume-entry { transition: background .3s; scroll-margin-top: 110px; }
.entry-header { display: flex; align-items: baseline; justify-content: space-between; gap: 13px; margin: 23px 0 8px; padding-bottom: 7px; border-bottom: 1px solid #eef1f5; }
.resume .entry-header h3 { margin: 0; flex: 1; min-width: 0; }
.resume .entry-dates { color: #6d819a; font-size: 10px; margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry-role { display: block; font-size: 11px; color: #7a889a; font-weight: 400; margin-top: 1px; }
.work-timeline { --timeline-gap: 23px; display: flex; flex-direction: column; gap: var(--timeline-gap); margin-top: 23px; }
.work-timeline .resume-entry { position: relative; border: 0; padding-left: 24px; margin: 0; }
.work-timeline .resume-entry::before { content: ""; position: absolute; z-index: 1; width: 9px; height: 9px; left: 0; top: 10px; background: var(--navy); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #bac9da; }
/* Each connector extends across the flex gap to the next node. */
.work-timeline .resume-entry:not(:last-child)::after { content: ""; position: absolute; width: 1px; left: 4px; top: 14px; height: calc(100% + var(--timeline-gap)); background: #dce4ed; }
.work-timeline .entry-header { margin-top: 0; border: 0; padding-bottom: 0; }
.work-timeline ul { margin-bottom: 0; }
.entry-highlight { background: #eef3f9; box-shadow: 0 0 0 10px #eef3f9; border-radius: 2px; }
.pending { color: #936d2b; background: #fbf1dd; }
.document-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 18px; color: #8894a4; font-size: 10px; }
.project-rail { position: sticky; top: 110px; }
.rail-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.rail-title h2 { font-size: 12px; font-weight: 500; margin: 0; }
.rail-title > span { font-size: 8px; letter-spacing: 1.3px; color: #98a3b1; }
.project-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; margin-bottom: 18px; }
.project-cover { position: relative; height: 133px; overflow: hidden; background: #f8fafc; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 63%; display: block; }
.project-cover > span { position: absolute; top: 12px; left: 15px; color: #6f839c; font-size: 8px; letter-spacing: 1.2px; }
.card-content { padding: 18px 18px 16px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.card-heading h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--navy); }
.card-heading h3 > span { font-size: 10px; font-weight: 400; color: #7d8ea4; margin-left: 4px; }
.badge { color: #71849a; font-size: 8px; border: 1px solid #e4eaf1; border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.personal-badge { color: #8a7969; border-color: #ece6df; }
.card-content > p { font-size: 10.5px; line-height: 1.9; color: #78879a; margin: 10px 0 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-row > span { font-size: 8.5px; color: #6d819a; background: #f1f5f9; border-radius: 3px; padding: 3px 6px; }
.text-button { width: 100%; justify-content: space-between; font-size: 10px; color: var(--navy); background: transparent; padding: 11px 0 0; margin-top: 12px; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.text-button:hover { background: transparent; color: #557da8; border-color: var(--line); }
.lifecycle { font-size: 8.5px; color: #8090a4; display: flex; justify-content: space-between; gap: 3px; white-space: nowrap; }
.lifecycle span { color: #acb8c6; }
.phone-previews { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 14px; padding: 14px 22px 12px; background: #f3f5f7; }
.phone-device { --device-radius: 34px; --screen-radius: 25px; display: block; position: relative; width: 100%; padding: 12px 7px 10px; border: 2px solid #8793a3; border-radius: var(--device-radius); background: linear-gradient(120deg,#4e5a6b,#111b29 30%,#233042 80%,#677384); box-shadow: 0 15px 28px -14px #152c4b60, inset 0 0 0 1px #c0cbd547; text-decoration: none; }
.phone-device::before, .phone-device::after { content: ""; position: absolute; background: #637185; border: 1px solid #929dab; width: 3px; border-radius: 2px; pointer-events: none; }
.phone-device::before { left: -5px; top: 83px; height: 23px; box-shadow: 0 35px 0 -0.3px #637185; }
.phone-device::after { right: -5px; top: 124px; height: 43px; }
.phone-device:hover { border-color: #adbbcc; background: linear-gradient(120deg,#4e5a6b,#111b29 30%,#233042 80%,#677384); }
.device-screen { display: block; overflow: hidden; border-radius: var(--screen-radius); background: #fff; line-height: 0; }
.device-hardware { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; border-radius: 3px; background: #080f19; box-shadow: 0 1px 0 #66758a50; pointer-events: none; }
.device-hardware::after { content: ""; position: absolute; width: 3px; height: 3px; right: -7px; top: 0; border-radius: 50%; background: #0c1420; box-shadow: inset 0 0 0 1px #485c7570; }
.phone-previews .phone-device { --device-radius: 16px; --screen-radius: 11px; padding: 6px 3px 4px; border-width: 1px; box-shadow: 0 5px 12px #243c5820; }
.phone-previews .phone-device::before { left: -3px; top: 33px; height: 10px; width: 2px; box-shadow: 0 17px 0 #637185; }
.phone-previews .phone-device::after { right: -3px; top: 52px; width: 2px; height: 18px; }
.phone-previews .device-hardware { top: 2px; width: 12px; height: 2px; }
.phone-previews .device-hardware::after { width: 2px; height: 2px; right: -4px; }
.phone-previews img { width: 100%; height: auto; display: block; }
.card-bottom { padding-top: 15px; }
.card-content > .release-note { font-size: 8.5px; color: #8c97a6; margin: 13px 0 0; line-height: 1.8; }
.export-note { display: flex; gap: 11px; padding: 4px 6px; color: #8795a7; font-size: 10px; }
.export-note > span { padding-top: 3px; }
.export-note strong { font-size: 10px; font-weight: 500; color: #6d7e93; }
.export-note p { margin: 5px 0 0; line-height: 1.9; font-size: 9px; }
dialog { border: 1px solid #d9e2ed; border-radius: 12px; box-shadow: 0 20px 100px #102b4650; color: var(--ink); background: #fff; }
dialog::backdrop { background: #142b4a70; backdrop-filter: blur(4px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dialog-header h2 { font-size: 21px; font-weight: 500; margin: 3px 0 0; color: var(--navy); }
.eyebrow { color: #8998ab; font-size: 9px; letter-spacing: 1.5px; }
.icon-button { width: 34px; height: 34px; padding: 7px; flex-shrink: 0; }
.editor-panel { width: min(900px,calc(100% - 40px)); max-height: 90dvh; height: 820px; padding: 26px 30px; }
.editor-panel[open] { display: flex; flex-direction: column; }
.editor-hint { margin: 14px 0; color: #76869a; font-size: 11px; }
.editor-label { color: #62758d; font-size: 10px; margin-bottom: 7px; }
textarea { width: 100%; flex: 1; min-height: 150px; resize: none; border: 1px solid #dce4ed; border-radius: 6px; padding: 17px; background: #f8fafc; color: #334a67; font-family: "SFMono-Regular", "Menlo", var(--sans); font-size: 12px; line-height: 1.9; }
.editor-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.editor-footer > div { display: flex; gap: 8px; }
.editor-footer button { font-size: 11px; }
.quiet-button { background: transparent; color: #8491a3; border-color: transparent; padding-left: 0; }
.editor-notes { font-size: 10px; color: #8390a2; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.editor-notes summary { cursor: pointer; }
.editor-notes p { line-height: 1.9; }
.editor-notes a { text-underline-offset: 3px; color: var(--navy); }
.gallery-dialog { width: min(1060px,calc(100% - 40px)); max-height: 90dvh; padding: 27px 32px; overflow: auto; overscroll-behavior: contain; }
.gallery-sticky { position: sticky; top: -27px; z-index: 2; padding-block: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.gallery-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.gallery-jump button { padding: 5px 9px; font-size: 10px; color: #536e8d; background: #f4f7fa; border-color: #e7edf4; }
.gallery-description { margin: 17px 0 4px; font-size: 12px; color: #6a7b90; }
.gallery-status { font-size: 10px; color: #8c97a7; margin: 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 34px 30px; max-width: 900px; margin: 26px auto; align-items: start; }
.portfolio-grid figure { margin: 0; min-width: 0; scroll-margin-top: 20px; }
.portfolio-grid img { display: block; width: 100%; height: auto; }
.portfolio-grid figcaption { font-size: 11px; color: #73849b; margin-top: 12px; }
.portfolio-grid figcaption > div { display: flex; align-items: center; gap: 9px; }
.portfolio-grid figcaption span { color: #a3afbf; font-size: 10px; }
.portfolio-grid figcaption strong { color: var(--navy); font-size: 12px; font-weight: 500; }
.portfolio-grid figcaption p { margin: 7px 0 0; font-size: 10px; line-height: 1.8; }
@media (min-width: 601px) and (max-width: 850px) { .portfolio-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 650px; } }
.gallery-footnote { text-align: center; font-size: 10px; color: #929dac; }
.toast { position: fixed; z-index: 30; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); border: 1px solid #48617f; color: white; box-shadow: 0 6px 25px #19365030; padding: 12px 20px; border-radius: 7px; font-size: 12px; max-width: calc(100% - 30px); width: max-content; }
@media (min-width: 1700px) { .workspace { gap: 30px; grid-template-columns: minmax(0,1fr) 320px; padding-top: 40px; } .resume { padding: 48px 58px; font-size: 13.5px; } }
@media (max-width: 1250px) { :root { --sidebar: 180px; } .workspace { grid-template-columns: minmax(0,1fr) 260px; padding: 24px; gap: 20px; } .toolbar { padding-inline: 24px; } .resume { padding: 32px 28px; } .toolbar-title { gap: 10px; } .view-state { display: none; } .card-content { padding-inline: 15px; } .highlights strong { font-size: 16px; } .highlights > div { padding-inline: 11px; } }
@media (max-width: 1100px) { .workspace { grid-template-columns: minmax(0,1fr); max-width: 900px; } .project-rail { position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; } .rail-title { grid-column: 1 / -1; margin-bottom: -7px; } .project-card { margin-bottom: 0; } .export-note { grid-column: 1 / -1; } .resume { padding: 38px; } .project-cover { height: 155px; } .phone-previews { max-height: 250px; overflow: hidden; } }
@media (max-width: 850px) { .sidebar { position: static; width: auto; padding: 18px 24px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; } .brand-icon { width: 31px; height: 34px; font-size: 22px; } .brand-name { font-size: 16px; } .brand-name small { font-size: 6px; } .nav-caption, .sidebar-footer, .sidebar-project-link { display: none; } #outline { flex-direction: row; overflow-x: auto; margin: 16px -5px 0; gap: 3px; } #outline a { padding: 8px 10px; gap: 6px; flex-shrink: 0; font-size: 10px; } #outline svg { width: 14px; height: 14px; } .page { margin-left: 0; } .toolbar { min-height: 72px; } .toolbar h1 { font-size: 14px; } .workspace { padding-top: 22px; } }
@media (max-width: 600px) { html { scroll-padding-top: 128px; } .sidebar { padding: 15px 18px 9px; } .toolbar { padding: 14px 16px; flex-direction: column; align-items: stretch; gap: 11px; min-height: 0; } .toolbar-title { justify-content: space-between; } .view-state { display: flex; font-size: 9px; } .actions { display: grid; grid-template-columns: 1fr 1.45fr 1fr; gap: 6px; } .actions button { padding: 9px 5px; font-size: 10px; gap: 4px; } .actions svg { width: 14px; height: 14px; } .workspace { padding: 16px 12px 28px; gap: 25px; } .resume { padding: 28px 21px 32px; font-size: 12px; } .resume h1 { font-size: 39px; } .resume .role-line { font-size: 11px; } .resume .contact-line { font-size: 10px; } .resume .intro-summary { font-size: 11.5px; } .highlights { margin-top: 19px; padding: 14px 0; } .highlights strong { font-size: 13px; letter-spacing: -.5px; } .highlights span { font-size: 8px; } .highlights > div { padding-inline: 8px; } .resume h2 { font-size: 16px; margin-top: 26px; } .entry-header { display: block; } .resume .entry-header h3 { font-size: 13px; } .resume .entry-dates { margin-top: 5px; font-size: 10px; } .resume-entry { scroll-margin-top: 128px; } .project-rail { grid-template-columns: 1fr; padding: 0 5px; gap: 17px; } .rail-title, .export-note { grid-column: auto; } .phone-previews { max-height: none; gap: 21px; padding: 14px 28px 0; } .project-cover { height: 170px; } .card-content { padding: 19px; } .document-footer { font-size: 9px; padding: 0 4px; } .editor-panel { width: calc(100% - 24px); max-height: 92dvh; padding: 20px 17px; } .dialog-header h2 { font-size: 18px; } .editor-hint { font-size: 10px; } textarea { padding: 11px; font-size: 11px; } .editor-footer { flex-wrap: wrap; } .editor-footer > div { margin-left: auto; } .editor-footer button { font-size: 10px; padding: 8px 10px; } .editor-notes { font-size: 9px; } .gallery-dialog { width: calc(100% - 24px); padding: 22px 20px; } .portfolio-grid { grid-template-columns: 1fr; max-width: 280px; gap: 27px; margin-top: 22px; } .gallery-description { font-size: 11px; } .gallery-status, .gallery-footnote { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Public resume: two download actions, maintained from source files. */
@media (max-width: 600px) { .actions { grid-template-columns: 1.35fr 1fr; } }
