:root {
  --forest: #245c46;
  --sage: #9db9a3;
  --orange: #d97a48;
  --cream: #f7f2e8;
  --ink: #21352c;
  --paper: #fffdf8;
  --muted: #5e6e66;
  --line: rgba(36, 92, 70, 0.16);
  --shadow: 0 18px 50px rgba(33, 53, 44, 0.09);
  --radius-lg: 28px;
  --radius-md: 18px;
  --purple: #a78bfa;
  --purple-deep: #7c3aed;
  --purple-bg: #f3e8ff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(circle, rgba(36, 92, 70, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 104px 0; }
.section-tint { background: rgba(157, 185, 163, 0.17); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 242, 232, 0.9); border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px); transition: border-color 180ms ease, box-shadow 180ms ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 28px rgba(33, 53, 44, 0.06); }
.nav-shell { width: min(1180px, calc(100% - 40px)); min-height: 74px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; text-decoration: none; letter-spacing: .04em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--forest); color: #fff; font-size: 12px; box-shadow: 0 0 0 3px rgba(167,139,250,.12); }
nav { display: flex; align-items: center; gap: 28px; }
nav a { position: relative; color: var(--muted); font-size: 14px; text-decoration: none; }
nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--orange); transition: right 180ms ease; }
nav a:hover, nav a:focus-visible, nav a.is-active { color: var(--forest); }
nav a:hover::after, nav a:focus-visible::after, nav a.is-active::after { right: 0; }
.nav-toggle { display: none; border: 0; background: none; padding: 8px; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); }

.hero { min-height: calc(100vh - 74px); display: grid; align-items: center; overflow: hidden; background: radial-gradient(circle at 82% 28%, rgba(167,139,250,.1), transparent 35%), radial-gradient(circle at 15% 75%, rgba(157,185,163,.22), transparent 30%), linear-gradient(180deg, var(--cream), #fbf8f1); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: center; gap: clamp(50px, 8vw, 112px); }
.eyebrow, .section-index { margin: 0 0 14px; color: var(--forest); font-size: 13px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.section-index { display: inline-flex; align-items: center; gap: 8px; }
.section-index::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--purple); flex-shrink: 0; }
.hero h1 { margin: 0; font-size: clamp(68px, 9vw, 124px); line-height: .98; letter-spacing: -.07em; color: var(--forest); }
.identity { margin: 26px 0 6px; font-size: clamp(17px, 2vw, 22px); font-weight: 700; }
.direction { margin: 0 0 24px; color: var(--orange); font-weight: 750; letter-spacing: .04em; }
.direction span { margin: 0 7px; color: var(--sage); }
.lead { max-width: 750px; margin: 0; color: var(--muted); font-size: 17px; }
.email-line { display: inline-block; margin-top: 18px; color: var(--forest); font-weight: 700; text-underline-offset: 5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-width: 132px; min-height: 48px; padding: 11px 24px; border: 1px solid var(--orange); border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform 160ms ease, background 160ms ease, color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--orange); color: #fff; }
.button-secondary { color: var(--orange); }
.button-secondary:hover { background: var(--orange); color: #fff; }
.portrait-card { position: relative; padding: 16px; max-width: 220px; justify-self: center; background: rgba(255,253,248,.75); border: 1px solid rgba(36,92,70,.18); border-radius: 160px 160px 28px 28px; box-shadow: var(--shadow); }
.portrait-frame { position: relative; overflow: hidden; aspect-ratio: 4/5.2; border-radius: 145px 145px 20px 20px; background: var(--sage); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.portrait-note { display: flex; justify-content: space-between; gap: 12px; padding: 16px 8px 4px; color: var(--muted); font-size: 12px; }

.section-heading { max-width: 820px; margin-bottom: 48px; }
.section-heading h2 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.2; letter-spacing: -.045em; }
.section-heading > p:last-child:not(.section-index) { margin: 18px 0 0; color: var(--muted); }
.position-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.position-panel { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.42); }
.position-panel h3 { margin: 0 0 12px; font-size: 17px; }
.position-panel p { margin: 0; color: var(--muted); }
.accent-panel { border-top: 4px solid var(--orange); }
.keyword-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.keyword-card { position: relative; min-height: 230px; padding: 30px; overflow: hidden; border-radius: var(--radius-md); background: var(--paper); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(33,53,44,.06); transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease; }
.keyword-card:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.3); box-shadow: 0 14px 40px rgba(33,53,44,.07), 0 2px 12px rgba(167,139,250,.1); }
.keyword-number { color: var(--orange); font-size: 13px; font-weight: 800; }
.keyword-card h3 { margin: 42px 0 10px; font-size: 24px; }
.keyword-card p { margin: 0; color: var(--muted); }

