:root {
  --background: #f7f7f5;
  --text: #2b2b2b;
  --muted: #6f7478;
  --accent: #2f6f91;
  --line: #ddddda;

  --page-width: 1160px;
}


/* =========================================================
   GLOBAL
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--background);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans",
    "Noto Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;

  line-height: 1.65;
}

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

a:hover {
  text-decoration: underline;
}


/* =========================================================
   PAGE LAYOUT
   ========================================================= */

.page-layout {
  width: min(
    var(--page-width),
    calc(100% - 44px)
  );

  margin: 42px auto 64px;

  display: grid;

  grid-template-columns:
    280px minmax(0, 1fr);

  gap: 48px;

  align-items: start;
}


/* =========================================================
   LEFT PROFILE
   ========================================================= */

.profile-card {
  position: sticky;
  top: 34px;

  padding-right: 32px;

  border-right: 1px solid var(--line);
}

.profile-content {
  padding: 0;

  text-align: left;
}

.profile-card h1 {
  margin: 0 0 10px;

  font-family:
    Georgia,
    "Times New Roman",
    "Noto Serif SC",
    "Songti SC",
    serif;

  font-size: 1.95rem;

  font-weight: 500;

  line-height: 1.25;
}

.position {
  margin: 0 0 12px;

  color: var(--text);

  font-size: 0.95rem;
}

.affiliation {
  margin: 0;

  color: var(--muted);

  font-size: 0.88rem;

  line-height: 1.6;
}

.divider {
  width: 100%;
  height: 1px;

  margin: 22px 0;

  background: var(--line);
}


/* =========================================================
   PROFILE LINKS
   ========================================================= */

.profile-links {
  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 7px;
}

.profile-links a {
  color: var(--accent);

  font-size: 0.87rem;

  text-decoration: none;
}

.profile-links a:hover {
  text-decoration: underline;
}


/* =========================================================
   ADDRESSES
   ========================================================= */

.address {
  display: flex;

  flex-direction: column;

  gap: 3px;

  color: var(--muted);

  font-size: 0.88rem;

  line-height: 1.55;
}

.address strong {
  color: var(--text);

  font-weight: 600;
}

.address-gap {
  height: 10px;
}


/* =========================================================
   RIGHT CONTENT
   ========================================================= */

.content {
  min-width: 0;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.content-nav {
  display: flex;

  flex-wrap: wrap;

  gap: 14px 34px;

  padding: 6px 0 22px;

  margin-bottom: 42px;

  border-bottom: 1px solid var(--line);
}

.content-nav a {
  color: var(--muted);

  text-decoration: none;

  font-size: 0.9rem;

  line-height: 1.4;

  transition: color 0.15s ease;
}

.content-nav a:hover {
  color: var(--text);

  text-decoration: none;
}

.content-nav a.active {
  color: var(--text);

  font-weight: 600;
}


/* =========================================================
   TAB SECTIONS
   ========================================================= */

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}


/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

section {
  margin-bottom: 50px;
}

section h2 {
  margin: 0 0 22px;

  padding-bottom: 9px;

  border-bottom: 1px solid var(--line);

  font-family:
    Georgia,
    "Times New Roman",
    "Noto Serif SC",
    "Songti SC",
    serif;

  font-size: 1.95rem;

  font-weight: 400;

  letter-spacing: -0.02em;
}

section p {
  margin: 0 0 16px;
}

#about p {
  max-width: 780px;
}


/* =========================================================
   PUBLICATIONS
   ========================================================= */

.publication {
  display: grid;

  grid-template-columns:
    100px 1fr;

  gap: 24px;

  padding: 18px 0;

  border-bottom:
    1px solid rgba(0, 0, 0, 0.06);
}

.publication:first-of-type {
  padding-top: 4px;
}

.pub-year {
  color: var(--muted);

  font-size: 0.87rem;

  padding-top: 2px;
}

.pub-body h3 {
  margin: 0 0 5px;

  font-family:
    Georgia,
    "Times New Roman",
    "Noto Serif SC",
    "Songti SC",
    serif;

  font-size: 1.08rem;

  font-weight: 600;

  line-height: 1.5;
}

.pub-meta {
  margin: 5px 0 0;

  color: var(--muted);

  font-size: 0.92rem;
}

.pub-meta a {
  color: var(--accent);

  text-decoration: none;
}

.pub-meta a:hover {
  text-decoration: underline;
}


/* =========================================================
   TALKS
   ========================================================= */

.talk {
  display: grid;

  grid-template-columns:
    100px 1fr;

  gap: 24px;

  padding: 16px 0;

  border-bottom:
    1px solid rgba(0, 0, 0, 0.06);
}

.talk:first-of-type {
  padding-top: 4px;
}

.talk-date {
  color: var(--muted);

  font-size: 0.87rem;

  padding-top: 2px;
}

.talk-body h3 {
  margin: 0 0 4px;

  font-family:
    Georgia,
    "Times New Roman",
    "Noto Serif SC",
    "Songti SC",
    serif;

  font-size: 1.08rem;

  font-weight: 600;

  line-height: 1.5;
}

