/* ============================================
   Weisi Liu — Personal Academic Website
   Aesthetic: warm editorial minimalism
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,400&family=Libre+Franklin:wght@300;400;500;600&display=swap');

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

:root {
  --bg: #fcfaf8;
  --text: #1e1e1e;
  --text-mid: #4a4a4a;
  --text-light: #7a7a7a;
  --accent: #b8442a;
  --accent-soft: #eeded8;
  --border: #e8e3dd;
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Libre Franklin', system-ui, sans-serif;
  --max-w: 820px;
  --side-pad: 2rem;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(252,250,248,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 12px rgba(0,0,0,.04);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--side-pad); height: 52px;
}
.nav-name {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
  color: var(--text); text-decoration: none; letter-spacing: .01em;
  display: flex; align-items: center; gap: .4rem;
}
.nav-logo {
  font-size: 1.2rem; line-height: 1;
  /* Replace emoji with a real logo later:
     - Put logo image in assets/images/logo.png
     - Change this span to: <img src="assets/images/logo.png" class="nav-logo">
     - Update .nav-logo to: width: 22px; height: 22px; */
}
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  font-size: .75rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-light); text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }

/* ---- HERO ---- */
.hero {
  max-width: var(--max-w); margin: 0 auto;
  padding: 6.5rem var(--side-pad) 3rem;
  display: grid; grid-template-columns: 200px 1fr; gap: 2.5rem;
  align-items: start;
}

.hero-left { display: flex; flex-direction: column; align-items: center; gap: .8rem; }

.hero-photo {
  width: 200px; height: 250px;
  border-radius: 6px;
  object-fit: cover; object-position: center 15%;
  box-shadow: var(--shadow-md);
}

.social-row {
  display: flex; gap: .6rem; align-items: center; justify-content: center;
}
.social-row a {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  color: var(--text-mid);
  transition: all .2s;
}
.social-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  opacity: 1;
}
.social-row a svg { width: 15px; height: 15px; fill: currentColor; }

.hero-text h1 {
  font-family: var(--serif);
  font-size: 2.2rem; font-weight: 700; line-height: 1.2;
  margin-bottom: .1rem;
}
.hero-text .name-cn {
  font-family: var(--serif);
  font-size: 1rem; color: var(--text-light); font-weight: 400;
  margin-bottom: .8rem; letter-spacing: .06em;
}
.hero-text .bio {
  font-size: .9rem; color: var(--text-mid); line-height: 1.85;
  max-width: 500px;
}
.hero-text .bio strong { color: var(--text); font-weight: 600; }

/* ---- SECTIONS ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--side-pad); }
.section { margin-top: 3.5rem; }

.section-title {
  font-family: var(--serif);
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 1.4rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ---- NEWS ---- */
.news-list { list-style: none; }
.news-item {
  display: grid; grid-template-columns: 90px 1fr; gap: .8rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem; line-height: 1.6;
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-size: .72rem; font-weight: 600; color: var(--accent);
  letter-spacing: .05em; text-transform: uppercase;
  padding-top: 2px;
}
.news-tag {
  display: inline-block;
  font-size: .6rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em;
  padding: 1px 5px; border-radius: 3px; margin-right: .3rem;
  vertical-align: 1px;
}
.tag-paper   { background: #e8f0fe; color: #1a56db; }
.tag-award   { background: #fef3c7; color: #92400e; }
.tag-intern  { background: #d1fae5; color: #065f46; }
.tag-service { background: #f3e8ff; color: #6b21a8; }

/* ---- PUBLICATIONS ---- */
.pub-list { list-style: none; }
.pub-item {
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-item:last-child { border-bottom: none; }

.pub-with-image {
  display: grid; grid-template-columns: 140px 1fr; gap: 1.2rem; align-items: start;
}
.pub-thumb {
  width: 140px; height: 90px; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--border);
}

.pub-title { font-weight: 600; font-size: .92rem; line-height: 1.5; margin-bottom: .2rem; }
.pub-authors { font-size: .82rem; color: var(--text-light); margin-bottom: .15rem; }
.pub-authors .me { color: var(--text); font-weight: 600; }
.pub-venue {
  font-size: .78rem; font-style: italic; color: var(--accent); font-weight: 500;
}
.pub-links { margin-top: .25rem; display: flex; gap: .5rem; }
.pub-links a {
  font-size: .7rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); padding: 2px 6px;
  border: 1px solid var(--accent); border-radius: 3px;
  transition: all .2s;
}
.pub-links a:hover { background: var(--accent); color: #fff; opacity: 1; }

/* ---- TIMELINE (Experience / Education) ---- */
.timeline { list-style: none; }
.timeline-item {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.tl-role { font-weight: 600; font-size: .9rem; }
.tl-org { font-size: .84rem; color: var(--text-light); }
.tl-desc { font-size: .82rem; color: var(--text-light); margin-top: .15rem; max-width: 520px; }
.tl-date { font-size: .78rem; color: var(--text-light); white-space: nowrap; text-align: right; }

/* ---- AWARDS ---- */
.awards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem;
}
.award-card {
  background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 5px;
  padding: .8rem 1rem;
  transition: box-shadow .2s;
}
.award-card:hover { box-shadow: var(--shadow-md); }
.award-card img {
  width: 100%; height: 100px; object-fit: cover;
  border-radius: 3px; margin-bottom: .5rem;
}
.award-year { font-size: .68rem; font-weight: 600; color: var(--accent); letter-spacing: .05em; }
.award-name { font-size: .85rem; font-weight: 600; margin-top: .1rem; }

/* ---- FOOTER ---- */
footer {
  max-width: var(--max-w); margin: 4rem auto 0; padding: 1.5rem var(--side-pad);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .72rem; color: var(--text-light);
}

/* ---- ANIMATIONS ---- */
.fade-in {
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---- RESPONSIVE ---- */
@media (max-width: 680px) {
  :root { --side-pad: 1.2rem; }
  .hero { grid-template-columns: 1fr; gap: 1.2rem; padding-top: 5rem; }
  .hero-left { align-items: center; }
  .hero-photo { width: 150px; height: 190px; }
  .hero-text { text-align: center; }
  .hero-text h1 { font-size: 1.8rem; }
  .hero-text .bio { margin: 0 auto; }
  .news-item { grid-template-columns: 1fr; gap: .15rem; }
  .timeline-item { grid-template-columns: 1fr; gap: .15rem; }
  .tl-date { text-align: left; }
  .nav-links { gap: .8rem; }
  .nav-links a { font-size: .68rem; }
  .pub-with-image { grid-template-columns: 1fr; }
  .pub-thumb { width: 100%; height: auto; max-height: 120px; }
}
