@charset "UTF-8";
/* =========================================================================
   Aolong Sun - academic homepage
   Design language reimplemented from the al-folio Jekyll theme
   (alshedivat/al-folio, based on *folio). Accent: Fudan blue.
   Hand-rolled: no Bootstrap / MDB dependency.
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --global-bg-color: #eaeaea;
  --global-code-bg-color: #d4d1d1;
  --global-text-color: #000;
  --global-text-color-light: #828282;
  --global-theme-color: #0f4c99;
  --global-hover-color: #0f4c99;
  --global-hover-text-color: #fff;
  --global-divider-color: rgba(0, 0, 0, 0.1);
  --global-card-bg-color: #fff;
  --global-highlight-color: #b71c1c;
  --global-back-to-top-bg-color: rgba(0, 0, 0, 0.4);
  --global-back-to-top-text-color: #fff;

  --sans: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    sans-serif;
  --slab: "Roboto Slab", "Roboto", Georgia, "Songti SC", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --global-bg-color: #1c1c1d;
  --global-code-bg-color: #2c3237;
  --global-text-color: #e8e8e8;
  --global-text-color-light: #828282;
  --global-theme-color: #4a9eff;
  --global-hover-color: #4a9eff;
  --global-hover-text-color: #fff;
  --global-divider-color: #424246;
  --global-card-bg-color: #212529;
  --global-highlight-color: #ff6b6b;
  --global-back-to-top-bg-color: rgba(255, 255, 255, 0.5);
  --global-back-to-top-text-color: #000;
}

/* ---------- reset / base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding-bottom: 40px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--global-text-color);
  background-color: var(--global-bg-color);
  -webkit-font-smoothing: antialiased;
}
html[data-lang="zh"] body { line-height: 1.75; }

body h1, body h2, body h3, body h4, body h5, body h6 { scroll-margin-top: 66px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 2rem; }

a {
  color: var(--global-theme-color);
  text-decoration: none;
  background-color: transparent;
}
a:hover { color: var(--global-theme-color); text-decoration: underline; }

hr {
  border: 0;
  border-top: 1px solid var(--global-divider-color);
  margin: 1rem 0;
}

img { max-width: 100%; height: auto; vertical-align: middle; border-style: none; }
figure { margin: 0; }

code, pre { font-family: var(--mono); }
pre {
  background-color: var(--global-code-bg-color);
  padding: 10px;
  border-radius: 3px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
}

::selection {
  background: var(--global-theme-color);
  color: var(--global-hover-text-color);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: 930px;
  margin: 0 auto;
  padding: 0 15px;
}
.mt-5 { margin-top: 3rem; }
.rounded { border-radius: 0.25rem; }
.z-depth-1 {
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}
.float-left { float: left; }
.clearfix::after { content: ""; display: table; clear: both; }
.text-center { text-align: center; }

/* ---------- navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0.5rem 0;
  background-color: var(--global-bg-color);
  border-bottom: 1px solid var(--global-divider-color);
  opacity: 0.95;
  box-shadow: none;
}
.navbar > .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.navbar-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.nav-item { position: relative; }
.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--global-text-color);
  font-size: 1rem;
}
.nav-link:hover { color: var(--global-hover-color); text-decoration: none; }
.nav-item.active > .nav-link {
  font-weight: 700;
  color: var(--global-theme-color);
  background-color: inherit;
}

.toggle-container { display: flex; align-items: center; margin-left: 0.35rem; }
.toggle-container button {
  padding: 0.35rem 0.5rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--global-text-color);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
}
.toggle-container button:hover { color: var(--global-hover-color); }
.toggle-container button svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
#lang-toggle { font-weight: 500; letter-spacing: 0.02em; }
#lang-toggle .lang-slot { min-width: 2.1em; text-align: center; }

.navbar-toggler {
  display: none;
  padding: 0.5rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  margin-right: auto;
}
.navbar-toggler .icon-bar {
  display: block;
  width: 22px; height: 2px;
  background-color: var(--global-text-color);
  border-radius: 1px;
  margin-bottom: 4px;
  transition: all 0.2s;
}
.navbar-toggler .icon-bar:last-child { margin-bottom: 0; }
.navbar-toggler:not(.collapsed) .top-bar { transform: rotate(45deg) translate(3px, 4px); }
.navbar-toggler:not(.collapsed) .middle-bar { opacity: 0; }
.navbar-toggler:not(.collapsed) .bottom-bar { transform: rotate(-45deg) translate(3px, -4px); }

/* reading progress */
#progress {
  position: fixed;
  top: 56px; left: 0;
  width: 100%;
  height: 2px;
  z-index: 1029;
  border: 0;
  background-color: transparent;
  appearance: none;
  -webkit-appearance: none;
}
#progress::-webkit-progress-bar { background-color: transparent; }
#progress::-webkit-progress-value { background-color: var(--global-theme-color); }
#progress::-moz-progress-bar { background-color: var(--global-theme-color); }

