:root {
  --ink: #17202a;
  --muted: #5f6b76;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --line: #dfe5e8;
  --blue: #205a7a;
  --teal: #1f8275;
  --gold: #b9802a;
  --rose: #b95b5b;
  --green: #607b47;
  --shadow: 0 18px 50px rgba(21, 33, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(32, 90, 122, 0.08), transparent 360px),
    var(--paper);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial,
    sans-serif;
  line-height: 1.65;
}

body.modal-open {
  overflow: hidden;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(223, 229, 232, 0.78);
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  font-size: 18px;
  font-weight: 800;
}

.nav {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  min-width: 54px;
  padding: 8px 10px;
  text-align: center;
  border-radius: 6px;
}

.nav a:hover {
  color: var(--blue);
  background: rgba(32, 90, 122, 0.08);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: 64px 0 72px;
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;
  letter-spacing: 0;
}

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

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.35;
}

.headline {
  max-width: 780px;
  margin-bottom: 24px;
  color: #2b3945;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.6;
}

.meta-row,
.actions,
.tag-cloud,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-row span,
.tag-cloud span,
.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
}

.actions {
  margin-top: 28px;
}

.button,
.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  font: inherit;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.button {
  cursor: pointer;
}

.icon-button {
  gap: 9px;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.button-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button:hover,
.project-link:hover {
  transform: translateY(-2px);
  border-color: rgba(32, 90, 122, 0.34);
  box-shadow: 0 12px 28px rgba(32, 90, 122, 0.14);
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.profile-panel,
.skill-card,
.education-item,
.timeline-body,
.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.profile-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.avatar {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 6px;
  background: #fff;
}

.profile-name {
  margin-bottom: 2px;
  font-size: 22px;
  font-weight: 800;
}

.profile-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.section {
  padding: 72px 0;
  border-top: 1px solid rgba(223, 229, 232, 0.86);
}

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

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.skill-card {
  padding: 22px;
}

.skill-card:nth-child(1) {
  border-top: 4px solid var(--blue);
}

.skill-card:nth-child(2) {
  border-top: 4px solid var(--teal);
}

.skill-card:nth-child(3) {
  border-top: 4px solid var(--gold);
}

.skill-card:nth-child(4) {
  border-top: 4px solid var(--rose);
}

.skill-card p,
.project-card p,
.timeline-body p,
.timeline-body li,
.muted {
  color: var(--muted);
}

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

.education-item {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.school-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(32, 90, 122, 0.95), rgba(23, 32, 42, 0.95)),
    #17202a;
}

.school-logo-wrap img {
  width: 100%;
  max-width: 170px;
  height: auto;
  object-fit: contain;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
}

.time {
  color: var(--gold);
  font-weight: 800;
}

.timeline-body {
  padding: 24px;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 292px;
  padding: 22px;
}

.project-card.featured {
  border-top: 4px solid var(--teal);
}

.project-type {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.project-link {
  width: fit-content;
}

.detail-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.detail-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--accent, var(--teal));
  content: "";
}

.detail-card:hover,
.detail-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(32, 90, 122, 0.34);
  box-shadow: 0 24px 60px rgba(21, 33, 42, 0.14);
  outline: none;
}

.work-card {
  --accent: var(--blue);
}

.rhythm-card {
  --accent: var(--rose);
}

.data-card {
  --accent: var(--teal);
}

.map-card {
  --accent: var(--green);
}

.site-card {
  --accent: var(--gold);
}

.commerce-card {
  --accent: #8c6f3d;
}

.vision-card {
  --accent: var(--blue);
}

.agent-card {
  --accent: #6f5d9a;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.mini-badge,
.detail-hint {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.mini-badge {
  background: rgba(32, 90, 122, 0.1);
  color: var(--blue);
}

.mini-badge.amber {
  background: rgba(185, 128, 42, 0.14);
  color: #805717;
}

.detail-hint {
  margin-left: auto;
  border: 1px solid rgba(32, 90, 122, 0.16);
  color: var(--muted);
  white-space: nowrap;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin-bottom: 0;
}

.footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--blue);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.modal[aria-hidden="false"] {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 24, 0.54);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(900px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 30px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.modal-accent {
  width: 76px;
  height: 6px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--teal);
}

.modal-kicker {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.modal-summary {
  max-width: 760px;
  color: #2b3945;
  font-size: 18px;
}

.modal-body {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  margin-top: 22px;
}

.detail-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.detail-section h3 {
  margin-bottom: 12px;
  font-size: 17px;
}

.detail-section ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.detail-section li + li {
  margin-top: 8px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.modal-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.modal-actions a.primary-link {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .profile-panel {
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: center;
  }

  .avatar {
    grid-row: span 2;
  }

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

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

  .modal-body {
    grid-template-columns: 1fr;
  }
}

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

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

  main,
  .footer {
    width: min(100% - 28px, 1160px);
  }

  .hero,
  .section {
    padding: 42px 0;
  }

  .profile-panel,
  .skill-grid,
  .education-list,
  .timeline-item,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .avatar {
    grid-row: auto;
    max-height: 360px;
  }

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

  .card-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hint {
    margin-left: 0;
  }

  .modal-panel {
    width: min(100% - 20px, 900px);
    margin: 10px auto;
    padding: 22px;
    max-height: calc(100vh - 20px);
  }
}

@media print {
  .topbar,
  .actions,
  .project-link,
  .detail-hint,
  .modal {
    display: none;
  }

  body {
    background: #fff;
  }

  .hero {
    min-height: auto;
  }

  .section {
    break-inside: avoid;
  }
}
