/* ============================================================
   Variables & Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:  #ffffff;
  --ink:    #111111;
  --ink-2:  #444444;
  --ink-3:  #888888;
  --red:    #b01a24;
  --rule:   #111111;
  --max:    820px;
  --serif:  'Playfair Display', Georgia, serif;
  --sans:   'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   Masthead
   ============================================================ */
.masthead-bar { width: 100%; height: 4px; background: var(--ink); }

/* ============================================================
   Nav
   ============================================================ */
nav {
  background: var(--cream);
  border-bottom: 1.5px solid var(--ink);
  position: sticky; top: 0; z-index: 100;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mono {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

nav ul { list-style: none; display: flex; gap: 1.75rem; }

nav ul li a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 0.15s;
}
nav ul li a:hover { color: var(--red); text-decoration: none; }

/* ============================================================
   Main
   ============================================================ */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 2.2rem 0 2rem;
  border-bottom: 1.5px solid var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 2.5rem;
  align-items: start;
}

.hero-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.6rem;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.hero-zh {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.hero-rule {
  width: 40px; height: 2.5px;
  background: var(--red);
  margin-bottom: 1.2rem;
}

.hero-bio {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin-bottom: 0.7rem;
  max-width: 500px;
  line-height: 1.65;
}

.hero-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1.4rem;
}

.arrow-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  width: fit-content;
}
.arrow-link:hover { color: var(--red); border-bottom-color: var(--red); text-decoration: none; }

/* Avatar */
.hero-avatar-wrap { padding-top: 0.5rem; }

.hero-avatar-wrap img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
}

.avatar-box {
  width: 140px; height: 140px;
  background: var(--ink); color: var(--cream);
  font-family: var(--serif); font-weight: 900; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   Section structure
   ============================================================ */
.section { padding: 2rem 0 0; }

.sec-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0;
}

.sec-label {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink);
}

.sec-rule { flex: 1; height: 1.5px; background: var(--ink); }

/* ============================================================
   Education
   ============================================================ */
.edu-list { margin-top: 0; }

.edu-item {
  display: grid;
  grid-template-columns: 56px 40px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #d8d3cb;
}
.edu-item:first-child { border-top: 1px solid #d8d3cb; margin-top: 1.25rem; }

.edu-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  align-self: start;
  margin-top: 1px;
}

/* Logos whose artwork fills the whole canvas need padding to visually match
   the others (which have built-in whitespace) */
.edu-logo--tight { padding: 5px; }

.edu-year {
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1.4;
  text-align: right;
  padding-top: 2px;
  flex-shrink: 0;
}
.edu-year span { color: var(--ink-3); font-weight: 400; }

.edu-body strong { font-size: 0.88rem; font-weight: 600; display: block; margin-bottom: 0.15rem; }
.edu-body p { font-size: 0.8rem; color: var(--ink-2); line-height: 1.5; }
.edu-school { color: var(--ink-3) !important; }
.edu-school-main {
  font-family: var(--serif);
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
  letter-spacing: 0.01em;
  display: block;
  margin-bottom: 0.1rem;
}

/* ============================================================
   Publications — categories
   ============================================================ */
.pub-category { margin-top: 1.25rem; }

.pub-cat-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--ink);
  padding: 0.38rem 0.85rem;
}
.cat-icon { font-size: 0.85rem; }

/* ============================================================
   Publications — list
   ============================================================ */
.pub-list { display: flex; flex-direction: column; }

.pub-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #d8d3cb;
  transition: background 0.12s;
}
.pub-item:hover { background: rgba(176,26,36,0.03); }

.pub-num {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 900;
  color: #d8d3cb;
  line-height: 1;
  padding-top: 3px;
  text-align: right;
  flex-shrink: 0;
}

.pub-meta {
  display: none;
}

.venue {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 2px solid;
  vertical-align: middle;
  margin-right: 0.45em;
  position: relative;
  top: -1px;
  white-space: nowrap;
  border-radius: 2px;
}
.v-oral     { color: #fff; background: #1a3557; border-color: #1a3557; }
.v-conf     { color: #fff; background: #1a3557; border-color: #1a3557; }
.v-workshop { color: #fff; background: #1a3557; border-color: #1a3557; }
.v-journal  { color: #fff; background: #1a3557; border-color: #1a3557; }
.v-arxiv    { color: var(--ink-3); background: transparent; border-color: var(--ink-3); }

.pub-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  border: 1.5px solid var(--red);
  padding: 1px 6px;
  vertical-align: middle;
  margin-left: 0.3em;
  margin-right: 0.45em;
  position: relative;
  top: -1px;
}

.pub-title {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 0.22rem;
}

.pub-title-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.pub-title-link:hover {
  color: var(--red);
  border-bottom-color: var(--red);
  text-decoration: none;
}

.pub-authors {
  font-size: 0.76rem;
  color: var(--ink-3);
  line-height: 1.5;
}
.pub-authors strong { color: var(--ink-2); }

.pub-links { margin-top: 0.3rem; }
.pub-links a { font-size: 0.72rem; font-weight: 500; color: var(--red); }

/* ============================================================
   Honors
   ============================================================ */
.honors-list {
  list-style: none;
  border-top: 1px solid #d8d3cb;
  margin-top: 1.25rem;
}

.honors-list li {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #d8d3cb;
  font-size: 0.85rem;
}

.honor-year {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--red);
  min-width: 38px;
  text-align: right;
  flex-shrink: 0;
}

.activity-text {
  font-size: 0.85rem;
  color: var(--ink-2);
  border-top: 1px solid #d8d3cb;
  border-bottom: 1px solid #d8d3cb;
  padding: 0.75rem 0;
  margin-top: 1.25rem;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-text {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin-bottom: 1rem;
  margin-top: 1.25rem;
}

.contact-email {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2.5px solid var(--red);
  transition: color 0.15s;
}
.contact-email:hover { color: var(--red); }

/* ============================================================
   Footer
   ============================================================ */
footer { border-top: 1.5px solid var(--ink); margin-top: 4rem; }

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

footer span {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.footer-bar { flex: 1; height: 2.5px; background: var(--red); max-width: 80px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  nav ul { gap: 0.65rem; }
  nav ul li a { font-size: 0.58rem; }
}

@media (max-width: 580px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-avatar-wrap { order: -1; }
  .hero-avatar-wrap img { width: 80px; height: 80px; }
}
