/* ===== Design tokens =====
   Unified palette: ONE accent (cbfinn-style cyan-blue) on a white background.
   Type scale: 6 sizes only — 13, 15, 18, 20, 24, 36. */
:root {
  --text: #262626;
  --heading: #0f0f0f;
  --muted: #6a6a6a;
  --link: #0E7BC4;            /* cbfinn-style cyan-blue (unified accent) */
  --link-hover: #0A5C94;
  --border: #e5e5e5;
  --max-width: 1080px;

  /* Serif stack: Source Serif 4 for Latin, Noto Serif TC for Traditional Chinese
     (Adobe/Google designed them as harmonized companion families).
     Falls back to Win11 / macOS native serifs if no internet. */
  --font-serif: 'Source Serif 4', 'Source Serif Pro',
                'Noto Serif TC', 'Source Han Serif TC',
                Cambria, Georgia, Constantia, 'Hoefler Text', 'Liberation Serif',
                PMingLiU, MingLiU, '宋体', 'Times New Roman', Times, serif;
}

/* ===== Base ===== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 22px 56px;
}

a,
a:visited {
  color: var(--link);
  text-decoration: none;
}

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

p { margin: 0 0 12px; }

/* ===== Headings ===== */
h1, h2, h3 {
  color: var(--heading);
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.005em;
}

h1 {
  font-size: 36px;
  margin: 0 0 4px;
  line-height: 1.2;
}

h2 {
  font-size: 24px;
  margin: 40px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  line-height: 1.25;
}

.scholar-link,
.scholar-link:visited {
  font-size: 24px;
  font-weight: 500;
  color: var(--link);
  margin-left: 10px;
}

.scholar-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ===== Hero / Bio (photo on RIGHT, original aspect ratio) ===== */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  margin-bottom: 4px;
}

.bio {
  flex: 1;
  min-width: 0;
}

.bio .role {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 18px;
}

.bio .contact {
  font-size: 18px;
  margin-top: 10px;
}

.bio .contact .label { color: var(--muted); }

.bio .links {
  font-size: 20px;
  margin-top: 12px;
}

.portrait-wrap {
  flex-shrink: 0;
  width: 240px;
  align-self: flex-start;
}

.portrait {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.photo-caption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 8px 0 0;
  line-height: 1.45;
}

/* Keep the English title and the Chinese name each as one indivisible unit.
   The only allowed break is the space between them. */
.photo-caption .nobreak { white-space: nowrap; }

.photo-caption a,
.photo-caption a:visited {
  color: var(--muted);
  text-decoration: none;
}

.photo-caption a:hover {
  color: var(--link);
  text-decoration: underline;
}

/* ===== News ===== */
ul.news {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.news + ul.news { margin-top: 6px; }

ul.news li { margin-bottom: 6px; }

ul.news .date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}

ul.news .venue-note {
  color: var(--muted);
  font-style: italic;
  font-size: 15px;
}

.read-toggle {
  display: inline-block;
  margin-top: 12px;
  padding: 0;
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--link);
  cursor: pointer;
}

.read-toggle:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ===== Publications ===== */
.convention {
  font-size: 15px;
  color: var(--muted);
  margin: -4px 0 18px;
}

.convention .sym {
  font-weight: 700;
  color: var(--text);
}

.pubs {
  display: grid;
  gap: 22px;
}

.pub {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
}

.venue {
  color: var(--link);
  font-size: 20px;
  font-weight: 700;
  text-align: left;
  padding-top: 1px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.venue-sub {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0;
}

.title-line {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.5;
}

.entry .title {
  font-weight: 600;
  color: var(--heading);
}

/* [Paper] action: brackets are subtle gray text (non-clickable),
   only the inner "Paper" word is the link in accent blue. */
.entry .action-wrap {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  margin-left: 4px;
}

.entry .action-wrap a.action,
.entry .action-wrap a.action:visited {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.entry .action-wrap a.action:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.entry .note {
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  margin-left: 4px;
}

.entry .authors {
  font-size: 15px;
  color: var(--text);
}

/* ===== Services ===== */
section p { margin: 6px 0; }

/* ===== Footer ===== */
footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--muted);
}

footer p { margin: 4px 0; }
footer .updated { font-variant-numeric: tabular-nums; }

/* ===== Mobile ===== */
@media (max-width: 720px) {
  html, body { font-size: 17px; }

  main { padding: 22px 16px 44px; }

  .hero {
    flex-direction: column;
    gap: 18px;
  }

  .portrait-wrap { width: 200px; }

  h1 { font-size: 30px; }
  h2 { font-size: 21px; }
  .scholar-link { font-size: 21px; }

  .pub {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .venue {
    font-size: 18px;
    text-align: left;
  }
  .venue-sub {
    display: inline;
    margin-left: 6px;
    font-size: 14px;
  }

  .bio .links { font-size: 18px; }
  .bio .role,
  .bio .contact { font-size: 17px; }
}
