:root {
  --ink: #17212b;
  --muted: #637083;
  --line: #dce4ec;
  --paper: #f7f9fb;
  --panel: #ffffff;
  --accent: #0f8b8d;
  --accent-strong: #09666d;
  --gold: #c99738;
  --coral: #d86750;
  --shadow: 0 22px 70px rgba(31, 49, 65, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 139, 141, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 139, 141, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.65;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(220, 228, 236, 0.7);
  background: rgba(247, 249, 251, 0.86);
  backdrop-filter: blur(18px);
}

.site-header[data-elevated="true"] {
  box-shadow: 0 12px 34px rgba(23, 33, 43, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 18px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.nav a,
.footer a {
  transition: color 180ms ease;
}

.nav a:hover,
.footer a:hover {
  color: var(--accent-strong);
}

.header-cta,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.header-cta {
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
}

.header-cta:hover,
.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 72px) 52px;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(64px, 12vw, 132px);
  line-height: 0.98;
  letter-spacing: 0;
}

.headline {
  margin-bottom: 22px;
  color: var(--accent-strong);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.25;
}

.intro {
  max-width: 680px;
  color: #425063;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-action {
  padding: 0 24px;
  color: #fff;
  background: var(--accent-strong);
  box-shadow: 0 16px 34px rgba(9, 102, 109, 0.22);
}

.secondary-action {
  padding: 0 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.profile-panel {
  padding: 22px;
  border: 1px solid rgba(220, 228, 236, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.portrait-visual {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 360px;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 22%, rgba(216, 103, 80, 0.18), transparent 30%),
    radial-gradient(circle at 78% 74%, rgba(201, 151, 56, 0.18), transparent 34%),
    #13202a;
}

.portrait-visual canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait-initials {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(48vw, 190px);
  height: min(48vw, 190px);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.08);
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.profile-grid div {
  padding: 18px;
  background: #fff;
}

.profile-grid strong,
.metrics-strip span {
  display: block;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.profile-grid span {
  color: var(--muted);
  font-size: 14px;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 clamp(20px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metrics-strip div {
  min-height: 148px;
  padding: 24px;
  background: #fff;
}

.metrics-strip p {
  margin: 10px 0 0;
  color: var(--muted);
}

.section {
  padding: clamp(70px, 9vw, 120px) clamp(20px, 5vw, 72px) 0;
}

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

.section-heading h2,
.education-contact h2,
.contact-panel h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
}

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

.project-card {
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 139, 141, 0.28);
  box-shadow: 0 20px 48px rgba(23, 33, 43, 0.11);
}

.feature-card {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 139, 141, 0.92), rgba(19, 32, 42, 0.96)),
    #13202a;
}

.feature-card p,
.feature-card .card-topline,
.feature-card .tag-row span {
  color: rgba(255, 255, 255, 0.78);
}

.feature-card .tag-row span {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.project-card h3,
.stack-groups h3,
.timeline-item h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.28;
}

.project-card p,
.stack-groups p,
.timeline-item p {
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-row span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #415063;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.stack-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.skill-map,
.stack-groups article,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.skill-map {
  display: grid;
  min-height: 430px;
  place-items: center;
  padding: 18px;
}

.skill-map canvas {
  width: min(100%, 500px);
  aspect-ratio: 1;
}

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

.stack-groups article {
  min-height: 190px;
  padding: 24px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.timeline-date {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

.education-contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  gap: 28px;
  align-items: stretch;
  padding-bottom: clamp(70px, 9vw, 120px);
}

.education-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.education-list p {
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
}

.education-list strong {
  color: var(--ink);
}

.contact-panel {
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 246, 247, 0.96)),
    #fff;
}

.contact-links {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.contact-links a,
.contact-links span {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #415063;
  font-weight: 700;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .hero,
  .stack-layout,
  .education-contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

@media (max-width: 640px) {
  .site-header {
    min-height: 64px;
    padding: 12px 18px;
  }

  .header-cta {
    display: none;
  }

  .hero {
    padding: 38px 18px 34px;
  }

  h1 {
    font-size: 64px;
  }

  .hero-actions,
  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .profile-panel {
    padding: 14px;
  }

  .portrait-visual {
    min-height: 280px;
  }

  .profile-grid,
  .metrics-strip,
  .project-grid,
  .stack-groups {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    margin: 0 18px;
  }

  .section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .section-heading {
    display: block;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 18px;
  }
}
