/* ============================================================
   Chuhan Zhang — Personal Homepage
   Minimal academic style, single stylesheet, no dependencies.
   ============================================================ */

:root {
  --text:         #1f2328;
  --text-muted:   #57606a;
  --accent:       #0969da;
  --accent-hover: #0550ae;
  --border:       #d0d7de;
  --bg:           #ffffff;
  --bg-soft:      #f6f8fa;
  --max-width:    760px;
  --font-serif:   "Charter", "Iowan Old Style", "Georgia", "Times New Roman", serif;
  --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text:         #e6edf3;
    --text-muted:   #8b949e;
    --accent:       #58a6ff;
    --accent-hover: #79c0ff;
    --border:       #30363d;
    --bg:           #0d1117;
    --bg-soft:      #161b22;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ---------- Header / Profile ---------- */
.profile {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-soft);
}

.profile-text {
  flex: 1;
  min-width: 240px;
}

.profile-text h1 {
  margin: 0 0 6px;
  font-size: 2.0rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
}

.name-cn {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85em;
  margin-left: 2px;
}

.affiliation {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 1.0rem;
}

.contact {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.contact a {
  white-space: nowrap;
}

/* ---------- Sections ---------- */
section {
  margin-bottom: 44px;
}

section h2 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.005em;
}

section p {
  margin: 0 0 14px;
}

/* ---------- Publications ---------- */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.pub:last-child {
  border-bottom: none;
}

.pub-title {
  font-weight: 600;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.pub-authors {
  color: var(--text);
  font-size: 0.96rem;
  margin-bottom: 2px;
}

.pub-authors strong {
  font-weight: 600;
}

.pub-authors sup {
  color: var(--text-muted);
  font-size: 0.75em;
}

.equal-contrib {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.pub-venue {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 6px;
}

.pub-links {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.pub-links a {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 500;
}

.pub-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border-radius: 4px;
  vertical-align: middle;
}

.badge.award-badge {
  background-color: #9c27b0; /* Purple background */
  color: #ffffff;            /* White text */
  border: 1px solid #7b1fa2; /* Optional: slightly darker purple border */
}

.badge-group {
  margin-left: 0 !important;
  display: inline-flex; /* Forces the items inside to sit side-by-side */
  align-items: center;  /* Keeps them vertically centered with each other */
  gap: 8px;             /* Adds a clean space between the two badges */
  white-space: nowrap;  /* Prevents the browser from breaking them onto two lines */
  margin-left: 4px;     /* Adds a little space after the '2026' text */
}

@media (prefers-color-scheme: dark) {
  .badge {
    color: #fbbf24;
    background: #422006;
  }
}

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

footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .container { padding: 36px 20px 60px; }
  .profile { gap: 20px; }
  .avatar { width: 110px; height: 110px; }
  .profile-text h1 { font-size: 1.7rem; }
  body { font-size: 16px; }
}
