:root {
  --ink: #242628;
  --muted: #62656a;
  --accent: #974a32;
  --accent-dark: #713522;
  --paper: #fff;
  --tint: #faf7f4;
  --line: #e7e2dd;
  --max: 1280px;
  /* Shared hierarchy: section, category, item, body, supporting text. */
  --type-section: 30px;
  --type-category: 20px;
  --type-item: 18px;
  --type-body: 16px;
  --type-secondary: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--type-body)/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
p { margin: 0 0 16px; }
h2 { font-size: var(--type-section); font-weight: 500; letter-spacing: -1px; line-height: 1.2; margin: 0; }
h3 { font-size: var(--type-item); font-weight: 600; letter-spacing: -.25px; line-height: 1.4; margin: 0 0 8px; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 10; padding: 10px 20px; background: var(--ink); color: white; }
.skip-link:focus { top: 10px; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.header-inner { max-width: var(--max); padding: 20px 0; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.wordmark { color: var(--ink); font-size: var(--type-category); letter-spacing: -.6px; }
.wordmark strong { font-weight: 650; }
nav { display: flex; align-items: center; gap: 25px; font-size: var(--type-secondary); }
nav a { color: var(--muted); }
nav .nav-cv { border: 1px solid var(--line); padding: 5px 13px; border-radius: 5px; color: var(--accent); }
.page { max-width: var(--max); margin: auto; }
.intro { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 26px; padding: 48px 0 42px; align-items: center; }
h1 { font-size: 49px; font-weight: 500; letter-spacing: -2px; line-height: 1.15; margin: 0 0 24px; }
.intro .bio, .intro .research-statement, .intro .industry-intro { font-size: 22px; line-height: 1.5; letter-spacing: -.3px; color: var(--ink); margin: 0 0 19px; }
.intro .bio a { white-space: nowrap; }
.research-statement strong { font-weight: 650; }
.availability { font-size: var(--type-secondary); color: var(--accent-dark); margin: 24px 0 17px; display: flex; gap: 8px; align-items: baseline; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }
.profile-links { display: flex; flex-wrap: wrap; gap: 22px; font-size: var(--type-secondary); font-weight: 500; }
.portrait { margin: 10px 0 0; }
.portrait img { width: 180px; height: 206px; object-fit: cover; object-position: 50% 40%; border-radius: 6px; }
.portrait figcaption { font-size: var(--type-secondary); color: var(--muted); margin: 9px 0 0; text-align: right; }
.experience { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 0; scroll-margin-top: 30px; }
.section-label { margin-bottom: 24px; }
.experience-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px; }
.experience-grid article + article { border-left: 1px solid var(--line); padding-left: 30px; }
.company-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.company-line h3 { margin: 0; }
.company-line span { font-size: var(--type-secondary); color: var(--muted); }
.experience .role { font-size: var(--type-secondary); color: var(--accent); margin: 5px 0 12px; }
.experience p:not(.role):not(.tools) { color: var(--muted); margin-bottom: 12px; }
.experience .tools { font-size: var(--type-secondary); color: var(--muted); margin-bottom: 0; }
.research { padding: 48px 0 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: var(--type-secondary); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.text-link { font-size: var(--type-secondary); }
.section-intro { max-width: 1050px; color: var(--muted); margin: 14px 0 28px; }
.research-group { border: 1px solid #dfd4cb; border-radius: 9px; background: var(--tint); margin: 0 0 24px; overflow: hidden; }
.research-group summary { display: flex; align-items: center; gap: 20px; padding: 21px 25px; list-style: none; cursor: pointer; }
.research-group summary::-webkit-details-marker { display: none; }
.research-group summary > span:first-child { flex: 1; min-width: 0; }
.group-title { display: block; font-size: var(--type-category); line-height: 1.4; letter-spacing: -.4px; font-weight: 600; color: var(--accent-dark); }
.group-count { font-size: var(--type-secondary); color: var(--muted); white-space: nowrap; }
.disclosure { width: 25px; height: 25px; border: 1px solid var(--group-border); border-radius: 50%; flex-shrink: 0; position: relative; }
.disclosure:before, .disclosure:after { content: ''; position: absolute; width: 9px; height: 1px; background: var(--accent); top: 11px; left: 7px; }
.disclosure:after { transform: rotate(90deg); }
.research-group[open] > summary .disclosure:after { transform: rotate(0); }
.paper-list { padding: 0 25px; }
.paper { display: grid; grid-template-columns: 305px minmax(0,1fr); gap: 28px; padding: 27px 0; border-top: 1px solid var(--line); align-items: start; scroll-margin-top: 25px; }
.figure-link { margin-top: 7px; position: relative; display: flex; align-items: center; justify-content: center; min-height: 160px; background: white; border: 1px solid #e8e2dc; border-radius: 5px; padding: 8px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.figure-link:hover { border-color: var(--group-border); box-shadow: 0 4px 13px #4331240d; }
.figure-link img { width: 100%; height: 185px; object-fit: contain; }
.enlarge { position: absolute; bottom: 4px; right: 6px; background: #fff; padding: 0 3px; border-radius: 2px; font-size: var(--type-secondary); color: var(--accent); }
.paper-meta { font-size: var(--type-secondary); font-weight: 600; color: var(--accent); margin: 0 0 5px; }
.meta-divider { margin: 0 4px; color: var(--muted); }
.paper h3 a, .related-work h3 a { color: var(--ink); }
.authors { font-size: var(--type-secondary); line-height: 1.6; color: var(--muted); margin: 0 0 12px; }
.authors strong { color: #44484b; font-weight: 650; }
.contribution { margin: 0 0 12px; color: #42474a; }
.contribution strong { color: var(--accent-dark); font-weight: 650; }
.paper-links { display: flex; gap: 8px; }
.paper-links a { font-size: var(--type-secondary); border: 1px solid var(--group-border); padding: 4px 11px; border-radius: 3px; color: var(--accent-dark); background: #fff; }
.equal-note { font-size: var(--type-secondary); color: var(--muted); margin: 0 0 24px; }
.curriculum-group { --accent: #974a32; --accent-dark: #713522; --line: #e7d9cf; --group-border: #d8bda7; background: #faf6f1; border-color: var(--group-border); }
.reward-group { --accent: #246b70; --accent-dark: #175359; --line: #cfe1df; --group-border: #9ebfbb; background: #f1f8f7; border-color: var(--group-border); }
.related-work { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.related-work > summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; cursor: pointer; font-size: var(--type-item); font-weight: 600; line-height: 1.4; letter-spacing: -.25px; }
.related-work summary::-webkit-details-marker { display: none; }
.related-work ul { padding-left: 20px; margin: 24px 0 0; }
.related-work li { padding-bottom: 20px; }
.related-work li p { font-size: var(--type-secondary); margin: 4px 0; color: var(--muted); }
.directions { padding: 42px 0; border-bottom: 1px solid var(--line); }
.direction-grid, .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; }
.direction-grid { margin-top: 24px; }
.direction-grid p, .about p { color: var(--muted); margin-bottom: 12px; }
.about { padding: 42px 0; }
.about h2 { margin-bottom: 24px; }
.education p + p { margin-top: 22px; }
.education strong { font-weight: 600; color: var(--ink); }
footer { border-top: 1px solid var(--line); padding: 22px 0 35px; display: flex; justify-content: space-between; gap: 20px; font-size: var(--type-secondary); color: var(--muted); }
dialog { width: min(1400px,94vw); max-height: 94vh; border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px 16px; background: white; box-shadow: 0 25px 100px #0005; color: var(--ink); }
dialog::backdrop { background: #1d2023b8; }
.dialog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 15px; }
.dialog-toolbar p { margin: 0; font-size: var(--type-secondary); font-weight: 600; }
.dialog-toolbar button { font: inherit; font-size: var(--type-secondary); border: 1px solid var(--line); background: white; padding: 6px 12px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.dialog-toolbar button span { margin-left: 10px; }
#enlarged-figure { width: 100%; max-height: 74vh; object-fit: contain; }
#original-figure { font-size: var(--type-secondary); display: block; margin-top: 12px; text-align: right; }
body.modal-open { overflow: hidden; }
@media (max-width: 1350px) {
  .page, .header-inner { margin-left: 35px; margin-right: 35px; }
}
@media (max-width: 1050px) {
  .company-line { display: block; }
  .paper { grid-template-columns: 260px minmax(0,1fr); }
}
@media (max-width: 850px) {
  .page, .header-inner { margin-left: 28px; margin-right: 28px; }
  .intro { grid-template-columns: minmax(0,1fr) 150px; gap: 22px; padding-top: 38px; }
  .portrait img { width: 150px; height: 180px; }
  h1 { font-size: 42px; }
  .intro .bio, .intro .research-statement, .intro .industry-intro { font-size: 20px; }
  .experience-grid { gap: 22px; }
  .experience-grid article + article { padding-left: 20px; }
  .paper { grid-template-columns: 220px minmax(0,1fr); gap: 22px; }
  .paper-list { padding: 0 20px; }
  .research-group summary { padding: 20px; }
}
@media (max-width: 620px) {
  :root { --type-section: 28px; }
  .page, .header-inner { margin-left: 20px; margin-right: 20px; }
  .header-inner { padding: 16px 0; gap: 15px; }
  .wordmark { font-size: var(--type-item); white-space: nowrap; }
  nav { gap: 14px; }
  nav a[href='#about'] { display: none; }
  nav .nav-cv { padding: 3px 8px; }
  .intro { grid-template-columns: 1fr; padding-top: 31px; padding-bottom: 27px; position: relative; }
  .portrait { position: absolute; top: 28px; right: 0; margin: 0; }
  .portrait img { width: 83px; height: 96px; border-radius: 4px; }
  .portrait figcaption { display: none; }
  h1 { font-size: 36px; letter-spacing: -1.5px; margin: 0 100px 29px 0; min-height: 96px; display: flex; align-items: center; }
  .intro .bio, .intro .research-statement, .intro .industry-intro { font-size: 20px; line-height: 1.55; margin-bottom: 18px; }
  .availability { margin-top: 20px; }
  .profile-links { gap: 19px; }
  .experience { padding: 28px 0; }
  .experience-grid { grid-template-columns: 1fr; gap: 22px; }
  .experience-grid article + article { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; }
  .company-line { display: flex; }
  .research { padding-top: 35px; }
  .section-heading { align-items: start; gap: 16px; }
  .section-heading .text-link { margin-top: 30px; }
  .research-group summary { padding: 18px 16px; gap: 10px; align-items: start; }
  .group-count { display: none; }
  .disclosure { margin-top: 2px; }
  .paper-list { padding: 0 16px; }
  .paper { grid-template-columns: 1fr; gap: 18px; padding: 24px 0; }
  .figure-link { margin-top: 0; min-height: 0; }
  .figure-link img { height: auto; max-height: 230px; min-height: 140px; }
  .paper-links a { padding: 5px 12px; }
  .directions { padding: 32px 0; }
  .direction-grid, .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about { padding: 32px 0; }
  footer { padding: 19px 0 25px; }
  dialog { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .profile-links, .enlarge, dialog, .paper-links, footer { display: none; }
  .page { max-width: none; margin: 0; }
  .intro { padding-top: 0; }
  .research-group { break-inside: auto; }
  .paper { break-inside: avoid; }
  .availability { color: #333; }
  a { color: inherit; }
  details:not([open]) { display: none; }
}