body.fixed-top-nav { padding-top: 56px; }

/* ---------- post header ---------- */
.post-header { margin-bottom: 1.5rem; }
.post-title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 3rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.post-title .font-weight-bold { font-weight: 700; }
html[data-lang="en"] .post-title .name-zh { display: none; }
.post-title .name-zh {
  display: block;
  font-family: var(--slab);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--global-text-color-light);
  margin-top: 0.35rem;
}
.post-description {
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--global-text-color-light);
}
.post-description a { color: inherit; }
.post-description a:hover { color: var(--global-theme-color); text-decoration: none; }
p.desc {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: var(--global-text-color-light);
}
p.desc strong { color: var(--global-text-color); font-weight: 500; }

/* ---------- profile column ---------- */
.profile { width: 32%; }
.profile.float-left { margin-right: 1rem; margin-bottom: 1rem; }
.profile img { width: 100%; }
/* The reference theme sets this block in monospace, which reads well in SF Mono
   on macOS but resolves to Consolas on Windows and turns clunky at this size.
   Roboto (already loaded) keeps it quiet and consistent with the rest of the page. */
.profile .more-info {
  margin-top: 0.6rem;
  margin-bottom: 5px;
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
  color: var(--global-text-color-light);
}
.profile .more-info p { display: block; margin: 0; }
.profile .more-info a { color: var(--global-text-color-light); }
.profile .more-info a:hover { color: var(--global-theme-color); text-decoration: none; }

.social { text-align: center; }
.social .contact-icons {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  margin-top: 0.35rem;
}
.social .contact-icons a {
  flex: 1;
  text-align: center;
  margin: 0 0.05rem;
  color: var(--global-text-color);
  line-height: 1;
}
.social .contact-icons a svg {
  width: 1.6rem; height: 1.6rem;
  max-width: 1.6rem; max-height: 1.6rem;
  fill: currentColor;
  transition: color 0.2s ease-in-out;
}
.social .contact-icons a:hover { color: var(--global-theme-color); text-decoration: none; }
.social .contact-note {
  font-size: 0.8rem;
  color: var(--global-text-color-light);
  margin-top: 0.5rem;
}


/* Prose sits in a hard column to the right of the floated profile, at the same
   35% the reference theme uses, so no line wraps under the photo and the measure
   stays around 75 characters. This only stays balanced if the bio is kept short
   enough to end near the bottom of the photo block — see BIO in _build/build.py.
   Hyphenation keeps justified English from opening up rivers of whitespace; CJK
   does not need it. */
