:root {
  color-scheme: light;
  --bg: #f6f8ff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #10182f;
  --muted: #64708a;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --border: rgba(79, 70, 229, 0.14);
  --shadow: 0 16px 52px rgba(28, 38, 92, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.2), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(6, 182, 212, 0.24), transparent 28rem),
    linear-gradient(135deg, #f8fbff 0%, var(--bg) 48%, #eef2ff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: auto;
  padding: 24px 0 48px;
}

.nav {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(28, 38, 92, 0.08);
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 380px;
  align-items: center;
  gap: 42px;
  padding-top: 58px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.05em;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.hero-text {
  max-width: 720px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button,
.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.3);
}

.button.secondary,
.contact-links a {
  border: 1px solid var(--border);
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.72);
}

.button:hover,
.contact-links a:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 36px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.16), transparent 42%, rgba(6, 182, 212, 0.16));
  pointer-events: none;
}

.profile-card > * {
  position: relative;
}

.avatar-wrap {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  margin-bottom: 16px;
  border: 10px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  background: #eef2ff;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h2 {
  margin-bottom: 8px;
  font-size: 34px;
}

.profile-card p,
.card p,
.project-card p,
.timeline-item p,
.contact p,
.about-grid p,
.evaluation-card p {
  color: var(--muted);
  line-height: 1.6;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.profile-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(79, 70, 229, 0.1);
  font-size: 13px;
  font-weight: 700;
}

.section {
  padding: 52px 0;
}

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

.about-grid,
.cards,
.project-list {
  display: grid;
  gap: 18px;
}

.about-grid {
  grid-template-columns: repeat(3, 1fr);
}

.about-grid p,
.card,
.project-card,
.timeline,
.contact,
.evaluation-card,
.experience-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 16px 48px rgba(28, 38, 92, 0.08);
}

.about-grid p,
.card,
.project-card,
.timeline-item,
.contact,
.evaluation-card,
.experience-card {
  padding: 18px;
}

.skill-cards {
  grid-template-columns: repeat(5, 1fr);
}

.award-cards {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  min-height: 180px;
  transition: 0.2s ease;
}

.card:hover,
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-list {
  grid-template-columns: repeat(2, 1fr);
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: 0.2s ease;
}

.project-card.featured {
  grid-row: span 2;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.88));
}

.project-type {
  margin-bottom: 8px;
  color: var(--accent) !important;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card ul {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.text-link {
  width: fit-content;
  color: var(--primary);
  font-weight: 800;
  transition: 0.2s ease;
}

.timeline {
  overflow: hidden;
  padding: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-item span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.experience-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.experience-head h3 {
  margin-bottom: 6px;
}

.experience-head p,
.experience-head span {
  margin: 0;
  color: var(--primary-dark);
  font-weight: 800;
}

.experience-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 242, 255, 0.86));
}

.contact p {
  max-width: 620px;
  margin-bottom: 0;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.28);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .hero-grid,
  .about-grid,
  .skill-cards,
  .award-cards,
  .project-list {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 42px;
  }

  .profile-card {
    max-width: 460px;
  }

  .section-heading,
  .contact {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
  }

  .nav {
    align-items: flex-start;
    border-radius: 24px;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
  }

  h1 {
    font-size: 42px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 36px;
  }

  .section {
    padding: 36px 0;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .experience-head {
    flex-direction: column;
  }
}