.talk-place {
  margin: 0;

  color: var(--muted);

  font-size: 0.92rem;
}


/* =========================================================
   TEACHING
   ========================================================= */

.teaching-item {
  display: grid;

  grid-template-columns:
    110px 1fr 90px;

  gap: 18px;

  align-items: center;

  padding: 9px 0;

  border-bottom:
    1px solid rgba(0, 0, 0, 0.06);
}

.teaching-item:first-of-type {
  padding-top: 4px;
}

.teaching-term {
  color: var(--muted);

  font-size: 0.87rem;

  white-space: nowrap;
}

.teaching-course {
  font-family:
    Georgia,
    "Times New Roman",
    "Noto Serif SC",
    "Songti SC",
    serif;

  font-size: 1.03rem;

  font-weight: 600;

  line-height: 1.35;
}

.teaching-place {
  color: var(--muted);

  font-size: 0.87rem;

  text-align: right;

  white-space: nowrap;
}


/* =========================================================
   SHORT CV
   ========================================================= */

.cv-group {
  margin-bottom: 36px;
}

.cv-group > h3 {
  margin: 0 0 12px;

  font-family:
    Georgia,
    "Times New Roman",
    "Noto Serif SC",
    "Songti SC",
    serif;

  font-size: 1.15rem;

  font-weight: 600;
}

.cv-item {
  display: grid;

  grid-template-columns:
    110px 1fr;

  gap: 20px;

  padding: 14px 0;

  border-bottom:
    1px solid rgba(0, 0, 0, 0.06);
}

.cv-date {
  color: var(--muted);

  font-size: 0.87rem;
}

.cv-body strong {
  font-family:
    Georgia,
    "Times New Roman",
    "Noto Serif SC",
    "Songti SC",
    serif;

  font-size: 1.03rem;
}

.cv-body p {
  margin: 3px 0 0;

  color: var(--muted);

  font-size: 0.92rem;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
  margin-top: 60px;

  padding-top: 18px;

  border-top: 1px solid var(--line);

  color: var(--muted);

  font-size: 0.82rem;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 860px) {

  .page-layout {
    grid-template-columns:
      220px minmax(0, 1fr);

    gap: 32px;
  }

  .profile-card {
    padding-right: 24px;
  }

  .profile-card h1 {
    font-size: 1.7rem;
  }

  .content-nav {
    gap: 12px 24px;
  }

  .publication,
  .talk {
    grid-template-columns:
      85px 1fr;

    gap: 18px;
  }

  .teaching-item {
    grid-template-columns:
      100px 1fr 75px;

    gap: 14px;
  }

  .teaching-course {
    font-size: 0.98rem;
  }

  .cv-group {
    margin-bottom: 30px;
  }

  .cv-item {
    grid-template-columns:
      90px 1fr;

    gap: 16px;
  }

  .cv-date {
    font-size: 0.84rem;
  }

  .cv-body strong {
    font-size: 1rem;
  }

  .cv-body p {
    font-size: 0.9rem;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 680px) {

  /* PAGE */

  .page-layout {
    width: calc(100% - 28px);

    margin-top: 24px;

    grid-template-columns: 1fr;

    gap: 30px;
  }


  /* PROFILE */

  .profile-card {
    position: static;

    padding-right: 0;
    padding-bottom: 28px;

    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .profile-card h1 {
    font-size: 1.85rem;
  }

  .profile-links {
    flex-direction: row;

    flex-wrap: wrap;

    gap: 10px 18px;
  }


  /* NAVIGATION */

  .content-nav {
    justify-content: flex-start;

    gap: 10px 16px;

    margin-bottom: 30px;

    padding-bottom: 15px;
  }

  .content-nav a {
    font-size: 0.84rem;
  }


  /* SECTIONS */

  section {
    margin-bottom: 40px;
  }

  section h2 {
    font-size: 1.75rem;
  }


  /* PUBLICATIONS */

  .publication {
    grid-template-columns: 1fr;

    gap: 5px;
  }

  .pub-year {
    margin-bottom: 2px;
  }


  /* TALKS */

  .talk {
    grid-template-columns: 1fr;

    gap: 4px;
  }

  .talk-date {
    margin-bottom: 2px;
  }


  /* TEACHING */

  .teaching-item {
    grid-template-columns:
      88px 1fr;

    gap: 3px 12px;

    padding: 11px 0;
  }

  .teaching-term {
    grid-column: 1;
    grid-row: 1;

    font-size: 0.82rem;
  }

  .teaching-course {
    grid-column: 2;
    grid-row: 1;

    font-size: 0.98rem;
  }

  .teaching-place {
    grid-column: 2;
    grid-row: 2;

    text-align: left;

    font-size: 0.82rem;
  }


  /* CV */

  .cv-item {
    grid-template-columns: 1fr;

    gap: 4px;
  }

}