.post .clearfix {
  margin-bottom: 2rem;
  margin-left: 35%;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.post .clearfix p, .post .clearfix ul, .post .clearfix li { text-align: justify; }
.post .clearfix ul { padding-left: 1.2rem; }
html[data-lang="zh"] .post .clearfix { hyphens: none; -webkit-hyphens: none; }

/* ---------- inline tags ---------- */
.research-interest, .keyword-tag {
  display: inline-block;
  background-color: var(--global-code-bg-color);
  color: var(--global-text-color);
  padding: 0.1rem 0.4rem;
  margin: 0.1rem 0.2rem 0.1rem 0;
  border: 1px solid var(--global-divider-color);
  border-radius: 3px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  text-decoration: none;
}
.research-interest { font-size: 0.9em; }
.keyword-tag { font-size: 0.75em; }
.research-interest:hover, .keyword-tag:hover {
  background-color: var(--global-theme-color);
  color: var(--global-hover-text-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}
.keyword-tag.active {
  background-color: var(--global-theme-color);
  color: var(--global-hover-text-color);
  border-color: var(--global-theme-color);
}

/* ---------- section headings ---------- */
.full-width-section { clear: both; margin-top: 2rem; }
.full-width-section > h2 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}
.full-width-section > h2 a { color: inherit; }
.full-width-section > h2 a:hover { color: var(--global-theme-color); text-decoration: none; }

/* ---------- publications ---------- */
.publications { margin-top: 2rem; }
.publications h2 { margin-bottom: 1rem; }
.publications h2.bibliography {
  color: var(--global-divider-color);
  border-top: 1px solid var(--global-divider-color);
  padding-top: 1rem;
  margin-top: 2rem;
  text-align: right;
  font-size: 2rem;
}
html[data-theme="dark"] .publications h2.bibliography { color: #55555a; }

.publications ol.bibliography { list-style: none; padding: 0; margin-top: 0; }
.publications ol.bibliography > li { margin-bottom: 1.5rem; }
.publications ol.bibliography > li.filtered-out { display: none; }
.publications h2.bibliography.filtered-out { display: none; }

.bib-row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.bib-col-left {
  flex: 0 0 20%; max-width: 20%;
  padding: 0 15px;
  text-align: center;
}
.bib-col-right { flex: 0 0 80%; max-width: 80%; padding: 0 15px; }

.publications ol.bibliography li .abbr { margin-bottom: 0.5rem; }
.publications ol.bibliography li .abbr abbr {
  display: inline-block;
  width: 100%;
  padding: 0.15rem 0.35rem;
  background-color: var(--global-theme-color);
  color: var(--global-card-bg-color) !important;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}
.publications ol.bibliography li .abbr abbr a { color: #fff; }
.publications ol.bibliography li .abbr abbr a:hover { text-decoration: none; }
.publications ol.bibliography li .abbr abbr.award {
  background-color: transparent !important;
  color: var(--global-theme-color) !important;
  border: 1px solid var(--global-theme-color);
}
.publications ol.bibliography li img.preview {
  width: 100%;
  background-color: #fff;
}

.publications ol.bibliography li .title { font-weight: bolder; }
.publications ol.bibliography li .author { font-size: 0.95rem; }
.publications ol.bibliography li .author > em {
  border-bottom: 1px solid;
  font-style: normal;
}
.publications ol.bibliography li .author > span.more-authors {
  color: var(--global-text-color-light);
  border-bottom: 1px dashed var(--global-text-color-light);
  cursor: pointer;
}
.publications ol.bibliography li .author > span.more-authors:hover {
  color: var(--global-text-color);
  border-bottom: 1px dashed var(--global-text-color);
}
.publications ol.bibliography li .periodical { font-size: 0.95rem; }
.publications ol.bibliography li .periodical em { font-style: italic; }
.publications ol.bibliography li .keywords { margin: 0.25rem 0; }

.publications ol.bibliography li .links { margin-top: 0.35rem; }
.publications ol.bibliography li .links a.btn {
  display: inline-block;
  color: var(--global-text-color);
  border: 1px solid var(--global-text-color);
  background: transparent;
  border-radius: 0.25rem;
  padding: 0.25rem 1rem;
  margin: 0 0.25rem 0.25rem 0;
  font-size: 0.8rem;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.publications ol.bibliography li .links a.btn:hover {
  color: var(--global-theme-color);
  border-color: var(--global-theme-color);
  text-decoration: none;
}
.publications ol.bibliography li .links a.award.btn { border-color: var(--global-highlight-color); }

.publications ol.bibliography li .hidden {
  font-size: 0.875rem;
  max-height: 0;
  overflow: hidden;
  text-align: justify;
  transition: all 0.15s ease;
}
.publications ol.bibliography li .hidden.open { max-height: 100em; }
.publications ol.bibliography li .hidden p { line-height: 1.5em; margin: 10px; }
.publications ol.bibliography li div.abstract.hidden { border: dashed 1px var(--global-bg-color); }
.publications ol.bibliography li div.abstract.hidden.open { border-color: var(--global-text-color); }

/* publications page header: search + metrics */
.pub-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.pub-header-left { flex: 1 1 60%; min-width: 260px; }
.pub-header-right { flex: 0 0 auto; }
.bibsearch-form-input {
  width: 100%;
  max-width: 320px;
  padding: 0.35rem 0.6rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--global-text-color);
  background-color: var(--global-card-bg-color);
  border: 1px solid var(--global-divider-color);
  border-radius: 0.25rem;
}
.bibsearch-form-input:focus { outline: none; border-color: var(--global-theme-color); }
.search-container { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.btn-outline-secondary {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-family: var(--sans);
  color: var(--global-text-color-light);
  background: transparent;
  border: 1px solid var(--global-divider-color);
  border-radius: 0.25rem;
  cursor: pointer;
}
.btn-outline-secondary:hover {
  color: var(--global-theme-color);
  border-color: var(--global-theme-color);
}
.keyword-filter { margin-top: 0.6rem; }
.scholar-metrics {
  border: 1px solid var(--global-divider-color);
  border-radius: 0.25rem;
  background-color: var(--global-card-bg-color);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}
.scholar-metrics .metrics-list { list-style: none; margin: 0; padding: 0; }
.scholar-metrics .metrics-list li { white-space: nowrap; }
.scholar-metrics .metric-label { color: var(--global-text-color-light); }
.scholar-metrics .metric-value { font-weight: 700; }
.scholar-link-center { text-align: center; margin-top: 0.25rem; }
#bibsearch-empty {
  display: none;
  color: var(--global-text-color-light);
  font-size: 0.9rem;
  padding: 1rem 0;
}

/* ---------- news (al-folio table style) ---------- */
.news { margin-top: 1rem; max-height: 25em; overflow-y: auto; }
.news table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.news table td {
  padding: 0.4rem 0.5rem;
  border-top: 1px solid var(--global-divider-color);
  vertical-align: top;
}
.news table tr:first-child td { border-top: 0; }
.news .news-date {
  width: 6.5rem;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--global-text-color-light);
  padding-top: 0.55rem;
}
.news .news-title { text-align: left; }

/* ---------- cv page ---------- */
.cv-layout { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.cv-sidebar { flex: 0 0 25%; max-width: 25%; padding: 0 15px; }
.cv-main { flex: 0 0 75%; max-width: 75%; padding: 0 15px; }

#toc-sidebar { position: sticky; top: 76px; }
#toc-sidebar ul { list-style: none; margin: 0; padding: 0; }
#toc-sidebar li { margin-bottom: 0.35rem; }
#toc-sidebar a {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--global-text-color-light);
  text-decoration: none;
}
#toc-sidebar a:hover { color: var(--global-theme-color); }
#toc-sidebar a.active {
  color: var(--global-bg-color);
  background-color: var(--global-theme-color);
  border-radius: 0.125rem;
  padding: 0.125rem 0.5rem;
  font-weight: 700;
}

.cv { margin-bottom: 40px; }
.cv .anchor { display: block; position: relative; top: -66px; visibility: hidden; }
.cv .card {
  background-color: var(--global-card-bg-color);
  border: 1px solid var(--global-divider-color);
  border-radius: 0.25rem;
  padding: 1rem;
  margin-top: 1rem;
}
.cv .card .card-title {
  color: var(--global-theme-color);
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.cv .card .list-group { list-style: none; margin: 0; padding: 0; }
.cv .card .list-group-item {
  background-color: inherit;
  border-top: 1px solid var(--global-divider-color);
  padding: 0.75rem 0;
}
.cv .card .list-group-item:first-child { border-top: 0; padding-top: 0; }
.cv .card .list-group-item:last-child { padding-bottom: 0; }

.cv-item { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.cv-item .date-column {
  flex: 0 0 132px; max-width: 132px;
  padding: 0 8px;
  text-align: center;
}
.cv-item .cv-body { flex: 1 1 0; min-width: 200px; padding: 0 8px 0 20px; }
.cv-item .badge {
  display: block;
  padding: 0.28rem 0.4rem;
  color: var(--global-card-bg-color) !important;
  background-color: var(--global-theme-color) !important;
  border-radius: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  /* a date range must never break across two lines */
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cv-item .location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  font-size: 0.7rem;
  white-space: nowrap;
  color: var(--global-text-color-light);
  margin: 0.4rem 0 0;
}
.cv-item .location svg {
  flex: 0 0 auto;
  width: 0.72rem; height: 0.72rem;
  fill: var(--global-theme-color);
}

/* Institution marks: a square crest, a 1.3:1 oval and two wide wordmarks. Each
   is fitted into an identical chip so the column reads as one set rather than
   four differently sized stickers. The chip — not the image — carries the
   backing colour, so every plate is the same size. Marks are never inverted;
   that would wreck the brand colour. */
.cv-item .cv-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  margin-top: 0.55rem;
  padding: 5px 7px;
  border-radius: 4px;
  box-sizing: border-box;
}
.cv-item .cv-logo img { width: 100%; height: 100%; object-fit: contain; }
/* every mark is dark-on-transparent, so one rule covers all four */
html[data-theme="dark"] .cv-item .cv-logo { background: #fff; }

.cv-item .cv-body .title { font-weight: 700; font-size: 1rem; margin-bottom: 0.15rem; }
.cv-item .cv-body .title a { color: var(--global-text-color); }
.cv-item .cv-body .title a:hover { color: var(--global-theme-color); text-decoration: none; }
.cv-item .cv-body .subtitle { font-size: 0.95rem; margin-bottom: 0.1rem; }
.cv-item .cv-body .meta {
  font-size: 0.85rem;
  color: var(--global-text-color-light);
  margin-bottom: 0.1rem;
}
.cv-item .cv-body ul.items {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}
.cv-item .cv-body ul.items li { margin-bottom: 0.15rem; }

/* compact single-line list (awards / patents) */
.cv .card .list-group-item.compact { padding: 0.4rem 0; }
.cv-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; }
.cv-line .year {
  flex: 0 0 3.2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--global-text-color-light);
}
.cv-line .what { flex: 1 1 0; min-width: 200px; font-size: 0.95rem; }
.cv-line .what .sub {
  display: block;
  font-size: 0.8rem;
  color: var(--global-text-color-light);
}
.cv-line .what em { border-bottom: 1px solid; font-style: normal; }

/* ---------- paper detail page ---------- */
.paper .post-title {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.paper .paper-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--global-text-color-light);
  margin-bottom: 0.75rem;
}
.paper .paper-meta .sep { padding: 0 0.4rem; opacity: 0.5; }
.paper .paper-meta .pill {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--global-divider-color);
  border-radius: 3px;
  background-color: var(--global-code-bg-color);
  color: var(--global-text-color);
}
.paper .paper-authors { font-size: 0.95rem; margin-bottom: 0.75rem; }
.paper .paper-authors em { border-bottom: 1px solid; font-style: normal; }
.paper .paper-authors .dim { color: var(--global-text-color-light); font-size: 0.8rem; }
.paper .links { margin-bottom: 1.5rem; }
.paper .links a.btn {
  display: inline-block;
  color: var(--global-text-color);
  border: 1px solid var(--global-text-color);
  border-radius: 0.25rem;
  padding: 0.25rem 1rem;
  margin: 0 0.25rem 0.25rem 0;
  font-size: 0.8rem;
}
.paper .links a.btn:hover {
  color: var(--global-theme-color);
  border-color: var(--global-theme-color);
  text-decoration: none;
}
.paper .links a.btn.primary {
  color: var(--global-card-bg-color);
  background-color: var(--global-theme-color);
  border-color: var(--global-theme-color);
}
.paper .links a.btn.primary:hover { opacity: 0.85; color: var(--global-card-bg-color); }

