/* Shared visual language with the personal homepage. */
:root {
  --bg-color: #F4EFE6;
  --text-color: #1A1815;
  --secondary-text: #6A6258;
  --border-color: #E2D9CD;
  --card-color: #FBF8F3;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  color: var(--text-color);
  background: var(--bg-color);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
a, button { touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }
video { display: block; max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, p { margin-top: 0; }
p { margin-bottom: 1rem; }
strong { font-weight: 600; color: var(--text-color); }
.wrap { max-width: 864px; margin-inline: auto; padding-inline: 2rem; }
h1, h2, .wordmark {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border-color);
}
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.4; margin-bottom: .75rem; }
.site-header { padding-top: 4rem; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.home-link, .nav-links a, .button, .text-link, .footer a {
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2px;
  transition: border-color .2s ease;
}
.home-link:hover, .nav-links a:hover, .button:hover, .text-link:hover, .footer a:hover {
  border-color: var(--text-color);
}
.home-link { font-size: .95rem; font-weight: 500; }
.nav-links { display: flex; gap: 1.25rem; }
.nav-links a { font-size: .85rem; color: var(--secondary-text); }
.button, .text-link { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 500; }
.button { background: none; border-top: 0; border-right: 0; border-left: 0; padding: 0 0 2px; color: var(--text-color); }
.paper-figure figcaption { color: var(--secondary-text); font-size: .85rem; line-height: 1.6; margin-top: 1rem; }
.section { padding-top: 4rem; }
.section-heading { margin-bottom: 2rem; }
.eyebrow { color: var(--secondary-text); font-size: .75rem; letter-spacing: .06em; font-weight: 500; margin-bottom: .75rem; }
.lede { font-size: 1.1rem; color: var(--secondary-text); line-height: 1.5; }
.contribution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2.5rem; }
.contribution-grid article { border-top: 1px solid var(--border-color); padding-top: 1rem; }
.index { display: block; font-family: 'Newsreader', serif; color: var(--secondary-text); font-size: 1.15rem; margin-bottom: .75rem; }
.contribution-grid p, .method-steps p { font-size: .9rem; color: var(--secondary-text); }
.abstract { border-top: 1px solid var(--border-color); padding-top: 2rem; }
.abstract h3 { font-family: 'Newsreader', serif; font-weight: 500; font-size: 1.5rem; }
.abstract p { font-size: 1rem; color: var(--secondary-text); line-height: 1.75; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.stats strong { display: block; font-family: 'Newsreader', serif; font-size: 2.75rem; font-weight: 500; line-height: 1.2; }
.stats strong span { font-size: 1.4rem; }
.stats p { font-size: .8rem; color: var(--secondary-text); margin-top: .75rem; }
.paper-figure {
  padding: 1.5rem;
  background: var(--card-color);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(163, 149, 134, .15), 0 4px 12px rgba(163, 149, 134, .1);
}
.paper-figure img { width: 100%; }
.paper-figure a { display: block; }
.gripper-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}
.gripper-tabs a {
  padding: .48rem .85rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-color);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}
