/* chendiwang.com — one stylesheet for the whole site.
   Sizes are in px on purpose: they are the measurements agreed on the design preview (November 2026).
   Layout changes with the width of the block an element sits in (container queries), not with the window. */

@font-face{font-family:'Open Sans';src:url('/fonts/open-sans-latin-wght-normal.woff2') format('woff2');font-weight:300 800;font-style:normal;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Open Sans';src:url('/fonts/open-sans-latin-wght-italic.woff2') format('woff2');font-weight:300 800;font-style:italic;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Open Sans';src:url('/fonts/open-sans-latin-ext-wght-normal.woff2') format('woff2');font-weight:300 800;font-style:normal;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Open Sans';src:url('/fonts/open-sans-latin-ext-wght-italic.woff2') format('woff2');font-weight:300 800;font-style:italic;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

:root{
  --paper:#ffffff;   /* page */
  --ink:#1d2824;     /* text */
  --muted:#55625c;   /* secondary text */
  --accent:#17513f;  /* bottle green: links, the mark for "current" */
  --rule:#d3ddd7;    /* hairlines */
  --tint:#eff4f1;    /* open buttons */
  --maxw:1180px;     /* page column */
  --roww:680px;      /* longest line of an entry */
  --textw:640px;     /* longest line of running text */
}

/* ---------- base */
body{margin:0;background:var(--paper);color:var(--ink);font-family:'Open Sans','Segoe UI',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.62}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
button,input{font:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* a link inside running text is underlined: the green is strong against the page but close to the text colour */
.prose a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}

/* ---------- top bar (pinned) */
.pin-head{position:sticky;top:0;z-index:25;background:var(--paper);border-bottom:1px solid var(--rule)}
.pin-head-in{container-type:inline-size;container-name:phead;max-width:var(--maxw);min-height:54px;margin:0 auto;padding:0 28px;box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 24px}
.brand{font-weight:700;font-size:18px;color:var(--ink);padding:10px 0}
.topnav{display:flex;flex-wrap:wrap;gap:0 26px;font-size:12.5px;font-weight:600;letter-spacing:.07em;text-transform:uppercase}
.topnav a{display:flex;align-items:center;height:46px;color:var(--ink)}
/* the current page: accent colour and a 2px line above the word, 4px under the bar's top edge */
.topnav a[aria-current="page"]{color:var(--accent);box-shadow:inset 0 2px 0 var(--accent)}
.brand:hover,.topnav a:hover,.bi:hover{text-decoration:none}
.topnav a:hover,.bi:hover{color:var(--accent)}
.topnav a:focus-visible{outline:none}
.topnav a:focus-visible span{outline:2px solid var(--accent);outline-offset:5px}
@container phead (max-width:583px){.brand{display:none}}
@container phead (max-width:294px){.topnav{gap:0 16px}}

/* ---------- page title */
.page-head{max-width:var(--maxw);margin:0 auto;padding:34px 28px 20px;box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 40px}
.page-head--intro{padding-bottom:26px;gap:12px 40px}
.page-title{flex:1 1 180px;min-width:0;margin:0;font-weight:700;font-size:34px;line-height:1.1;letter-spacing:-.01em}
.page-count{flex:999 1 560px;min-width:0;margin:0;font-size:13.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.page-intro{flex:999 1 560px;min-width:0}
.page-intro p{margin:0;max-width:var(--roww);text-wrap:pretty}

/* ---------- pinned bar under the top bar (Research: jump, search, filter; Teaching: jump) */
.pin-row{position:sticky;top:54px;z-index:20;background:var(--paper);border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.bar{position:relative;container-type:inline-size;max-width:var(--maxw);margin:0 auto;padding:0 28px;box-sizing:border-box;font-size:13.5px;line-height:1.3}
.bar--r{container-name:rbar}
.bar--t{container-name:tbar}
.bar-top{display:flex;align-items:center;gap:0 14px;min-height:46px}
.bar-n{display:none}                                   /* the folded form, for narrow bars only */
.bar-btn{flex:0 0 auto;align-items:center;height:40px;padding:0 16px;border:1px solid var(--muted);border-radius:3px;background:#ffffff;color:var(--accent);font-size:15px;cursor:pointer}
.bar-btn[aria-expanded="true"]{background:var(--tint);border-color:var(--accent)}
.bar-btn.is-narrowed{background:var(--accent);border-color:var(--accent);color:#ffffff}   /* a research line is selected */
.bar-jumps{flex:0 1 auto;min-width:0;margin-left:-8px;display:flex;flex-wrap:wrap;align-items:center;gap:0 2px}
.bar--t .bar-jumps{flex:1 1 0}
/* the width is given as width, not as flex-basis: Safari sizes the row from its items' widths and would otherwise be 2px short, pushing the last item to a new line */
.bar-label{flex:none;width:62px;box-sizing:border-box;padding-left:8px;color:var(--muted)}
/* an item of "Jump to" or "Show": the current one is in the accent colour with a 2px line under it */
.bi{color:var(--ink)}
.bi.is-cur,.bi[aria-pressed="true"]{color:var(--accent);box-shadow:inset 0 -2px 0 var(--accent)}
.bar-jumps .bi{flex:0 0 auto;display:flex;align-items:center;height:34px;padding:0 8px;white-space:nowrap}
.bar-lines{margin-left:-8px;padding-bottom:4px;display:flex;flex-wrap:wrap;align-items:center;gap:0 2px}
.bar-lines .bi{flex:0 0 auto;height:32px;padding:0 8px;border:0;background:none;white-space:nowrap;cursor:pointer}
.bar-search{flex:1 0 220px;max-width:350px;margin-left:auto;display:flex}
.bar-search input{flex:1 1 0;min-width:0;box-sizing:border-box;height:36px;padding:0 12px;border:1px solid var(--muted);border-radius:3px;background:#ffffff;color:var(--ink);font-size:13.5px}
.bar-search-n{flex:1 1 0;min-width:0}
.bar-search-n input{flex:1 1 0;min-width:0;box-sizing:border-box;height:40px;padding:0 12px;border:1px solid var(--muted);border-radius:3px;background:#ffffff;color:var(--ink);font-size:16px}
.bar-cur{flex:1 1 0;min-width:0;align-items:center}
.bar-cur span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:15px}
/* the panel the folded bar opens */
.bar-panel{position:absolute;top:100%;left:0;right:0;flex-direction:column;gap:4px;padding:6px 28px 10px;background:var(--paper);border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);font-size:15px}
.bar--t .bar-panel{gap:0}
.bar-prow{display:flex;align-items:flex-start}
.bar-plabel{flex:0 0 64px;height:40px;display:flex;align-items:center;color:var(--muted)}
.bar-pitems{flex:1 1 0;min-width:0;margin-left:-8px;display:flex;flex-wrap:wrap;gap:0 2px}
.bar-pitems button.bi{flex:0 1 auto;max-width:100%;min-height:40px;padding:4px 8px;border:0;background:none;text-align:left;cursor:pointer}
.bar-pitems a.bi{flex:0 1 auto;max-width:100%;box-sizing:border-box;display:flex;align-items:center;min-height:40px;padding:4px 8px}
.bar-pcol{margin-left:-8px;display:flex;flex-direction:column;align-items:flex-start}
.bar-pcol a.bi{box-sizing:border-box;max-width:100%;display:flex;align-items:center;min-height:40px;padding:4px 8px}
@container rbar (max-width:983px){.bar-w{display:none}.bar-n{display:flex}}
@container tbar (max-width:375px){.bar-w{display:none}.bar-n{display:flex}}

/* ---------- sections: the name in a margin column under a dark rule, the list beside it */
.rlist{container-type:inline-size;container-name:rlist}
.list{padding-top:44px}
#list{scroll-margin-top:139px}
.sec{scroll-margin-top:163px;max-width:var(--maxw);margin:0 auto;padding:0 28px 52px;box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:flex-start;gap:0 40px}
.sec--t{scroll-margin-top:127px}
@container rlist (max-width:1039px){#list{scroll-margin-top:103px}.rlist .sec{scroll-margin-top:127px}}
.sec-head{flex:1 1 180px;min-width:0;border-top:1px solid var(--ink);padding:13px 0 16px;display:flex;flex-direction:column;gap:6px}
.sec-head--bare{padding-bottom:22px}
.sec-title{margin:0;font-weight:600;font-size:19px;line-height:1.2;text-wrap:balance}
.sec--t .sec-title{line-height:1.25}
.sec-note{margin:0;font-size:13px;line-height:1.45;color:var(--muted)}
.sec-more{font-size:13.5px;font-weight:600}
.sec-body{flex:999 1 560px;min-width:0}
.none{max-width:var(--maxw);margin:0 auto;padding:0 28px 48px;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:0 40px}
.none-pad{flex:1 1 180px;min-width:0}
.none-msg{flex:999 1 560px;min-width:0;border-top:1px solid var(--rule);padding:22px 0;display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
.none-msg button{min-height:44px;padding:8px 16px;border:1px solid var(--accent);border-radius:3px;background:none;color:var(--accent);cursor:pointer}

/* ---------- an entry: text at the left, figure at the right; the abstract opens under both */
.entry{padding:11px 0 12px;border-top:1px solid var(--rule)}
.entry-row{container-type:inline-size;display:flex;align-items:flex-start;justify-content:space-between;gap:0 clamp(14px,5%,32px)}
.entry-text{flex:1 1 0;min-width:0;max-width:var(--roww);overflow-wrap:break-word;display:flex;flex-direction:column;gap:3px}
.entry-title{margin:0;font-weight:600;font-size:17px;line-height:1.32;color:var(--ink);text-wrap:pretty}
.entry-title a{color:inherit}
.entry-authors{font-size:13.5px;line-height:1.45}
.me{font-weight:600}
.entry-note{color:var(--muted)}
.entry-venue{font-size:13.5px;line-height:1.45;color:var(--muted)}
.entry-links{display:flex;flex-wrap:wrap;align-items:center;gap:0 18px;font-size:13.5px}
.entry-links a{padding:2px 0}
.entry-sum{margin:1px 0 0;font-size:14.5px;line-height:1.5;text-wrap:pretty}
.more{margin-left:8px;padding:0;border:0;background:none;color:var(--accent);font-size:13.5px;cursor:pointer}
.abs{margin:10px 0 2px;padding-left:14px;border-left:2px solid var(--rule);font-size:13.5px;line-height:1.55;color:var(--muted)}
/* The figure. Every entry reserves the same block: 208px wide (40% of the entry on narrow windows), as tall as the entry up
   to a square, and beside short text as tall as the figure needs (at most 158px). The block has no colour or border.
   The figure is the largest that fits and sits in the middle. --r is the figure's width over its height, set in the page. */
.fig{flex:none;align-self:stretch;container-type:size;box-sizing:border-box;width:clamp(112px,40cqw,208px);max-height:clamp(112px,40cqw,208px);min-height:min(clamp(112px,40cqw,158px),calc(clamp(112px,40cqw,208px) / var(--r)));display:flex;align-items:center;justify-content:center}
.fig img{display:block;flex:none;width:min(100cqw,calc(100cqh * var(--r)));height:auto;aspect-ratio:var(--r);max-width:100%;max-height:100%;object-fit:contain}

/* ---------- home */
.hero{container-type:inline-size;container-name:hero;max-width:var(--maxw);margin:0 auto;padding:56px 28px 52px;box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:flex-start;gap:28px 40px}
.hero-main{flex:999 1 660px;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:24px 40px}
.portrait{flex:0 0 200px;width:200px;height:auto;aspect-ratio:1 / 1;object-fit:cover;object-position:50% 12%;border-radius:3px}
.hero-text{flex:999 1 420px;min-width:0;max-width:var(--textw);display:flex;flex-direction:column;gap:14px}
.hero-text p{margin:0;text-wrap:pretty}
.hero-name{margin:0;font-weight:700;font-size:40px;line-height:1.08;letter-spacing:-.012em}
.hero-text .hero-role{margin:-6px 0 4px;color:var(--muted);font-size:16px;text-wrap:wrap}
.hero-text>p:not(.hero-role) a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.hero-links{margin-top:4px;display:flex;flex-wrap:wrap;gap:4px 22px;font-size:13.5px}
.hero-side{flex:1 1 220px;min-width:0;display:flex;flex-wrap:wrap;gap:24px 36px;font-size:13px;line-height:1.45}
.side-list{flex:1 1 200px;min-width:0;display:flex;flex-direction:column;gap:7px}
.side-list h2{margin:0;font-size:13px;font-weight:600;color:var(--muted)}
@container hero (width < 660px){.portrait{margin-left:auto;margin-right:auto}.hero-id{text-align:center}}
@container hero (width < 480px){.portrait{flex-basis:168px;width:168px}}
.sec--home{scroll-margin-top:70px;padding-bottom:48px}
.sec--last{padding-bottom:56px}
.sec--home .sec-head{padding:18px 0 20px;gap:8px}
.sec--home .sec-title{text-wrap:wrap}
.sec--home .entry{padding:18px 0 20px}
.sec--home .entry-text{gap:5px}
.item{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px 32px;padding:18px 0 20px;border-top:1px solid var(--rule)}
.item-text{flex:1 1 340px;min-width:0;max-width:var(--textw);display:flex;flex-direction:column;gap:5px}
.item-title{margin:0;font-weight:600;font-size:17px;line-height:1.32}
.item-sub{font-size:13.5px;color:var(--muted)}
.item-sum{margin:3px 0 0;font-size:14.5px;line-height:1.52;text-wrap:pretty}
.item-meta{flex:0 0 208px;display:flex;flex-direction:column;gap:2px;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.item-meta strong{color:var(--ink);font-weight:600}
.item-meta a{padding:4px 0}
.awards{font-size:14.5px;line-height:1.5}
.award{display:flex;gap:20px;padding:12px 0;border-top:1px solid var(--rule)}
.award-when{flex:0 0 84px;color:var(--muted);font-variant-numeric:tabular-nums}
.award-what{flex:1 1 0;min-width:0;max-width:var(--textw)}
.awards-note{margin:0;padding:12px 0 0;border-top:1px solid var(--rule);color:var(--muted);font-size:13.5px}

/* ---------- teaching */
.course{padding:13px 0 14px;border-top:1px solid var(--rule)}
.course-text{max-width:var(--roww);display:flex;flex-direction:column;gap:3px}

/* ---------- plain pages (anything without a layout of its own, and "page not found") */
.plain{max-width:var(--maxw);margin:0 auto;padding:34px 28px 56px;box-sizing:border-box}
.plain-in{max-width:var(--textw)}
.plain h1{margin:0 0 18px;font-weight:700;font-size:34px;line-height:1.1;letter-spacing:-.01em}

/* ---------- footer */
.foot{border-top:1px solid var(--rule)}
.foot-in{max-width:var(--maxw);margin:0 auto;padding:22px 28px 28px;box-sizing:border-box;font-size:13px;color:var(--muted)}

/* ---------- round button in the corner: sections of the page, the pages, back to top */
.menu{position:sticky;bottom:0;height:0;z-index:30}
.menu-back{position:fixed;top:0;left:0;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:default}
.menu-in{position:absolute;z-index:1;right:20px;bottom:20px;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.menu-panel{width:252px;box-sizing:border-box;padding:14px 18px 10px;background:#ffffff;border:1px solid var(--rule);border-radius:4px;box-shadow:0 12px 32px rgba(29,40,36,.18);display:flex;flex-direction:column;font-size:13.5px;line-height:1.3}
.menu-label{font-size:13px;color:var(--muted);padding:2px 0 4px}
.menu-label--pages{margin-top:8px;padding:12px 0 4px;border-top:1px solid var(--rule)}
.menu-panel>.menu-label--pages:first-child{margin-top:0;padding:2px 0 4px;border-top:0}   /* a page without sections ("page not found") */
.menu-panel a{padding:8px 0;color:var(--ink)}
.menu-pages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.menu-pages a[aria-current="page"]{color:var(--accent);font-weight:600}
.menu-panel a.menu-top{margin-top:8px;padding:12px 0 8px;border-top:1px solid var(--rule);color:var(--accent);font-weight:600}
.menu-btn{width:48px;height:48px;padding:0;border:0;border-radius:50%;background:var(--accent);color:#ffffff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(29,40,36,.28)}
.menu-btn svg{stroke-width:2;stroke-linecap:round}
.menu-btn .ico-close,.menu-btn[aria-expanded="true"] .ico-open{display:none}
.menu-btn[aria-expanded="true"] .ico-close{display:block}
