:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --ink: #111315;
  --ink-soft: #2b2f33;
  --muted: #74777a;
  --muted-2: #9da1a5;
  --line: rgba(17, 19, 21, 0.11);
  --line-strong: rgba(17, 19, 21, 0.22);
  --steel: #5e6973;
  --radius: 6px;
  --font-sans:
    "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI",
    "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-serif:
    "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN",
    "STSong", "SimSun", serif;
  --font-mono: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}

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

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

button,
summary {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 30;
  padding: 9px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px clamp(22px, 6vw, 88px);
  background: rgba(247, 247, 244, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 0.94rem;
  font-weight: 720;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 800;
}

.nav-links {
  gap: 4px;
}

.nav-links a {
  padding: 8px 10px;
  color: var(--muted);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 680;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: rgba(17, 19, 21, 0.04);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 62px);
  padding: clamp(64px, 8vw, 112px) clamp(22px, 6vw, 88px) clamp(56px, 7vw, 88px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.signal-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.48;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  gap: clamp(42px, 8vw, 120px);
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 720;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 18px;
  font-family: var(--font-serif);
  font-size: 7.5rem;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-size: 2.45rem;
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.role {
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.35;
}

.summary {
  max-width: 700px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.86;
}

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

.button,
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 760;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.button.secondary,
.contact-link {
  color: var(--ink);
  background: transparent;
}

.button:hover,
.button:focus-visible,
.contact-link:hover,
.contact-link:focus-visible {
  border-color: var(--line-strong);
  outline: 0;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #2a2e32;
}

.button.secondary:hover,
.button.secondary:focus-visible,
.contact-link:hover,
.contact-link:focus-visible {
  background: rgba(17, 19, 21, 0.04);
}

.system-panel {
  position: relative;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.panel-media {
  position: relative;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e7e8e6;
  aspect-ratio: 16 / 9;
}

.panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(0.92) brightness(1.08);
  opacity: 0.58;
  transform: scale(1.02);
}

.panel-head,
.fact-list div,
.runtime-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 720;
}

.panel-head-end {
  justify-content: flex-end;
}

.panel-head span,
.fact-list dt,
.runtime-strip li {
  color: var(--muted);
}

.panel-head strong {
  color: var(--steel);
  font-weight: 760;
}

.fact-list {
  margin: 0;
}

.fact-list div {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.fact-list dt {
  font-size: 0.82rem;
  font-weight: 680;
}

.fact-list dd {
  margin: 0;
  text-align: right;
  font-weight: 740;
}

.runtime-strip {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.runtime-strip li {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 680;
}

.runtime-strip li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--muted-2);
  border-radius: 999px;
}

.runtime-strip li.is-supported::before {
  background: var(--ink);
}

.runtime-strip span {
  color: var(--ink);
}

.section {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(70px, 8vw, 116px) clamp(22px, 6vw, 88px);
}

.compact-section {
  padding-bottom: clamp(48px, 6vw, 82px);
}

.section-title {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 30px;
}

.section-title > span,
.row-index,
.project-row summary span,
.project-row summary small,
.timeline-item time,
.profile-row span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.section-title > span,
.project-row summary span,
.project-row summary small,
.timeline-item time {
  font-family: var(--font-mono);
}

.row-index,
.profile-row span {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 760;
}

.section-title p {
  grid-column: 2;
  max-width: 520px;
  margin: -8px 0 0;
  color: var(--muted);
}

.capability-list,
.project-list,
.timeline,
.profile-section {
  border-top: 1px solid var(--line-strong);
}

.capability-row {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(220px, 0.44fr);
  gap: 28px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.capability-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.capability-row.is-active::before {
  width: min(420px, 56%);
}

.capability-row p,
.timeline-item p,
.profile-row p,
.contact-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.capability-row ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.capability-row li {
  padding: 4px 8px;
  color: var(--steel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.48fr) minmax(0, 1fr);
  gap: clamp(34px, 7vw, 96px);
}

.sticky-title {
  position: sticky;
  top: 92px;
  align-self: start;
}

.project-row {
  border-bottom: 1px solid var(--line);
}

.project-row summary {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 118px 28px;
  gap: 24px;
  align-items: center;
  min-height: 78px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
}

.project-row summary::-webkit-details-marker {
  display: none;
}

.project-row summary:focus {
  outline: 0;
}

.project-row summary:focus-visible {
  outline: 0;
}

.project-row summary:focus-visible::after {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 19, 21, 0.06);
}

.project-row summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  line-height: 1;
}

