:root {
  --bg: #fbf8ff;
  --surface: #ffffff;
  --ink: #17213f;
  --muted: #66708e;
  --line: #e3def5;
  --soft: #f1f6ff;
  --accent: #5a7df8;
  --accent-2: #f17cba;
  --accent-soft: #edf3ff;
  --pink-soft: #fff0f7;
  --shadow: 0 18px 50px rgba(69, 86, 150, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 14%, rgba(241, 124, 186, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 6%, rgba(90, 125, 248, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(237, 243, 255, 0.38)),
    var(--bg);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 248, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 760;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  min-height: calc(100dvh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 64px;
  align-items: center;
  padding: 56px 0;
}

.hero-copy {
  max-width: 620px;
}

.availability {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0 0 28px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 720;
  box-shadow: 0 10px 28px rgba(24, 28, 40, 0.05);
}

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(54px, 8vw, 94px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  margin-bottom: 16px;
  color: #33406f;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.32;
  font-weight: 620;
}

.sublead {
  max-width: 620px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: var(--radius);
  font-weight: 740;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  white-space: nowrap;
}

.button:active {
  transform: translateY(1px);
}

.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 14px 32px rgba(90, 125, 248, 0.24);
}

.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-visual {
  min-height: 440px;
  display: grid;
  place-items: center;
}

.portrait-card {
  position: relative;
  width: min(380px, 88vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(135deg, #fff1f8, #dce9ff 58%, #b8c9ff);
  box-shadow: var(--shadow);
}

.portrait-ring {
  width: 74%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 9px solid white;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff0f7, #dce9ff);
  overflow: hidden;
}

.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.status-card {
  position: absolute;
  right: -18px;
  bottom: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(24, 28, 40, 0.16);
  font-size: 14px;
}

.status-card span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-2);
}

.section {
  padding: 82px 0;
  scroll-margin-top: 76px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.about-card {
  max-width: 930px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.about-card p {
  margin-bottom: 18px;
  color: #33406f;
  font-size: 18px;
  line-height: 2;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.project-card,
.education-card,
.skill-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 32px rgba(24, 28, 40, 0.045);
}

.project-card {
  overflow: hidden;
}

.project-card img,
.project-visual {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid var(--line);
}

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

.workflow-visual {
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(241, 124, 186, 0.16), rgba(90, 125, 248, 0.16)),
    #f9fbff;
}

.workflow-visual span,
.workflow-visual strong {
  width: 100%;
  min-height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(90, 125, 248, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.workflow-visual strong {
  color: var(--accent);
}

.dashboard-visual {
  align-items: end;
  grid-template-columns: repeat(3, 44px);
  gap: 18px;
  padding-bottom: 42px;
  background:
    linear-gradient(180deg, rgba(241, 124, 186, 0.15), rgba(90, 125, 248, 0.08)),
    #f8fbff;
}

.bar {
  width: 44px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--accent);
}

.bar.one {
  height: 70px;
}

.bar.two {
  height: 112px;
}

.bar.three {
  height: 88px;
}

.line {
  position: absolute;
  width: 72%;
  height: 2px;
  left: 14%;
  bottom: 72px;
  transform: rotate(-8deg);
  background: var(--accent-2);
}

.project-body {
  padding: 24px;
}

.project-body h3,
.education-card h3,
.skill-card h3 {
  margin-bottom: 14px;
  font-size: 20px;
  line-height: 1.35;
}

.project-body p,
.education-card p,
.skill-card p {
  color: var(--muted);
  line-height: 1.7;
}

dl {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

dt {
  margin-bottom: 5px;
  color: var(--ink);
  font-weight: 760;
}

dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #3958c9;
  font-size: 13px;
  font-weight: 650;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 760;
}

.education-list {
  display: grid;
  gap: 22px;
  max-width: 900px;
  margin: 0 auto;
}

.education-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 28px;
}

.education-card p {
  margin-bottom: 0;
}

.education-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.skill-card {
  padding: 28px;
}

.skill-card p {
  margin-bottom: 0;
  font-size: 16px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.contact-card {
  min-height: 120px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 28px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

a.contact-card:hover,
.project-card:hover,
.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.contact-card span {
  color: var(--muted);
}

.contact-card strong {
  font-size: 18px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer .shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

@media (max-width: 920px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 58px 0 72px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .project-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 28px, 1120px);
  }

  h1 {
    font-size: clamp(46px, 14vw, 64px);
  }

  .lead {
    font-size: 22px;
  }

  .section {
    padding: 64px 0;
  }

  .section-heading {
    text-align: left;
  }

  .about-card,
  .project-body,
  .education-card,
  .skill-card,
  .contact-card {
    padding: 22px;
  }

  .education-card {
    grid-template-columns: 1fr;
  }

  .education-meta {
    text-align: left;
    white-space: normal;
  }

  .status-card {
    right: 8px;
    bottom: 20px;
  }

  .footer .shell {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}
