.compact-list {
  margin: 0;
  padding-left: 1.25rem;
}

.compact-list li {
  margin-bottom: 0.55rem;
}

.meta-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.25rem;
  align-items: baseline;
  margin: 0.15rem 0;
}

.meta-line > :first-child {
  min-width: 0;
}

.meta-line .date {
  justify-self: end;
  white-space: nowrap;
  color: var(--luka-secondary);
}

.date {
  color: var(--luka-secondary);
}

.entry-title {
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.entry-subtitle,
.entry-meta {
  margin: 0.12rem 0;
}

.entry-meta {
  color: var(--luka-secondary);
}

.entry-card {
  margin-bottom: 1rem;
}

.entry-card ul {
  margin-top: 0.45rem;
  padding-left: 1.25rem;
}

.entry-card li {
  margin-bottom: 0.35rem;
}

#research-experience .section-title {
  margin-bottom: 12px;
}

#research-experience .entry-card {
  margin-bottom: 0.65rem;
}

#research-experience .meta-line {
  margin-bottom: 0.05rem;
  line-height: 1.35;
}

#research-experience .entry-title,
#research-experience .entry-subtitle,
#research-experience .entry-meta {
  margin-bottom: 0.1rem;
}

#research-experience .entry-card ul {
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
}

#work-experience .entry-card {
  margin-bottom: 0.65rem;
}

#work-experience .section-title {
  margin-bottom: 12px;
}

#work-experience .meta-line {
  margin-bottom: 0.05rem;
}

#work-experience .entry-title,
#work-experience .entry-subtitle {
  margin-bottom: 0.1rem;
}

#work-experience .meta-line,
#work-experience .entry-subtitle {
  line-height: 1.35;
}

#service .section-title {
  margin-bottom: 10px;
}

#service .entry-card {
  margin-bottom: 0.45rem;
}

#service .meta-line,
#service .entry-title {
  margin-bottom: 0;
}

#service .entry-card ul {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.service-org {
  color: var(--luka-text);
  font-weight: 400;
}

#teaching-experience .section-title {
  margin-bottom: 10px;
}

#teaching-experience .meta-line {
  margin-bottom: 0;
  line-height: 1.35;
}

#teaching-experience .entry-title {
  margin-bottom: 0;
  font-weight: 400;
}

#teaching-experience .entry-card ul {
  margin-top: 0.15rem;
  margin-bottom: 0;
}

#skills .section-body p {
  margin-bottom: 6px;
  line-height: 1.45;
}

#skills .section-body p:last-child {
  margin-bottom: 0;
}

.profile-link {
  color: inherit;
  text-decoration: underline;
}

.publication-note {
  margin-top: 0.2rem;
  color: var(--luka-secondary);
  font-size: 0.95rem;
}

.sidebar-note {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: nowrap;
}

.visitor-card-body ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

@media (max-width: 640px) {
  .meta-line {
    display: block;
  }
  .meta-line .date {
    display: block;
    margin-top: 0.15rem;
  }
}

/* ---- language switch + CJK fallback (added for the bilingual preview) ---- */

body.theme-luka .nav-container {
  justify-content: flex-end;
  gap: 16px;
}

body.theme-luka .nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ---- section links in the top bar ---- */

body.theme-luka .nav-links {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

body.theme-luka .nav-links::-webkit-scrollbar {
  display: none;
}

body.theme-luka .nav-links a {
  display: block;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--luka-text);
  font-size: 15px;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease;
}

body.theme-luka .nav-links a:hover {
  filter: none;
  color: var(--luka-accent);
  background: var(--luka-social-bg);
}

body.theme-luka .nav-links a.active {
  color: var(--luka-accent);
  background: var(--luka-border);
}

/* Keep section titles clear of the fixed 60px top bar when jumped to. */
body.theme-luka .section {
  scroll-margin-top: 96px;
}

@media (max-width: 1080px) {
  body.theme-luka .nav-links a {
    padding: 6px 8px;
    font-size: 14px;
  }
}

body.theme-luka .lang-switch {
  color: var(--luka-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

body.theme-luka .lang-switch:hover {
  color: var(--luka-accent);
  background: var(--luka-social-bg);
}

html[lang="zh"] body.theme-luka .sidebar-note {
  white-space: normal;
}

/* Applies to both language pages: the English one also carries 黄嘉旭 in the
   sidebar name and footer, and the Latin half of this family is the same
   Libertine the template already uses. */
body.theme-luka,
body.theme-luka .site-name,
body.theme-luka .section-title,
body.theme-luka .entry-title,
body.theme-luka .site-footer {
  font-family: 'Jiaxu Mixed Serif', 'Linux Libertine', 'Linux Libertine O',
    "STZhongsong", "华文中宋", "Songti SC", "SimSun", serif;
}

/* Publication links show the full URL, so let long ones wrap on narrow screens. */
body.theme-luka .pub-content .links,
body.theme-luka .pub-content .links a {
  overflow-wrap: anywhere;
}

/* Sub-heading inside a section (e.g. 工作论文 / 期刊论文 within Publications). */
body.theme-luka .subsection-title {
  margin: 18px 0 8px;
  color: var(--luka-text);
  font-weight: 600;
  font-size: 1.02em;
}

body.theme-luka .section-body > .subsection-title:first-child {
  margin-top: 0;
}

body.theme-luka .pub-note {
  color: var(--luka-secondary);
  font-size: 0.92em;
}
