:root {
  --bg: #f5f9fd;
  --card: #ffffff;
  --text: #1d2939;
  --muted: #5b6b80;
  --line: #dde8f3;
  --blue: #2f86d4;
  --blue-dark: #1f6db3;
  --blue-soft: #e6f1fc;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }

/* Top nav */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 249, 253, .85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav .inner {
  max-width: 1040px; margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { font-weight: 700; color: var(--text); font-size: 1.02rem; white-space: nowrap; }
.brand:hover { color: var(--blue); text-decoration: none; }
.topnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.topnav ul::-webkit-scrollbar { display: none; }
.topnav ul a {
  display: block; padding: 6px 12px; border-radius: 8px;
  color: var(--muted); font-size: .92rem; font-weight: 500; white-space: nowrap;
}
.topnav ul a:hover, .topnav ul a.active { color: var(--blue-dark); background: var(--blue-soft); text-decoration: none; }

/* Home layout */
.page {
  max-width: 1040px; margin: 0 auto; padding: 48px 24px 40px;
  display: grid; grid-template-columns: 260px 1fr; gap: 56px;
}
.page > * { min-width: 0; }
.profile { position: sticky; top: 100px; align-self: start; }
.avatar {
  width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #8cc8f5, #3d93db);
  color: #fff; font-size: 2.6rem; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 8px 24px -10px rgba(47,134,212,.6);
  margin-bottom: 22px;
}
.profile h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 6px; font-weight: 700; }
.profile .role { color: var(--muted); font-size: .95rem; margin: 0 0 22px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links a, .links span { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .93rem; }
.links span { color: var(--muted); }
.links a:hover { color: var(--blue); text-decoration: none; }
.links svg { width: 17px; height: 17px; color: var(--blue); flex-shrink: 0; }

/* Subpage layout */
.subpage { max-width: 780px; margin: 0 auto; padding: 48px 24px 40px; }
.page-title { font-size: 2rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; }
.page-intro { color: var(--muted); margin: 0 0 32px; }

/* Sections */
main section { margin-bottom: 44px; }
h2 {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 16px;
  padding-bottom: 8px; border-bottom: 2px solid var(--line);
}
.bio p { margin: 0 0 14px; font-size: 1.05rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span {
  background: var(--blue-soft); color: var(--blue-dark);
  font-size: .84rem; font-weight: 500; padding: 5px 12px; border-radius: 999px;
}

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.item-head { display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; }
.item h3 { font-size: 1rem; margin: 0; font-weight: 600; }
.date { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.sub { color: var(--muted); font-size: .92rem; margin: 2px 0 0; }
.item ul { margin: 10px 0 0; padding-left: 18px; color: #344255; font-size: .94rem; }
.item ul li { margin-bottom: 4px; }
.item ul li b { font-weight: 600; color: var(--text); }
.project { margin-top: 14px; }
.project h4 { font-size: .95rem; margin: 0; font-weight: 600; }
.project h4 span { color: var(--muted); font-weight: 400; }
.project ul { margin-top: 4px; }

.pub .title { font-weight: 600; margin: 0 0 4px; }
.pub .authors { color: var(--muted); font-size: .92rem; margin: 0 0 6px; }
.pub .authors b { color: var(--text); font-weight: 600; }
.venue { font-size: .9rem; font-style: italic; color: #344255; }
.badge {
  display: inline-block; font-size: .76rem; font-weight: 600;
  background: #fff4d6; color: #8a5a00; padding: 2px 8px; border-radius: 6px; margin-left: 6px;
}
.note { color: var(--muted); font-size: .88rem; margin: 4px 0 0; }

.simple { list-style: none; margin: 0; padding: 0; }
.simple li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem;
}
.simple li:last-child { border-bottom: 0; }
.simple .date { min-width: 64px; }
.news li { justify-content: flex-start; }
.more { display: inline-block; margin-top: 12px; font-size: .9rem; font-weight: 600; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
a.proj { display: flex; flex-direction: column; color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s; }
a.proj:hover { text-decoration: none; border-color: #a9cff2; box-shadow: 0 8px 22px -14px rgba(47,134,212,.55); transform: translateY(-2px); }
.proj img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.proj h3 { margin-bottom: 4px; }
.proj p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; flex: 1; }
.proj .go { font-size: .88rem; font-weight: 600; color: var(--blue); }
.proj.play { grid-column: 1 / -1; flex-direction: row; gap: 20px; align-items: center; }
.proj.play img { width: 200px; height: 130px; margin: 0; flex-shrink: 0; }
.proj.play > div { display: flex; flex-direction: column; }

footer {
  max-width: 1040px; margin: 0 auto; padding: 20px 24px 40px;
  color: var(--muted); font-size: .85rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

@media (max-width: 820px) {
  .topnav .inner { height: auto; padding-top: 10px; padding-bottom: 8px; flex-direction: column; align-items: stretch; gap: 4px; }
  .topnav ul { margin: 0 -12px; }
  .page { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; }
  .subpage { padding-top: 32px; }
  .profile { position: static; text-align: center; }
  .avatar { margin: 0 auto 18px; width: 112px; height: 112px; font-size: 2.2rem; }
  .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
  .proj.play { flex-direction: column; align-items: stretch; }
  .proj.play img { width: 100%; }
}

/* Section heading link */
h2 { display: flex; justify-content: space-between; align-items: baseline; }
h2 a { font-size: .82rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
.pub .title a { color: var(--text); }
.pub .title a:hover { color: var(--blue); }

/* Detail pages */
.crumb { display: inline-block; font-size: .9rem; font-weight: 500; margin-bottom: 14px; }
.detail-title { font-size: 1.8rem; line-height: 1.3; font-weight: 700; margin: 0 0 12px; letter-spacing: -.01em; }
.detail-meta { color: var(--muted); margin: 0 0 6px; }
.detail-meta b { color: var(--text); font-weight: 600; }
.detail-venue { margin: 0 0 22px; }
.detail-venue .venue { font-size: 1rem; }
.linkbtns { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; }
.linkbtns a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; font-size: .9rem; font-weight: 600;
  background: var(--blue-soft); color: var(--blue-dark);
}
.linkbtns a:hover { background: #d6e9fb; text-decoration: none; }
.detail section { margin-bottom: 32px; }
.detail p { margin: 0 0 12px; }
.detail ul { margin: 0; padding-left: 20px; }
.detail ul li { margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.detail-venue + .note { margin: -14px 0 28px; }

/* Research project cards */
a.rcard { display: block; color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s; }
a.rcard:hover { text-decoration: none; border-color: #a9cff2; box-shadow: 0 8px 22px -14px rgba(47,134,212,.55); transform: translateY(-2px); }
.rcard h3 { font-size: 1.05rem; }
.rcard .desc { margin: 8px 0 12px; color: #344255; font-size: .95rem; }
.publine {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: .9rem;
}
.publine .label {
  flex-shrink: 0; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue-dark); background: var(--blue-soft); padding: 2px 8px; border-radius: 5px; margin-top: 2px;
}
.publine .ptitle { font-weight: 600; }
.publine .venue { font-size: .88rem; }
.rcard .go { display: inline-block; margin-top: 10px; font-size: .88rem; font-weight: 600; color: var(--blue); }
.citation { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.citation .title { font-weight: 600; margin: 0 0 4px; }
.citation .authors { color: var(--muted); font-size: .92rem; margin: 0 0 6px; }
.citation .authors b { color: var(--text); }
.simple li > span:first-child { flex: 1; min-width: 0; }
.simple .date { text-align: right; }
@media (max-width: 560px) { .projects { grid-template-columns: 1fr; } }

/* Plain inline links (homepage experience rows) */
a.plain { color: var(--text); }
a.plain:hover { color: var(--blue); text-decoration: none; }

/* ---------- Project pages ---------- */
.pp { max-width: 860px; margin: 0 auto; padding: 40px 24px 40px; }
.pp-hero { text-align: center; margin: 8px 0 34px; }
.pp-title { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.25; font-weight: 700; letter-spacing: -.015em; margin: 0 0 16px; }
.pp-title span { color: var(--blue); }
.pp-authors { font-size: 1rem; margin: 0 0 6px; }
.pp-authors a { color: var(--text); border-bottom: 1px solid #b9d7f2; }
.pp-authors a:hover { color: var(--blue); text-decoration: none; }
.pp-authors b { font-weight: 700; }
.pp-authors sup, .pp-affil sup { color: var(--blue); font-size: .7em; margin-left: 1px; }
.pp-affil { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.pp-venue { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-bottom: 22px; }
.pp-venue .chip { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; font-size: .88rem; padding: 4px 12px; border-radius: 999px; }
.pp-venue .badge { margin: 0; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
.pp-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pp-links a, .pp-links span {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px; font-size: .92rem; font-weight: 600;
  background: var(--text); color: #fff; transition: background .2s, transform .15s;
}
.pp-links a:hover { background: var(--blue-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.pp-links span { background: #e3e9f0; color: var(--muted); cursor: default; }
.pp-links svg { width: 16px; height: 16px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 0 0 40px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-align: center; }
.stat b { display: block; font-size: 1.6rem; font-weight: 700; color: var(--blue-dark); line-height: 1.2; }
.stat span { font-size: .84rem; color: var(--muted); }

.pp section { margin-bottom: 44px; }
.pp p { margin: 0 0 12px; }
.lead { font-size: 1.08rem; }
.figure { margin: 18px 0 0; }
.figure img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: block; }
.figure figcaption { color: var(--muted); font-size: .86rem; margin-top: 8px; }

.finding { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
.finding .kicker { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.finding h3 { font-size: 1.15rem; margin: 4px 0 8px; }
.finding > p { color: #344255; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.legend .sw { width: 14px; height: 10px; border-radius: 2px; background: var(--blue); }
.legend .sw.neg { background: #d9622b; }
.legend .tick { width: 0; height: 14px; border-left: 2px dashed #5b6b80; }
.legend .ci { width: 14px; height: 2px; background: var(--text); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; background: #e9f0f7; border-radius: 9px; padding: 3px; }
.seg button {
  border: 0; background: transparent; font: 500 .85rem var(--sans); color: var(--muted);
  padding: 5px 12px; border-radius: 7px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--blue-dark); box-shadow: 0 1px 3px rgba(16,40,80,.12); font-weight: 600; }

.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 64px; align-items: center; gap: 12px; padding: 4px 6px; border-radius: 8px; outline: none; }
.bar-row:hover, .bar-row:focus-visible { background: var(--blue-soft); }
.bar-label { font-size: .9rem; }
.bar-value { font-size: .88rem; font-variant-numeric: tabular-nums; text-align: right; color: var(--text); font-weight: 600; }
.bar-track { position: relative; height: 22px; }
.bar-zero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: #c4d1de; }
.bar { position: absolute; top: 4px; height: 14px; background: var(--blue); border-radius: 0 4px 4px 0; transition: left .4s, width .4s; }
.bar.neg { background: #d9622b; border-radius: 4px 0 0 4px; }
.bar-ci { position: absolute; top: 10px; height: 2px; background: var(--text); }
.bar-ci::before, .bar-ci::after { content: ""; position: absolute; top: -4px; width: 2px; height: 10px; background: var(--text); }
.bar-ci::before { left: 0; } .bar-ci::after { right: 0; }
.bar-base { position: absolute; top: -2px; bottom: -2px; border-left: 2px dashed #5b6b80; }
.viz-tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 260px;
  background: #1d2939; color: #fff; font-size: .82rem; line-height: 1.45;
  padding: 8px 11px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.viz-tip b { color: #9fd0ff; }
.data-table { margin-top: 10px; font-size: .85rem; }
.data-table summary { cursor: pointer; color: var(--blue); font-weight: 500; }
.table-wrap { overflow-x: auto; }
.data-table table { border-collapse: collapse; margin-top: 8px; min-width: 100%; }
.data-table th, .data-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th { color: var(--muted); font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.tile { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.tile .pair { font-size: .8rem; font-weight: 600; color: var(--muted); }
.tile .nums { display: flex; justify-content: space-between; margin-top: 6px; font-size: .9rem; }
.tile .nums b { display: block; font-size: 1.35rem; color: var(--blue-dark); }

.steps { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.step-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); background: #f9fbfe; }
.step-tabs button {
  flex: 1 0 auto; border: 0; background: transparent; cursor: pointer;
  font: 500 .86rem var(--sans); color: var(--muted); padding: 12px 14px; border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.step-tabs button i {
  font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #e3ebf4; font-size: .78rem; font-weight: 700;
}
.step-tabs button[aria-selected="true"] { color: var(--blue-dark); border-bottom-color: var(--blue); background: #fff; }
.step-tabs button[aria-selected="true"] i { background: var(--blue); color: #fff; }
.step-panel { padding: 20px 22px; }
.step-panel h4 { margin: 0 0 6px; font-size: 1rem; }
.step-panel p { color: #344255; margin: 0; }
.step-panel .tools { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.step-panel .tools span { font-size: .78rem; background: var(--blue-soft); color: var(--blue-dark); padding: 2px 9px; border-radius: 999px; }

.bib { position: relative; }
.bib pre {
  margin: 0; background: #1d2939; color: #dce8f6; border-radius: 12px;
  padding: 18px 20px; font-size: .8rem; line-height: 1.55; overflow-x: auto;
}
.bib button {
  position: absolute; top: 10px; right: 10px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font: 600 .78rem var(--sans); padding: 5px 10px; border-radius: 6px;
}
.bib button:hover { background: rgba(255,255,255,.22); }

@media (max-width: 640px) {
  .bar-row { grid-template-columns: 96px 1fr 52px; gap: 8px; }
  .bar-label { font-size: .82rem; }
  .tiles { grid-template-columns: 1fr; }
  .finding { padding: 18px 16px; }
}

/* Sentence figure */
.sentence { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.pair-text { margin: 0 0 6px !important; font-size: .98rem; }
.pair-text span { display: inline-block; width: 30px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.pair-text .de { color: #c4521f; } .pair-text .en { color: #2a78d6; }
.legend .ln { width: 18px; height: 0; border-top: 2.5px solid; }
.legend .ln.de { border-color: #eb6834; } .legend .ln.en { border-color: #2a78d6; }
.legend .ln.dash { border-top: 2px dashed #8796a8; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); cursor: pointer; }
.fig-scroll { overflow-x: auto; margin: 4px -6px 0; }
#fig2 { display: block; width: 100%; min-width: 600px; height: auto; font-family: var(--sans); }
#fig2 .f-title { font-size: 12px; font-weight: 600; fill: var(--muted); }
#fig2 .f-axis { font-size: 10.5px; fill: #7a8899; }
#fig2 .f-grid { stroke: #edf2f7; stroke-width: 1; }
#fig2 .f-grid.mean { stroke: #c9d6e3; stroke-dasharray: 3 3; }
#fig2 .f-word { fill: transparent; stroke: #e1e8f0; stroke-width: 1; transition: fill .15s; }
#fig2 .f-word.aligned { fill: #f7fafd; }
#fig2 .f-word.hot { fill: #fff3d6; stroke: #f0c060; }
#fig2 .f-token { font-size: 11.5px; fill: var(--text); cursor: default; }
#fig2 .f-token.hot { font-weight: 700; }
#fig2 .f-token.de { fill: #c4521f; } #fig2 .f-token.en { fill: #2a78d6; }
#fig2 .f-voiced { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
#fig2 .f-interp { fill: none; stroke-width: 1; stroke-dasharray: 3 2.5; opacity: .55; }
#fig2 .f-link { fill: none; stroke: #b9c6d4; stroke-width: 1.5; transition: stroke .15s, stroke-width .15s; }
#fig2 .f-link.hot { stroke: #e0a020; stroke-width: 2.5; }
#fig2 .f-links.off { display: none; }
#fig2 .f-cross { stroke: #1d2939; stroke-width: 1; stroke-dasharray: 2 2; }
#fig2 .f-dot { stroke: #fff; stroke-width: 2; }
#fig2 .f-band { fill: transparent; transition: fill .15s; }
#fig2 .f-band.hot { fill: rgba(42,120,214,.07); }
#fig2 .f-sep { stroke: #dfe6ee; stroke-dasharray: 2 2; }
#fig2 .f-reorder { fill: #fff1ea; }
#fig2 .f-note { font-size: 10.5px; fill: #c4521f; }
#fig2 .f-rho { font-size: 13px; font-weight: 700; fill: var(--text); }
.readout { min-height: 1.5em; font-size: .9rem; color: #344255; margin: 8px 0 0 !important; }
.fig-credit { font-size: .78rem; color: var(--muted); margin: 4px 0 0 !important; }

[hidden] { display: none !important; }

/* Experience detail (job) pages */
.job-hero {
  display: flex; gap: 22px; align-items: center;
  background: linear-gradient(135deg, #e6f1fc 0%, #f5f9fd 60%, #ffffff 100%);
  border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; margin: 6px 0 36px;
}
.job-icon {
  flex-shrink: 0; width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(140deg, #8cc8f5, #3d93db); color: #fff;
  box-shadow: 0 10px 24px -12px rgba(47,134,212,.7);
}
.job-icon svg { width: 34px; height: 34px; }
.job-kicker { margin: 0 0 2px !important; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.job-title { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; }
.job-org { margin: 4px 0 10px !important; font-size: 1.05rem; color: var(--muted); }
.job-org a { font-weight: 600; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.job-meta span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; }

.contrib { display: grid; grid-template-columns: 56px 1fr; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px 20px 18px; margin-bottom: 16px; }
.contrib-num { font-size: 1.6rem; font-weight: 800; color: #b9d7f2; line-height: 1; padding-top: 2px; text-align: center; }
.contrib h3 { margin: 0 0 6px; font-size: 1.1rem; }
.contrib p { color: #344255; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tagrow span { font-size: .8rem; background: var(--blue-soft); color: var(--blue-dark); padding: 3px 10px; border-radius: 999px; }

.flow { display: flex; align-items: stretch; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; }
.flow-node {
  flex: 1 1 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px; cursor: pointer;
  font: inherit; color: var(--text); transition: border-color .2s, background .2s, transform .15s;
}
.flow-node:hover { border-color: #a9cff2; transform: translateY(-2px); }
.flow-node.mine { background: #eaf4fd; border-color: #a9cff2; }
.flow-node.on { border-color: var(--blue); background: #fff; box-shadow: 0 6px 18px -10px rgba(47,134,212,.6); }
.flow-ico { font-size: 1.5rem; }
.flow-node b { font-size: .92rem; }
.flow-node small { color: var(--muted); font-size: .78rem; }
.flow-arrow { align-self: center; color: var(--blue); font-size: 1.3rem; font-weight: 700; }
.flow-detail { font-size: .92rem; color: #344255; background: var(--bg); border-radius: 10px; padding: 10px 14px; margin: 6px 0 0 !important; }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.skill { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.skill span { font-size: 1.4rem; }
.skill b { font-size: .95rem; }
.skill small { color: var(--muted); font-size: .84rem; }

@media (max-width: 640px) {
  .job-hero { flex-direction: column; align-items: flex-start; padding: 22px; }
  .contrib { grid-template-columns: 1fr; padding: 20px 18px; }
  .contrib-num { text-align: left; }
  .flow-arrow { transform: rotate(90deg); width: 100%; text-align: center; }
}

/* Distribution chart */
.sub-h { margin: 26px 0 4px; font-size: 1rem; }
.thr { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.thr b { color: var(--text); font-variant-numeric: tabular-nums; min-width: 2.6em; }
.thr input { width: 150px; accent-color: var(--blue); }
.dist-legend { margin: 2px 0 6px; }
.legend .ln.mean { border-top: 2px dashed #1d2939; }
.legend .ln.zero { border-top: 1.5px solid #9aa8b8; }
#dist { display: block; width: 100%; min-width: 600px; height: auto; font-family: var(--sans); }
#dist .d-grid { stroke: #edf2f7; }
#dist .d-axis { font-size: 10.5px; fill: #7a8899; }
#dist .d-bar { fill: #9cc7ee; transition: fill .15s; }
#dist .d-bar.above { fill: var(--blue); }
#dist .d-bar.hot { fill: #1f5fa8; }
#dist .d-thr { fill: rgba(47,134,212,.06); }
#dist .d-thrline { stroke: var(--blue); stroke-width: 1.5; }
#dist .d-zero { stroke: #9aa8b8; stroke-width: 1.2; }
#dist .d-mean { stroke: #1d2939; stroke-width: 1.5; stroke-dasharray: 4 3; }
#dist .d-shuf { stroke: #5b6b80; stroke-width: 1.5; stroke-dasharray: 2 2; }
#dist .d-label { font-size: 11px; font-weight: 600; fill: #1d2939; }
#dist .d-label.muted { fill: #5b6b80; font-weight: 500; }
#dist .d-step { fill: none; stroke-width: 2; stroke-linejoin: round; }
#dist .d-hit { fill: transparent; }
#dist .d-hit.hot { fill: rgba(29,41,57,.06); }
.readout .muted { color: var(--muted); }

.page, footer { position: relative; z-index: 1; }

/* Painting card + page */
.proj.art img { width: 150px; height: 190px; object-fit: cover; object-position: top; }
.art-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 8px; }
.art-frame { margin: 0; }
.art-zoom { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; }
.art-zoom img {
  width: 100%; display: block; border-radius: 6px;
  box-shadow: 0 2px 4px rgba(16,40,80,.08), 0 24px 48px -20px rgba(16,40,80,.45);
  border: 10px solid #fff; transition: transform .3s;
}
.art-zoom:hover img { transform: scale(1.01); }
.art-frame figcaption { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 10px; }
.art-info { padding-top: 8px; }
.art-info .facts { margin: 16px 0 20px; }
.art-info p { color: #344255; }
.muted-note { font-style: italic; color: var(--muted) !important; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,18,32,.88);
  display: grid; place-items: center; padding: 24px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 4px; }
.lb-close { position: absolute; top: 16px; right: 20px; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; }
@media (max-width: 720px) { .art-layout { grid-template-columns: 1fr; } }

.pp-announce {
  display: inline-block; margin: -6px 0 20px !important; padding: 8px 16px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #f3dfa8; color: #5c4600; font-size: .93rem;
}

/* Scroll reveal: only hides content when JS has enabled it */
.reveal-on .reveal { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(3px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), filter .7s; }
.reveal-on .reveal.in { opacity: 1; transform: none; filter: none; }

/* Experience timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, #8cc8f5, #d6e7f7 85%, transparent);
}
.tl-item { position: relative; padding-left: 58px; margin-bottom: 14px; }
.tl-node {
  position: absolute; left: 0; top: 14px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--blue);
  border: 2px solid #b9d7f2; box-shadow: 0 4px 12px -6px rgba(47,134,212,.5);
}
.tl-node svg { width: 19px; height: 19px; }
.tl-item.current .tl-node { background: linear-gradient(140deg, #8cc8f5, #3d93db); color: #fff; border-color: #fff; }
.tl-item.current .tl-node::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #8cc8f5;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.tl-card {
  display: flex; flex-direction: column; gap: 2px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tl-card:hover { text-decoration: none; border-color: #a9cff2; box-shadow: 0 10px 26px -16px rgba(47,134,212,.6); transform: translateX(3px); }
.tl-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.tl-kind { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; }
.tl-kind.research { background: var(--blue-soft); color: var(--blue-dark); }
.tl-kind.industry { background: #e8f6ef; color: #17734d; }
.tl-kind.teaching { background: #f3ecfb; color: #6a3fa3; }
.tl-date { font-size: .84rem; color: var(--muted); white-space: nowrap; }
.tl-card b { font-size: 1rem; }
.tl-org { color: var(--muted); font-size: .92rem; }
.tl-sum { font-size: .9rem; color: #344255; margin-top: 4px; }

/* Honors cards */
.honors { display: grid; grid-template-columns: 1fr; gap: 10px; }
.hon {
  display: flex; align-items: center; gap: 14px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
a.hon:hover { text-decoration: none; border-color: #f0c060; box-shadow: 0 10px 26px -16px rgba(200,140,20,.6); transform: translateY(-2px); }
.hon-ico {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-dark);
}
.hon-ico svg { width: 21px; height: 21px; }
.hon-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hon-body b { font-size: .95rem; }
.hon-body small { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.hon-more { font-size: .8rem; font-weight: 600; color: #a86b00; margin-top: 3px; }
.hon-year { align-self: flex-start; font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.hon.feature {
  grid-column: 1 / -1; padding: 18px 20px;
  background: linear-gradient(120deg, #fff8e6, #fffdf6 60%, #fff);
  border-color: #f3dfa8;
}
.hon.feature .hon-ico { width: 50px; height: 50px; background: linear-gradient(140deg, #ffd66b, #f0a92a); color: #fff; box-shadow: 0 8px 20px -10px rgba(220,150,20,.8); }
.hon.feature .hon-ico svg { width: 25px; height: 25px; }
.hon.feature .hon-body b { font-size: 1.05rem; }
@media (max-width: 560px) { .honors { grid-template-columns: 1fr; } }

/* Profile picture (painting) */
img.avatar { display: block; object-fit: cover; padding: 0; border: 4px solid #fff; background: #3a3a3a;
  box-shadow: 0 10px 28px -12px rgba(16,40,80,.55); }
@media (max-width: 820px) { img.avatar { margin: 0 auto 18px; } }
.tl-kind.athletics { background: #fff1e8; color: #b04a14; }

/* Organization badges (SCAI, CLSP, JHU, Supio) */
.tl-chips { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.org-badge {
  --dot: #8796a8;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em; line-height: 1.5;
  padding: 1px 9px 1px 8px; border-radius: 999px;
  background: #fff; color: #344255; border: 1px solid #d5e1ee;
}
.org-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.org-badge.jhu   { --dot: #002d72; color: #002d72; border-color: #c4d3ea; }
.org-badge.scai  { --dot: #2f86d4; }
.org-badge.clsp  { --dot: #6a5acd; }
.org-badge.supio { --dot: #17a673; }
.badges-row { margin-bottom: 8px; }

/* ---------- Organization pages (SCAI, CLSP, Supio) ---------- */
.org-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--accent, var(--blue));
  border-radius: 16px; padding: 24px 26px; margin: 6px 0 40px;
  box-shadow: 0 14px 34px -26px rgba(16,40,80,.45);
}
.accent-scai  { --accent: #f0a92a; }
.accent-clsp  { --accent: #6a5acd; }
.accent-supio { --accent: #17a673; }
.org-logo {
  width: 112px; height: 112px; border-radius: 14px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); padding: 12px; transition: box-shadow .2s, transform .2s;
}
a.org-logo:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(16,40,80,.5); }
.org-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.clsp-mark { background: linear-gradient(140deg, #7b6ee0, #4b3fb0); border: 0; color: #fff; }
.clsp-mark:hover { text-decoration: none; }
.clsp-mark span { font-size: 1.6rem; font-weight: 800; letter-spacing: .08em; }
.org-kicker { margin: 0 0 2px !important; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.org-title { margin: 0; font-size: clamp(1.4rem, 3.4vw, 1.8rem); line-height: 1.2; }
.org-name { margin: 4px 0 12px !important; color: var(--muted); font-size: 1rem; }
.org-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.org-facts div { display: flex; gap: 6px; font-size: .88rem; }
.org-facts dt { color: var(--muted); }
.org-facts dd { margin: 0; font-weight: 500; }
.org-facts .ext { width: 12px; height: 12px; vertical-align: -1px; }
.org-jhu { width: 120px; height: auto; opacity: .85; align-self: start; margin-top: 4px; }

/* Timeline: the dot is centered on the rail */
.steps-tl { list-style: none; margin: 0; padding: 0; }
.steps-tl li { position: relative; padding: 0 0 22px 34px; }
.steps-tl li::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: -8px; width: 2px; background: #dbe6f2; }
.steps-tl li:last-child { padding-bottom: 0; }
.steps-tl li:last-child::before { display: none; }
.steps-tl .dot {
  position: absolute; left: 1px; top: 2px; width: 14px; height: 14px; border-radius: 50%; z-index: 1;
  background: #fff; border: 2px solid var(--blue); box-sizing: border-box; transition: transform .2s;
}
.steps-tl li:hover .dot { transform: scale(1.25); }
.steps-tl li.award .dot { border-color: #e0a020; background: #ffe7a8; }
.steps-tl li.now .dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(47,134,212,.16); }
.steps-tl .when { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); line-height: 18px; }
.steps-tl li.award .when { color: #a86b00; }
.steps-tl b { display: block; font-size: .98rem; margin-top: 1px; }
.steps-tl p { margin: 2px 0 0 !important; color: #344255; font-size: .92rem; }

/* Featured project card */
.feature-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-card:hover { text-decoration: none; transform: translateY(-3px); border-color: #a9cff2; box-shadow: 0 18px 40px -26px rgba(16,40,80,.55); }
.fc-media { background: #fffdf8; display: grid; place-items: center; min-height: 220px; border-right: 1px solid var(--line); }
.fc-media img { width: 100%; height: 100%; object-fit: contain; }
.fc-body { padding: 22px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fc-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fc-body h3 { margin: 0; font-size: 1.2rem; }
.fc-body p { color: #344255; margin: 0 !important; font-size: .94rem; }
.fc-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.fc-stats span { font-size: .8rem; background: var(--bg); border-radius: 8px; padding: 4px 9px; color: var(--muted); }
.fc-stats b { color: var(--blue-dark); }
.fc-body .go { color: var(--blue); font-weight: 600; font-size: .9rem; margin-top: 4px; }
.spark-wrap { background: linear-gradient(160deg, #f8f6ff, #eef5fd); padding: 18px 14px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.spark { width: 100%; height: auto; }
.spark .sp-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s ease forwards; }
.spark .sp-line.de { stroke: #eb6834; }
.spark .sp-line.en { stroke: #2a78d6; animation-delay: .3s; }
.spark .sp-sep { stroke: #d9e2ee; stroke-dasharray: 2 3; }
.spark .sp-mean { stroke: #c4d1de; stroke-dasharray: 4 3; }
.spark .sp-reorder { fill: rgba(235,104,52,.08); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .spark .sp-line { animation: none; stroke-dashoffset: 0; } }
.spark-legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); justify-content: center; }
.spark-legend span::before { content: ""; display: inline-block; width: 14px; height: 0; border-top: 2.5px solid; vertical-align: middle; margin-right: 5px; }
.spark-legend .de::before { border-color: #eb6834; } .spark-legend .en::before { border-color: #2a78d6; }
.spark-legend .r { font-weight: 700; color: var(--text); } .spark-legend .r::before { display: none; }

/* Supio flow icons + company facts */
.flow-node svg { width: 24px; height: 24px; color: var(--blue); margin-bottom: 4px; }
.kv { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.kv div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

@media (max-width: 720px) {
  .org-card { grid-template-columns: auto 1fr; padding: 20px; gap: 18px; }
  .org-jhu { display: none; }
  .org-logo { width: 84px; height: 84px; }
  .feature-card { grid-template-columns: 1fr; }
  .fc-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
}

/* Research figures use the full card width at their natural proportions. */
.list.eq { gap: 18px; grid-auto-rows: auto; }
.list.eq > li, .list.eq > li > .rcard { height: auto; }
.rcard.with-thumb { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
.rthumb { display: block; width: 100%; overflow: hidden; border-radius: 8px; background: #fff; }
.rthumb img { display: block; width: 100%; height: auto; }
.rbody { min-width: 0; }
.rcard.with-thumb .item-head h3 { font-size: 1.02rem; }
.rcard.with-thumb .sub { font-size: .84rem; margin: 0; }
.rcard.with-thumb .desc { margin: 6px 0 10px; font-size: .88rem; line-height: 1.5; }
.rcard.with-thumb .publine { align-items: flex-start; padding: 7px 10px; gap: 8px; border-radius: 6px; }
.rcard.with-thumb .publine .label { margin-top: 2px; font-size: .64rem; padding: 1px 6px; }
.rcard.with-thumb .publine > div { display: block; min-width: 0; }
.rcard.with-thumb .publine .ptitle { font-size: .84rem; line-height: 1.4; }
.rcard.with-thumb .publine .venue { font-size: .8rem; color: var(--muted); }
.rcard.with-thumb .publine .badge { margin-left: 6px; font-size: .68rem; padding: 1px 6px; }
.tile-note { display: block; margin-top: 6px; font-size: .74rem; color: var(--muted); }
.figure.narrow { max-width: 520px; }

/* ---------- Tone paper: shared figure styles ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: -18px 0 34px; justify-content: center; }
.toc a { font-size: .84rem; font-weight: 500; padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.toc a:hover { color: var(--blue-dark); border-color: #a9cff2; text-decoration: none; }
.ex-tabs { margin: 4px 0 12px; }
.fig-svg { display: block; width: 100%; min-width: 600px; height: auto; font-family: var(--sans); }
.fig-svg.narrow-svg { min-width: 520px; max-width: 760px; }
.fig-svg .f-title { font-size: 12px; font-weight: 600; fill: var(--muted); }
.fig-svg .f-axis { font-size: 10.5px; fill: #7a8899; }
.fig-svg .f-grid { stroke: #edf2f7; }
.fig-svg .f-grid.mean { stroke: #c9d6e3; stroke-dasharray: 3 3; }
.fig-svg .f-shade { fill: #f5f3ef; }
.fig-svg .f-hz { font-size: 13px; fill: var(--text); }
.fig-svg .f-py { font-size: 9.5px; fill: var(--muted); }
.fig-svg .f-hz.hot, .fig-svg .f-py.hot, .fig-svg .f-token.hot { font-weight: 700; fill: #b4781a; }
.fig-svg .f-token { font-size: 11.5px; fill: var(--text); }
.fig-svg .f-voiced { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: opacity .3s; }
.fig-svg .f-voiced.faded { opacity: .3; }
.fig-svg .f-adj { fill: none; stroke-width: 2; stroke-dasharray: 5 3; stroke-linejoin: round; }
.fig-svg .f-interp { fill: none; stroke-width: 1; stroke-dasharray: 2 2.5; opacity: .6; }
.fig-svg .f-link { fill: none; stroke: #b9c6d4; stroke-width: 1.5; transition: stroke .15s, stroke-width .15s; }
.fig-svg .f-link.hot { stroke: #e0a020; stroke-width: 2.6; }
.fig-svg .f-links.off { display: none; }
.fig-svg .f-cross { stroke: #1d2939; stroke-width: 1; stroke-dasharray: 2 2; }
.fig-svg .f-band { fill: transparent; }
.fig-svg .f-band.hot { fill: rgba(42,120,214,.07); }
.fig-svg .f-sep { stroke: #dfe6ee; stroke-dasharray: 2 2; }
.fig-svg .f-reorder { fill: #fdeeee; }
.fig-svg .f-note { font-size: 10.5px; fill: #b0503c; }
.fig-svg .f-rho { font-size: 13px; font-weight: 700; fill: var(--text); }
.fig-svg .tone-line { fill: none; stroke-width: 2.4; stroke-linecap: round; transition: opacity .2s; }
.fig-svg .tone-line.dim, .fig-svg .tone-label.dim { opacity: .15; }
.fig-svg .tone-label { font-size: 11.5px; font-weight: 600; }
.fig-svg .trend-line { stroke-width: 1.4; stroke-dasharray: 5 4; fill: none; }
.fig-svg .d-grid-l { stroke: #edf2f7; }
.fig-svg .d-zero-l { stroke: #9aa8b8; stroke-width: 1.2; }
.fig-svg .d-lab { font-size: 11.5px; font-weight: 600; }
.legend .ln.adj { border-top: 2px dashed #9a3d12; }
.legend .ln.ja { border-color: #d4588a; border-top-width: 2.5px; border-top-style: solid; }
.tone-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tone-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font: 500 .82rem var(--sans); color: var(--text); padding: 3px 10px; border-radius: 999px;
}
.tone-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tone-chip.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
.mix-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; }
.mix-row input { flex: 1; accent-color: var(--blue); }
.mini-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 10px; font: 600 .8rem var(--sans); color: var(--muted); cursor: pointer; }
.mini-btn:hover { color: var(--blue-dark); border-color: #a9cff2; }
.pick { display: inline-flex; align-items: center; gap: 6px; }
.pick select { font: 500 .85rem var(--sans); padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); }
.sw-a, .sw-b { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.sw-a { background: #2a78d6; } .sw-b { background: #eb6834; }
.kv.compact { margin-top: 16px; }
.kv.compact div { grid-template-columns: 210px 1fr; padding: 8px 14px; font-size: .86rem; }
@media (max-width: 640px) { .kv.compact div { grid-template-columns: 1fr; } }
.followup { display: block; color: var(--text); }
.followup:hover { text-decoration: none; border-color: #a9cff2; box-shadow: 0 8px 22px -14px rgba(47,134,212,.55); }
.followup h3 { font-size: 1.02rem; margin: 4px 0 6px; }
.followup .desc { margin: 0 0 8px; color: #344255; font-size: .93rem; }
.followup .go { font-size: .88rem; font-weight: 600; color: var(--blue); }
.fu-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Highlighted header buttons (PDF, related paper) */
.pp-links a.hl { background: linear-gradient(120deg, #2563eb, #0ea5e9); color: #fff; box-shadow: 0 8px 22px -10px rgba(37,99,235,.7); }
.pp-links a.hl:hover { background: linear-gradient(120deg, #1d4ed8, #0284c7); }
/* the first figure sits right under the title */
.pp-hero { margin-bottom: 26px; }
.pp-hero + section { margin-bottom: 36px; }

/* Autoplay control */
.play-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font: 600 .8rem var(--sans); color: var(--blue-dark); padding: 5px 11px; border-radius: 999px;
}
.play-btn:hover { border-color: #a9cff2; }
.play-btn span { font-size: .7rem; }
.autoplaying .readout::before {
  content: "Auto-playing · hover to explore"; display: inline-block; margin-right: 8px;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--blue); padding: 2px 8px; border-radius: 999px; vertical-align: 1px;
}

/* Keep cards and figure controls inside narrow phone screens. */
@media (max-width: 640px) {
  .rcard.with-thumb { grid-template-columns: minmax(0, 1fr); }
  .rthumb { width: 100%; }
  .list.eq { grid-auto-rows: auto; }
  .list.eq > li, .list.eq > li > .rcard { height: auto; }
  .seg { max-width: 100%; flex-wrap: wrap; }
  .seg button { flex: 1 1 auto; white-space: normal; }
  .ex-tabs { display: flex; }
  .chart-head, .controls { min-width: 0; max-width: 100%; }
  .sentence { padding: 16px 14px; }
  .readout { overflow-wrap: anywhere; }
  h2 { flex-wrap: wrap; gap: 4px 12px; }
}
@media (max-width: 640px) {
  .tl-top { flex-wrap: wrap; }
  .topnav ul { flex-wrap: wrap; overflow: visible; }
  .topnav ul a { padding-top: 8px; padding-bottom: 8px; }
  .seg button, .play-btn { min-height: 40px; }
}

/* Full author credits remain readable on research cards. */
.card-authors { margin: 4px 0 7px; font-size: .8rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.card-authors strong { color: var(--text); font-weight: 700; }
.links .cv-link { color: var(--blue-dark); font-weight: 700; }

/* Compact homepage entries with a figure filling the left panel. */
.home-research { gap: 12px; }
@media (min-width: 641px) {
  .home-research .rcard.with-thumb {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    gap: 16px; padding: 0; overflow: hidden; align-items: stretch;
  }
  .home-research .rthumb { position: relative; min-height: 200px; border-radius: 0; }
  .home-research .rthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .home-research .rbody { padding: 14px 16px 14px 0; }
  .home-research .item-head h3 { font-size: .98rem; }
  .home-research .card-authors { font-size: .76rem; margin: 4px 0; }
  .home-research .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 5px 0 8px; }
}

/* "Try it with your own voice" callout on research pages */
.voice-cta {
  display: flex; align-items: center; gap: 16px; margin: 16px 0 0; padding: 14px 18px;
  background: linear-gradient(120deg, #eef5fe, #f6fbff); border: 1px solid #c9def4; border-radius: 14px;
  color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.voice-cta:hover { text-decoration: none; border-color: #8cc0ee; box-shadow: 0 10px 26px -18px rgba(37,99,235,.7); transform: translateY(-2px); }
.vc-ico { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(140deg, #2563eb, #0ea5e9); color: #fff; }
.vc-ico svg { width: 21px; height: 21px; }
.vc-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vc-text b { font-size: .98rem; }
.vc-text small { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.vc-go { flex-shrink: 0; font-size: .88rem; font-weight: 600; color: var(--blue); white-space: nowrap; }
@media (max-width: 600px) { .voice-cta { flex-wrap: wrap; } .vc-go { width: 100%; padding-left: 58px; } }
