:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --line: #d7dce2;
  --link: #1772d0;
  --link-hover: #f09228;
  --soft: #f6f8fa;
  --soft-strong: #e9eef4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Titillium Web", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.68;
}

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

a:hover,
a:focus {
  color: var(--link-hover);
}

.site {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 32px;
}

/* ── Navigation ── */

.nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 42px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav a:hover,
.nav a:focus {
  color: var(--text);
}

/* ── Hero (centered academic style) ── */

.hero {
  text-align: center;
}

.profile-photo {
  display: block;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.25;
}

.name-en {
  font-weight: 300;
  color: var(--muted);
  font-size: 0.82em;
}

.identity {
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 500;
}

.research {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 16px;
}

.email {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Consolas", monospace;
}

.status-badge {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 500;
  color: #1a73e8;
}

.hero-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
}

/* ── Headings ── */

h2 {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 600;
}

h3 {
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

/* ── Dividers ── */

hr {
  border: 0;
  height: 1px;
  margin: 34px 0;
  background: linear-gradient(to right, transparent, rgba(32, 33, 36, 0.55), transparent);
}

/* ── Sections ── */

.section {
  scroll-margin-top: 24px;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose p:last-child,
.section p:last-child,
.timeline-item ul:last-child,
.project p:last-child {
  margin-bottom: 0;
}

/* ── Timeline (experience / education) ── */

.timeline {
  display: grid;
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
}

.time {
  color: var(--muted);
  font-size: 15px;
}

.meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 15px;
}

ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

/* ── Projects ── */

.projects {
  display: grid;
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}

.project {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.project-media {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px solid var(--soft-strong);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
}

/* ── Writing ── */

.writing-list {
  display: grid;
  gap: 8px;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Footer ── */

.footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 42px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Responsive ── */

@media (max-width: 720px) {
  .site {
    width: min(100% - 28px, 860px);
    padding-top: 24px;
  }

  .nav {
    gap: 18px;
    margin-bottom: 30px;
  }

  .profile-photo {
    width: 110px;
    height: 110px;
  }

  h1 {
    font-size: 26px;
  }

  .identity {
    font-size: 16px;
  }

  .research {
    font-size: 15px;
  }

  .timeline-item,
  .project {
    grid-template-columns: 1fr;
  }

  .project-media {
    min-height: 100px;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}
