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

:root {
  --bg: #f5f4ef;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-muted: #efede6;
  --line: #d9d2c7;
  --line-strong: #c8bfb2;
  --text: #21201d;
  --muted: #645d53;
  --accent: #1f4c67;
  --accent-soft: #dce8ef;
  --max-width: 1180px;
  --page-pad: 24px;
  --shadow: 0 18px 48px rgba(34, 34, 34, 0.06);
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
}

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

a:hover {
  text-decoration: underline;
}

.page-shell {
  width: min(calc(100% - (var(--page-pad) * 2)), var(--max-width));
  margin: 0 auto;
}

body.home-page {
  background:
    radial-gradient(circle at top left, rgba(220, 232, 239, 0.8), transparent 34%),
    linear-gradient(180deg, #f1f3f4 0, var(--bg) 180px, var(--bg) 100%);
}

.hero-copy {
  min-width: 0;
}

.hero-intro {
  padding-top: 76px;
}

.hero-eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(3rem, 4vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.hero-name-zh {
  display: inline-block;
  margin-left: 0.2em;
  color: #6d665d;
  font-size: 0.46em;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-role {
  margin: 20px 0 14px;
  color: #2f2b27;
  font-size: 1.08rem;
  font-weight: 600;
}

.hero-summary {
  max-width: 68ch;
  margin: 0 0 1rem;
  color: #2f2c27;
  font-size: 1rem;
}

.focus-strip {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.focus-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.focus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.focus-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #ccd6db;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #27485b;
  font-size: 0.9rem;
  font-weight: 600;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.button {
  background: var(--accent);
  color: #fff;
}

.button:hover {
  background: #183b51;
  color: #fff;
  text-decoration: none;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--surface-muted);
  text-decoration: none;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.link-row a,
.link-row span {
  white-space: nowrap;
}

.hero-aside {
  display: grid;
  gap: 18px;
  align-content: start;
}

.portrait {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  border: 1px solid #ddd6ca;
  border-radius: 18px;
  object-fit: cover;
  object-position: center top;
  box-shadow: var(--shadow);
}

.hero-card,
.section-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 22px;
}

.hero-card h2,
.section-card h2 {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-card p,
.section-card p {
  margin: 0 0 0.9rem;
  color: #2f2c27;
}

.hero-card p:last-child,
.section-card p:last-child {
  margin-bottom: 0;
}

.cv-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hero-details .focus-strip {
  margin-top: 18px;
}

.highlight-facts {
  display: grid;
  gap: 14px;
}

.highlight-fact {
  margin: 0;
  color: #34302b;
}

.highlight-fact strong {
  color: var(--text);
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.86fr);
  gap: 28px;
  align-items: start;
  padding: 0 0 54px;
}

.page-grid-home {
  padding-top: 0;
}

.main-column,
.side-column {
  display: grid;
  gap: 24px;
}

.side-column {
  padding-top: 76px;
}

.section-card {
  padding: 26px;
}

.section-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.28rem;
  line-height: 1.22;
  font-weight: 700;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 8px;
  color: #736b61;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.experience-heading {
  margin-bottom: 18px;
}

.experience-heading.has-employer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
}

.experience-heading-copy {
  min-width: 0;
}

.experience-heading-copy .meta-line {
  margin-bottom: 7px;
}

.experience-heading-copy .experience-organization {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
}

.experience-heading-copy h3,
.experience-heading-copy .experience-organization {
  word-break: normal;
  overflow-wrap: anywhere;
}

.employer-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  text-decoration: none;
  transition: opacity 0.16s ease;
}

.employer-link:hover {
  opacity: 0.65;
  text-decoration: none;
}

.employer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.employer-logo {
  display: block;
  width: clamp(72px, 10vw, 112px);
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.timeline-item + .timeline-item,
.simple-item + .simple-item {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid #e7e1d7;
}

.detail-list,
.citation-list,
.recent-posts {
  margin: 0;
  padding-left: 18px;
}

.detail-list li,
.citation-list li {
  margin-bottom: 0.68rem;
  color: #2f2c27;
}

.achievement-block {
  margin-top: 18px;
  padding: 16px 18px 6px;
  border: 1px solid #e4ddd2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.subheading {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.achievement-list {
  margin-bottom: 0;
}

.stack-line {
  margin-top: 14px;
  color: #3a362f;
}

.citation-list {
  margin-top: 0;
}

.recent-posts {
  list-style: none;
  padding-left: 0;
}

.recent-post-item + .recent-post-item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e7e1d7;
}

.recent-post-link {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.32;
}

.recent-post-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.recent-post-date,
.recent-post-placeholder {
  color: #766f64;
  font-size: 0.84rem;
}

.section-link {
  margin-top: 16px;
}

.footer {
  width: min(calc(100% - (var(--page-pad) * 2)), var(--max-width));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line-strong);
  color: #7a7368;
  font-size: 0.84rem;
}

.blog-page {
  --content-max-width: 1040px;
}

.blog-page main {
  width: min(calc(100% - (var(--page-pad) * 2)), var(--content-max-width));
  margin: 36px auto;
  padding: 0;
}

.blog-page footer {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #e5e5e5;
  color: #999;
  font-size: 0.8em;
  text-align: center;
}

@media (max-width: 980px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    max-width: 440px;
  }

  .hero-intro {
    padding-top: 44px;
  }

  .side-column {
    padding-top: 0;
  }
}

@media (max-width: 600px) {
  :root {
    --page-pad: 16px;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-intro {
    padding-top: 30px;
  }

  .cv-actions {
    display: grid;
  }

  .button,
  .button-secondary {
    width: 100%;
  }

  .hero-card,
  .section-card {
    padding: 20px;
    border-radius: 16px;
  }

  .portrait {
    border-radius: 16px;
  }
}
