:root {
  color-scheme: light;
  --background: #f5f4ef;
  --surface: #ffffff;
  --text: #18202a;
  --muted: #66707c;
  --line: #dcded9;
  --accent: #146b60;
  --accent-soft: #e6f1ee;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; }
.shell { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }
.lang-en { display: none; }
html[lang="en"] .lang-zh { display: none; }
html[lang="en"] .lang-en { display: inline; }
p.lang-en, html[lang="en"] p.lang-zh { display: none; }
html[lang="en"] p.lang-en { display: block; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(220, 222, 217, .9);
  background: rgba(245, 244, 239, .92);
  backdrop-filter: blur(12px);
}
.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-size: 1.02rem;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links > a {
  color: var(--muted);
  font-size: .94rem;
  text-decoration: none;
}
.nav-links > a:hover { color: var(--text); }
.language {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.language button {
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.language button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.intro {
  padding-block: 92px 76px;
  border-bottom: 1px solid var(--line);
}
.intro h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(3.25rem, 9vw, 6rem);
  line-height: .98;
  letter-spacing: -.065em;
}
.school {
  margin: 25px 0 0;
  color: var(--accent);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 650;
}
.bio {
  max-width: 760px;
  margin-top: 54px;
}
.bio h2 {
  margin: 0 0 12px;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bio p {
  margin: 0;
  color: #3e4854;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.75;
}

section { padding-block: 72px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.045em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.project {
  min-height: 245px;
  display: flex;
  flex-direction: column;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.project:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: 0 14px 36px rgba(30, 38, 48, .08);
}
.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: .78rem;
}
.role {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}
.project h3 {
  margin: 24px 0 10px;
  font-size: 1.23rem;
  letter-spacing: -.02em;
}
.project p {
  margin: 0 0 24px;
  color: #59636f;
}
.arrow {
  margin-top: auto;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 700;
}
.site-footer {
  border-top: 1px solid var(--line);
}
.footer-row {
  min-height: 95px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: .9rem;
}
.footer-row a { text-decoration: none; }
.footer-row a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 1080px); }
  .nav { min-height: 64px; }
  .nav-links { gap: 12px; }
  .nav-links > a:first-child { display: none; }
  .intro { padding-block: 68px 58px; }
  .intro h1 { letter-spacing: -.05em; }
  .bio { margin-top: 42px; }
  section { padding-block: 56px; }
  .section-head { display: block; }
  .section-head p { margin-top: 12px; }
  .projects { grid-template-columns: 1fr; }
  .project { min-height: 220px; }
  .footer-row { align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project { transition: none; }
}