.tldr-box {
  border-left: 3px solid var(--global-theme-color);
  background-color: var(--global-card-bg-color);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  text-align: justify;
}
.tldr-box .tldr-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--global-theme-color);
  margin-bottom: 0.25rem;
}
.paper-figure { margin-bottom: 1.5rem; }
.paper-figure img { width: 100%; background: #fff; border-radius: 0.25rem; }
.paper-figure figcaption {
  font-size: 0.75rem;
  color: var(--global-text-color-light);
  margin-top: 0.4rem;
  text-align: center;
}
.paper-section { margin-bottom: 1.5rem; }
.paper-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--global-divider-color);
  margin-bottom: 0.6rem;
}
.paper-section p, .paper-section li { text-align: justify; }
.paper-section .citation {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  background-color: var(--global-code-bg-color);
  padding: 0.75rem;
  border-radius: 3px;
}
.paper-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--global-divider-color);
  padding-top: 1rem;
  font-size: 0.9rem;
}

/* ---------- footer ---------- */
footer.sticky-bottom {
  border-top: 1px solid var(--global-divider-color);
  padding: 40px 0;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--global-text-color-light);
}
footer.sticky-bottom .container { text-align: center; }
footer.sticky-bottom a { color: var(--global-text-color-light); }
footer.sticky-bottom a:hover { color: var(--global-theme-color); text-decoration: none; }