.split-heading { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.year-range { margin: 0; color: var(--orange); font-size: clamp(22px, 3vw, 34px); font-weight: 800; letter-spacing: .02em; }
.education-card { display: grid; grid-template-columns: .65fr 1.35fr; gap: 60px; padding: 40px; border-radius: var(--radius-lg); background: var(--forest); color: #fff; }
.label { margin: 0 0 10px; color: var(--sage); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.education-card h3 { margin: 0; font-size: 25px; }
.inline-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.inline-list li { padding: 8px 13px; border: 1px solid rgba(255,255,255,.24); border-left: 2px solid var(--purple); border-radius: 999px; font-size: 14px; }

.project-list { display: grid; gap: 24px; }
.project-card { position: relative; padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 12px 36px rgba(33,53,44,.055); transition: transform 200ms ease, box-shadow 200ms ease; }
.project-card:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(33,53,44,.08), 0 4px 16px rgba(167,139,250,.1); }
.project-card::before { content: ""; position: absolute; top: 22px; right: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--purple); opacity: .35; }
.project-featured { border-top: 6px solid var(--orange); }
.project-featured::before { top: 28px; }
.project-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--forest); font-size: 13px; font-weight: 750; }
.role-tag, .course-tag { display: inline-flex; padding: 5px 11px; border-radius: 999px; background: rgba(157,185,163,.27); }
.course-tag { background: rgba(217,122,72,.13); color: #a84e25; }
.project-card h3 { max-width: 900px; margin: 0; font-size: clamp(24px, 3.4vw, 38px); line-height: 1.35; }
.award { margin: 18px 0 0; color: var(--forest); font-weight: 750; }
.award span { margin-right: 9px; color: var(--orange); font-size: 12px; letter-spacing: .12em; }
.project-summary { margin: 24px 0; color: var(--muted); font-size: 18px; }
.project-summary strong { color: var(--orange); font-size: 25px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0; }
.metric-grid div { padding: 22px; border-radius: 14px; background: rgba(157,185,163,.13); border-top: 2px solid rgba(167,139,250,.2); }
.metric-grid strong, .metric-grid span { display: block; }
.metric-grid strong { color: var(--orange); font-size: 32px; line-height: 1.1; }
.metric-grid span { margin-top: 7px; color: var(--muted); font-size: 13px; }
.project-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.project-columns.single-column { grid-template-columns: 1fr; }
.project-columns h4 { margin: 0 0 8px; font-size: 14px; color: var(--forest); }
.project-columns p { margin: 0; color: var(--muted); }
.tech-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 28px 0 0; padding: 0; list-style: none; }
.tech-list li { padding: 7px 12px; border: 1px solid var(--line); border-left: 2px solid rgba(167,139,250,.35); border-radius: 8px; color: var(--forest); font-size: 13px; }
.text-link { display: inline-block; margin-top: 24px; color: var(--orange); font-weight: 800; text-underline-offset: 6px; }

.section-dark { background: var(--ink); color: #fff; }
.light-heading .section-index { color: var(--sage); }
.experience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.experience-card { min-height: 290px; padding: 36px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-md); background: rgba(255,255,255,.04); transition: transform 200ms ease, border-color 200ms ease; }
.experience-card:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.25); }
.experience-card h3 { margin: 38px 0 4px; font-size: 27px; }
.experience-role { margin: 0 0 24px; color: var(--sage); font-weight: 750; }
.experience-card > p:last-child { color: rgba(255,255,255,.72); }

.skill-list { border-top: 1px solid var(--line); }
.skill-row { display: grid; grid-template-columns: .42fr 1.58fr; gap: 36px; align-items: baseline; padding: 26px 12px; border-bottom: 1px solid var(--line); transition: background 200ms ease; }
.skill-row:hover { background: rgba(167,139,250,.035); }
.skill-row h3, .skill-row p { margin: 0; }
.skill-row h3 { color: var(--forest); font-size: 19px; }
.skill-row p { color: var(--muted); }

