:root {
  --canvas: #101917;
  --surface: #182421;
  --surface-raised: #1d2b27;
  --line: rgba(150, 190, 178, 0.22);
  --line-strong: #38504a;
  --text: #f3f7f5;
  --text-body: #d3ded9;
  --text-muted: #adbeb7;
  --mint: #77d6bd;
  --blue: #82b8ef;
  --orange: #edb176;
  --pink: #d994bb;
  --page-width: 1080px;
  --radius: 12px;
  --card-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--text-body);
  background:
    radial-gradient(1100px 480px at 88% -6%, rgba(119, 214, 189, 0.09), transparent 62%),
    radial-gradient(900px 420px at -8% 14%, rgba(130, 184, 239, 0.07), transparent 60%),
    var(--canvas);
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
::selection { color: var(--text); background: rgba(119, 214, 189, 0.3); }

.page-width { width: min(var(--page-width), calc(100% - 40px)); margin: 0 auto; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(173, 190, 183, 0.16);
  background: rgba(16, 25, 23, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(var(--page-width), calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
}
.site-name {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav-links { display: flex; flex: 1; justify-content: center; gap: 26px; }
.site-nav-links a {
  position: relative;
  padding: 4px 0;
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.18s ease;
}
.site-nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--mint);
  transition: right 0.22s ease;
}
.site-nav-links a:hover, .site-nav-links a:focus-visible { color: var(--text); }
.site-nav-links a:hover::after, .site-nav-links a:focus-visible::after { right: 0; }

/* ===== 按钮 ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.button-primary { color: #10201b; background: var(--mint); box-shadow: 0 6px 18px rgba(119, 214, 189, 0.22); }
.button-primary:hover { background: #9ae2cd; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(119, 214, 189, 0.3); }
.button-secondary { color: var(--text); border-color: var(--line-strong); background: transparent; }
.button-secondary:hover { border-color: var(--text-muted); background: var(--surface); transform: translateY(-1px); }
.button-compact { min-height: 36px; padding: 7px 13px; white-space: nowrap; }

/* ===== Hero 区 ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 250px);
  align-items: center;
  gap: 72px;
  min-height: 520px;
  padding: 92px 0 84px;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.hero-copy > * { animation: rise 0.55s ease both; }
.hero-copy > *:nth-child(2) { animation-delay: 0.07s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.21s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.28s; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--text); letter-spacing: 0; }
h1 { max-width: 680px; margin-bottom: 18px; font-size: 46px; font-weight: 700; line-height: 1.15; }
h2 { margin-bottom: 0; font-size: 26px; font-weight: 700; line-height: 1.25; }

.icon { display: inline-flex; flex: none; }
.icon svg { width: 15px; height: 15px; display: block; }

.role-list { display: flex; flex-wrap: wrap; gap: 10px; max-width: 660px; margin-bottom: 22px; }
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 1px solid rgba(119, 214, 189, 0.45);
  border-radius: 999px;
  color: var(--mint);
  font-size: 14px;
  font-weight: 600;
  background: rgba(119, 214, 189, 0.08);
}
.role-chip .icon svg { width: 14px; height: 14px; }

.contact-list { display: flex; flex-wrap: wrap; gap: 8px 10px; max-width: 680px; }
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-body);
  font-size: 13.5px;
  text-decoration: none;
  background: rgba(24, 36, 33, 0.6);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.contact-chip .icon { color: var(--mint); }
.contact-label { color: var(--text-muted); }
.contact-value { font-weight: 550; }
a.contact-chip:hover { color: var(--text); border-color: rgba(119, 214, 189, 0.55); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.profile-photo {
  display: block;
  width: min(100%, 250px);
  aspect-ratio: 3 / 4;
  justify-self: end;
  object-fit: cover;
  object-position: center 25%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  outline: 1px solid rgba(119, 214, 189, 0.28);
  outline-offset: 8px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  animation: rise 0.55s 0.12s ease both;
}

/* ===== 区块结构 ===== */
.section { padding: 78px 0 0; scroll-margin-top: 84px; }
#education { --section-accent: var(--blue); }
#internships { --section-accent: var(--mint); }
#projects { --section-accent: var(--orange); }
#skills { --section-accent: var(--pink); }
#awards { --section-accent: var(--orange); }

.section > .eyebrow { color: var(--section-accent, var(--blue)); }
.section > h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-icon { width: 22px; height: 22px; flex: none; color: var(--section-accent, var(--blue)); }
.section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 58px;
  height: 2px;
  border-radius: 2px;
  background: var(--section-accent, var(--mint));
}

/* ===== 教育与实习卡片 ===== */
.education-list, .experience-list { display: grid; gap: 16px; }
.education-item, .experience-item {
  position: relative;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.education-item { display: flex; align-items: flex-start; gap: 20px; }
.education-logo { width: 52px; height: 52px; flex: none; margin-top: 3px; opacity: 0.92; }
.education-body { flex: 1; min-width: 0; }
.school-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 9px;
  border: 1px solid rgba(130, 184, 239, 0.5);
  border-radius: 999px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  vertical-align: 2px;
  background: rgba(130, 184, 239, 0.1);
}
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 118px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(16, 25, 23, 0.55);
}
.stat-value { color: var(--blue); font-size: 17px; font-weight: 700; line-height: 1.3; }
.stat-label { color: var(--text-muted); font-size: 12.5px; }
.education-item::before, .experience-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--section-accent, var(--mint)), transparent 85%);
}
.education-item:hover, .experience-item:hover {
  transform: translateY(-2px);
  border-color: rgba(150, 190, 178, 0.4);
  box-shadow: var(--card-shadow);
}