.gripper-tabs a:hover { border-color: #765033; }
.gripper-tabs a[aria-selected="true"] { background: #302823; border-color: #302823; color: #fff; }
.gripper-tabs a:focus-visible { outline: 2px solid #ae5c23; outline-offset: 3px; }
.gripper-panel > .cad-viewer { margin-top: .8rem; }
.split-copy { display: grid; grid-template-columns: 1fr 1.7fr; gap: 2rem; margin: 3rem 0 1.5rem; }
.split-copy h3 { font-family: 'Newsreader', serif; font-size: 1.75rem; font-weight: 500; }
.split-copy p { color: var(--secondary-text); }
.method-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.method-steps span { font-size: .7rem; color: var(--secondary-text); }
.method-steps h3 { margin-top: .75rem; }
.result-intro h3 { font-family: 'Newsreader', serif; font-size: 1.6rem; font-weight: 500; }
.result-intro p { color: var(--secondary-text); }
.spaced { margin-top: 3rem; }
.chart-panel { background: var(--card-color); padding: 1.5rem; border: 1px solid var(--border-color); border-radius: 12px; margin: 1.5rem 0; }
.chart-top { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.chart-label { font-size: .75rem; color: var(--secondary-text); }
.task-buttons { display: flex; flex-wrap: wrap; gap: .3rem; }
.task-buttons button { font-size: .75rem; background: transparent; color: var(--secondary-text); border: 1px solid var(--border-color); border-radius: 5px; padding: .35rem .6rem; }
.task-buttons button[aria-pressed=true] { background: var(--text-color); border-color: var(--text-color); color: var(--card-color); }
.bar-chart { display: grid; gap: 1rem; margin-top: 1.5rem; }
.bar-row { display: grid; grid-template-columns: 115px 1fr 45px; align-items: center; gap: .75rem; font-size: .8rem; }
.bar-track { height: 17px; background: #EAE2D6; border-radius: 2px; }
.bar-fill { height: 100%; background: #ACA18E; border-radius: 2px; transition: width .25s; }
.bar-row.ours .bar-fill { background: #685A49; }
.bar-row.ours { font-weight: 600; background: none; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow: auto; border: 1px solid var(--border-color); border-radius: 10px; background: var(--card-color); }
table { width: 100%; border-collapse: collapse; font-size: .8rem; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-size: .75rem; padding: 1rem; color: var(--secondary-text); border-bottom: 1px solid var(--border-color); }
th, td { padding: .8rem .85rem; border-bottom: 1px solid var(--border-color); }
thead th { font-size: .72rem; font-weight: 500; color: var(--secondary-text); }
th:first-child { text-align: left; }
tbody th { font-weight: 500; }
tbody tr:last-child > * { border-bottom: 0; }
tr.ours { background: #EEE5D8; }
tr.ours td, tr.ours th { font-weight: 600; }
.small-note { color: var(--secondary-text); font-size: .8rem; margin-top: 1rem; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.data-details { margin-top: 2rem; border-block: 1px solid var(--border-color); }
.data-details summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; font-weight: 500; }
.data-details p { color: var(--secondary-text); font-size: .9rem; }
.data-details .paper-figure { margin: 1.5rem 0; }
.demo-heading .section-heading { margin-bottom: 1rem; }
.small { font-size: .8rem; margin-bottom: 2rem; }
.demo-grid { display: flex; flex-direction: column; gap: 2.5rem; }
.demo-card { display: grid; grid-template-columns: 1.8fr 1fr; grid-template-rows: auto 1fr; column-gap: 1.5rem; align-items: start; }
.clip-frame { grid-row: 1 / 3; background: #101010; border-radius: 12px; overflow: hidden; min-width: 0; }
.clip-frame video { width: 100%; aspect-ratio: 1.73; object-fit: contain; }
.demo-card h3 { margin-bottom: .5rem; }
.demo-card p { font-size: .9rem; color: var(--secondary-text); }
.full-video { margin-top: 2.5rem; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.full-video summary { padding: 1.25rem; display: flex; align-items: center; gap: 1rem; font-size: 1rem; font-weight: 500; }
.video-meta { margin-left: auto; font-size: .75rem; color: var(--secondary-text); font-weight: 400; }
.full-video video { width: 100%; aspect-ratio: 16 / 9; background: #101010; }
.full-video p { padding: .5rem 1.25rem; font-size: .8rem; color: var(--secondary-text); }
.closing { margin-top: 4rem; padding-top: 2rem; }
.closing h2 { border: none; }
.footer { margin-top: 4rem; padding-top: 2rem; padding-bottom: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border-color); color: var(--secondary-text); font-size: .8rem; }
.footer p { margin: 0; }
.footer .wordmark { font-size: 1.25rem; }
.skip { position: absolute; top: -70px; left: 1rem; padding: .75rem; background: var(--text-color); color: var(--card-color); z-index: 5; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid #685A49; outline-offset: 4px; }
@media (max-width: 600px) {
  .wrap { padding-inline: 1.5rem; }
  .site-header { padding-top: 2rem; }
  .nav { gap: .75rem; }
  .nav-links { gap: .75rem; }
  .nav-links a { font-size: .75rem; }
  .nav-links a:first-child { display: none; }
  .button, .text-link { font-size: .8rem; }
  .section { padding-top: 3rem; }
  .contribution-grid, .method-steps { grid-template-columns: 1fr; gap: 1.5rem; }
  .method-steps article { border-top: 1px solid var(--border-color); padding-top: 1rem; }
  .contribution-grid .index { margin-bottom: .5rem; }
  .stats { gap: .75rem; }
  .stats strong { font-size: 2rem; }
  .stats strong span { font-size: 1rem; }
  .stats p { font-size: .7rem; }
  .stats p br { display: none; }
  .paper-figure { padding: .75rem; border-radius: 12px; }
  .paper-figure figcaption { font-size: .75rem; }
  .split-copy { grid-template-columns: 1fr; gap: .5rem; }
  .split-copy h3 br { display: none; }
  .chart-panel { padding: 1rem; }
  .bar-row { grid-template-columns: 95px 1fr 36px; gap: .5rem; font-size: .7rem; }
  .demo-card { grid-template-columns: 1fr; grid-template-rows: auto; }
  .clip-frame { grid-row: auto; margin-bottom: 1rem; }
  .full-video summary { padding: 1rem; flex-wrap: wrap; font-size: .9rem; }
  .video-meta { font-size: .7rem; }
  .closing { margin-top: 3rem; }
  .footer { flex-wrap: wrap; margin-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
