body {
  font-size: 16px;
}

nav ul {
  flex-wrap: wrap;
}

nav ul li a {
  font-size: 14px;
  padding: 1rem 1.1rem;
}

.slabel {
  font-size: 11px;
}

.slinks a,
.positions li,
.email-bar,
.page-sub {
  font-size: 14.5px;
}

.main h1,
.page-title {
  font-size: 36px;
}

.sec-title {
  font-size: 22px;
}

.rcard h4,
.proj-name,
.jname,
.edu-school {
  font-size: 15px;
}

.rcard p,
.pub-title,
.item-title,
.ptable td,
.alist li,
.slist li,
.conf-name,
.award-name,
.mem-badge {
  font-size: 14.5px;
}

.pub-authors,
.pub-meta,
.item-authors,
.item-venue,
.proj-period,
.proj-source,
.edu-period,
.edu-dept,
.edu-deg,
.reviewer-journal,
.std-meta {
  font-size: 13px;
}

.news-list {
  border-top: 1px solid var(--border);
}

.news-month {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.news-month:last-child {
  border-bottom: none;
}

.news-month .news-date {
  align-self: flex-start;
  margin-top: 1px;
  min-width: 0;
  width: 74px;
  font-size: 12.5px;
  border-radius: 6px;
  background: #dceef8;
  color: var(--accent);
}

.news-month .news-body {
  font-size: 14.5px;
  line-height: 1.55;
}

.news-month .news-sub {
  padding: 0 0 6px;
}

.news-month .news-sub + .news-sub {
  padding-top: 6px;
}

.tag,
.pbadge,
.jrole-tag,
.conf-role,
.news-tag {
  font-size: 11px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  box-sizing: border-box;
  white-space: nowrap;
}

.filter-btn,
.tab-btn {
  font-size: 13px;
}

.collapse-hidden {
  display: none !important;
}

.collapse-control {
  margin-top: 1rem;
}

.collapse-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  font: 500 13px var(--sans);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.collapse-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.stat-card .lbl,
.stat .l {
  font-size: 11.5px;
}

.dyn-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
}

.dyn-link:hover {
  border-bottom-color: var(--accent);
}

.news-tag {
  color: var(--accent);
  background: #e6eff8;
  border: 1px solid #c9dceb;
}