.project-row[open] summary::after {
  content: "-";
  color: var(--ink);
  border-color: var(--line-strong);
}

.project-row summary h3 {
  margin-bottom: 0;
}

.project-row summary small {
  text-align: right;
}

.project-row ul {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding-left: calc(170px + 24px);
  color: var(--ink-soft);
}

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

.timeline {
  --timeline-progress: 0%;
  position: relative;
  display: grid;
}

.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  left: 210px;
  top: 0;
  width: 1px;
}

.timeline::before {
  bottom: 0;
  background: var(--line);
}

.timeline::after {
  height: var(--timeline-progress);
  background: var(--ink);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 82px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 204px;
  top: 38px;
  width: 13px;
  height: 13px;
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.timeline-item.is-current::before {
  background: var(--ink);
  box-shadow: 0 0 0 6px rgba(17, 19, 21, 0.06);
}

.timeline-date {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-content: start;
  padding-top: 2px;
}

.timeline-date span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 760;
}

.timeline-card {
  max-width: 760px;
}

.timeline-item h3 {
  margin-bottom: 7px;
  font-size: 1.28rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-tags li {
  padding: 4px 9px;
  color: var(--steel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 680;
}

.profile-section {
  display: grid;
  padding-top: 0;
}

.profile-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.profile-row a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  font-weight: 740;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(58px, 7vw, 86px) clamp(22px, 6vw, 88px);
  color: var(--ink);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.contact-section > div:first-child {
  max-width: 720px;
}

.contact-section h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-family: var(--font-serif);
  font-size: 2.45rem;
  font-weight: 760;
  line-height: 1.22;
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(22px, 6vw, 88px);
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--ink);
  font-weight: 740;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.58s ease, transform 0.58s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].is-visible,
[data-reveal-prime] {
  opacity: 1;
  transform: translateY(0);
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.18s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

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

  .system-panel {
    max-width: 640px;
  }

  .sticky-title {
    position: static;
  }

  .capability-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .capability-row ul {
    grid-column: 2;
    justify-content: flex-start;
  }

  h1 {
    font-size: 5.8rem;
  }

  h2,
  .contact-section h2 {
    font-size: 2.15rem;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 20px;
  }

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

  .nav-links a {
    flex: 1;
    padding-inline: 4px;
    text-align: center;
  }

  .hero,
  .section,
  .contact-section,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .system-panel {
    margin-top: 8px;
  }

  .panel-media {
    aspect-ratio: 21 / 9;
    margin-bottom: 18px;
  }

  .panel-media img {
    object-position: center 44%;
  }

  .fact-list div {
    padding: 12px 0;
  }

  .runtime-strip {
    gap: 10px;
    margin: 14px 0;
  }

  .runtime-strip li {
    font-size: 0.68rem;
  }

  .summary {
    font-size: 0.98rem;
    line-height: 1.8;
  }

  h1 {
    font-size: 4.7rem;
  }

  h2,
  .contact-section h2 {
    font-size: 1.95rem;
  }

  .role {
    font-size: 1.22rem;
  }

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    width: 100%;
  }

  .button,
  .contact-link {
    flex: 1 1 0;
    min-width: 0;
  }

  .section-title {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .section-title p {
    grid-column: 1;
    margin-top: 0;
  }

  .capability-row,
  .project-row summary,
  .timeline-item,
  .profile-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .capability-row ul {
    grid-column: 1;
  }

  .project-row summary {
    padding-right: 44px;
  }

  .project-row summary::after {
    position: absolute;
    right: 0;
    top: 22px;
  }

  .project-row summary small {
    text-align: left;
  }

  .project-row ul {
    padding-left: 18px;
  }

  .timeline::before,
  .timeline::after {
    left: 5px;
  }

  .timeline-item {
    padding: 24px 0 24px 24px;
  }

  .timeline-item::before {
    left: 0;
    top: 31px;
  }

  .timeline-date {
    justify-items: start;
    gap: 8px;
  }

  .timeline-date span {
    min-height: 24px;
    padding-inline: 8px;
  }

  .timeline-card {
    max-width: none;
  }

  .timeline-tags {
    margin-top: 13px;
  }

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