:root {
  --ink: #1b2028;
  --muted: #646b7a;
  --accent: #b42c3a;
  --accent-dark: #8f2230;
  --accent-soft: #fbedef;
  --bg-alt: #faf8f7;
  --line: #ece8e7;
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 64px; }

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #fff;
}

.title, .publication-title { font-family: 'Newsreader', Georgia, serif; }

/* ---------- Header ---------- */
.hero {
  padding-top: 2.8rem;
  padding-bottom: 1rem;
  background: radial-gradient(1100px 360px at 50% -130px, var(--accent-soft), #fff 72%);
}

.conf-badge {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: .42rem 1.4rem;
  margin: .4rem 0 1.6rem;
  box-shadow: 0 4px 14px rgba(180, 44, 58, .28);
}

/* ---------- Top nav ---------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 1.2rem;
}
.nav-brand {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--ink);
}
.nav-brand:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: .25rem; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  padding: .42rem .8rem;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover { color: var(--accent); background: var(--accent-soft); }

.nav-dropdown { position: relative; }
.nav-dropdown .more-toggle { color: var(--accent); }
.nav-dropdown .more-toggle .fa-caret-down { transition: transform .18s ease; }
.nav-dropdown:hover .more-toggle .fa-caret-down,
.nav-dropdown.open .more-toggle .fa-caret-down { transform: rotate(180deg); }

.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  min-width: 248px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(20, 20, 30, .16);
  padding: .4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-dropdown:hover .more-menu,
.nav-dropdown.open .more-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.more-menu a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.4rem;
  padding: .55rem .85rem;
  border-radius: 9px;
  color: var(--ink);
  transition: background .12s ease;
}
.more-menu a:hover { background: var(--accent-soft); }
.more-menu .proj { font-weight: 600; }
.more-menu .venue { font-size: .76rem; color: var(--muted); white-space: nowrap; }

/* ---------- TL;DR ---------- */
.tldr {
  max-width: 900px;
  margin: 1.1rem auto 0;
  background: var(--accent-soft);
  border: 1px solid #f1d6da;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  color: var(--ink);
  font-size: .98rem;
  line-height: 1.6;
}
.tldr-tag {
  display: inline-block;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .08em;
  color: #fff;
  background: var(--accent);
  border-radius: 5px;
  padding: .12rem .5rem;
  margin-right: .55rem;
  vertical-align: middle;
}

/* ---------- Method steps ---------- */
.method-intro {
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.method-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.method-steps li {
  position: relative;
  counter-increment: step;
  padding: 0 0 1.15rem 3.2rem;
  line-height: 1.6;
  color: var(--ink);
}
.method-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem; height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  font-size: .95rem;
}
.method-steps li:last-child { padding-bottom: 0; }
.step-name {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .15rem;
}

.publication-title {
  line-height: 1.25;
  margin-bottom: 1.4rem !important;
}

.publication-authors { margin-bottom: .6rem; }

.author-block {
  display: inline-block;
  margin: 0 .35rem;
  white-space: nowrap;
}
.author-block a { color: var(--ink); }
.author-block a:hover { color: var(--accent); }
.author-block sup { color: var(--muted); }

.orcid { font-size: .82em; margin-left: .12rem; }
.orcid i { color: #a6ce39; }

.publication-affiliations {
  color: var(--muted);
  margin-bottom: .3rem;
}
.affil-block { display: inline-block; margin: 0 .55rem; }

.publication-notes {
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.publication-notes span { margin: 0 .45rem; }

/* ---------- Resource buttons ---------- */
.publication-links { margin-top: .4rem; }
.publication-links .link-block { display: inline-block; margin: .25rem .3rem; }
.publication-links .button {
  background: var(--ink);
  border: none;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  transition: transform .12s ease, background .15s ease;
}
.publication-links .button:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
.section { padding-top: 2.6rem; padding-bottom: 2.6rem; }
.teaser-section { padding-top: 1rem; padding-bottom: 1.5rem; }

.title.is-3 { margin-bottom: 1.6rem; }
.section .title.is-3.has-text-centered::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: .75rem auto 0;
  background: var(--accent);
  border-radius: 3px;
}
.section.alt { background: var(--bg-alt); }

.caption {
  color: var(--muted);
  font-size: .92rem;
  margin-top: .8rem;
  text-align: center;
  line-height: 1.5;
}

figure.image img {
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(20, 28, 50, .07);
}

.keywords { color: var(--muted); margin-top: 1rem; }

/* ---------- Video ---------- */
.video-wrap {
  max-width: 880px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(20, 28, 50, .12);
  background: #000;
}
.video-wrap video { display: block; width: 100%; height: auto; }

/* ---------- Carousel ---------- */
.carousel { position: relative; max-width: 960px; margin: 0 auto; }
.carousel-track { overflow: hidden; border-radius: 8px; }
.carousel-slide { display: none; }
.carousel-slide.active { display: block; animation: fade .35s ease; }
.carousel-slide img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}
@keyframes fade { from { opacity: .35; } to { opacity: 1; } }

.carousel-btn {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(31, 36, 51, .78);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.carousel-btn:hover { background: var(--accent); }
.carousel-btn.prev { left: -8px; }
.carousel-btn.next { right: -8px; }

.carousel-dots { text-align: center; margin-top: .9rem; }
.carousel-dots .dot {
  display: inline-block;
  width: 9px; height: 9px;
  margin: 0 4px;
  border-radius: 50%;
  background: #cfd4e0;
  cursor: pointer;
  transition: background .15s ease;
}
.carousel-dots .dot.active { background: var(--accent); }

/* ---------- Experiment tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin: 0 auto 0;
}
.exp-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: .86rem;
  color: var(--ink);
  border-top: 1.5px solid var(--ink);
}
.exp-table thead th {
  font-weight: 700;
  padding: .5rem .7rem;
  text-align: center;
  white-space: nowrap;
}
.exp-table thead tr:first-child th { border-bottom: 1px solid var(--line); }
.exp-table thead tr:last-child th { border-bottom: 1.5px solid var(--ink); }
.exp-table tbody td {
  padding: .42rem .7rem;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.exp-table .lcol { text-align: left; }
.exp-table tbody tr:last-child td { border-bottom: 1.5px solid var(--ink); }
.exp-table .oursname { font-weight: 700; color: var(--accent-dark); }
.exp-table td.r1 { background: #cde9c6; font-weight: 700; }  /* 1st */
.exp-table td.r2 { background: #c8e8d6; }                    /* 2nd */
.exp-table td.r3 { background: #fbeec2; }                    /* 3rd */
.exp-table sup { font-size: .7em; }

/* ---------- BibTeX ---------- */
.bibtex-wrap { position: relative; max-width: 820px; margin: 0 auto; }
.bibtex-wrap pre {
  background: #f6f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem 1.3rem;
  font-size: .86rem;
  overflow-x: auto;
  color: var(--ink);
}
.copy-btn {
  position: absolute;
  top: .6rem; right: .6rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 6px;
  padding: .25rem .6rem;
  font-size: .78rem;
  cursor: pointer;
  transition: all .15s ease;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.copied { color: #2f855a; border-color: #2f855a; }

/* ---------- Footer ---------- */
.footer {
  background: #f6f7fb;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 2.2rem 1.5rem;
  margin-top: 1.5rem;
}
.footer a { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .author-block { white-space: normal; }
  .carousel-btn.prev { left: 2px; }
  .carousel-btn.next { right: 2px; }
}