.news-tag[data-news-type="award"]   { background: #fff4d8; color: #8a6010; border-color: #ecd9a0; }
.news-tag[data-news-type="paper"]   { background: #e6eff8; color: var(--accent); border-color: #c9dceb; }
.news-tag[data-news-type="patent"]  { background: #e6f4ec; color: #2e7d4f; border-color: #b8dcc5; }
.news-tag[data-news-type="service"] { background: #ece8f8; color: #4a3a8a; border-color: #cbc1e8; }

[data-theme="dark"] .news-tag[data-news-type="award"]   { background: #3a2e1c; color: #e4c87a; border-color: #4a3a22; }
[data-theme="dark"] .news-tag[data-news-type="paper"]   { background: var(--accent-light); color: var(--accent); border-color: var(--border); }
[data-theme="dark"] .news-tag[data-news-type="patent"]  { background: #1f3a2c; color: #8edcb1; border-color: #2a4a3a; }
[data-theme="dark"] .news-tag[data-news-type="service"] { background: #2c2540; color: #c6b8ee; border-color: #3a3450; }

.award-minor .award-name {
  color: var(--muted);
}

.pub-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  margin-left: 4px;
  border-radius: 3px;
  background: #fdf0dc;
  color: #8a5010;
  vertical-align: 1px;
}

[data-theme="dark"] .pub-status {
  background: #3a2e1c;
  color: #d6b576;
}

/* --- Service page polish --- */
.reviewer-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.reviewer-journal {
  position: relative;
  padding-left: 24px;
}
.reviewer-journal::before {
  content: '';
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}
.mem-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.mem-badge::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
.journal-card .jname { min-height: 2.6em; }
.award-item .award-name a,
.conf-item .conf-name a { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--border); }

.proj-year-group { margin-bottom: 1.5rem; }
.proj-year-group:last-child { margin-bottom: 0; }
.proj-year-label {
  position: sticky;
  top: 64px;
  z-index: 1;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0 0 0.6rem -24px;
  padding: 2px 0 2px 24px;
  background: linear-gradient(to bottom, var(--bg) 70%, rgba(0,0,0,0));
}
.proj-year-group .proj-item:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .proj-year-label { top: 56px; font-size: 16px; }
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 1rem;
}
.search-input {
  flex: 1;
  min-width: 0;
  padding: 7px 12px;
  font: 400 13px var(--sans);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44,95,138,0.12);
}
.filter-summary {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
[data-theme="dark"] .search-input:focus {
  box-shadow: 0 0 0 3px rgba(122,184,232,0.18);
}

.copy-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  vertical-align: -4px;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.copy-email-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}
.copy-email-btn.copied {
  color: #2e7d4f;
  border-color: #2e7d4f;
  background: #e6f4ec;
}
[data-theme="dark"] .copy-email-btn.copied {
  color: #8edcb1;
  border-color: #8edcb1;
  background: #1f3a2c;
}

@media (max-width: 720px) {
  nav {
    padding: 0 0.75rem;
  }

  nav ul li a {
    font-size: 12.5px;
    padding: 0.85rem 0.65rem;
  }

  .lang-switch {
    margin-left: 0;
  }

  .main h1,
  .page-title {
    font-size: 31px;
  }

  .proj-header,
  .pub,
  .item,
  .award-item,
  .conf-item {
    gap: 10px;
  }

  .news-month {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .news-month .news-date {
    width: fit-content;
  }
}

/* --- 20-round visual refinement pass, content-neutral --- */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fbfcfd;
  --text: #191d24;
  --muted: #666d78;
  --accent: #245f7d;
  --accent-strong: #174763;
  --accent-light: #e8f1f5;
  --border: #dfe4ea;
  --border-soft: #edf0f4;
  --shadow-sm: 0 1px 2px rgba(25, 29, 36, 0.04);
  --shadow-md: 0 14px 34px rgba(25, 29, 36, 0.08);
}

[data-theme="dark"] {
  --bg: #12161d;
  --surface: #1a2029;
  --surface-soft: #171c24;
  --text: #edf0f5;
  --muted: #a5acb7;
  --accent: #8fc4dc;
  --accent-strong: #b4d7e7;
  --accent-light: #203645;
  --border: #303845;
  --border-soft: #252d38;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.26);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.34);
}

html {
  background: var(--bg);
}

body {
  font-size: 15.5px;
  line-height: 1.72;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(36, 95, 125, 0.035), transparent 30%, transparent 70%, rgba(36, 95, 125, 0.03)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
}

[data-theme="dark"] body::before {
  background:
    linear-gradient(90deg, rgba(143, 196, 220, 0.055), transparent 32%, transparent 68%, rgba(143, 196, 220, 0.04)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
}

nav {
  padding: 0 2rem;
  background: rgba(246, 247, 249, 0.88);
  backdrop-filter: blur(16px) saturate(125%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.74) inset;
}

[data-theme="dark"] nav {
  background: rgba(18, 22, 29, 0.9);
  box-shadow: none;
}

nav ul {
  max-width: 1080px;
  min-height: 58px;
  align-items: center;
  gap: 2px;
}

nav ul li a {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 7px;
  border-bottom: none;
  letter-spacing: 0.03em;
}

nav ul li a:hover,
nav ul li a.active {
  background: var(--accent-light);
}

nav ul li a.active {
  color: var(--accent-strong);
}

.lang-switch,
nav ul > li:has(.theme-toggle) {
  margin-left: 4px;
}

.lang-switch a,
.theme-toggle,
.filter-btn,
.tab-btn,
.collapse-toggle,
.copy-email-btn {
  border-radius: 7px;
}

.theme-toggle {
  min-width: 34px;
  min-height: 34px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.container {
  grid-template-columns: 230px minmax(0, 1fr);
  max-width: 1080px;
  gap: 3.25rem;
  padding: 3.5rem 2rem 4rem;
}

.sidebar {
  top: 78px;
  padding-right: 0;
}

.avatar {
  border-width: 1px !important;
  box-shadow: 0 0 0 6px var(--surface), 0 18px 34px rgba(25, 29, 36, 0.1);
}

[data-theme="dark"] .avatar {
  box-shadow: 0 0 0 6px var(--surface), 0 18px 34px rgba(0, 0, 0, 0.34);
}

.sidebar h2 {
  line-height: 1.12;
}

.sidebar .tagline {
  margin-bottom: 1.35rem;
  color: var(--accent);
}

.slabel {
  margin-top: 1.35rem;
  letter-spacing: 0.11em;
}

.slinks {
  display: grid;
  gap: 2px;
}

.slinks li {
  margin-bottom: 0;
}

.slinks a {
  min-width: 0;
  padding: 5px 0;
}

.slinks a:hover .ico {
  opacity: 0.82;
}

.ico {
  opacity: 0.46;
}

.stats,
.stat-row {
  gap: 10px;
}

.stat,
.stat-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border-color: var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.stat .n,
.stat-card .num {
  color: var(--accent-strong);
}

.main {
  min-width: 0;
}

.container,
.main,
.sidebar,
.stat-row,
.stats,
.tab-panel,
.timeline,
.journal-grid,
.reviewer-list,
.mem-list,
.rgrid,
.news-list,
.page-sub,
.proj-card,
.journal-card,
.rcard,
.stat-card,
.stat {
  min-width: 0;
}

.main h1,
.page-title {
  color: var(--text);
  line-height: 1.08;
  letter-spacing: 0;
}

.positions {
  margin-bottom: 1.25rem;
}

.positions li {
  color: var(--muted);
  padding-left: 15px;
}

.email-bar {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 5px;
  margin-bottom: 2.75rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.email-bar a {
  overflow-wrap: anywhere;
}

.sec {
  margin-bottom: 2.75rem;
  padding-bottom: 2.75rem;
  border-bottom-color: var(--border-soft);
}

.sec-title {
  margin-bottom: 1.15rem;
  color: var(--text);
  line-height: 1.2;
}

.sec-title::after {
  background: linear-gradient(90deg, var(--border), transparent);
}

.rgrid {
  gap: 14px;
}

.rcard,
.journal-card,
.proj-card,
.std-card {
  border-radius: 8px !important;
  border-color: var(--border-soft) !important;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft)) !important;
  box-shadow: var(--shadow-sm);
}

.rcard:hover,
.journal-card:hover,
.proj-card:hover,
.std-card:hover {
  border-color: var(--border) !important;
  box-shadow: var(--shadow-md) !important;
}

.rcard h4,
.proj-name,
.jname,
.edu-school {
  color: var(--text);
  line-height: 1.42;
}

.rcard h4 {
  color: var(--accent-strong);
}

.rcard p,
.page-sub,
.pub-authors,
.pub-meta,
.item-authors,
.item-venue,
.proj-period,
.proj-source,
.edu-period,
.edu-dept,
.edu-deg,
.reviewer-journal,
.std-meta {
  color: var(--muted);
}

.pub,
.item,
.edu-item,
.conf-item,
.award-item,
.ptable tr,
.alist li,
.slist li {
  border-bottom-color: var(--border-soft) !important;
}

.pub,
.item {
  gap: 14px;
}

.pub-title,
.item-title,
.award-name,
.conf-name,
.std-title {
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.dyn-link,
.award-item .award-name a,
.conf-item .conf-name a {
  border-bottom-color: rgba(36, 95, 125, 0.22);
  text-decoration-thickness: 1px;
}

.dyn-link:hover,
.award-item .award-name a:hover,
.conf-item .conf-name a:hover {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
}

.pbadge,
.tag,
.author-tag,
.proj-role span,
.role-join,
.rjoin,
.jrole-tag,
.conf-role,
.mem-badge,
.news-tag,
.pub-status {
  border-radius: 5px !important;
  letter-spacing: 0.025em;
}

.q1,
.t-q1,
.t-first,
.p-granted,
.news-tag[data-news-type="paper"] {
  background: #e3f1f5;
  color: #1b5b74;
}

.q2,
.t-q2 {
  background: #eef5f8;
  color: #3f7187;
}

.t-corr,
.news-tag[data-news-type="service"] {
  background: #efedf7;
  color: #574989;
}

.p-pending,
.conf-role,
.role-join,
.pub-status,
.news-tag[data-news-type="award"] {
  background: #f8f0df;
  color: #87621e;
}

.news-tag[data-news-type="patent"] {
  background: #e7f3ec;
  color: #2f7450;
}

[data-theme="dark"] .q1,
[data-theme="dark"] .t-q1,
[data-theme="dark"] .t-first,
[data-theme="dark"] .p-granted,
[data-theme="dark"] .news-tag[data-news-type="paper"] {
  background: #203b49;
  color: #9ed0e3;
}

[data-theme="dark"] .q2,
[data-theme="dark"] .t-q2 {
  background: #22313b;
  color: #9bbfd0;
}

[data-theme="dark"] .news-date {
  background: var(--accent-light);
}

.news-list {
  border-top-color: var(--border-soft);
}

.news-month {
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom-color: var(--border-soft);
}

.news-month .news-date {
  width: auto;
  min-width: 72px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
}

.news-month .news-body {
  min-width: 0;
}

.news-sub {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.news-tag {
  width: 104px;
  margin-right: 0;
}

.ptable td {
  padding: 12px 8px;
}

.ptable .yr,
.edu-period,
.conf-year,
.award-year {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.tab-bar {
  gap: 4px;
  padding-bottom: 6px;
  border-bottom-color: var(--border-soft);
  overflow-x: auto;
}

.tab-btn {
  white-space: nowrap;
  padding: 9px 14px;
}

.tab-btn.active {
  background: var(--accent-light);
}

.filter-bar {
  align-items: center;
  gap: 7px;
}

.filter-btn {
  min-height: 34px;
  padding: 6px 12px;
  background: var(--surface);
}

.filter-btn.active {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.search-input {
  min-height: 38px;
  background: var(--surface);
  border-color: var(--border-soft);
}

.year-label,
.proj-year-label {
  color: var(--accent);
  background: linear-gradient(to bottom, var(--bg) 76%, rgba(246, 247, 249, 0));
}

[data-theme="dark"] .year-label,
[data-theme="dark"] .proj-year-label {
  background: linear-gradient(to bottom, var(--bg) 76%, rgba(18, 22, 29, 0));
}

.item-num {
  font-variant-numeric: tabular-nums;
}

.proj-card {
  padding: 1rem 1.1rem;
}

.proj-header {
  align-items: baseline;
}

.proj-meta {
  gap: 8px 12px;
}

.journal-grid,
.reviewer-list,
.mem-list {
  gap: 10px;
}

.reviewer-journal,
.mem-badge {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
}

.reviewer-journal {
  padding-top: 8px;
  padding-bottom: 8px;
}

.mem-badge {
  padding: 7px 10px;
}

.collapse-control {
  margin-top: 1.15rem;
}

.collapse-toggle {
  min-height: 36px;
  background: var(--surface);
}

footer {
  background: rgba(255, 255, 255, 0.34);
  border-top-color: var(--border-soft);
}

[data-theme="dark"] footer {
  background: rgba(255, 255, 255, 0.015);
}

@media (max-width: 900px) {
  .container {
    gap: 2rem;
    padding: 2.5rem 1.5rem 3.25rem;
  }

  nav ul {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  nav {
    padding: 0.35rem 0.75rem;
  }

  nav ul {
    justify-content: flex-start;
    min-height: 0;
    gap: 4px;
  }

  nav ul li a {
    min-height: 36px;
    padding: 0.45rem 0.62rem;
  }

  .lang-switch,
  nav ul > li:has(.theme-toggle) {
    margin-left: 0;
  }

  .container {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.5rem 1rem 2.75rem;
    gap: 0;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 0 18px;
    align-items: start;
  }

  .sidebar .avatar {
    grid-row: span 4;
    width: 94px !important;
    height: 94px !important;
    margin-bottom: 0;
  }

  .sidebar h2,
  .sidebar .en,
  .sidebar .tagline {
    grid-column: 2;
  }

  .sidebar .slabel,
  .sidebar .slinks,
  .sidebar .stats {
    grid-column: 1 / -1;
  }

  .stats {
    margin-top: 1rem;
  }

  .main h1,
  .page-title {
    font-size: 29px;
  }

  .email-bar {
    display: flex;
    width: 100%;
  }

  .sec {
    margin-bottom: 2.2rem;
    padding-bottom: 2.2rem;
  }

  .main,
  .sidebar {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .page-sub,
  .positions li,
  .email-bar,
  .proj-name,
  .proj-source,
  .item-title,
  .pub-title,
  .jname,
  .conf-name,
  .award-name {
    overflow-wrap: anywhere;
  }

  .news-sub {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .news-tag {
    width: fit-content;
  }

  .pub,
  .item,
  .edu-item,
  .conf-item,
  .award-item {
    gap: 10px;
  }

  .edu-item {
    display: block;
  }

  .edu-period {
    margin-bottom: 4px;
  }

  .proj-header {
    display: grid;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  nav ul li a {
    font-size: 11.5px;
  }

  .main h1,
  .page-title {
    font-size: 27px;
  }

  .sidebar {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0 14px;
  }

  .sidebar .avatar {
    width: 82px !important;
    height: 82px !important;
  }

  .stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .stat-card {
    padding: 11px 12px;
    width: 100%;
  }

  .filter-summary {
    width: 100%;
  }

  .pub,
  .item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pbadge,
  .item-num {
    width: fit-content;
    min-width: 0;
    text-align: left;
  }

  .ptable,
  .ptable tbody,
  .ptable tr,
  .ptable td {
    display: block;
    width: 100%;
  }

  .ptable tr {
    padding: 11px 0;
  }

  .ptable td {
    padding: 2px 0;
  }

  .ptable .role {
    text-align: left;
  }
}

/* --- 40-round refinement pass: calmer, safer, more editorial --- */
/* R01-R05: safer news layout; labels stay labels, text stays text. */
.news-month {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 20px;
  padding: 15px 0;
}

.news-month .news-date {
  min-width: 76px;
  padding: 4px 9px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.news-body {
  min-width: 0;
}

.news-month .news-sub {
  display: block !important;
  position: relative;
  min-width: 0;
  padding: 0 0 8px 118px !important;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.news-month .news-sub::after {
  content: "";
  display: block;
  clear: both;
}

.news-month .news-sub + .news-sub {
  padding-top: 8px;
  border-top: 1px dashed var(--border-soft);
}

.news-month .news-tag {
  float: left !important;
  width: 104px !important;
  min-height: 24px;
  margin: 1px 0 0 -118px;
  padding: 3px 8px;
  line-height: 1.25;
  white-space: nowrap;
}

.news-body em,
.news-sub em {
  color: var(--text);
  font-style: italic;
}

/* R06-R10: stronger hierarchy without adding decoration. */
.container {
  max-width: 1120px;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 3.5rem;
}

.main h1,
.page-title {
  font-size: 38px;
  margin-bottom: 0.7rem;
}

.page-sub {
  max-width: 760px;
  line-height: 1.78;
}

.sec-title {
  font-size: 23px;
  margin-bottom: 1.25rem;
}

.sec {
  margin-bottom: 3.1rem;
  padding-bottom: 3.1rem;
}

/* R11-R15: profile column reads more deliberate. */
.sidebar {
  color: var(--muted);
}

.sidebar h2 {
  color: var(--text);
  font-size: 25px;
}

.sidebar .en {
  margin-top: 2px;
}

.slabel {
  color: #8c949f;
  opacity: 1;
}

[data-theme="dark"] .slabel {
  color: #919aa7;
}

.slinks a {
  border-radius: 6px;
}

.slinks a:hover {
  color: var(--accent-strong);
  transform: translateX(1px);
}

/* R16-R20: cards become quieter and more aligned. */
.rcard,
.journal-card,
.proj-card,
.std-card,
.stat,
.stat-card,
.reviewer-journal,
.mem-badge {
  border-color: var(--border) !important;
}

.rcard,
.journal-card,
.proj-card,
.std-card {
  padding: 1.08rem 1.16rem;
}

.rcard p,
.proj-meta,
.jmeta,
.std-meta {
  line-height: 1.64;
}

.stat,
.stat-card {
  border-radius: 7px;
}

.stat-card .lbl,
.stat .l {
  margin-top: 5px;
  line-height: 1.3;
}

/* R21-R25: publication/project lists feel cleaner. */
.pub,
.item {
  padding: 14px 0;
}

.item-num {
  color: var(--accent);
  opacity: 0.55;
}

.pub-title,
.item-title,
.proj-name {
  color: var(--text);
}

.pub-authors strong,
.item-authors strong {
  font-weight: 600;
}

.year-label,
.proj-year-label {
  font-size: 19px;
  margin-bottom: 0.8rem;
}

/* R26-R30: controls are consistent but not loud. */
.filter-btn,
.tab-btn,
.collapse-toggle,
.search-input {
  border-color: var(--border);
}

.filter-btn:hover,
.tab-btn:hover,
.collapse-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.filter-btn.active,
.tab-btn.active {
  box-shadow: none;
}

.search-bar {
  align-items: stretch;
}

.filter-summary {
  display: inline-flex;
  align-items: center;
}

/* R31-R35: restrained dark mode contrast. */
[data-theme="dark"] body::before {
  opacity: 0.78;
}

[data-theme="dark"] .rcard,
[data-theme="dark"] .journal-card,
[data-theme="dark"] .proj-card,
[data-theme="dark"] .std-card,
[data-theme="dark"] .stat,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .reviewer-journal,
[data-theme="dark"] .mem-badge,
[data-theme="dark"] .email-bar {
  background: linear-gradient(180deg, #1b222c, #171d25) !important;
}

[data-theme="dark"] .news-sub + .news-sub {
  border-top-color: var(--border);
}

[data-theme="dark"] .news-body em,
[data-theme="dark"] .news-sub em {
  color: var(--text);
}

/* R36-R40: mobile polish and overflow guards. */
@media (max-width: 560px) {
  .container {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .sidebar {
    margin-bottom: 2.35rem;
  }

  .main h1,
  .page-title {
    font-size: 29px;
  }

  .news-month {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 14px 0;
  }

  .news-month .news-sub {
    padding-left: 0 !important;
  }

  .news-month .news-tag {
    float: none !important;
    width: auto !important;
    margin: 0 8px 3px 0;
    vertical-align: 1px;
  }

  .rgrid,
  .journal-grid,
  .reviewer-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 0.9rem;
  }

  .main h1,
  .page-title {
    font-size: 27px;
  }

  .sec-title {
    font-size: 20px;
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat {
    padding-inline: 8px;
  }
}
