:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --surface: #fffdf8;
  --ink: #1c302b;
  --text: #354c44;
  --muted: #53665d;
  --line: #cfd2c4;
  --sea: #194e45;
  --deep: #143a34;
  --tint: #e8ede4;
  --rust: #984429;
  --gutter: clamp(18px, 5vw, 68px);
  --header-height: 72px;
  --display: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --latin: "Iowan Old Style", Baskerville, Georgia, serif;
  font: 16px/1.7 "PingFang SC", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 12px); }
body, h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.28; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid #bc5924;
  outline-offset: 3px;
}
.container { width: min(1240px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip-link {
  position: fixed; top: 8px; left: 12px; z-index: 20;
  background: var(--deep); color: white; padding: 8px 16px; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 22px; min-height: var(--header-height);
}
.identity { display: flex; align-items: center; gap: 10px; justify-self: start; font-weight: 650; }
.monogram {
  display: grid; place-items: center; width: 39px; height: 39px;
  background: var(--deep); color: var(--paper); border-radius: 9px 9px 2px 9px;
  font: 700 24px/1 var(--display);
}
.identity-sub { display: block; color: var(--muted); font-size: 11px; font-weight: 450; line-height: 1.2; }
.site-header nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 36px); }
.site-header nav a {
  display: inline-flex; align-items: center; position: relative;
  min-height: 44px; color: var(--muted); font-size: 14px;
}
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--sea); }
.site-header nav a[aria-current]::after {
  content: ""; position: absolute; right: 0; bottom: 4px; left: 0; height: 2px; background: var(--sea);
}
.compact-label { display: none; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 7px;
  font-size: 15px; line-height: 1.45; font-weight: 600;
  transition: background .16s, color .16s, border-color .16s;
}
.header-resume {
  justify-self: end; min-height: 42px; padding: 8px 14px; gap: 7px;
  border-color: #9faea1; color: var(--deep); font-size: 14px; white-space: nowrap;
}
.file-format { font-size: 10px; letter-spacing: .05em; font-weight: 550; }
.download-arrow { font-size: 17px; line-height: 1; }
.header-resume:hover, .button-outline:hover { background: var(--tint); border-color: var(--sea); }
.button-primary { color: white; background: var(--sea); border-color: var(--sea); }
.button-primary:hover { background: #0c3831; }
.button-outline { background: transparent; border-color: #adb9aa; color: var(--deep); }
.button-quiet { padding-inline: 6px; color: var(--deep); }
.button-quiet:hover, .text-link:hover, .text-button:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: .22em; }
.play-icon {
  display: inline-block; width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor;
}
.hero {
  display: grid; grid-template-columns: .88fr 1.12fr;
  gap: clamp(30px, 5vw, 75px); align-items: center; padding-block: clamp(48px, 5vw, 72px);
}
.hero-copy { min-width: 0; }
.hero-intro, .project-origin, .secondary-copy .section-kicker { color: var(--rust); font-size: 13px; font-weight: 600; }
.hero-intro { display: flex; align-items: center; gap: 9px; }
.hero-intro::before { content: ""; width: 22px; height: 2px; background: currentColor; margin-right: 2px; }
.hero-intro span { opacity: .6; }
.hero h1 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px 17px; margin-top: 14px; font: 700 clamp(60px, 6.7vw, 97px)/1.14 var(--display); letter-spacing: -.04em; }
.name-en { font: italic 400 clamp(21px, 2.2vw, 32px)/1.3 var(--latin); letter-spacing: -.01em; color: var(--muted); white-space: nowrap; }
.hero-headline { margin-top: 18px; font-size: clamp(21px, 2vw, 29px); line-height: 1.45; font-weight: 640; letter-spacing: -.03em; }
.hero-headline span { color: var(--rust); font-weight: 400; }
.hero-description { max-width: 29em; margin-top: 16px; color: var(--muted); line-height: 1.9; text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 25px; }
.poster { display: block; min-width: 0; color: var(--deep); }
.poster-art {
  overflow: hidden; isolation: isolate; position: relative;
  aspect-ratio: 1.88; border-radius: 9px 9px 2px 2px; background: var(--deep); color: white;
}
.poster-art > img { width: 100%; height: 100%; object-fit: cover; object-position: 76% 55%; }
.poster-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(84deg, rgba(8,29,29,.59), rgba(8,29,29,.50) 55%, transparent 84%),
    linear-gradient(180deg, rgba(9,32,32,.22), transparent 32%, transparent 48%, rgba(9,30,29,.7));
}
.poster-copy {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: start; justify-content: space-between; flex-direction: column;
  padding: clamp(18px, 2.1vw, 30px);
}
.poster-label {
  padding: 4px 10px; border: 1px solid #ffffff78; border-radius: 3px;
  background: #14312fbb; color: white; font-size: 12px; font-weight: 550; letter-spacing: .045em;
}
.poster-copy strong { display: block; font: 700 clamp(36px, 4.2vw, 61px)/1.2 var(--display); letter-spacing: .09em; }
.poster-meta { display: block; margin-top: 5px; color: #fff8e7; font-size: 13px; }
.poster-play {
  position: absolute; right: clamp(18px, 2.1vw, 30px); bottom: clamp(18px, 2.1vw, 30px); z-index: 1;
  display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #f2f1e5;
  border-radius: 50%; color: #fff; background: #183c3c59; transition: background .15s, color .15s;
}
.poster-play .play-icon { margin-left: 4px; border-width: 7px 0 7px 11px; }
.poster:hover .poster-play, .poster:focus-visible .poster-play { background: var(--paper); color: var(--deep); }
.poster-caption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 1px;
  font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line);
}
.poster-caption span:last-child { color: var(--sea); font-weight: 620; white-space: nowrap; }
.poster-caption i { font-style: normal; }
.poster-caption span:first-child i { padding-inline: 3px; }
.section-heading { display: flex; align-items: center; gap: 24px; margin-bottom: 23px; }
.section-heading::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.section-heading h2, .about-intro h2, .skills-section h2, .contact-inner h2 {
  font: 700 clamp(29px, 2.8vw, 40px)/1.28 var(--display); letter-spacing: -.025em;
}
.featured-project { border: 1px solid #c5cdbf; border-radius: 12px; background: var(--surface); }
.project-showcase { display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(20px, 3.2vw, 44px); align-items: center; padding: clamp(23px, 3vw, 43px); }
.showcase-copy h3 { margin-top: 7px; font: 620 clamp(38px, 4.2vw, 62px)/1.04 var(--latin); letter-spacing: -.035em; }
.project-subtitle { margin-top: 7px; color: var(--text); font-size: clamp(18px, 1.55vw, 22px); font-weight: 550; }
.project-description { max-width: 34em; margin-top: 12px; color: var(--muted); }
.showcase-tags, .plain-tags { display: flex; flex-wrap: wrap; gap: 5px 15px; margin-top: 13px; color: var(--muted); font-size: 13px; }
.showcase-tags span + span::before, .plain-tags span + span::before { content: "·"; color: #738679; margin-right: 11px; }
.case-demo-link { margin-top: 18px; color: var(--sea); border-color: #a6b8a8; background: #f0f3e9; }
.case-demo-link:hover { background: #dde7d8; border-color: var(--sea); }
.week-preview {
  min-width: 0; margin: 0; padding: clamp(15px, 2.1vw, 28px);
  border-radius: 8px; background: var(--deep); color: #f8f6ee;
}
.week-heading, .week-preview figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.week-heading { margin-bottom: 20px; }
.week-heading strong { font: 650 21px/1.3 var(--display); }
.week-heading span, .week-preview figcaption { color: #dce6dc; font-size: 12px; }
.week-preview picture { display: block; overflow: hidden; border-radius: 5px; background: white; }
.week-preview img { width: 100%; height: auto; }
.week-preview figcaption { margin-top: 13px; }
.week-preview figcaption i { font-style: normal; }
.week-enlarge { display: block; width: 100%; border: 0; border-radius: 5px; padding: 0; background: transparent; cursor: zoom-in; }
.week-enlarge:focus-visible { outline-color: #fff4ca; }
.week-dialog { width: min(1080px, calc(100% - 28px)); }
.week-dialog .dialog-header h2 { font: 650 clamp(22px, 3.3vw, 34px)/1.35 var(--display); }
.week-dialog img { width: 100%; height: auto; }
.week-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 12px; margin: 17px 0 0; }
.week-times > div { border-top: 1px solid var(--line); padding-top: 8px; }
.week-times dt { color: var(--ink); font-weight: 600; }
.week-times dd { margin: 2px 0 0; }
.project-details { padding-inline: clamp(23px, 3vw, 43px); }
.project-role { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding-block: 20px; border-top: 1px solid var(--line); color: var(--text); }
.project-role > span { align-self: start; padding-top: 3px; font-size: 14px; font-weight: 650; color: var(--sea); }
.contribution-tabs { display: flex; flex-wrap: wrap; gap: clamp(10px, 3vw, 39px); border-bottom: 1px solid var(--line); }
.contribution-tabs button {
  min-height: 45px; padding: 7px 2px 10px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--muted); font-size: 15px;
}
.contribution-tabs button[aria-selected="true"] { border-color: var(--sea); color: var(--deep); font-weight: 650; }
.contribution-panel { display: grid; grid-template-columns: 1.24fr .76fr; align-items: center; gap: clamp(22px, 4vw, 74px); padding-block: 26px; min-height: 210px; }
.contribution-panel h4 { margin-bottom: 10px; font-size: 21px; }
.contribution-panel p { color: var(--text); }
.contribution-panel .panel-emphasis { margin-top: 12px; color: var(--sea); font-size: 14px; }
.memory-layers, .context-flow, .delivery-flow { border-block: 1px solid var(--line); }
:is(.memory-layers, .context-flow, .delivery-flow) > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 3px; }
:is(.memory-layers, .context-flow, .delivery-flow) > div + div { border-top: 1px solid #e1e4d8; }
:is(.memory-layers, .context-flow, .delivery-flow) span { color: var(--sea); font-size: 14px; font-weight: 600; }
:is(.memory-layers, .context-flow, .delivery-flow) small, :is(.memory-layers, .context-flow) > p { font-size: 13px; color: var(--muted); }
:is(.memory-layers, .context-flow) > p { padding: 4px 3px 7px; }
.memory-layers i { display: none; }
.case-footer { border-top: 1px solid var(--line); padding-block: 5px; }
.text-button, .text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--sea); font-size: 15px; font-weight: 600; }
.text-button { border: 0; background: none; padding: 0; }
.secondary-project {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 22px; padding: 29px 3px; border-bottom: 1px solid var(--line);
}
.dataflow-mark { display: flex; align-items: center; justify-content: center; gap: 4px; width: 62px; height: 65px; border-radius: 8px; background: #e6e9df; }
.dataflow-mark span { width: 5px; height: 15px; background: #416855; border-radius: 2px; }
.dataflow-mark span:nth-child(2) { height: 31px; }
.dataflow-mark span:nth-child(3) { height: 23px; }
.dataflow-mark span:nth-child(4) { height: 38px; }
.secondary-copy h3 { margin-top: 4px; font-size: 25px; }
.secondary-copy h3 > span { margin-left: 9px; color: var(--text); font-size: 16px; font-weight: 500; }
.secondary-copy > p:not(.section-kicker) { margin-top: 7px; color: var(--muted); }
.plain-tags { margin-top: 6px; }
.about-section, .skills-section { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(32px, 6vw, 88px); }
.about-section { padding-block: clamp(48px, 5.5vw, 80px); }
.about-intro > p { color: var(--muted); max-width: 24em; margin-top: 14px; }
.about-intro .text-link { margin-top: 12px; text-decoration: underline; text-underline-offset: 5px; }
.experience-item { display: grid; grid-template-columns: minmax(108px, .42fr) 1fr; gap: 18px; padding-block: 19px; border-bottom: 1px solid var(--line); }
.experience-item:first-child { padding-top: 3px; }
.experience-item:last-child { border: 0; padding-bottom: 0; }
.experience-date { padding-top: 3px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.experience-item h3, .skill-groups h3 { font-size: 18px; }
.experience-role { color: var(--sea); font-weight: 550; margin-block: 5px; }
.experience-item p:not(.experience-role), .skill-groups p { color: var(--muted); }
.skills-section { border-top: 1px solid var(--line); padding-block: clamp(35px, 4.5vw, 64px); }
.skill-groups { display: grid; gap: 19px; }
.skill-groups h3 { margin-bottom: 5px; font-size: 16px; }
.contact-section { background: var(--deep); color: var(--paper); }
.contact-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding-block: clamp(38px, 4.5vw, 64px); }
.contact-inner p { margin-top: 12px; color: #d4e2d7; }
.contact-email { display: inline-block; margin-bottom: 13px; font: 500 clamp(23px, 2.8vw, 35px)/1.35 var(--latin); word-break: break-word; }
.contact-actions > div { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-actions .button-primary { background: #f4f1de; border-color: #f4f1de; color: var(--deep); }
.contact-actions .button-primary:hover { background: white; }
.contact-actions .button-outline { border-color: #9aafa2; color: #f6f7ec; }
.contact-actions .button-outline:hover { background: #245247; }
.contact-actions #copy-status { min-height: 1.7em; margin: 5px 0 0; font-size: 13px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-block: 12px; font-size: 13px; color: var(--muted); }
.site-footer a { padding-block: 10px; }
dialog { width: min(710px, calc(100% - 28px)); max-height: 88dvh; padding: 0; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: var(--surface); box-shadow: 0 25px 70px #0a282844; }
dialog::backdrop { background: #102b26a6; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: start; justify-content: space-between; gap: 18px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 19px 28px; }
.dialog-header .section-kicker { margin-bottom: 4px; color: var(--rust); font-size: 13px; }
.dialog-header h2 { font: 620 35px/1.15 var(--latin); }
.dialog-header > div > p:last-child { color: var(--muted); font-size: 15px; margin-top: 3px; }
.dialog-close { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 24px; line-height: 1; }
.dialog-body { padding: 22px 28px; color: var(--text); line-height: 1.85; }
.dialog-lead { color: var(--ink); }
.dialog-body h3 { margin: 22px 0 6px; color: var(--ink); font-size: 18px; }
.dialog-contributions { border-left: 2px solid #a6baab; padding-left: 18px; }
.dialog-note { padding-top: 14px; margin-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.dialog-footer { display: flex; gap: 9px; flex-wrap: wrap; padding: 0 28px 24px; }
.dialog-footer .case-demo-link { margin: 0; }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 27px; }
  .hero h1 { gap: 7px 12px; }
  .hero-description { font-size: 16px; }
  .project-role { grid-template-columns: 82px 1fr; }
  .experience-item { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 760px) {
  :root { --header-height: 60px; }
  .header-inner { gap: 10px; grid-template-columns: auto 1fr auto; }
  .identity { gap: 6px; }
  .monogram { width: 31px; height: 33px; font-size: 19px; }
  .identity-sub, .wide-label, .file-format { display: none; }
  .compact-label { display: inline; }
  .site-header nav { justify-self: center; gap: 3px; }
  .site-header nav a { min-width: 44px; justify-content: center; font-size: 14px; }
  .header-resume { min-height: 44px; padding: 7px 10px; }
  .hero { grid-template-columns: 1fr; gap: 25px; padding-block: 34px 38px; }
  .hero h1 { font-size: clamp(52px, 11vw, 72px); margin-top: 8px; }
  .name-en { font-size: 24px; }
  .hero-headline { margin-top: 9px; font-size: clamp(21px, 4.8vw, 27px); }
  .hero-description { max-width: 38em; margin-top: 10px; }
  .hero-actions { margin-top: 17px; gap: 13px; }
  .poster-art { aspect-ratio: 2.02; }
  .poster-play { width: 43px; height: 43px; }
  .poster-caption { font-size: 12px; }
  .section-heading { gap: 16px; margin-bottom: 17px; }
  .project-showcase, .contribution-panel, .about-section, .skills-section { grid-template-columns: 1fr; }
  .project-showcase { gap: 21px; }
  .project-description { max-width: 38em; }
  .week-heading { margin-bottom: 12px; }
  .project-role { display: block; }
  .project-role > span { display: inline-block; margin-bottom: 5px; }
  .contribution-panel { gap: 18px; min-height: 0; padding-block: 22px; }
  .contribution-tabs { justify-content: space-between; gap: 2px; }
  .contribution-tabs button { font-size: 14px; }
  .secondary-project { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px 14px; }
  .secondary-project > .button { grid-column: 2; justify-self: start; }
  .dataflow-mark { width: 44px; height: 51px; gap: 3px; }
  .secondary-copy h3 > span { display: block; margin: 4px 0 0; }
  .about-section, .skills-section { gap: 22px; }
  .experience-item { padding-block: 16px; }
  .contact-inner { grid-template-columns: 1fr; gap: 20px; }
  .dialog-header { padding: 17px 20px; }
  .dialog-body { padding: 18px 20px; }
  .dialog-footer { padding: 0 20px 21px; }
}
@media (max-width: 380px) {
  .site-header nav { gap: 0; }
  .identity .monogram { display: none; }
  .header-resume { padding-inline: 8px; }
  .hero-actions { gap: 9px; }
  .hero-actions .button { font-size: 14px; }
  .hero-actions .button-primary { padding-inline: 13px; }
  .poster-caption span:first-child i { padding: 0; }
  .project-showcase, .project-details { padding-inline: 15px; }
  .contribution-tabs button { font-size: 13px; }
  .week-preview { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
