/* =========================================================
   Huazhang Hu — Academic Homepage (flat, paper-like layout)
   ========================================================= */

:root {
  --text: #222222;
  --text-soft: #555555;
  --muted: #888888;
  --rule: #e2e2e2;
  --link: #1a5fb4;
  --link-hover: #0b3d82;
  --page-w: 880px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Charter", "Georgia", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; }

.page {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 56px 28px 32px;
}

/* ---------------- Header ---------------- */
.header {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-bottom: 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.avatar {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
}

.name {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}
.name-zh {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}

.title { margin: 8px 0 0; font-size: 1.05rem; }
.meta  { margin: 2px 0 0; color: var(--text-soft); font-size: 0.95rem; }

.socials {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 0.95rem;
}
.socials a { color: var(--text-soft); }
.socials a:hover { color: var(--link); text-decoration: none; }
.socials i { margin-right: 4px; }

/* ---------------- Sections ---------------- */
.section { margin-top: 36px; }

.section-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.section p { margin: 0 0 12px; }
#about > p { text-align: justify; }

.interests { color: var(--text-soft); }
.interests .label { color: var(--text); font-weight: 600; margin-right: 4px; }

#about > .invite {
  margin-top: 18px;
  text-align: left;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--text-soft);
}

.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 0.9rem; }

/* ---------------- Publications ---------------- */
.pub {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
}
.pub + .pub { border-top: 1px dashed var(--rule); }

.pub-media { display: block; align-self: start; }
.pub-media img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: #fff;
}

.pub-title { display: block; font-weight: 700; font-size: 1.02rem; line-height: 1.4; margin-bottom: 4px; }
.section .pub-authors { font-size: 0.93rem; color: var(--text-soft); margin: 0 0 2px; }
.pub-authors a { color: inherit; }
.pub-authors a:hover { color: var(--link); }
.me { font-weight: 700; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.section .pub-venue { font-size: 0.93rem; margin: 0 0 4px; }
.section .pub-links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 0.92rem; margin: 0 0 6px; }
.star { height: 20px; vertical-align: middle; }
.section .pub-desc { font-size: 0.92rem; color: var(--text-soft); margin: 0; }

/* ---------------- Experience ---------------- */
.exp { margin-bottom: 16px; }
.exp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.exp-org { font-weight: 700; font-size: 1.02rem; }
.exp-org a { color: var(--text); }
.exp-org a:hover { color: var(--link); }
.exp-date { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
.section .exp-role { margin: 0; font-style: italic; color: var(--text-soft); }
.exp-list { margin: 6px 0 0; padding-left: 20px; font-size: 0.95rem; }
.exp-list li { margin-bottom: 4px; }

/* ---------------- Lists ---------------- */
.plain-list { margin: 0; padding-left: 20px; }
.plain-list li { margin-bottom: 6px; }
.repo-list .star { margin-left: 4px; }

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

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .page { padding: 32px 18px 24px; }
  .header { flex-direction: column; text-align: center; gap: 16px; }
  .avatar { width: 120px; height: 120px; }
  .name { font-size: 1.8rem; }
  .name-zh { display: block; margin: 4px 0 0; }
  .socials { justify-content: center; }
  .pub { grid-template-columns: 1fr; gap: 12px; }
  .pub-media img { height: 160px; }
  #about > p { text-align: left; }
}