/* ---------- back to top ---------- */
#back-to-top {
  position: fixed;
  bottom: 30px; right: 30px;
  height: 40px; width: 40px;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.25rem;
  cursor: pointer;
  color: var(--global-back-to-top-text-color);
  background: var(--global-back-to-top-bg-color);
}
#back-to-top.show { display: flex; }
#back-to-top svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }

/* ---------- responsive ---------- */
@media (max-width: 767px) {
  .navbar-toggler { display: block; }
  .navbar > .container { justify-content: space-between; }
  #navbarNav { flex-basis: 100%; display: none; }
  #navbarNav.show { display: block; }
  .navbar-nav { flex-direction: column; align-items: flex-end; width: 100%; }
  .navbar .toggle-container { margin-left: 0; }

  .post-title { font-size: 2.25rem; }
  .profile { width: 62%; float: none; margin: 0 auto 1.5rem; }
  .profile.float-left { margin-right: auto; }
  .post .clearfix { margin-left: 0; text-align: left; }
  .post .clearfix p, .post .clearfix ul, .post .clearfix li { text-align: left; }

  .bib-col-left { flex: 0 0 100%; max-width: 100%; margin-bottom: 0.5rem; text-align: left; }
  .bib-col-right { flex: 0 0 100%; max-width: 100%; }
  .publications ol.bibliography li .abbr abbr { width: auto; }
  .publications ol.bibliography li img.preview { max-width: 240px; }

  .cv-sidebar { display: none; }
  .cv-main { flex: 0 0 100%; max-width: 100%; }
  .cv-item .date-column {
    flex: 0 0 100%; max-width: 100%;
    text-align: left;
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  }
  .cv-item .badge { display: inline-block; }
  .cv-item .location { margin: 0; }
  .cv-item .cv-logo { width: auto; min-width: 46px; height: 28px; margin-top: 0; padding: 3px 5px; }
  .cv-item .cv-body { flex: 0 0 100%; max-width: 100%; padding-left: 8px; margin-top: 0.4rem; }
}

@media print {
  .navbar, #progress, #back-to-top, .toggle-container { display: none !important; }
  body { padding-top: 0; background: #fff; }
}
