/* Evren Cao — a quiet, content-first portfolio. */
:root{color-scheme:light;--bg:#f7f8fa;--surface:#fff;--surface-soft:#f0f2f5;--text:#1c2027;--muted:#616976;--faint:#7a818c;--line:#dfe3e9;--accent:#1663c7;--accent-soft:#eaf2ff;--header:rgba(247,248,250,.92);--shadow:0 8px 32px #1b2b4410;--radius:18px;--sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;--mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace}
:root[data-theme="dark"]{color-scheme:dark;--bg:#111318;--surface:#191c23;--surface-soft:#21252e;--text:#e9edf3;--muted:#a8b0bd;--faint:#939dad;--line:#303641;--accent:#82b5ff;--accent-soft:#20334e;--header:rgba(17,19,24,.94);--shadow:0 8px 32px #0002}
*{box-sizing:border-box}html{scroll-padding-top:112px;scrollbar-gutter:stable}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.75 var(--sans);-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}a{color:var(--accent);text-underline-offset:4px}a:hover{text-decoration-thickness:2px}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}a,button,input,select{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:4px}a,button{transition:background .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease}button:active,.button:active{transform:translateY(1px)}img{max-width:100%;height:auto}svg{vertical-align:middle}h1,h2,h3,h4,p{margin:0}h1,h2,h3,h4{color:var(--text);line-height:1.3}h1{font-size:clamp(36px,5.3vw,58px);font-weight:650;letter-spacing:-.055em}h2{font-size:28px;font-weight:650;letter-spacing:-.035em}h3{font-size:19px;font-weight:630;letter-spacing:-.02em}h4{font-size:16px;font-weight:650}p+p{margin-top:16px}ul,ol{padding-left:22px}button{color:inherit}::selection{background:var(--accent-soft);color:var(--text)}[hidden]{display:none!important}.wrap,.container{width:min(1040px,calc(100% - 56px));margin-inline:auto}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip-link{position:fixed;z-index:99;left:20px;top:-80px;padding:10px 16px;border-radius:10px;background:var(--surface);color:var(--accent)}.skip-link:focus{top:12px}.site-header{position:sticky;top:0;z-index:30;background:var(--header);border-bottom:1px solid var(--line);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.header-inner{display:flex;align-items:center;gap:28px;min-height:76px}.brand{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:650;letter-spacing:-.02em;text-decoration:none;color:var(--text);white-space:nowrap}.brand-mark{display:grid;place-items:center;width:31px;height:31px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:11px;letter-spacing:-.03em}.primary-nav{display:flex;gap:3px;margin-left:auto}.primary-nav a{display:flex;align-items:center;justify-content:center;min-height:40px;padding:7px 12px;border-radius:9px;font-size:13px;font-weight:550;color:var(--muted);text-decoration:none;white-space:nowrap}.primary-nav a:hover{background:var(--surface-soft);color:var(--text)}.primary-nav a[aria-current="page"]{color:var(--text);background:var(--surface)}.header-controls{display:flex;align-items:center;gap:12px}.language-switch{display:flex;border-left:1px solid var(--line);padding-left:12px;gap:1px}.language-switch button{border:0;background:none;color:var(--faint);font-size:12px;padding:5px 6px;min-height:36px}.language-switch button[aria-pressed="true"]{color:var(--text);font-weight:700}.icon-button{display:inline-flex;justify-content:center;align-items:center;width:36px;height:36px;border:0;background:none;border-radius:9px;color:var(--muted)}.icon-button:hover{background:var(--surface-soft);color:var(--text)}.icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}main{min-height:65vh;padding:0 0 80px}main:focus{outline:none}.page-enter{animation:page-in .2s ease-out both}@keyframes page-in{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}.eyebrow{font-family:var(--mono);font-size:11px;font-weight:550;letter-spacing:.1em;line-height:1.6;text-transform:uppercase;color:var(--muted);margin-bottom:13px}.page-heading{padding:60px 0 36px;max-width:760px}.page-heading h1{margin-bottom:18px}.lede,.intro{font-size:17px;line-height:1.85;color:var(--muted);max-width:720px}.page-heading .lede{margin-top:16px}.text-link,.plain-link{display:inline-flex;align-items:center;gap:8px;text-decoration:none;font-size:14px;font-weight:550}.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 17px;border:1px solid transparent;border-radius:10px;background:var(--accent);color:white;font-size:14px;font-weight:600;text-decoration:none}.button:hover{filter:brightness(.97)}:root[data-theme="dark"] .button{color:#101b2b}.button-secondary{background:var(--surface);color:var(--text);border-color:var(--line)}:root[data-theme="dark"] .button-secondary{color:var(--text)}.button-secondary:hover{background:var(--surface-soft);filter:none}.actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin-top:25px}.home-hero{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:80px;align-items:start;padding:76px 0 56px}.identity-line{display:flex;align-items:center;gap:13px;margin-bottom:28px}.avatar{width:48px;height:48px;border-radius:50%;border:1px solid var(--line);object-fit:cover}.identity-line strong{display:block;font-size:15px;font-weight:600}.identity-line small{display:block;font-size:12px;color:var(--muted)}.home-hero h1{font-size:clamp(38px,4.6vw,55px);line-height:1.23;letter-spacing:-.05em;margin-bottom:22px;text-wrap:balance}.hero-copy{font-size:17px;color:var(--muted);line-height:1.9;max-width:650px}.hero-aside{padding-top:84px}.fact-row{padding:15px 0;border-bottom:1px solid var(--line)}.fact-row:first-child{padding-top:0}.fact-row small{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}.fact-row strong{font-size:14px;line-height:1.5;font-weight:600;display:block}.fact-row p{font-size:12px;color:var(--muted);line-height:1.6;margin-top:3px}.fact-row a{color:inherit;text-decoration:none}.fact-row a:hover{color:var(--accent)}.home-section{padding:38px 0;border-top:1px solid var(--line)}.section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin-bottom:24px}.section-heading h2{font-size:21px}.section-heading .text-link{font-size:13px;white-space:nowrap}.project-feature{display:grid;grid-template-columns:1.5fr 1fr;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;color:inherit;text-decoration:none}.project-feature:hover{border-color:var(--accent);box-shadow:var(--shadow)}.project-feature-copy{padding:32px}.project-feature .eyebrow{color:var(--accent);margin-bottom:12px}.project-feature h3{font-size:34px;letter-spacing:-.05em;margin-bottom:9px}.project-feature h4{font-size:17px;font-weight:550;margin-bottom:15px}.project-feature p{font-size:14px;line-height:1.8;color:var(--muted)}.project-feature-footer{display:flex;gap:14px;align-items:center;margin-top:24px;color:var(--accent);font-size:13px;font-weight:600}.project-feature-art{background:var(--surface-soft);display:flex;flex-direction:column;justify-content:center;gap:15px;padding:38px;border-left:1px solid var(--line)}.pipeline-row{display:flex;gap:7px;align-items:center;justify-content:center}.pipeline-node{display:grid;place-items:center;min-width:74px;min-height:45px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font:11px/1.3 var(--mono);text-align:center;padding:8px}.pipeline-node.primary{border-color:var(--accent);color:var(--accent)}.pipeline-arrow{color:var(--faint);font-size:14px}.pipeline-caption{text-align:center;font:10px/1.6 var(--mono);letter-spacing:.08em;color:var(--muted)}.home-about{display:grid;grid-template-columns:1fr 2fr;gap:64px}.home-about>p{color:var(--muted);line-height:1.9}.mini-facts{display:flex;flex-wrap:wrap;gap:10px 20px;margin-top:20px;color:var(--muted);font-size:13px}.home-latest .note-row:last-child{border-bottom:0}.section{display:grid;grid-template-columns:215px minmax(0,1fr);gap:48px;padding:45px 0;border-top:1px solid var(--line)}.section-mark h2{font-size:24px;margin-bottom:10px}.section-mark>p:last-child:not(.eyebrow){color:var(--muted);font-size:13px}.section-body{min-width:0}.section-body>p{color:var(--muted)}.section-body>.lead{font-size:21px;line-height:1.75;letter-spacing:-.02em;color:var(--text);margin-bottom:20px}.skill-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px 30px}.skill-grid>div{padding:0 0 26px;border-bottom:1px solid var(--line);min-width:0}.skill-grid h3{font-size:17px;line-height:1.5}.skill-copy{font-size:14px;line-height:1.85;color:var(--muted);margin-top:12px!important}.skill-stack{font:11px/1.9 var(--mono);color:var(--faint);margin-top:16px!important}.experience{position:relative;padding:0 0 34px;margin:0 0 32px;border-bottom:1px solid var(--line)}.experience:last-child{margin:0;padding-bottom:0;border-bottom:0}.experience-dot{display:none}.item-top{display:flex;justify-content:space-between;gap:20px;align-items:baseline}.item-top h3,.experience-body>h3{font-size:18px}.date{font:11px/1.7 var(--mono);white-space:nowrap;color:var(--muted)}.organization{color:var(--accent);font-size:13px;margin:8px 0 14px}.experience-body>p:not(.organization):not(.date),.research-role>p{color:var(--muted);font-size:14px;line-height:1.9}.fde-highlights{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.fde-highlights span,.tag{border:1px solid var(--line);border-radius:6px;font-size:11px;line-height:1.5;padding:4px 8px;color:var(--muted);background:var(--surface)}details>summary{cursor:pointer;list-style:none;color:var(--accent);font-size:13px;font-weight:550;padding:14px 0;min-height:44px}details>summary::-webkit-details-marker{display:none}details>summary::before{content:"+";display:inline-block;margin-right:9px;width:10px}details[open]>summary::before{content:"−"}.fde-details{margin-top:9px}.fde-responsibilities{list-style:none;margin:0;padding:5px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:23px 26px}.fde-responsibilities h4{font-size:14px;margin-bottom:7px}.fde-responsibilities p{color:var(--muted);font-size:13px;line-height:1.85}.research-role{padding-top:16px}.research-role+.research-role{margin-top:21px;border-top:1px solid var(--line);padding-top:22px}.research-role .item-top{margin-bottom:10px}.research-role h4{font-size:15px}.education-item{padding-bottom:28px;margin-bottom:28px;border-bottom:1px solid var(--line)}.education-item:last-child{border:0;margin:0;padding:0}.degree{font-size:14px;margin:8px 0 12px}.description{font-size:14px;line-height:1.85;color:var(--muted)}.contact-section{border:0;padding-top:20px}.contact-section .section-mark{display:none}.contact-section{display:block;max-width:780px}.contact-text{font-size:21px;line-height:1.8;letter-spacing:-.02em;margin-bottom:35px}.contact-email-list{list-style:none;padding:0;margin:10px 0 0}.contact-email-row{display:flex;gap:20px;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:18px 0}.contact-email-info{min-width:0}.email-service{display:block;font:11px/1.6 var(--mono);color:var(--muted);margin-bottom:5px}.contact-link{font-size:19px;letter-spacing:-.02em;overflow-wrap:anywhere;text-decoration:none;color:var(--text)}.contact-link:hover{color:var(--accent)}.copy-email,.share-project{border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:8px 11px;display:flex;gap:8px;align-items:center;font-size:12px;min-height:38px;white-space:nowrap;color:var(--muted)}.copy-email:hover,.share-project:hover{color:var(--accent);border-color:var(--accent)}.contact-bottom{display:flex;flex-wrap:wrap;gap:12px 20px;border-top:1px solid var(--line);padding-top:25px;margin-top:8px}.contact-bottom a{font-size:14px;text-decoration:none}.contact-bottom>span{font-size:12px;color:var(--muted);margin-left:auto}.interests{font-size:14px;color:var(--muted);margin-top:30px!important}.copy-feedback,.share-project-status{font-size:12px;color:var(--accent)}.copy-feedback:empty,.share-project-status:empty{display:none}.site-footer{border-top:1px solid var(--line);padding:26px 0 35px}.footer-inner{display:flex;justify-content:space-between;gap:20px;font-size:12px;color:var(--muted)}.footer-links{display:flex;gap:20px}.footer-links a{color:var(--muted);text-decoration:none}.footer-links a:hover{color:var(--accent)}.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:80;background:var(--text);color:var(--bg);border-radius:12px;padding:10px 18px;box-shadow:var(--shadow);font-size:13px;max-width:calc(100% - 40px);text-align:center}.back-link{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:var(--muted);font-size:13px;padding:28px 0 8px}.back-link:hover{color:var(--accent)}
/* Research case study */
.project-page .wrap{width:100%}.project-page .hero{padding:26px 0 32px}.project-page .hero .eyebrow{margin-bottom:22px}.hero-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:48px;align-items:start}.project-page .hero h1{font-size:58px;letter-spacing:-.065em;margin-bottom:12px}.project-page .hero h1 span{color:var(--accent)}.project-page .hero h2{font-size:24px;line-height:1.5;margin-bottom:20px;letter-spacing:-.03em}.project-page .intro{font-size:15px;line-height:1.85}.project-page .actions{gap:12px}.result-card{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:26px}.card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font:10px/1.5 var(--mono);color:var(--muted)}.metric-switch{display:flex;gap:2px;background:var(--surface-soft);padding:3px;border-radius:7px}.metric-switch button{border:0;border-radius:5px;background:none;color:var(--muted);padding:4px 8px;font:11px/1.5 var(--mono);min-height:28px}.metric-switch button[aria-pressed="true"]{background:var(--surface);color:var(--text);box-shadow:0 1px 4px #0001}.score{font-size:65px;font-weight:600;letter-spacing:-.065em;line-height:1.2;margin:24px 0 8px!important;color:var(--text)}.score small{font-size:23px;font-weight:400;letter-spacing:-.03em;margin-left:5px;color:var(--muted)}.eval-scope{font-size:11px;color:var(--accent);background:var(--accent-soft);padding:5px 9px;display:inline-block;border-radius:6px;margin:0 0 9px!important}.score-label{font-size:13px;color:var(--muted);margin:0!important}.bar-group{margin-top:23px}.bar-row{display:grid;grid-template-columns:57px 1fr 53px;align-items:center;gap:9px;font-size:11px;margin-bottom:13px}.bar-row>span{color:var(--muted)}.bar-row strong{text-align:right;font-size:11px;font-variant-numeric:tabular-nums}.track{height:5px;border-radius:4px;overflow:hidden;background:var(--surface-soft)}.fill{height:100%;border-radius:4px;background:var(--faint);transition:width .2s ease}.fill.adapted{background:var(--accent)}.result-note{margin-top:18px!important;color:var(--muted);font-size:11px;line-height:1.8}.result-note a{margin-left:5px}.hero-bottom{border-top:1px solid var(--line);margin-top:32px;padding-top:18px;display:flex;justify-content:space-between;gap:20px;align-items:center;font-size:12px}.tags{display:flex;gap:6px;flex-wrap:wrap}.hero-bottom>a{text-decoration:none}.project-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:22px;margin:0;padding:24px 0 32px;border-top:1px solid var(--line)}.project-meta>div{min-width:0}.project-meta dt{color:var(--muted);font-size:11px;margin-bottom:7px}.project-meta dd{margin:0;font-size:13px;font-weight:550;line-height:1.7}.project-page .section p{font-size:15px;line-height:1.9}.project-page .section .lead{font-size:20px}.mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:25px;margin-top:28px}.mini-grid>div{border-top:1px solid var(--line);padding-top:20px}.mini-grid h3{font-size:16px;margin-bottom:9px}.mini-grid p{font-size:13px!important;color:var(--muted)}.method-list{list-style:none;padding:0;margin:0}.method-list li{display:flex;gap:18px;margin-bottom:26px}.step{font:12px/1.6 var(--mono);color:var(--accent);padding-top:4px;flex-shrink:0}.method-list h3{font-size:17px;margin-bottom:8px}.method-list p{color:var(--muted)}.architecture{margin:32px 0 0;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:12px}.architecture img{display:block;width:100%;height:auto;background:white;border-radius:5px}.architecture figcaption{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:14px;font-size:10px;color:var(--muted)}.table-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:12px;padding:20px;background:var(--surface)}table{border-collapse:collapse;width:100%;font-size:13px}th,td{padding:13px 12px;text-align:right;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums;white-space:nowrap}th:first-child,td:first-child{text-align:left}thead th{color:var(--muted);font-size:12px;font-weight:500}tbody tr:last-child td{border-bottom:0}.highlight{background:var(--accent-soft)}.table-caption{font-size:11px!important;color:var(--muted);margin-top:10px!important}.metrics{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:30px}.metric{padding:24px;border:1px solid var(--line);background:var(--surface);border-radius:12px}.metric .eyebrow{font-size:10px!important;margin-bottom:12px}.metric-number{font-size:40px!important;font-weight:650;letter-spacing:-.05em;line-height:1.3!important;margin:0 0 13px!important}.metric-number span{font-size:17px;margin-left:4px;color:var(--muted)}.metric h3{font-size:15px;margin-bottom:9px}.metric>p:not(.metric-number):not(.eyebrow){font-size:12px!important;color:var(--muted)}.metric a{font-size:12px;display:inline-block;margin-top:14px;text-decoration:none}.research-note,.insight{margin-top:25px;padding:20px 0 0;border-top:1px solid var(--line)}.research-note{border-left:3px solid var(--accent);border-top:0;background:var(--accent-soft);padding:19px 20px;border-radius:0 10px 10px 0}.research-note h3,.insight h3{font-size:16px;margin-bottom:9px}.research-note p,.insight p{font-size:13px!important;color:var(--muted)}.publication{border:1px solid var(--line);background:var(--surface);border-radius:14px;padding:28px}.publication h3{font-size:22px;line-height:1.5;letter-spacing:-.025em;margin:12px 0 18px}.pub-label{font:11px/1.6 var(--mono)!important;color:var(--accent)}.authors,.venue{font-size:12px!important;color:var(--muted)}.pub-actions{display:flex;flex-wrap:wrap;gap:18px;margin-top:20px;font-size:13px}.pub-actions a{text-decoration:none}.publication pre{background:var(--surface-soft);padding:18px;border-radius:8px;overflow:auto;font:12px/1.7 var(--mono);white-space:pre}.sources{font-size:11px!important;margin-top:18px!important;color:var(--muted)}.sources a{margin-left:7px}
/* Notebook library and reader */
.notes-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;margin-bottom:18px}.segmented{display:inline-flex;gap:3px;padding:4px;background:var(--surface-soft);border:1px solid var(--line);border-radius:11px}.segmented button{min-height:36px;padding:7px 16px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:13px;font-weight:550;white-space:nowrap}.segmented button[aria-pressed="true"],.segmented button[aria-selected="true"],.segmented .active{background:var(--surface);color:var(--text);box-shadow:0 1px 5px #0001}.search-field{display:flex;align-items:center;gap:10px;min-width:220px;position:relative}.search-field input,input.search-field{width:100%;min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);padding:10px 14px;font-size:13px}.search-field input::placeholder{color:var(--faint)}.search-field input[type="search"]{appearance:none;-webkit-appearance:none}.notes-status{font-size:12px;color:var(--muted);min-height:22px;margin:15px 0 24px}.notes-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.notes-actions .button{font-size:12px;min-height:36px;padding:6px 12px}.notes-actions a{font-size:12px}.notes-language-note{font-size:12px;color:var(--faint);margin-top:8px}.notes-filters{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 25px}.notes-filters button{border:1px solid var(--line);background:var(--surface);color:var(--muted);border-radius:7px;min-height:34px;padding:5px 10px;font-size:12px}.notes-filters button[aria-pressed="true"]{color:var(--accent);background:var(--accent-soft);border-color:var(--accent)}.topic-section{margin-top:36px;scroll-margin-top:130px}.topic-header{display:flex;align-items:baseline;justify-content:space-between;gap:18px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--line)}.topic-header h2{font-size:18px;letter-spacing:-.02em}.topic-header small,.topic-header .count{font-size:12px;color:var(--muted);font-family:var(--mono);margin-left:9px}.topic-header a{font-size:12px;text-decoration:none}.topic-description{font-size:13px;color:var(--muted);margin-bottom:18px}.notes-list{list-style:none;padding:0;margin:0}.note-row{display:grid;grid-template-columns:100px minmax(0,1fr) auto;gap:18px;align-items:baseline;padding:20px 8px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--text);border-radius:5px;min-width:0}.note-row:hover{background:var(--surface);color:var(--accent)}.note-date{font:11px/1.8 var(--mono);color:var(--muted);white-space:nowrap}.note-title{font-size:15px;font-weight:550;line-height:1.65;overflow-wrap:anywhere;min-width:0}.note-topic{font-size:11px;color:var(--muted);max-width:180px;text-align:right;line-height:1.7}.note-arrow{font-size:15px;color:var(--faint)}.notes-empty{padding:50px 20px;text-align:center;border:1px dashed var(--line);border-radius:12px;color:var(--muted)}.notes-empty p{margin-bottom:15px}.reader-back{display:inline-flex;align-items:center;gap:8px;margin:30px 0 24px;font-size:13px;color:var(--muted);background:none;border:0;text-decoration:none;min-height:36px;padding:0}.reader-header{max-width:760px;margin:0 auto 36px}.reader-header h1{font-size:clamp(28px,4vw,41px);line-height:1.45;letter-spacing:-.035em;overflow-wrap:anywhere;margin-bottom:18px}.reader-meta{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;font-size:12px;color:var(--muted)}.reader-meta a{text-decoration:none}.reader-toc{max-width:760px;margin:0 auto 30px;padding:16px 20px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.reader-toc summary{padding:0;min-height:26px}.reader-toc nav,.reader-toc ul{margin-top:10px;display:grid;gap:6px}.reader-toc a{font-size:13px;text-decoration:none;color:var(--muted);overflow-wrap:anywhere}.reader-toc a:hover{color:var(--accent)}.markdown-body{max-width:760px;margin:0 auto;color:var(--text);font-size:16px;line-height:1.95;overflow-wrap:anywhere}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4{scroll-margin-top:120px;line-height:1.5;letter-spacing:-.025em}.markdown-body h1{font-size:32px;margin:0 0 26px}.markdown-body h2{font-size:25px;margin:42px 0 18px;padding-bottom:10px;border-bottom:1px solid var(--line)}.markdown-body h3{font-size:20px;margin:30px 0 14px}.markdown-body h4{font-size:17px;margin:25px 0 12px}.markdown-body p,.markdown-body ul,.markdown-body ol{margin:15px 0}.markdown-body li+li{margin-top:5px}.markdown-body blockquote{margin:24px 0;border-left:3px solid var(--line);padding:3px 20px;color:var(--muted)}.markdown-body code{font: .86em/1.7 var(--mono);background:var(--surface-soft);padding:2px 5px;border-radius:4px;overflow-wrap:anywhere}.markdown-body pre{position:relative;max-width:100%;overflow:auto;padding:20px;margin:24px 0;border:1px solid var(--line);background:var(--surface);border-radius:12px;tab-size:2;white-space:pre}.markdown-body pre code{display:block;padding:0;background:none;font-size:12px;overflow-wrap:normal;word-break:normal;min-width:0}.markdown-body .code-copy{border:1px solid var(--line);background:var(--surface);border-radius:6px;padding:4px 8px;position:absolute;top:7px;right:7px;color:var(--muted);font-size:10px}.markdown-body img{display:block;max-height:650px;max-width:100%;width:auto;object-fit:contain;margin:25px auto;border-radius:6px}.markdown-body table{display:block;max-width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:8px;margin:22px 0}.markdown-body th,.markdown-body td{text-align:left;min-width:100px;white-space:normal;font-size:13px;line-height:1.7}.markdown-body th{background:var(--surface-soft);color:var(--text);font-weight:600}.markdown-body hr{border:0;border-top:1px solid var(--line);margin:35px 0}.markdown-body .katex-display{max-width:100%;overflow-x:auto;overflow-y:hidden;padding:8px 0}.markdown-body .katex{font-size:1.05em}.reading-progress{position:fixed;top:0;left:0;height:2px;width:100%;transform:scaleX(0);transform-origin:left;background:var(--accent);z-index:60;pointer-events:none}.archive-intro{max-width:670px}.project-list{margin-top:6px}.note-count{font:12px/1.6 var(--mono);color:var(--muted)}
@media(max-width:1000px){.header-inner{gap:14px}.primary-nav a{padding-inline:9px}.home-hero{gap:38px;grid-template-columns:minmax(0,1fr) 200px}.section{grid-template-columns:180px minmax(0,1fr);gap:32px}.hero-grid{gap:28px;grid-template-columns:1.1fr 1fr}.project-feature-art{padding:25px}.pipeline-node{min-width:62px}.home-about{gap:32px}.note-topic{max-width:140px}}
@media(max-width:760px){html{scroll-padding-top:138px}.container,.wrap{width:calc(100% - 40px)}.header-inner{min-height:0;padding-top:12px;gap:0;display:grid;grid-template-columns:1fr auto}.brand{font-size:14px}.brand-mark{width:29px;height:29px}.header-controls{grid-column:2;grid-row:1;gap:8px}.primary-nav{grid-column:1/-1;grid-row:2;width:100%;margin:9px 0 9px;justify-content:space-between;gap:2px}.primary-nav a{padding:7px 8px;min-height:35px;font-size:12px}.language-switch{border:0;padding:0}.language-switch button{min-height:32px}.icon-button{width:32px;height:32px}.home-hero{grid-template-columns:1fr;gap:28px;padding:43px 0 35px}.home-hero h1{font-size:39px;line-height:1.3}.identity-line{margin-bottom:23px}.hero-copy{font-size:15px;line-height:1.9}.hero-aside{padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.fact-row{border-bottom:0;border-top:1px solid var(--line);padding:14px 0 0}.fact-row:first-child{padding-top:14px}.fact-row strong{font-size:12px}.fact-row p{font-size:11px}.fact-row small{font-size:10px}.actions{margin-top:22px}.button{font-size:13px;padding:9px 14px}.home-section{padding:30px 0}.home-about{display:block}.home-about h2{margin-bottom:18px}.home-about>p{font-size:15px}.project-feature{grid-template-columns:1fr}.project-feature-art{border-left:0;border-top:1px solid var(--line);padding:20px 24px;gap:10px}.project-feature-copy{padding:25px}.project-feature h3{font-size:30px}.project-feature h4{font-size:16px}.project-feature p{font-size:13px}.pipeline-row{gap:12px}.pipeline-node{min-width:95px;min-height:36px}.pipeline-caption{font-size:9px}.section-heading{gap:12px;margin-bottom:19px}.section-heading h2{font-size:20px}.section-heading .text-link{font-size:12px}.page-heading{padding:38px 0 28px}.page-heading h1{font-size:37px}.lede{font-size:15px}.section{display:block;padding:32px 0}.section-mark{margin-bottom:26px}.section-mark .eyebrow{font-size:10px;margin-bottom:7px}.section-mark h2{font-size:24px;margin-bottom:6px}.skill-grid{gap:23px}.skill-copy{font-size:13px}.skill-grid h3{font-size:16px}.skill-stack{font-size:10px}.item-top{display:block}.item-top .date{display:block;margin-top:6px}.experience{padding-bottom:27px;margin-bottom:26px}.experience-body>p:not(.organization):not(.date),.research-role>p{font-size:14px}.fde-responsibilities{gap:20px}.research-role .item-top{margin-bottom:12px}.contact-section{padding-top:0}.contact-text{font-size:18px;margin-bottom:25px}.contact-link{font-size:16px}.copy-email{font-size:11px;min-height:36px;padding:7px 9px}.contact-email-row{gap:12px}.contact-bottom>span{margin-left:0}.footer-inner{flex-wrap:wrap;gap:12px}.footer-links{gap:20px}.site-footer{padding:22px 0 30px}.hero-grid{display:block}.project-page .hero{padding-top:20px}.project-page .hero h1{font-size:49px}.project-page .hero h2{font-size:22px}.project-page .intro{font-size:14px}.result-card{margin-top:30px;padding:24px}.score{font-size:61px}.hero-bottom{align-items:flex-start;flex-direction:column;gap:14px}.project-meta{grid-template-columns:1fr 1fr;gap:23px 18px;padding-bottom:28px}.project-page .section .lead{font-size:19px}.project-page .section p{font-size:14px}.metrics{gap:13px}.metric{padding:19px}.metric-number{font-size:34px!important}.publication{padding:22px}.publication h3{font-size:20px}.publication pre{font-size:10px}.table-scroll{padding:12px}.architecture{padding:10px}.note-row{grid-template-columns:78px minmax(0,1fr);gap:12px;padding:17px 4px}.note-title{font-size:14px}.note-date{font-size:10px}.note-topic{grid-column:2;text-align:left;max-width:none;margin-top:-9px;font-size:10px}.note-arrow{display:none}.notes-toolbar{gap:12px;align-items:stretch}.search-field{min-width:0;flex:1}.segmented{flex-shrink:0}.segmented button{padding-inline:13px;font-size:12px}.topic-header{align-items:flex-start}.topic-header h2{font-size:17px}.topic-header a{flex-shrink:0;font-size:11px}.reader-back{margin-top:25px}.reader-header h1{font-size:29px}.markdown-body{font-size:15px;line-height:1.9}.markdown-body h2{font-size:23px}.markdown-body h3{font-size:19px}.markdown-body pre{padding:17px}.reader-toc{padding:14px 16px}.toast{bottom:18px;font-size:12px}}
@media(max-width:480px){.container,.wrap{width:calc(100% - 32px)}.home-hero h1{font-size:35px}.hero-aside{grid-template-columns:1fr;gap:0}.fact-row{display:grid;grid-template-columns:70px 1fr;column-gap:12px;padding:10px 0!important;align-items:baseline}.fact-row small{grid-column:1;grid-row:1/3;font-size:11px}.fact-row strong{font-size:13px}.fact-row p{grid-column:2;font-size:11px}.skill-grid{grid-template-columns:1fr}.skill-copy{font-size:14px}.skill-grid h3{font-size:17px}.skill-stack{font-size:11px}.fde-responsibilities{grid-template-columns:1fr}.metrics,.mini-grid{grid-template-columns:1fr}.metric-number{font-size:39px!important}.contact-link{font-size:15px}.copy-email{padding:6px 8px}.copy-email span:first-child{display:none}.pipeline-node{min-width:68px}.pipeline-row{gap:8px}.project-feature-copy{padding:22px}.primary-nav a{padding-inline:6px;font-size:11px}.notes-toolbar{flex-direction:column}.search-field{width:100%}.segmented{align-self:flex-start}.notes-actions{gap:12px}.topic-header{flex-wrap:wrap;gap:6px}.topic-header h2{font-size:16px}.page-heading h1{font-size:34px}.hero-copy{font-size:15px}.home-about>p{font-size:14px}.contact-bottom a{font-size:13px}.reader-meta{font-size:11px;gap:8px 15px}.reader-header h1{font-size:26px}.markdown-body h1{font-size:27px}.markdown-body pre code{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}button:active,.button:active{transform:none}}
@media print{.site-header,.site-footer,.actions,.back-link,.reader-back,.notes-toolbar,.notes-actions,.copy-email,.share-project,.toast,.reading-progress{display:none!important}:root{--bg:white;--surface:white;--text:black;--muted:#444;--line:#ccc}body{font-size:11pt}.container,.wrap{width:100%;max-width:none}main{padding:0}.page-heading{padding:0 0 20px}.section{break-inside:avoid;padding:20px 0}.fde-details:not([open]) .fde-responsibilities{display:grid}.fde-details summary{display:none}.project-feature,.publication,.metric{box-shadow:none}.markdown-body{max-width:none}.markdown-body pre{white-space:pre-wrap}a{color:inherit;text-decoration:none}}

/* Library controls and progressive enhancement details. */
.notes-language{font-size:12px;color:var(--muted);margin-top:10px}
.topic-filter{max-width:260px;min-height:44px;padding:9px 32px 9px 12px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:10px;font-size:12px}
.topic-count{font:11px/1.6 var(--mono);color:var(--muted);margin-left:10px}
.note-row{grid-template-columns:100px minmax(0,1fr) auto 14px}
.notes-actions{justify-content:flex-start}.notes-actions .notes-status{margin:0}
.reader-toc .toc-sub{padding-left:14px}
.markdown-body .table-scroll{padding:0;margin:24px 0;max-width:100%}
.markdown-body .table-scroll table{display:table;border:0;margin:0;width:100%;max-width:none}
.markdown-body .table-scroll td,.markdown-body .table-scroll th{min-width:125px}
.code-block{position:relative;max-width:100%;margin:24px 0}
.code-block pre{margin:0;padding-top:40px}
.copy-code{position:absolute;top:8px;right:8px;z-index:1;font-size:10px;padding:4px 9px;border:1px solid var(--line);border-radius:6px;color:var(--muted);background:var(--surface);min-height:28px}
.note-raw{white-space:pre-wrap;overflow-wrap:anywhere}
.note-equation{max-width:100%;overflow:auto}
#experience-section{border-top:0;padding-top:8px}
.noscript-message{max-width:700px;margin:30px auto;padding:20px;border:1px solid var(--line);border-radius:12px}
@media(max-width:760px){.note-row{grid-template-columns:78px minmax(0,1fr)}.topic-filter{max-width:none}.notes-toolbar .search-field{flex:1 1 200px}.reader-header.page-heading{padding-top:26px}.notes-toolbar.notes-actions{flex-direction:row;flex-wrap:wrap}}
@media(max-width:480px){.topic-filter{width:100%}.notes-toolbar .search-field{flex:0 1 auto}.notes-toolbar.notes-actions{align-items:center}}


/* Typography and paper tones shared by the portfolio and the notebook. */
:root {
  --bg: #f7f3e9; --surface: #fcf9f1; --surface-soft: #eee8da;
  --text: #272820; --muted: #56584d; --faint: #68695c; --line: #d3cfbf;
  --accent: #8e422f; --accent-soft: #efdfd2; --header: #f7f3e9;
  --shadow: none; --radius: 4px;
  --display: "Baskerville", "Iowan Old Style", Georgia, "Noto Serif CJK SC", "Songti SC", SimSun, serif;
}
:root[data-theme="dark"] {
  --bg: #22251f; --surface: #292d26; --surface-soft: #30352b;
  --text: #f3efdf; --muted: #c3c4b5; --faint: #a7ab9c; --line: #474c40;
  --accent: #f0ac8d; --accent-soft: #44352c; --header: #22251f;
}
body {
  background: radial-gradient(ellipse at 80% 0%, var(--surface-soft), transparent 540px) no-repeat, var(--bg);
}
.site-header { background: var(--header); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }
.header-inner { min-height: 72px; border-bottom: 1px solid var(--line); }
.wordmark { font: italic 600 24px/1 var(--display); letter-spacing: -.075em; }
.primary-nav { gap: 16px; }
.primary-nav a { padding-inline: 2px; border-radius: 0; font-weight: 500; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] {
  background: transparent; color: var(--text); text-decoration: underline;
  text-decoration-color: var(--accent); text-underline-offset: 7px; text-decoration-thickness: 2px;
}
.portrait-intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(195px, 27%);
  grid-template-areas: "name photo" "bio photo"; column-gap: clamp(36px,7vw,100px);
  padding: clamp(42px, 6vw, 84px) 0 clamp(42px, 5.3vw, 76px);
}
.intro-name { grid-area: name; min-width: 0; }
.intro-name h1 {
  font: 500 clamp(64px, 7.2vw, 100px)/1.08 var(--display);
  letter-spacing: -.065em; color: var(--text); margin: 0 0 12px;
}
:lang(zh-CN) .intro-name h1 { letter-spacing: .005em; }
.alternate-name { font: italic 22px/1.3 var(--display); color: var(--accent); }
.alternate-name [lang="zh-CN"] { font-style: normal; }
.intro-bio { grid-area: bio; min-width: 0; }
.job-line { font-size: 15px; font-weight: 620; line-height: 1.6; margin: 26px 0 12px; }
.job-line span { font-weight: 450; color: var(--muted); }
.portrait-intro .hero-copy { max-width: 65ch; font-size: 16px; line-height: 1.85; margin: 0; }
.intro-links { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 22px; }
.intro-links a, .section-heading .text-link, .project-feature-footer {
  font-size: 14px; font-weight: 580; color: var(--accent); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--line);
}
.intro-links a { padding: 5px 0; }
.intro-links a:hover, .section-heading .text-link:hover { text-decoration-color: var(--accent); }
.portrait-print {
  grid-area: photo; align-self: center; justify-self: end; width: 96%;
  padding: 7px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: 2px 5px 13px rgba(37,32,22,.11); transform: rotate(2deg);
}
.portrait-print img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.expertise, .home-section { padding: clamp(28px,4vw,52px) 0; border-top: 1px solid var(--line); }
.expertise { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: clamp(30px,8vw,100px); }
.expertise-intro h2, .section-heading h2, .section-mark h2, .topic-header h2 {
  font-family: var(--display); font-weight: 580; letter-spacing: -.025em;
}
.expertise-intro h2, .section-heading h2 { font-size: clamp(26px,3vw,37px); }
.expertise-intro p { max-width: 42ch; font-size: 14px; color: var(--muted); line-height: 1.85; margin-top: 16px; }
.expertise-list { align-self: start; }
.expertise-list details { border-bottom: 1px solid var(--line); }
.expertise-list details:first-child { border-top: 1px solid var(--line); }
.expertise-list summary { color: var(--text); font-weight: 550; font-size: 17px; padding: 15px 2px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.expertise-list summary::before { display: none; }
.expertise-list summary::after { content: "+"; color: var(--accent); font: 20px/1 var(--mono); }
.expertise-list details[open] summary::after { content: "−"; }
.expertise-list summary:hover { color: var(--accent); }
.skill-detail { padding: 0 12px 18px 2px; }
.skill-detail .skill-copy { margin-top: 0!important; }
.page-heading h1, .project-page .hero h1, .markdown-body h2, .score, .metric-number, .project-feature h3 {
  font-family: var(--display); font-weight: 550; letter-spacing: -.035em;
}
.page-heading h1 { line-height: 1.17; }
.page-heading .lede { max-width: 65ch; }
.project-feature {
  align-items: center; grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr);
  gap: clamp(24px,5vw,65px); padding: 10px 0 4px; border: 0; border-radius: 0;
  background: transparent; overflow: visible;
}
.project-feature-copy { padding: 0; }
.project-feature h3 { font-size: clamp(36px,4.5vw,56px); line-height: 1.14; margin: 5px 0 12px; }
.project-feature:hover { box-shadow: none; }
.project-feature:hover h3 { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.project-feature .project-credit { color: var(--accent); font: 12px/1.6 var(--mono); }
.project-feature .project-description { font-size: 15px; line-height: 1.8; }
.project-feature-footer { margin-top: 15px; }
.project-plate { margin: 0; min-width: 0; }
.project-plate img { display: block; width: 100%; height: auto; background: white; border: 1px solid var(--line); padding: 10px; }
.project-plate figcaption { margin-top: 6px; color: var(--muted); font: 11px/1.6 var(--mono); }
.project-list { padding-bottom: 40px; }
.result-card, .publication, .metric, .architecture, .table-scroll { border-radius: 4px; box-shadow: none; }
.project-page .section-mark > .eyebrow, #experience-section .section-mark > .eyebrow,
#education-section .section-mark > .eyebrow { display: none; }
.note-row { padding-left: 0; border-radius: 0; }
.note-row:hover { background: transparent; }
.note-row:hover .note-title { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.notes-toolbar { justify-content: flex-start; gap: 12px; margin-bottom: 12px; }
.notes-toolbar .search-field { max-width: 360px; }
.segmented, .segmented button, .topic-filter, .search-field input, .button, .share-project, .copy-email, .reader-toc { border-radius: 4px; }
#notes-mount:has(.reader-header) { max-width: 760px; }
.reader-header.page-heading { margin-bottom: 12px; padding-bottom: 8px; }
.notes-status { margin: 10px 0 18px; }
.notes-toolbar.notes-actions { align-items: center; }
.contact-phone-list { margin-bottom: 24px; }
@media (max-width: 760px) {
  .header-inner { min-height: auto; }
  .primary-nav { margin: 3px 0; gap: 4px; }
  .primary-nav a { min-height: 40px; }
  .portrait-intro { column-gap: 32px; grid-template-columns: minmax(0,1fr) 165px; }
  .portrait-print { width: 100%; }
  .intro-name h1 { font-size: 64px; }
  .expertise { gap: 28px; }
  .project-feature { gap: 20px; grid-template-columns: minmax(0,1fr) minmax(0,.9fr); }
  .project-feature-copy { padding: 0; }
}
@media (max-width: 600px) {
  .portrait-intro { grid-template-areas: "name photo" "bio bio"; grid-template-columns: minmax(0,1fr) 28%; align-items: center; column-gap: 14px; padding: 32px 0; }
  .intro-name h1 { font-size: clamp(42px,10vw,56px); }
  .alternate-name { font-size: 17px; }
  .portrait-print { padding: 3px; max-width: 116px; }
  .job-line { font-size: 14px; margin-top: 24px; }
  .portrait-intro .hero-copy { font-size: 15px; line-height: 1.85; }
  .intro-links { margin-top: 15px; }
  .expertise { display: block; }
  .expertise-intro p { max-width: none; margin-top: 9px; }
  .expertise-list { margin-top: 20px; }
  .expertise-list summary { font-size: 16px; padding-block: 12px; }
  .project-feature { display: block; }
  .project-plate { margin-top: 18px; }
  .project-feature h3 { font-size: 36px; }
  .notes-toolbar:not(.notes-actions) { display: flex; flex-flow: row wrap; align-items: center; }
  .notes-toolbar .search-field { max-width: none; flex: 1 1 135px; width: auto; }
  .notes-toolbar .topic-filter { width: auto; flex: 1 1 125px; }
}
@media print {
  body { background: white; }
  .portrait-intro { padding-block: 15px; }
  .portrait-print { transform: none; box-shadow: none; }
  .intro-links { display: none; }
  :root, :root[data-theme="dark"] { --bg:white; --surface:white; --text:black; --muted:#444; --line:#ccc; }
}

/* Keep the wordmark legible alongside the translated employer name. */
.experience.current .employer-identity {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
}
.employer-logo {
  box-sizing: content-box;
  display: block;
  width: 108px;
  height: 36px;
  padding: 4px 6px;
  background: #faf8f1;
  border: 1px solid var(--line);
  border-radius: 4px;
}
@media (max-width: 480px) {
  .experience.current .employer-identity { gap: 9px; }
  .employer-logo { width: 90px; height: 30px; }
}

/* Keep each course and its date range together when the dates wrap. */
.course-terms { display: flex; flex-wrap: wrap; gap: 2px 20px; margin: 0 0 12px; }
.course-terms > span { white-space: nowrap; }
