@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,300;6..72,400;6..72,500;6..72,600;6..72,700&display=swap');

/* Claude-style editorial serif stack, applied site-wide */
:root {
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
}

:root {
  --bg: #f7f4ec;
  --bg-card: #fdfbf6;
  --bg-secondary: #f0ece1;
  --text: #2b2823;
  --text-secondary: #6b655c;
  --text-muted: #948d81;
  --accent: #c9603f;
  --accent-hover: #b04d2f;
  --accent-soft: #f2e4dc;
  --border: #e4ddd0;
  --border-strong: #d6cdbc;
  --tag-bg: #efe9dc;
  --tag-text: #5f594f;
  --max-width: 820px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 40, 35, 0.04), 0 4px 16px rgba(43, 40, 35, 0.05);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---- Nav ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-name .cn { font-weight: 400; color: var(--text-secondary); margin-left: 5px; }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 28px 100px;
}

/* ---- Header ---- */
header { margin-bottom: 52px; }

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}

.bio-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 30% 20%;
  flex-shrink: 0;
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow);
  background: var(--bg-secondary);
}

header h1 {
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

header h1 .chinese {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 1.3rem;
}

.header-role {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 6px;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-info a {
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.contact-info a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.contact-sep {
  color: var(--border);
  user-select: none;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.77rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
}

/* ---- Section ---- */
section { margin-bottom: 48px; }

h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ---- About ---- */
#about p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 700px;
  line-height: 1.8;
}
#about p + p { margin-top: 14px; }
#about strong { color: var(--text); font-weight: 600; }

/* ---- News ---- */
#news .news-item {
  display: flex;
  gap: 16px;
  margin-bottom: 15px;
  font-size: 0.93rem;
  align-items: baseline;
}

#news .news-date {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 0.76rem;
  min-width: 62px;
  flex-shrink: 0;
  padding-top: 2px;
  font-weight: 500;
}

#news .news-content { color: var(--text); }
#news .news-content .label { color: var(--text-secondary); font-weight: 500; }

/* ---- Publications ---- */
#publications .pub-item {
  margin-bottom: 20px;
  font-size: 0.93rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

#publications .pub-title {
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.5;
  color: var(--text);
}

#publications .pub-meta {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

#publications .pub-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---- Experience / Education cards ---- */
.exp-item {
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
}
.exp-item:hover { border-color: var(--border-strong); }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.exp-title { font-size: 1rem; font-weight: 600; color: var(--text); }

.exp-org {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 2px;
}

.exp-period {
  font-family: var(--font-serif);
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.exp-sub { color: var(--text-secondary); font-size: 0.9rem; margin-top: 3px; }

.exp-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  list-style: none;
  margin-top: 12px;
}
.exp-desc li { position: relative; padding-left: 18px; margin-bottom: 7px; }
.exp-desc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.exp-desc strong { color: var(--text); font-weight: 600; }

/* ---- Collapsible (details/summary) ---- */
details.collapse {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s;
}
details.collapse[open] { border-color: var(--border-strong); }
details.collapse:hover { border-color: var(--border-strong); }

details.collapse > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  user-select: none;
}
details.collapse > summary::-webkit-details-marker { display: none; }

.summary-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.summary-chevron {
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  align-self: center;
}
details.collapse[open] .summary-chevron { transform: rotate(90deg); }

.collapse-body {
  padding: 0 22px 20px;
  animation: reveal 0.3s ease;
}
.collapse-body .exp-desc { margin-top: 4px; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: -8px 0 18px;
}

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

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .header-top { flex-direction: column; }
  .contact-info { align-items: flex-start; }
  .container { padding: 44px 18px 80px; }
  .nav-links { gap: 18px; }
  .bio-row { gap: 16px; }
  .avatar { width: 76px; height: 76px; }
  header h1 { font-size: 1.8rem; }
}

/* ---- Scroll fade-in ---- */
.fade-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}
