@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&display=swap');

/* ========================================
   学术个人网站样式
   字体、配色、间距变量集中在顶部，方便统一调整
======================================== */

:root {
  --color-bg: #f7f2e8;
  --color-text: #2f261f;
  --color-muted: #743ea0e0;
  --color-link: #aa5b4f;
  --color-accent: #147bb8;
  --color-accent-2: #147bb8;
  --color-page-title: hsla(234, 54%, 27%, 0.701);
  --color-site-name: #147bb8;
  --color-border: #e7ded4;
  --color-bg-alt: #fffaf3;
  --max-width: 980px;
  --font-sans: 'EB Garamond', serif;
  --font-heading: var(--font-sans);
  --base-font-size: 15px;
  --base-line-height: 1.55;
  --section-padding: 40px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
    line-height: var(--base-line-height);
    font-size: var(--base-font-size);
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

p {
  margin: 0 0 1.35rem;
}

header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.site-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-site-name);
  letter-spacing: 0.02em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav a {
  color: var(--color-link);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

/* ---------- Layout ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--color-border);
}

section:last-of-type {
  border-bottom: none;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-page-title);
}

body.home-page h1, body.home-page h2, body.home-page h3,
body.about-page h1, body.about-page h2, body.about-page h3,
body.research-page h1, body.research-page h2, body.research-page h3,
body.teaching-page h1, body.teaching-page h2, body.teaching-page h3,
body.publications-page h1, body.publications-page h2, body.publications-page h3,
body.cv-page h1, body.cv-page h2, body.cv-page h3,
body.contact-page h1, body.contact-page h2, body.contact-page h3 {
  color: var(--color-page-title);
}


.page-intro h2,
.section-block h2 {
  color: inherit;
}

h1 {
  font-size: 2.2rem;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.35rem;
  margin: 0 0 18px;
}

h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  background: var(--color-text);
  margin-top: 10px;
  border-radius: 999px;
}

.subtitle {
  color: var(--color-muted);
  font-size: 1.05rem;
  margin: 0 0 20px;
}

.muted {
  color: var(--color-muted);
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  gap: 36px;
  align-items: center;
  padding-top: 56px;
  flex-wrap: wrap;
}

.hero-photo {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(51, 42, 38, 0.06);
  flex-shrink: 0;
  background: var(--color-bg-alt);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.hero-text {
  flex: 1;
  min-width: 260px;
}

.affiliation {
  color: var(--color-muted);
  margin: 0 0 14px;
  font-size: 1rem;
}

.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  margin-top: 22px;
}

.social-links a {
  padding: 7px 11px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-alt);
}

.page-intro {
  padding: 52px 0 36px;
  margin: 0 auto;
  width: min(100%, var(--max-width));
}
.page-intro.page-intro-flex {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.page-intro-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding-top: 4px;
  min-width: 0;
}

.page-intro-image {
  flex: 0 0 290px;
  width: 290px;
  max-width: 290px;
  overflow: hidden;
  border-radius: 0;
}

.page-intro-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
}

.contact-strip {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(51, 42, 38, 0.1);
}

.contact-strip h3 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-page-title);
}

.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-links li {
  margin: 0;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(51, 42, 38, 0.08);
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

.contact-links a:hover {
  background: rgba(81, 77, 145, 0.06);
}

.contact-links .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  min-width: 1.4em;
  height: 1.4em;
  font-size: 0.88rem;
  border-radius: 0.28rem;
  background: rgba(81, 77, 145, 0.12);
  color: var(--color-site-name);
}

.icon-email::before {
  content: "✉";
}

.icon-linkedin::before {
  content: "in";
  font-size: 0.78rem;
  font-weight: 700;
}

.icon-scholar::before {
  content: "S";
  font-size: 0.9rem;
  font-weight: 700;
}

.page-intro .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  color: var(--color-accent);
  margin-bottom: 14px;
  font-weight: 600;
}
.page-intro h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.page-intro .lead {
  color: var(--color-text);
  max-width: 720px;
}

.page-intro.page-intro-flex .lead {
  max-width: 100%;
}


.page-intro h1 {
  font-size: 2.1rem;
  margin-bottom: 10px;
}

.lead {
  font-size: 1.02rem;
  font-weight: 300
  color: var(--color-muted);
  max-width: 760px;
  line-height: 1.65;
  margin-bottom: 18px;
  text-align: justify;
  text-justify: inter-word;
}

/* Responsive: stack intro image above content on narrower screens */
@media (max-width: 900px) {
  .page-intro.page-intro-flex {
    display: block;
  }
  .page-intro-image {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-bottom: 24px;
  }
  .page-intro-image img {
    aspect-ratio: 4 / 3;
    height: auto;
    max-height: 360px;
    border-radius: 16px;
  }
}

@media (max-width: 420px) {
  .page-intro-image img {
    max-height: 240px;
  }
}


.section-block {
  padding: 48px 0;
  border-top: 1px solid var(--color-border);
}

.research-page p,
.research-page .item-list li,
.about-page p,
.about-page .lead,
.about-page .item-list li {
  text-align: justify;
  text-justify: inter-word;
}

.research-page .item-list li,
.about-page .item-list li {
  padding-left: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.contact-details {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.85;
}

/* ---------- Lists (news, publications, teaching) ---------- */

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-list li {
  padding: 15px 0;
  border-bottom: 1px dashed var(--color-border);
}

.item-list li strong {
  color: var(--color-accent);
}

.item-list li:last-child {
  border-bottom: none;
}

.item-date {
  color: var(--color-muted);
  font-size: 0.88rem;
  min-width: 90px;
  display: inline-block;
}

/* ---------- Publications ---------- */

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

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

.pub-title {
  font-weight: 300;
  font-size: 1.02rem;
  margin: 0 0 4px;
}

.pub-authors {
  margin: 0 0 4px;
}

.pub-venue {
  color: var(--color-muted);
  font-style: italic;
  margin: 0 0 8px;
}

.pub-links a {
  margin-right: 14px;
  font-size: 0.9rem;
}

.pub-year-heading {
  font-size: 1.1rem;
  margin: 32px 0 6px;
  color: var(--color-accent);
}

.pub-year-heading:first-of-type {
  margin-top: 0;
}

.pdf-viewer {
  margin-bottom: 24px;
}

.cv-viewer {
  width: 100%;
  height: 80vh;
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

/* ---------- Banner ---------- */

.banner-section,
.journal-banner {
  padding: 0;
}

.journal-banner {
  margin: 24px 0 24px;
  padding: 32px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248, 241, 231, 0.95));
  border: 1px solid rgba(51, 42, 38, 0.08);
  border-radius: 14px;
}

.header-banner {
  margin-top: 0;
  margin-bottom: 18px;
  border-radius: 0 0 14px 14px;
  border-top: none;
}

.journal-banner .banner-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.journal-banner h2 {
  font-size: 1.5rem;
  margin: 0 0 14px;
  color: var(--color-page-title);
}

.banner-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.banner-logos span,
.banner-gallery .gallery-tile {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(81, 77, 145, 0.07);
  border: 1px solid rgba(81, 77, 145, 0.08);
  color: var(--color-text);
  font-size: 0.96rem;
  font-weight: 500;
  text-align: center;
}

.banner-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.banner-gallery .gallery-tile {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: rgba(47, 38, 31, 0.75);
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.85);
  border-style: dashed;
  overflow: hidden;
}

.banner-gallery .gallery-tile img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center;
}

.banner-image {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
}

/* ---------- Footer ---------- */

footer {
  text-align: center;
  padding: 36px 20px 44px;
  color: var(--color-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(51,42,38,0.04);
  margin-top: 8px;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  nav ul {
    gap: 14px;
  }

  section {
    padding: 40px 0;
  }
}
