/* Academic homepage style — inspired by classic faculty/PhD pages */

:root {
  --fg: #222;
  --muted: #666;
  --link: #8b0000;       /* classic academic dark red */
  --link-hover: #b22222;
  --border: #e0e0e0;
  --bg: #ffffff;
  --max-width: 780px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: "Charter", "Georgia", "Times New Roman", "Songti SC", serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

em { font-style: italic; }
strong { font-weight: 600; }

/* ----- Header ----- */
.header {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.photo img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
}

.intro h1 {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.cn-name {
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--muted);
}

.email-line {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.affiliation {
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.contact {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ----- Sections ----- */
.section {
  margin-top: 2.5rem;
}

.section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.section p + p { margin-top: 0.8rem; }

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

/* ----- News ----- */
.news-list {
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.news-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--border);
  font-size: 0.95rem;
}
.news-list li:last-child { border-bottom: none; }

.news-list .date {
  display: inline-block;
  width: 6.5em;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ----- Publications ----- */
.pub {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

.pub-thumb img,
.pub-thumb video {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  display: block;
}

/* Placeholder thumbnail when no image is available */
.pub-thumb.placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  background: #f5f3ee;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pub-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.pub-authors,
.pub-venue,
.pub-links {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.pub-venue { color: var(--muted); }

.pub-links {
  font-size: 0.88rem;
  margin-top: 0.3rem;
}
.pub-links a { color: var(--link); cursor: pointer; }

/* Toggleable abstract / bibtex */
.pub-extra {
  display: none;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  background: #f8f8f6;
  border-left: 3px solid var(--border);
  padding: 0.7rem 0.9rem;
  border-radius: 2px;
}
.pub-extra.open { display: block; }

.pub-extra.abstract {
  font-style: italic;
  color: #444;
  line-height: 1.55;
}

.pub-extra.bibtex {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-style: normal;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: #333;
}

/* ----- Plain lists (teaching, service) ----- */
.plain-list {
  list-style: none;
}
.plain-list li {
  padding: 0.3rem 0;
  font-size: 0.95rem;
}

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

/* ----- Responsive ----- */
@media (max-width: 600px) {
  .container { padding: 2rem 1rem 3rem; }
  .header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .photo {
    max-width: 160px;
    margin: 0 auto;
  }
  .pub {
    grid-template-columns: 1fr;
  }
  .pub-thumb { max-width: 200px; }
  .news-list .date { display: block; width: auto; }
}
