:root {
  color-scheme: light;
  --bg: #f7f9ff;
  --paper: #ffffff;
  --ink: #152033;
  --muted: #647084;
  --line: #dfe6f2;
  --blue: #3867f4;
  --cyan: #1da6a8;
  --violet: #7b61ff;
  --green-soft: #edf8f4;
  --blue-soft: #edf3ff;
  --violet-soft: #f1edff;
  --shadow: 0 22px 60px rgba(35, 54, 92, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(56, 103, 244, 0.1), transparent 34rem),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 42%, #ffffff 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button {
  font: inherit;
  cursor: pointer;
}

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

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

p {
  color: var(--muted);
  line-height: 1.78;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(223, 230, 242, 0.8);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 30px);
  color: #344056;
  font-size: 15px;
  font-weight: 750;
}

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

.contact-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: stretch;
  gap: 6px;
}

.contact-item a,
.copy-icon {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #344056;
  font-size: 13px;
  font-weight: 800;
}

.contact-item a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
}

.copy-icon {
  display: grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0;
}

.copy-icon:hover {
  border-color: rgba(56, 103, 244, 0.46);
  background: var(--blue-soft);
  color: var(--blue);
}

.copy-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  padding: 52px 0 34px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(58px, 12vw, 126px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 26px);
  margin-bottom: 18px;
}

.hero-identity {
  margin: -6px 0 14px;
  color: var(--ink);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 850;
  line-height: 1.45;
}

.hero-lede {
  max-width: 680px;
  margin-bottom: 18px;
  color: #3a4658;
  font-size: clamp(19px, 2.4vw, 28px);
  line-height: 1.55;
}

.identity-strip {
  width: fit-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 26px rgba(35, 54, 92, 0.06);
}

.identity-strip img {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 18%;
}

.identity-strip strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.identity-strip span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.contact-strip {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
  max-width: 440px;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  background: #fff;
  color: #253044;
  font-weight: 850;
  box-shadow: 0 10px 26px rgba(35, 54, 92, 0.08);
}

.button.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.hero-panel {
  position: relative;
  min-height: 560px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.hero-panel img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.profile-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.profile-card span,
.tag {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.profile-card strong {
  display: block;
  margin: 7px 0 8px;
  font-size: 25px;
}

.profile-card p {
  margin: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 78px;
}

.metrics article,
.project-card,
.skills-grid article,
.background-column article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 36px rgba(35, 54, 92, 0.07);
}

.metrics article {
  min-height: 128px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 20px;
}

.metrics strong {
  color: var(--blue);
  font-size: clamp(26px, 3vw, 38px);
}

.metrics span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.section {
  padding: 68px 0;
}

.section-title {
  max-width: 760px;
  margin-bottom: 26px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
}

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

.profile-tags span {
  border: 1px solid rgba(29, 166, 168, 0.22);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--green-soft);
  color: #087f82;
  font-size: 13px;
  font-weight: 900;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro > p {
  margin: 36px 0 0;
  font-size: 18px;
}

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

.project-card {
  min-height: 326px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

h3 {
  margin: 10px 0 10px;
  font-size: 22px;
  line-height: 1.28;
}

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

.project-card ul {
  display: grid;
  gap: 10px;
  margin: auto 0 0;
  padding-left: 18px;
  color: #465367;
  line-height: 1.7;
}

.skills-section {
  border-top: 1px solid var(--line);
}

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

.skills-grid article {
  padding: 22px;
}

.skills-grid article:nth-child(1) {
  background: var(--blue-soft);
}

.skills-grid article:nth-child(2) {
  background: var(--violet-soft);
}

.skills-grid article:nth-child(3) {
  background: var(--green-soft);
}

.skills-grid h3,
.skills-grid p {
  margin-bottom: 0;
}

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

.background-column {
  display: grid;
  align-content: start;
  gap: 14px;
}

.background-column > h3 {
  margin: 0 0 2px;
  font-size: 28px;
}

.background-column article {
  min-height: 192px;
  padding: 22px;
}

.background-column time {
  display: block;
  margin-bottom: 12px;
  color: var(--blue);
  font-weight: 900;
}

.background-column strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
}

.background-column p {
  margin-bottom: 0;
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-top: 28px;
  padding: 52px clamp(18px, 5vw, 72px);
  color: #fff;
  background: #14213a;
}

.footer h2 {
  max-width: 760px;
  color: #fff;
}

.footer .eyebrow {
  color: #7ee4d2;
}

address {
  display: grid;
  gap: 10px;
  font-style: normal;
  text-align: right;
}

address a {
  color: #dbe7ff;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  background: #14213a;
  box-shadow: var(--shadow);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 980px) {
  .hero,
  .intro,
  .footer,
  .background-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .metrics,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  address {
    text-align: left;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-right {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero-panel,
  .hero-panel img {
    min-height: 410px;
  }

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

  .contact-strip a {
    width: 100%;
  }
}