.method-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: method; }
.method-steps li { position: relative; min-height: 188px; padding: 26px 22px; border-block: 1px solid var(--line); border-right: 1px solid var(--line); background: rgba(255,255,255,.48); }
.method-steps li::after { content: ""; position: absolute; top: 26px; right: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--purple); opacity: .3; }
.method-steps li:first-child { border-left: 1px solid var(--line); border-radius: 16px 0 0 16px; }
.method-steps li:last-child { border-radius: 0 16px 16px 0; }
.method-steps span, .method-steps strong { display: block; }
.method-steps span { margin-bottom: 55px; color: var(--orange); font-size: 13px; font-weight: 800; }
.method-steps strong { font-size: 16px; line-height: 1.5; }
.method-application { margin-top: 28px; padding: 28px; border-left: 4px solid var(--orange); background: var(--forest); color: #fff; }
.method-application h3 { margin: 0 0 16px; font-size: 16px; }

.summary-box { padding: clamp(30px, 6vw, 68px); border: 1px solid var(--line); border-top: 3px solid rgba(167,139,250,.15); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.summary-list { margin: 0; }
.summary-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 30px; padding: 20px 0; border-top: 1px solid var(--line); }
.summary-list dt { color: var(--forest); font-weight: 800; }
.summary-list dd { margin: 0; color: var(--muted); }
.summary-list a { color: var(--forest); font-weight: 700; text-underline-offset: 5px; }

.contact-section { background: var(--orange); color: #fff; }
.contact-section .section-index { color: var(--ink); }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: center; }
.contact-grid h2 { margin: 0; font-size: clamp(35px, 5vw, 56px); line-height: 1.2; }
.contact-grid p:last-child { color: rgba(255,255,255,.8); }
.contact-mail { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 25px 28px; border: 1px solid rgba(255,255,255,.55); border-radius: var(--radius-md); text-decoration: none; transition: background 160ms ease, color 160ms ease; }
.contact-mail:hover { background: #fff; color: var(--ink); }
.contact-mail span { font-size: 12px; letter-spacing: .12em; }
.contact-mail strong { font-size: clamp(18px, 2.4vw, 26px); overflow-wrap: anywhere; }
.site-footer { padding: 28px 0; background: var(--ink); color: rgba(255,255,255,.65); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner p { margin: 0; }
.back-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--forest); color: #fff; box-shadow: var(--shadow), 0 0 0 2px rgba(167,139,250,.1); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: 160ms ease; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; padding-block: 70px; }
  .hero-copy { order: 2; }
  .portrait-card { width: min(360px, 78vw); margin: auto; }
  .position-grid, .keyword-grid, .experience-grid { grid-template-columns: 1fr; }
  .keyword-card { min-height: 190px; }
  .keyword-card h3 { margin-top: 25px; }
  .education-card, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .method-steps { grid-template-columns: 1fr; }
  .method-steps li { min-height: auto; display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 0; }
  .method-steps li:first-child { border-radius: 16px 16px 0 0; }
  .method-steps li:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 16px 16px; }
  .method-steps span { margin: 0; }
}

@media (max-width: 768px) {
  .portrait-card { width: 130px; max-width: 130px; }
}

@media (max-width: 720px) {
  .container, .nav-shell { width: min(100% - 28px, 1120px); }
  .nav-toggle { display: block; cursor: pointer; }
  nav { position: absolute; top: 66px; left: 14px; right: 14px; display: none; align-items: stretch; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); }
  nav.is-open { display: grid; }
  nav a { padding: 10px 8px; }
  nav a::after { display: none; }
  .hero h1 { font-size: clamp(62px, 24vw, 88px); }
  .hero-grid { gap: 48px; padding-block: 52px 68px; }
  .lead { font-size: 15px; }
  .portrait-note { flex-direction: column; gap: 0; }
  .section-heading { margin-bottom: 34px; }
  .split-heading { display: block; }
  .year-range { margin-top: 14px; }
  .education-card { padding: 28px; }
  .project-card { padding: 25px 21px; }
  .project-meta { align-items: flex-start; flex-direction: column; }
  .project-columns, .metric-grid { grid-template-columns: 1fr; gap: 18px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid div { padding: 15px 10px; }
  .metric-grid strong { font-size: 24px; }
  .skill-row { grid-template-columns: 1fr; gap: 8px; padding-inline: 4px; }
  .summary-list > div { grid-template-columns: 1fr; gap: 5px; }
  .contact-mail { grid-template-columns: 1fr auto; }
  .contact-mail span:first-child { grid-column: 1 / -1; }
  .footer-inner { display: block; }
  .footer-inner p + p { margin-top: 5px; }
}

@media (max-width: 430px) {
  .section { padding: 68px 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; }
  .metric-grid span { margin: 0; }
  .hero-actions .button { flex: 1 1 130px; }
  .contact-mail { padding: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
