:root {
  color-scheme: light;
  --paper: #f7f6ef;
  --surface: #fdfcf7;
  --ink: #232422;
  --muted: #555850;
  --line: #d9d8cf;
  --accent: #4839a5;
  --lavender: #ded9f0;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: #dcd2fc; color: #201b3b; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a, button, summary { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

h1, h2, h3, h4, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
section[id], main[id] { scroll-margin-top: 24px; }

.shell {
  width: min(1240px, calc(100% - 112px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 5;
  inset: 14px auto auto 14px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 77px;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.wordmark, .header-actions, nav, .language-toggle {
  display: flex;
  align-items: center;
}

.wordmark { gap: 11px; font-size: 14px; font-weight: 720; }
.wordmark img { flex: none; }
.header-actions { gap: 29px; }
nav { gap: 28px; }

nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 590;
  transition: color .15s;
}

nav a:hover, .wordmark:hover { color: var(--accent); }

.language-toggle {
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  min-width: 76px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: 650 12px/1.2 var(--sans);
  cursor: pointer;
}

.language-toggle:hover { background: var(--surface); border-color: #a8a59b; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1fr);
  gap: clamp(30px, 5.8vw, 88px);
  align-items: center;
  padding: 65px 0 75px;
}

.eyebrow {
  font: 600 11px/1.4 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.location {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
}

.location-cross { color: var(--accent); font: 17px/1 var(--sans); }

.hero h1 {
  width: fit-content;
  font-size: clamp(76px, 9.25vw, 137px);
  font-weight: 730;
  line-height: .85;
  letter-spacing: -.088em;
}

.surname { display: block; }
.period { color: var(--accent); }

.hero-role {
  margin-top: 29px;
  font-size: clamp(15px, 1.45vw, 21px);
  font-weight: 720;
  line-height: 1.35;
  letter-spacing: -.025em;
}

.hero-description {
  max-width: 43ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions, .profile-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 25px;
}

.button, .text-link {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 45px;
  font-size: 14px;
  font-weight: 700;
}

.button {
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  transition: background-color .15s, color .15s, border-color .15s;
}

.button-primary { background: var(--ink); color: var(--surface); }
.button-primary:hover { background: var(--accent); }
.text-link { gap: 8px; }
.text-link:hover { color: var(--accent); }
.arrow { font: 17px/1 var(--sans); }

.hero-art {
  display: grid;
  align-content: center;
  position: relative;
  background: var(--lavender);
  border: 1px solid #c9c2e1;
  border-radius: 7px;
  overflow: hidden;
}

.hero-art-top, .hero-art-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #423950;
  padding: 16px 20px;
}

.hero-art-top { border-bottom: 1px solid #c9c2e1; }
.hero-art-bottom { border-top: 1px solid #c9c2e1; font-size: 11px; }
.wafer-art { width: 100%; height: auto; }
.art-key { display: flex; gap: 3px; }
.art-key i { width: 11px; height: 11px; background: #302748; }
.art-key i:nth-child(2) { background: #8675c1; }
.art-key i:nth-child(3) { background: #eb845c; }
.art-key i:nth-child(4) { background: #e6c565; }

.section {
  padding: 35px 0 66px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}

.section-index {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  margin-bottom: 9px;
}

.section-index > span:first-child {
  padding-right: 10px;
  border-right: 1px solid currentColor;
}

h2 {
  font-size: clamp(36px, 4.4vw, 66px);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.067em;
}

.section-aside { max-width: 29ch; color: var(--muted); font-size: 14px; }

.project {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  overflow: hidden;
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1fr);
}

.metric-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 26px clamp(22px, 3.2vw, 42px);
  background: #ebe7f4;
  color: #2d2638;
}

.figure-index {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 22px;
  border-bottom: 1px solid #c9c1d7;
  color: #514665;
}

.figure-index > :last-child { text-align: right; }

.metric-caption {
  display: grid;
  gap: 3px;
  margin-bottom: 22px;
  line-height: 1.25;
}

.metric-caption strong { font-size: clamp(20px, 2vw, 29px); letter-spacing: -.04em; }
.metric-caption > span { color: #514665; font-size: 12px; }
.bar-chart { display: grid; gap: 16px; }

.bar-label, .chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.bar-label { margin-bottom: 5px; }
.bar-label strong { font: 700 14px/1.5 var(--mono); }

.bar-track {
  height: 16px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent calc(50% - .5px), #c3bbd3 calc(50% - .5px), #c3bbd3 calc(50% + .5px), transparent calc(50% + .5px)), #ddd7e9;
}

.bar-fill { height: 100%; width: var(--score); background: #5746a2; }
.test-bar { background: #ad5338; }
.chart-axis { color: #514665; margin-top: 6px; font-family: var(--mono); font-size: 10px; }

.project-copy { padding: clamp(22px, 3.2vw, 42px); }

.project-meta {
  display: flex;
  align-items: center;
  gap: 9px 14px;
  flex-wrap: wrap;
  margin-bottom: 11px;
}

.project-number { color: #5b5d55; font: 600 11px/1 var(--mono); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ede8fa;
  color: #423176;
  font: 640 11px/1.4 var(--sans);
}

.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-prototype { color: #67431d; background: #f4e8d4; }

.project h3 {
  margin-bottom: 9px;
  font-size: clamp(24px, 2.7vw, 40px);
  font-weight: 720;
  letter-spacing: -.053em;
  line-height: 1.08;
}

.project-copy p { max-width: 60ch; color: var(--muted); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.tags li {
  padding: 3px 8px;
  border: 1px solid #dbd9d0;
  border-radius: 3px;
  color: #4c5047;
  font: 530 11px/1.45 var(--mono);
}

.project details {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.project details > p { margin-top: 1px; padding-bottom: 3px; font-size: 14px; }

.project summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  list-style: none;
  cursor: pointer;
}

.project summary::-webkit-details-marker { display: none; }
.project summary:hover { color: var(--accent); }

.detail-icon {
  position: relative;
  display: block;
  flex: 0 0 17px;
  height: 17px;
  color: var(--accent);
}

.detail-icon::before, .detail-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 2px;
  width: 13px;
  height: 1px;
  background: currentColor;
}

.detail-icon::after { transform: rotate(90deg); }
details[open] .detail-icon::after { transform: none; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.secondary-project { align-self: start; }

.project-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 173px;
  overflow: hidden;
}

.model-visual { background: #dfe9df; color: #3d5649; }
.sql-visual { background: #f0e5d2; color: #664c35; }

.project-visual img {
  width: min(91%, 475px);
  height: 145px;
  object-fit: contain;
}

.visual-label, .visual-coordinate { position: absolute; font-size: 9px; }
.visual-label { inset: 12px auto auto 15px; }
.visual-coordinate { inset: auto 15px 10px auto; }

.about-section { padding-bottom: 70px; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}

.about-copy { color: var(--muted); max-width: 64ch; }

.about-copy .about-lead {
  max-width: 38ch;
  margin-bottom: 16px;
  color: var(--ink);
  font: 400 clamp(21px, 2.5vw, 32px)/1.28 Georgia, serif;
  letter-spacing: -.025em;
}

.about-tags { margin-top: 20px; }

.education {
  padding: 21px 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.education h3 { color: var(--accent); }

.education-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 13px;
  padding-block: 13px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.education-item:last-child { padding-bottom: 1px; }

.education-mark {
  display: grid;
  place-items: center;
  height: 33px;
  border: 1px solid #e0d9ef;
  border-radius: 50%;
  color: var(--accent);
  font: 600 11px/1 var(--mono);
}

.education h4 { font-size: 15px; line-height: 1.4; }
.education-item p, .education-date { color: var(--muted); font-size: 13px; }
.education-date { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; }

.connect-section {
  position: relative;
  isolation: isolate;
  min-height: 306px;
  padding: clamp(24px, 4vw, 58px);
  overflow: hidden;
  border-radius: 7px;
  background: #28243e;
  color: #f7f3ff;
}

.connect-content { max-width: 56%; }
.connect-section .section-index { color: #d4cbfd; }
.connect-section h2 { margin-bottom: 13px; }
.connect-section .connect-content > p:not(.eyebrow) { color: #e5dff0; }
.connect-section :focus-visible { outline-color: #e8f1bd; }

.button-light { background: #e8f1bd; color: #272b19; }
.button-light:hover { background: #f3f8db; }
.button-outline { color: #f7f3ff; border-color: #948ba9; }
.button-outline:hover { background: #39334e; border-color: #d7cce7; }

.connect-orbit {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 1%;
  width: 39%;
  color: #777096;
  transform: translateY(-50%);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px 26px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer a { display: flex; align-items: center; gap: 6px; font-weight: 640; }
.site-footer a:hover { color: var(--accent); }
.site-footer .arrow { font-size: 14px; }

html[lang="zh-Hans"] .eyebrow { letter-spacing: .08em; }
html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] h3 { letter-spacing: -.035em; }
html[lang="zh-Hans"] .about-lead { font-family: var(--sans); font-weight: 600; }

@media (max-width: 1020px) {
  .shell { width: calc(100% - 72px); }
  .hero-description { font-size: 16px; }
  .hero { padding-block: 52px 62px; }
}

@media (max-width: 740px) {
  .shell { width: calc(100% - 40px); }
  .site-header { min-height: 65px; }
  .header-actions, nav { gap: 16px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 47px; }
  .hero h1 { font-size: clamp(72px, 15vw, 112px); }
  .hero-role { margin-top: 23px; font-size: 17px; }
  .hero-description { max-width: 49ch; }
  .hero-art { width: 100%; max-width: 500px; }
  .location { margin-bottom: 18px; }
  .section { padding: 26px 0 46px; }
  .featured-project, .about-grid { grid-template-columns: 1fr; }
  .featured-project .metric-panel { order: 1; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; margin-bottom: 20px; }
  .section-aside { max-width: none; }
  .metric-panel { padding: 23px; }
  .project-grid { gap: 10px; margin-top: 10px; }
  .about-grid { gap: 23px; }
  .connect-content { max-width: 75%; }
  .connect-orbit { right: -14%; width: 54%; }
}

@media (max-width: 520px) {
  .wordmark > span { display: none; }
  .site-header { gap: 10px; }
  .header-actions, nav { gap: 13px; }
  nav a { font-size: 13px; }
  .language-toggle { min-width: 56px; gap: 4px; padding-inline: 6px; }
  .language-toggle svg { width: 14px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-visual { min-height: 153px; }
  .project-visual img { height: 130px; }
  .connect-content { max-width: 100%; }
  .connect-orbit { opacity: .22; right: -14%; width: 68%; }
  .hero-art-top, .hero-art-bottom { padding: 11px 13px; }
  .site-footer { padding-block: 17px 20px; }
}

@media (max-width: 350px) {
  .shell { width: calc(100% - 28px); }
  nav, .header-actions { gap: 10px; }
}

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