.section-heading, .item-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.section-heading h3, .item-heading h3 { margin-bottom: 0; font-size: 18px; font-weight: 700; }
.period {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.item-subtitle { margin: 6px 0 0; color: var(--mint); font-size: 15px; font-weight: 600; }
#education .item-subtitle { color: var(--blue); }
.item-copy { margin: 12px 0 0; color: var(--text-body); font-size: 15px; }
.detail-list { margin: 14px 0 0; padding-left: 20px; color: var(--text-body); }
.detail-list li + li { margin-top: 8px; }
.detail-list li::marker { color: var(--section-accent, var(--mint)); }

/* ===== 项目卡片 ===== */
.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-raised), var(--surface) 55%);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(to right, var(--orange), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(237, 177, 118, 0.45);
  box-shadow: var(--card-shadow);
}
.project-card:hover::before { opacity: 1; }
.project-card h3 { font-size: 21px; }
.project-card .item-subtitle { color: var(--orange); }
.project-description { margin: 12px 0 0; color: var(--text-body); font-size: 15px; }
.stack-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
}
.stack-label .icon { color: var(--orange); }
.stack-label .icon svg { width: 13px; height: 13px; }
.tag-list, .project-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list { margin-top: 10px; }
.tag {
  padding: 3px 10px;
  border: 1px solid #4c645d;
  border-radius: 999px;
  color: #c7d9d2;
  font-size: 12.5px;
  line-height: 1.5;
}
.project-links { margin-top: auto; padding-top: 22px; }
.project-link-btn { gap: 7px; }
.project-link-btn .icon svg { width: 14px; height: 14px; }

/* ===== 技能卡片 ===== */
.skill-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.skill-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(to right, var(--accent, var(--mint)), transparent 80%);
}
.skill-card:hover {
  transform: translateY(-2px);
  border-color: rgba(150, 190, 178, 0.4);
  box-shadow: var(--card-shadow);
}
.skill-card h3 { margin-bottom: 12px; font-size: 18px; font-weight: 700; }
.skill-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.skill-card .detail-list { margin-top: 0; font-size: 14px; }
.skill-card .detail-list li::marker { color: var(--accent, var(--mint)); }
.skill-card .tag-list { margin-top: 17px; }
.skill-card .tag { border-color: color-mix(in srgb, var(--accent, var(--mint)) 52%, var(--line-strong)); }

/* ===== 奖学金与竞赛 ===== */
.award-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.award-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.award-card:hover { transform: translateY(-2px); border-color: rgba(237, 177, 118, 0.45); box-shadow: var(--card-shadow); }
.award-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  color: var(--orange);
  border: 1px solid rgba(237, 177, 118, 0.4);
  background: rgba(237, 177, 118, 0.1);
}
.award-icon svg { width: 20px; height: 20px; }
.award-card[data-level="省级"] .award-icon {
  color: var(--blue);
  border-color: rgba(130, 184, 239, 0.4);
  background: rgba(130, 184, 239, 0.1);
}
.award-body { min-width: 0; }
.award-title { margin: 0; color: var(--text); font-size: 15.5px; font-weight: 650; line-height: 1.45; }
.award-meta { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; color: var(--text-muted); font-size: 13px; }
.award-level {
  padding: 1px 9px;
  border: 1px solid rgba(237, 177, 118, 0.45);
  border-radius: 999px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}
.award-card[data-level="省级"] .award-level { border-color: rgba(130, 184, 239, 0.45); color: var(--blue); }

/* ===== 页脚 ===== */
.site-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 92px;
  padding: 28px 20px 34px;
  border-top: 1px solid rgba(173, 190, 183, 0.16);
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer a { color: var(--text-body); }
.site-footer a:hover { color: var(--mint); }
.load-error { padding: 80px 20px; color: var(--text); text-align: center; }

/* ===== 移动端 ===== */
@media (max-width: 760px) {
  .page-width, .site-nav { width: min(100% - 28px, var(--page-width)); }
  .site-nav { gap: 14px; min-height: 60px; }
  .site-nav-links { display: none; }
  .site-nav .button { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 32px; min-height: 0; padding: 52px 0 30px; }
  h1 { font-size: 34px; }
  h2 { font-size: 23px; }
  .section-icon { width: 20px; height: 20px; }
  .profile-photo { width: min(170px, 52vw); justify-self: center; grid-row: 1; outline-offset: 6px; }
  .project-list, .skill-list, .award-list { grid-template-columns: 1fr; }
  .section { padding-top: 58px; }
  .education-item, .experience-item, .project-card, .skill-card { padding: 20px; }
  .education-item { gap: 14px; }
  .education-logo { width: 42px; height: 42px; }
  .stat { min-width: 0; flex: 1; padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .site-nav-links a, .site-nav-links a::after, .education-item, .experience-item, .project-card, .project-card::before, .skill-card, .award-card, .contact-chip { transition: none; }
  .hero-copy > *, .profile-photo { animation: none; }
}
