:root {
  color-scheme: light;
  --ink: #17202c;
  --muted: #5f6b78;
  --paper: #f7f8f6;
  --surface: #fbfbf8;
  --surface-strong: #eef3f1;
  --line: #d6ddd8;
  --teal: #1d6f73;
  --blue: #315f9b;
  --copper: #ad6433;
  --green: #2d7650;
  --shadow: 0 18px 42px rgba(23, 32, 44, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(29, 111, 115, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(49, 95, 155, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  background: rgba(247, 248, 246, 0.86);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

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

.nav-links a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

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

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

.hero {
  min-height: min(760px, calc(100svh - 64px));
  display: flex;
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 6vw, 70px);
}

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

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

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-name {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(18px, 2.3vw, 24px);
  font-weight: 750;
}

.hero-name small {
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 520;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

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

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 10px 16px;
  border: 1px solid var(--line);
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #f8fbf8;
  border-color: var(--teal);
  background: var(--teal);
}

.button.secondary {
  background: rgba(251, 251, 248, 0.82);
}

.section {
  padding: clamp(46px, 7vw, 86px) 0;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 20%);
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head.split {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: start;
}

.about-copy {
  display: grid;
  gap: 14px;
}

.about-copy > p {
  color: #2f3a46;
  font-size: 20px;
}

.focus-list {
  display: grid;
  gap: 12px;
}

.focus-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.focus-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--surface);
  background: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  background: rgba(251, 251, 248, 0.88);
  cursor: pointer;
}

.filter-button[aria-pressed="true"] {
  color: var(--surface);
  border-color: var(--ink);
  background: var(--ink);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1fr);
  gap: 14px 22px;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 251, 248, 0.92);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--teal), var(--line) 44%);
  box-shadow: var(--shadow);
}

.project-card h3,
.project-card .project-meta,
.project-card .project-skills,
.project-card .tag-row {
  grid-column: 1 / -1;
}

.project-meta,
.project-skills,
.timeline-meta,
.contact-type {
  color: var(--muted);
  font-size: 13px;
}

.project-details {
  margin: 0;
  padding-left: 18px;
  color: #334252;
  font-size: 14px;
}

.project-field,
.experience-field {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 24%);
}

.project-field {
  grid-column: 1;
}

.project-card:not(:has(.artifact-strip)) .project-field {
  grid-column: 1 / -1;
}

.project-field span,
.experience-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.artifact-strip {
  grid-column: 2;
  grid-row: 4 / span 6;
  display: grid;
  align-content: start;
  gap: 10px;
}

.artifact {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.artifact img {
  width: 100%;
  max-height: 280px;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #f2f4f3;
}

.artifact figcaption {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.project-field p,
.experience-field p {
  margin-bottom: 0;
  color: #2f3a46;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
}

.status {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green), var(--line) 64%);
}

.map-section {
  container-type: inline-size;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

.map-company {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--teal), var(--line) 56%);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(29, 111, 115, 0.09), rgba(251, 251, 248, 0.96));
}

.map-company:nth-child(2n) {
  border-color: color-mix(in srgb, var(--blue), var(--line) 60%);
  background: linear-gradient(180deg, rgba(49, 95, 155, 0.08), rgba(251, 251, 248, 0.96));
}

.map-company:nth-child(3n) {
  border-color: color-mix(in srgb, var(--copper), var(--line) 60%);
  background: linear-gradient(180deg, rgba(173, 100, 51, 0.08), rgba(251, 251, 248, 0.96));
}

.map-company h3 {
  font-size: 16px;
}

.map-company p {
  color: var(--muted);
  font-size: 13px;
}

.map-projects {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.map-project {
  min-height: 58px;
  display: grid;
  align-content: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(251, 251, 248, 0.94);
  font-size: 13px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.map-project:hover,
.map-link:hover {
  border-color: color-mix(in srgb, var(--teal), var(--line) 30%);
  transform: translateY(-1px);
}

.map-link {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  margin: 4px 0 16px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(251, 251, 248, 0.82);
  font-size: 13px;
  font-weight: 700;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 84px;
}

.timeline-item h3 {
  margin-bottom: 6px;
}

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

.education-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(238, 243, 241, 0.72);
}

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

.skill-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 251, 248, 0.9);
}

.skill-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.skill-item:first-of-type {
  border-top: 0;
}

.skill-item strong {
  display: block;
}

.skill-item p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.contact-section {
  padding-bottom: 92px;
}

.contact-card-single {
  max-width: 720px;
  margin: 0 auto;
}

.contact-card {
  min-height: 230px;
  display: grid;
  gap: 22px;
  align-content: space-between;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(29, 111, 115, 0.12), rgba(49, 95, 155, 0.06)),
    rgba(251, 251, 248, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.contact-title strong {
  display: block;
  text-align: center;
  font-size: clamp(20px, 2.4vw, 28px);
  word-break: break-word;
}

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

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.contact-row span {
  color: var(--muted);
  font-size: 13px;
}

.contact-row strong,
.contact-row a {
  color: var(--ink);
  font-size: clamp(14px, 1.8vw, 17px);
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}

@container (max-width: 880px) {
  .career-map {
    grid-template-columns: 1fr;
  }

  .map-company {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .about-grid,
  .project-card,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .skill-groups,
  .education {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

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

  .section-head.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    justify-content: flex-start;
  }

  .project-grid,
  .skill-groups,
  .education {
    grid-template-columns: 1fr;
  }

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

  .artifact-strip,
  .project-field {
    grid-column: 1;
  }

  .artifact-strip {
    grid-row: auto;
  }

  .contact-row {
    gap: 4px;
  }

  h1 {
    font-size: clamp(30px, 10vw, 42px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
