/* Hao Wu — personal homepage
   Plain CSS. No framework, no build step. */

:root {
  --ink: #141414;
  --ink-secondary: #333;
  --ink-muted: #555;
  --ink-soft: #6b6b6b;
  --ink-faint: #777;
  --link: #1a0dab;
  --link-hover: #660099;
  --rule-strong: #141414;
  --rule-faint: #ddd;
  --bg: #fdfbf8;

  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Noto Serif SC", serif;
  --display: "Newsreader", Charter, Georgia, "Noto Serif SC", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--link-hover); }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 48px) clamp(16px, 4.5vw, 24px) 88px;
  text-wrap: pretty;
  box-sizing: border-box;
}

/* ---------- header ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 20px clamp(16px, 4vw, 32px);
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule-strong);
}

.ident {
  flex: 1 1 200px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-secondary);
}

.ident .name {
  font-family: inherit;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 10px;
}
.ident .name span { color: var(--ink-faint); }

.ident .contact { margin-top: 10px; }

.ident .meta {
  margin-top: 10px;
  color: var(--ink-faint);
}
.ident .meta .current { color: var(--ink); }

.portrait {
  flex: 0 0 clamp(112px, 30vw, 150px);
  width: clamp(112px, 30vw, 150px);
  height: clamp(142px, 38vw, 190px);
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- sections ---------- */

section { padding-top: 44px; }
section.bio { padding-top: 32px; }

h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule-faint);
  color: var(--ink);
}

h2.split {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
h2 .aside {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-faint);
  align-self: flex-end;
  padding-bottom: 5px;
}

.bio p + p { margin-top: 14px; }

/* ---------- research ---------- */

.topics {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.topic > h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 4px;
}
.topic > .summary {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 16px;
}

.threads {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 16px;
}

.thread {
  display: grid;
  grid-template-columns: clamp(76px, 24vw, 180px) minmax(0, 1fr);
  gap: clamp(10px, 2.6vw, 14px);
}
.thread > .label {
  overflow-wrap: anywhere;
  hyphens: auto;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding-top: 2px;
}

/* keyword trail under a description */
.keywords {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ---------- date-led lists (positions, alumni, news) ---------- */

.groups {
  display: flex;
  flex-direction: column;
  gap: 26px;
  font-size: 16px;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px;
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
}
.entries.loose { gap: 12px; }

.entry {
  display: grid;
  grid-template-columns: clamp(72px, 18vw, 104px) minmax(0, 1fr);
  gap: 10px;
}
.entry.short {
  grid-template-columns: clamp(58px, 16vw, 110px) minmax(0, 1fr);
  gap: 8px;
}
.entry > .when {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-faint);
  padding-top: 3px;
}
.entry .note {
  font-size: 15px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.entry .quiet { color: var(--ink-faint); }

/* ---------- publications ---------- */

.pubs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
  line-height: 1.5;
}

.pub {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px;
}
.pub > .ref {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-faint);
  padding-top: 3px;
}
.pub cite {
  font-style: italic;
}
.pub strong { font-weight: 600; }

/* ---------- teaching ---------- */

.courses {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* the teaching keyword trail sits 1px tighter than the research one */
.courses .keywords { margin-top: 3px; }

/* ---------- footer ---------- */

footer {
  margin-top: 56px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-faint);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.7;
}

/* ---------- Chinese needs more leading ---------- */

/* Only the research threads take the wider Chinese leading; the teaching
   keyword trail stays at 1.7, as in the original. */
:lang(zh) .bio p,
:lang(zh) .thread p {
  line-height: 1.8;
}

