

  :root{
    --bg:#ffffff; --text:#333333; --muted:#777777; --soft:#f7f7f7;
    --rule:#e5e5e5; --link:#337ab7; --link-h:#23527c;
    --sans:'Montserrat','Helvetica Neue',Arial,sans-serif;
    --mono:'SFMono-Regular','Consolas','Liberation Mono',Menlo,monospace;
    --w:730px;
  }
  *,*::before,*::after{ box-sizing:border-box; }
  html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
  @media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }
  body{
    margin:0; background:var(--bg); color:var(--text);
    font-family:var(--sans); font-size:15px; line-height:1.6;
    -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  }
  a{ color:var(--link); text-decoration:none; }
  a:hover{ color:var(--link-h); text-decoration:underline; }
  img{ max-width:100%; }
  b,strong{ font-weight:600; }

  .page{ max-width:var(--w); margin:0 auto; padding:20px 15px 40px; }

  /* ---------- Header (brand + nav) ---------- */
  .header{
    display:flex; justify-content:space-between; align-items:baseline;
    flex-wrap:wrap; gap:.4rem 1rem;
    border-bottom:1px solid var(--rule); padding-bottom:12px; margin-bottom:26px;
  }
  .brand{ font-size:22px; font-weight:500; color:#333; margin:0; line-height:40px; letter-spacing:.01em; }
  .tabs{ display:flex; flex-wrap:wrap; gap:2px; }
  .tab{
    font-family:var(--sans); font-size:12px; font-weight:500; letter-spacing:.05em;
    text-transform:uppercase; color:var(--link); background:none; border:0; cursor:pointer;
    padding:8px 12px; border-radius:4px; line-height:1; transition:background .15s,color .15s;
  }
  .tab:hover{ color:var(--link-h); background:var(--soft); text-decoration:none; }
  .tab[aria-selected="true"]{ color:#fff; background:var(--link); }
  .tab:focus-visible{ outline:2px solid var(--link); outline-offset:2px; }

  /* ---------- Intro (bio) ---------- */
  .intro{ margin-bottom:38px; }
  .subtitle{ font-size:16px; color:var(--muted); margin:0 0 1.3rem; }
  .abstract{ margin:0; }
  .abstract p{ margin:0; line-height:1.7; }
  .byline{ display:flex; flex-wrap:wrap; align-items:baseline; gap:.3rem .8rem; font-size:13.5px; color:var(--muted); margin-top:1.5rem; }
  .byline .sep{ color:#ccc; }
  .byline .affil{ color:var(--muted); }

  /* ---------- About ---------- */
  .about{ display:flex; gap:1.8rem; align-items:flex-start; }
  .about-photo{ flex:0 0 210px; width:210px; height:auto; border:1px solid var(--rule); border-radius:4px; display:block; }
  .about-text{ flex:1 1 0; min-width:0; }
  .about-text .subtitle{ margin-top:0; }
  @media (max-width:36rem){ .about{ flex-direction:column; gap:1.2rem; } .about-photo{ width:170px; flex-basis:auto; } }

  /* ---------- Sections / panels ---------- */
  main{ margin:0; }
  section.panel{ margin-top:1.6rem; }
  section.panel[hidden]{ display:none; }
  section.panel > p:first-child{ margin-top:0; }
  p{ margin:0 0 1rem; }

  h2.section{ font-size:20px; font-weight:500; color:#333; border-bottom:1px solid var(--rule); padding-bottom:6px; margin:0 0 18px; }
  h2.section .no{ color:var(--link); font-weight:500; margin-right:.4rem; }
  h3.sub{ font-size:18px; font-weight:600; color:#333; margin:30px 0 8px; line-height:1.3; }
  h3.sub:first-of-type{ margin-top:6px; }
  h3.sub .no{ color:var(--link); font-weight:600; margin-right:.45rem; }
  a.ref{ color:var(--link); }

  /* ---------- Experience entries ---------- */
  .entry{ margin-bottom:22px; }
  .entry .role{ font-size:16px; font-weight:600; color:#333; margin:0; }
  .entry .org{ font-size:13px; color:var(--muted); margin:2px 0 6px; }
  .entry .org .dot{ color:#ccc; margin:0 .4rem; }
  .entry .desc{ margin:4px 0 0; }
  .sidenote{ display:block; font-size:12px; color:var(--muted); line-height:1.5; margin:0 0 3px; }
  .sidenote b{ color:#555; font-weight:600; }
  ul.tight{ margin:.3rem 0 0; padding-left:1.15rem; }
  ul.tight li{ margin-bottom:.4rem; }
  ul.tight li::marker{ color:#bbb; }

  /* ---------- Figures / diagrams ---------- */
  figure{ margin:20px 0; }
  .plate{ background:var(--soft); border:1px solid var(--rule); border-radius:4px; padding:18px 16px; overflow-x:auto; }
  figcaption{ font-size:13px; color:var(--muted); margin-top:8px; line-height:1.5; }
  figcaption b{ color:#555; font-weight:600; }
  figure video.vid{ width:100%; height:auto; display:block; border:1px solid var(--rule); border-radius:4px; background:#000; }
  .flow{ display:flex; align-items:stretch; gap:.5rem; min-width:max-content; }
  .flow.col{ flex-direction:column; min-width:0; }
  .node{ flex:1 1 0; min-width:8.5rem; background:#fff; border:1px solid var(--rule); border-radius:4px; padding:.65rem .7rem; display:flex; flex-direction:column; gap:.15rem; justify-content:center; }
  .node .t{ font-size:13px; font-weight:600; color:#333; line-height:1.2; }
  .node .d{ font-family:var(--mono); font-size:10px; color:var(--muted); line-height:1.35; }
  .node.accent{ border-color:var(--link); }
  .node.accent .t{ color:var(--link); }
  .node.frozen{ background:#eee; border-style:dashed; }
  .arrow{ align-self:center; color:#bbb; font-size:1rem; flex:0 0 auto; }

  .photo-row{ display:grid; grid-template-columns:1fr 1fr; gap:.7rem; }
  .photo-row img{ width:100%; height:auto; display:block; border:1px solid var(--rule); border-radius:4px; background:var(--soft); }
  @media (max-width:34rem){ .photo-row{ grid-template-columns:1fr; } }

  /* ---------- Stat row ---------- */
  .stats{ display:grid; grid-template-columns:repeat(auto-fit,minmax(7rem,1fr)); gap:0; margin:16px 0 0; border:1px solid var(--rule); border-radius:4px; overflow:hidden; }
  .stat{ padding:12px 14px; background:var(--soft); border-right:1px solid var(--rule); }
  .stat:last-child{ border-right:0; }
  .stat .v{ font-size:16px; font-weight:600; color:#333; }
  .stat .k{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-top:2px; }

  /* ---------- Preprints ---------- */
  .preprint{ border:1px solid var(--rule); border-radius:4px; padding:18px 20px; margin:0 0 16px; background:#fff; }
  .preprint .status{ font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--link); margin:0 0 8px; }
  .preprint h3{ font-size:17px; font-weight:600; color:#333; margin:0 0 8px; line-height:1.3; }
  .preprint .q{ font-style:italic; color:var(--muted); margin:0 0 10px; }
  .preprint p.body{ font-size:14px; margin:0 0 12px; }
  .tags{ display:flex; flex-wrap:wrap; gap:6px; }
  .tag{ font-size:11px; color:var(--muted); border:1px solid var(--rule); border-radius:3px; padding:2px 8px; }
  .readlink{ font-size:13px; font-weight:500; color:var(--link); }
  .readlink:hover{ text-decoration:underline; }

  /* ---------- Discussion (collapsible) ---------- */
  details.post{ border:1px solid var(--rule); border-radius:4px; background:#fff; margin-bottom:10px; overflow:hidden; }
  details.post > summary{ cursor:pointer; list-style:none; padding:14px 92px 14px 16px; position:relative; transition:background .15s; }
  details.post > summary::-webkit-details-marker{ display:none; }
  details.post > summary:hover{ background:var(--soft); }
  details.post > summary:focus-visible{ outline:2px solid var(--link); outline-offset:-2px; }
  details.post > summary::after{ content:"Read"; position:absolute; right:16px; top:15px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--link); }
  details.post[open] > summary::after{ content:"Close"; }
  details.post[open] > summary{ border-bottom:1px solid var(--rule); }
  .post-meta{ font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin:0; }
  .post-title{ font-size:16px; font-weight:600; color:#333; margin:3px 0 0; line-height:1.3; }
  .post-inner{ padding:16px; }
  details.post > .post-inner{ display:none; }
  details.post[open] > .post-inner{ display:block; }
  a.paper-card{ display:block; border:1px solid var(--rule); border-radius:4px; padding:12px 14px; margin:0 0 16px; background:var(--soft); transition:border-color .15s; }
  a.paper-card:hover{ border-color:var(--link); text-decoration:none; }
  .pc-label{ display:block; font-size:10px; text-transform:uppercase; letter-spacing:.1em; color:var(--link); margin-bottom:4px; }
  .pc-title{ display:block; font-weight:600; color:#333; font-size:15px; line-height:1.3; }
  .pc-meta{ display:block; font-size:12px; color:var(--muted); margin-top:4px; }
  .pipeline{ font-family:var(--mono); font-size:12.5px; color:#333; background:var(--soft); border:1px solid var(--rule); border-radius:4px; padding:10px 12px; margin:0 0 1rem; overflow-x:auto; white-space:nowrap; }
  ul.roles{ list-style:none; padding:0; margin:0 0 1rem; }
  ul.roles li{ font-size:14px; margin-bottom:5px; }
  ul.roles b{ color:var(--link); font-weight:600; }
  ul.roles .ar{ color:#bbb; margin:0 .3rem; }
  .mono{ font-family:var(--mono); font-size:.9em; }

  /* ---------- Footer ---------- */
  footer{ margin-top:40px; padding-top:16px; border-top:1px solid var(--rule); color:var(--muted); font-size:13px; display:flex; flex-wrap:wrap; justify-content:space-between; gap:.3rem 1rem; }
  footer a{ color:var(--muted); }
  footer a:hover{ color:var(--link); }

  ::selection{ background:rgba(51,122,183,.22); }

