﻿:root {
  --ink: #444;
  --muted: #666;
  --accent: #444;
  --line: #ddd;
  --font-body: Arial, Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
  /* Prevent mobile text inflation while preserving user zoom. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 400 11pt/1.5 var(--font-body);
}
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #111; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid #555; outline-offset: 3px; }
.container { max-width: 1008px; margin: 0 auto; padding: 24px 24px 40px; }
.content { min-width: 0; overflow-wrap: anywhere; }

.profile-header {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 28px;
}
.profile-portrait { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 auto; }
.profile-info, .profile-intro { min-width: 0; }
h1 { margin: 0; color: var(--ink); font-family: Arial, "Microsoft YaHei", "PingFang SC", Helvetica, sans-serif; font-size: 24px; font-weight: 700; line-height: 1.3; }
.chinese-name { display: inline-block; font-family: inherit; font-size: inherit; font-weight: inherit; white-space: nowrap; }
.phd-title { margin: 16px 0; }
.contact-info { margin: 16px 0; font-size: 11pt; line-height: 1.6; }
.profile-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 16px; font-size: 10pt; }

p { margin: 14px 0; text-align: left; }
h3 { margin: 30px 0 12px; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.4; }
/* Section spacing replaces the decorative dividers. */
hr { border: 0; height: 0; margin: 0; }
ul { margin: 0; padding-left: 24px; }
li { padding: 3px 0; }
.news-box { max-height: 250px; overflow-y: auto; padding-right: 10px; scrollbar-width: thin; scrollbar-color: #ccc transparent; }
.news-list { list-style: none; padding: 0; }
.news-list li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 5px 0; font-size: 10pt; line-height: 1.5; }
.news-date { color: var(--muted); font-variant-numeric: tabular-nums; }

.pub-group { margin-top: 18px; }
.pub-group > summary { cursor: pointer; padding: 4px 0; font-size: 11pt; font-weight: 700; }
.pub { list-style: none; padding: 0; }
.pub li { padding: 12px 0; font-size: 10pt; line-height: 1.5; }
.pub li > b { display: block; margin: 3px 0; color: var(--ink); font-size: 16px; font-weight: 400; font-style: italic; line-height: 1.45; }
.pub font { color: var(--ink); font-size: inherit; }
.pub u { text-decoration: none; }
.award { display: inline-block; margin: 4px 0 0 6px; color: #b3261e; font-size: 10pt; font-weight: 700; }
.personal-info { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10pt; font-weight: 400; }

.wechat-contact { position: relative; }
.wechat-contact > summary { cursor: pointer; color: var(--accent); list-style: none; text-decoration: underline; text-underline-offset: 2px; }
.wechat-contact > summary::-webkit-details-marker { display: none; }
.wechat-contact > summary:hover { color: #111; }
.wechat-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 10; width: 300px; padding: 36px 12px 12px; border: 1px solid var(--line); background: #fff; box-shadow: 0 8px 28px #0002; }
.wechat-panel img { display: block; width: 100%; height: auto; }
.wechat-panel p { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.wechat-close { position: absolute; top: 4px; right: 6px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font: 24px/1 Arial, sans-serif; cursor: pointer; }
.wechat-close:hover { background: #eee; color: var(--ink); }

@media (max-width: 700px) {
  .profile-header { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
  .profile-portrait { width: 160px; }
}
@media (max-width: 560px) {
  .container { padding: 20px 18px 32px; }
  .profile-header { grid-template-columns: 100px minmax(0, 1fr); gap: 14px 18px; margin-bottom: 24px; }
  .profile-portrait { width: 100px; }
  .profile-info { display: contents; }
  h1 { font-size: 22px; }
  .chinese-name { display: block; margin: 4px 0 0; font-size: 20px; }
  .phd-title { margin: 8px 0 0; font-size: 10pt; }
  .contact-info, .profile-links { grid-column: 1 / -1; margin: 0; }
  .profile-links { gap: 4px 16px; }
  .profile-links > a, .wechat-contact > summary { display: inline-block; padding: 5px 0; }
  h3 { margin-top: 26px; }
  .news-list li { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
  .award { margin-left: 0; }
  .wechat-panel { position: fixed; top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%); width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 0 0 100vmax #0006, 0 8px 28px #0002; }
}
@media (max-width: 360px) {
  .container { padding-inline: 14px; }
  .profile-header { grid-template-columns: 88px minmax(0, 1fr); gap: 12px 14px; }
  .profile-portrait { width: 88px; }
  .news-list li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .container { max-width: none; padding: 0; }
  .news-box { max-height: none; overflow: visible; }
  .wechat-contact { display: none; }
}
