* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #4f6ef7;
  --primary-dark: #3b55d9;
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --border: #e5e9f2;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #4f6ef7 0%, #7b5cf0 55%, #9b5cf6 100%);
  color: #fff;
  text-align: center;
  padding: 90px 20px 110px;
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero::before { width: 340px; height: 340px; top: -120px; left: -100px; }
.hero::after  { width: 420px; height: 420px; bottom: -200px; right: -120px; }

.avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 3px solid rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 2px;
}
.hero h1 { font-size: 42px; letter-spacing: 4px; margin-bottom: 10px; }
.hero .role {
  display: inline-block;
  font-size: 17px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35);
  padding: 8px 26px;
  border-radius: 999px;
  letter-spacing: 2px;
}
.hero .tags { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .tags span {
  background: rgba(255,255,255,.12);
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 13px;
}

/* ===== Sections ===== */
main { max-width: 900px; margin: -50px auto 0; padding: 0 20px 60px; position: relative; z-index: 2; }

section.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px 38px;
  margin-bottom: 26px;
  box-shadow: 0 8px 30px rgba(31,36,48,.06);
}

h2 {
  font-size: 21px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), #9b5cf6);
}

/* About */
.about p { color: var(--muted); font-size: 15.5px; }
.about strong { color: var(--text); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.skill h3 { font-size: 15px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.skill h3 em { font-style: normal; color: var(--primary); font-size: 13px; }
.bar { height: 8px; background: #eef1f8; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), #9b5cf6); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.project {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: transform .2s, box-shadow .2s;
}
.project:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(79,110,247,.12); }
.project h3 { font-size: 16px; margin-bottom: 8px; }
.project p { font-size: 14px; color: var(--muted); }
.project .stack { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.project .stack span {
  font-size: 12px;
  color: var(--primary);
  background: #eef1fe;
  padding: 2px 10px;
  border-radius: 999px;
}

/* Contact */
.contact-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.contact-list li {
  display: flex; align-items: center; gap: 12px;
  background: #f8faff; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px; font-size: 14.5px;
}
.contact-list .icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), #9b5cf6);
  color: #fff; font-size: 17px;
}
.contact-list small { display: block; color: var(--muted); font-size: 12px; }
.contact-list a { color: inherit; text-decoration: none; }
.contact-list a:hover { color: var(--primary); }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0 40px;
}

@media (max-width: 560px) {
  .hero h1 { font-size: 32px; }
  section.card { padding: 26px 22px; }
}
