/* ============================================================
   Ping Guo — academic homepage
   Minimal, self-contained stylesheet (no framework dependency)
   ============================================================ */

:root {
  --text: #2b2b2b;
  --muted: #6a737d;
  --link: #1a5fb4;
  --link-hover: #c01c28;
  --rule: #d8dce0;
  --tag-bg: #eef2f7;
  --tag-text: #2d4a73;
  --accent: #2d78ad;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 66%;            /* proportional column, scales with the screen (Zhao-style) */
  margin: 0 auto;        /* centered */
  padding: 32px 20px 80px;
}

/* ---------- Links ---------- */
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* ---------- Header / intro ---------- */
.intro { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px; }
.intro .photo { flex: 0 0 200px; }
.intro .photo img {
  width: 200px; height: auto; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.intro .info { flex: 1 1 320px; min-width: 280px; }

.name { font-size: 1.9rem; font-weight: 700; margin: 0 0 2px; }
.name .zh { font-weight: 500; margin-left: 6px; color: #444; }
.title { font-size: 1.15rem; color: var(--muted); margin: 0 0 10px; }
.affil { margin: 0; line-height: 1.5; }
.affil a { font-weight: 500; }

/* ---------- Contact table ---------- */
.meta { width: 100%; border-collapse: collapse; margin: 22px 0 0; }
.meta th, .meta td { text-align: left; vertical-align: top; padding: 5px 0; }
.meta th {
  width: 80px; font-weight: 600; color: var(--muted);
  white-space: nowrap; padding-right: 12px;
}
.links a { white-space: nowrap; margin-right: 4px; }

/* ---------- Section headings ---------- */
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0 22px; }
h2.section {
  font-size: 1.35rem; font-weight: 700; margin: 0 0 14px;
  padding-bottom: 4px;
}
h3 { font-size: 1.05rem; margin: 20px 0 6px; }

p { margin: 0 0 12px; }

ul { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }

/* ---------- Publication / highlight list ---------- */
ol.pubs { padding-left: 24px; }
ol.pubs > li { margin-bottom: 16px; }
.pub-title { font-weight: 600; }
.pub-authors { color: #444; font-size: .95rem; }
.pub-authors .me { font-weight: 700; color: var(--text); }
.pub-links a { font-size: .9rem; margin-left: 4px; text-decoration: none; }
.pub-links a::before { content: "["; color: var(--text); }
.pub-links a::after  { content: "]"; color: var(--text); }
.pub-links a:hover { text-decoration: underline; }

/* venue tag */
.venue {
  display: inline-block; font-size: .78rem; font-weight: 700;
  color: var(--tag-text); background: var(--tag-bg);
  border-radius: 4px; padding: 1px 7px; margin-right: 6px;
  vertical-align: middle; letter-spacing: .2px;
}
.award { color: #b06000; font-weight: 600; font-size: .9rem; }

/* ---------- News ---------- */
.news { list-style: none; padding-left: 0; }
.news li { display: flex; gap: 12px; margin-bottom: 8px; }
.news .date {
  flex: 0 0 84px; color: var(--accent); font-weight: 600;
  font-variant-numeric: tabular-nums; font-size: .92rem;
}
details { margin: 6px 0; }
details summary {
  cursor: pointer; color: var(--accent); font-weight: 600;
  margin: 8px 0; outline: none;
}

/* ---------- CV-style blocks ---------- */
.entry { margin-bottom: 14px; }
.entry .when { color: var(--muted); font-size: .92rem; }
.entry .what { font-weight: 600; }

.cv-entry { margin-bottom: 16px; }
.cv-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.cv-what { font-weight: 600; }
.cv-when { color: var(--muted); font-size: .92rem; white-space: nowrap; }
.cv-detail { color: #444; font-size: .95rem; margin-top: 2px; }
.cv-bullets { margin: 4px 0 0; padding-left: 22px; }
.cv-bullets li { font-size: .95rem; margin-bottom: 4px; }

ul.cv-service { padding-left: 22px; margin: 0 0 12px; }
ul.cv-service li { margin-bottom: 6px; font-size: .95rem; }
ul.cv-service .venue { margin-right: 4px; }

ul.cv-list { padding-left: 22px; margin: 0 0 16px; }
ul.cv-list > li { margin-bottom: 10px; }
ul.cv-list ul { padding-left: 22px; margin: 4px 0 0; list-style: circle; }
ul.cv-list ul li { margin-bottom: 4px; font-size: .95rem; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: .88rem; text-align: center;
}

/* ---------- Back-to-top ---------- */
#toTop {
  position: fixed; right: 22px; bottom: 28px; display: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none;
  font-size: 20px; line-height: 40px; text-align: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); z-index: 99;
}
#toTop:hover { background: #1f5a85; }

/* ---------- Responsive ---------- */
/* Tablets / small laptops: widen the 66% column so it isn't too pinched */
@media (max-width: 1024px) {
  .container { width: 86%; }
}

@media (max-width: 600px) {
  .container { width: auto; }   /* near full-width on phones */
  .intro { flex-direction: column; align-items: center; text-align: center; }
  .intro .photo, .intro .photo img { width: 160px; flex-basis: auto; }
  .intro .info { text-align: left; }
  .news li { flex-direction: column; gap: 0; }
  .news .date { flex-basis: auto; }
}
