:root {
  color-scheme: light dark;
  --content: 1080px;
  --content-narrow: 900px;
  --bg: #f7f9fc;
  --bg-soft: #f2f5f9;
  --surface: #ffffff;
  --text: #101827;
  --muted: #6b788a;
  --line: #e8edf3;
  --blue: #256fd8;
  --blue-2: #5ba7ff;
  --green: #1d9a73;
  --amber: #b7791f;
  --chip: #f1f5fa;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] {
  --bg: #0f1829;
  --bg-soft: #111d31;
  --surface: #1b2638;
  --text: #f5f7fb;
  --muted: #aab6c6;
  --line: rgba(255, 255, 255, 0.09);
  --blue: #62a4ff;
  --blue-2: #8cc3ff;
  --green: #55d6a5;
  --amber: #f4c15d;
  --chip: #243348;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

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

button {
  font: inherit;
}

.container {
  width: min(var(--content), calc(100% - 72px));
  margin: 0 auto;
}

.container.narrow {
  width: min(var(--content-narrow), calc(100% - 72px));
}

.section-pad {
  padding: 82px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--content), calc(100% - 72px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.28rem;
  font-weight: 850;
  color: var(--text);
}

.brand-mark {
  order: 2;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 14px color-mix(in srgb, var(--blue) 80%, transparent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  min-width: 76px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-btn {
  min-width: 42px;
  width: 42px;
  padding: 0;
  font-size: 0;
  position: relative;
}

.icon-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text);
}

:root[data-theme="dark"] .icon-btn::before {
  width: 16px;
  height: 16px;
  border: none;
  background: var(--text);
  box-shadow: -5px 0 0 var(--surface);
}

.hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  background: var(--bg);
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 26px;
}

.avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  margin-bottom: 30px;
}

.avatar {
  position: relative;
  z-index: 2;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  border: 4px solid var(--surface);
  object-fit: cover;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.hero h1 {
  max-width: 980px;
  margin: 0 0 18px;
  font-size: clamp(2.05rem, 4.1vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 900;
  background: linear-gradient(120deg, #111827 18%, var(--blue) 74%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:root[data-theme="dark"] .hero h1 {
  background: linear-gradient(120deg, #f8fbff 18%, var(--blue-2) 74%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-action.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.hero-action:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.16);
}

.section-heading {
  margin-bottom: 56px;
}

.section-heading.centered {
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.9rem, 3.2vw, 2.45rem);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.heading-line {
  display: block;
  width: 46px;
  height: 5px;
  margin: 20px auto 0;
  border-radius: 999px;
  background: var(--blue);
}

.section-heading.compact {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.section-heading.compact h2 {
  max-width: 720px;
}

.section-intro {
  max-width: 720px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 650;
}

.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 850;
  transition: transform 180ms ease, background 180ms ease;
}

.section-link:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--blue) 13%, var(--surface));
}

.now-section {
  padding-top: 34px;
  background: var(--bg);
}

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

.focus-card {
  position: relative;
  isolation: isolate;
  min-height: 238px;
  overflow: hidden;
  padding: 30px 30px 32px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--blue)) 16%, var(--line));
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.focus-card::before {
  display: none;
}

.focus-card::after {
  display: none;
}

.focus-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent, var(--blue)) 42%, var(--line));
  box-shadow: 0 26px 62px rgba(15, 23, 42, 0.13);
}

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

.accent-green {
  --accent: var(--blue);
}

.accent-amber {
  --accent: var(--blue);
}

.focus-index {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 3px 12px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--blue)) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--blue)) 10%, var(--surface));
  color: var(--accent, var(--blue));
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.focus-card h3 {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  font-size: 1.22rem;
  line-height: 1.42;
  font-weight: 900;
}

.focus-card p {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

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

.project-grid.two-up,
.artifact-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.12);
}

.project-media {
  height: 252px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.project-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 820;
}

.project-meta span:first-child {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  color: var(--blue);
}

.project-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.45;
  font-weight: 900;
}

.project-body p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.project-points {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.project-points li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.62;
}

.project-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.74em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
}

.tag-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-row span,
.chip-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--chip);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 750;
}

.text-link {
  display: inline-flex;
  margin-top: auto;
  padding-top: 24px;
  color: var(--blue);
  font-weight: 850;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.card-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  font-weight: 850;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card-links a:first-child {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.card-links a:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 9%, var(--surface));
}

.card-links a:first-child:hover {
  background: color-mix(in srgb, var(--blue) 88%, #111827);
}

.alt-section {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.architecture-section {
  padding-top: 28px;
}

.architecture-panel {
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.arch-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.arch-stage {
  --stage-accent: var(--blue);
  position: relative;
  isolation: isolate;
  min-height: 248px;
  overflow: hidden;
  padding: 28px 24px 26px;
  border: 1px solid color-mix(in srgb, var(--stage-accent) 14%, var(--line));
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.arch-stage::before {
  display: none;
}

.arch-stage::after {
  display: none;
}

.arch-stage:nth-child(2) {
  --stage-accent: var(--blue);
}

.arch-stage:nth-child(3) {
  --stage-accent: var(--blue);
}

.arch-stage:nth-child(4) {
  --stage-accent: var(--blue);
}

.arch-stage:nth-child(6) {
  --stage-accent: var(--blue);
}

.arch-stage:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--stage-accent) 42%, var(--line));
  box-shadow: 0 26px 62px rgba(15, 23, 42, 0.13);
}

.arch-stage.highlight {
  --stage-accent: var(--blue);
  border-color: color-mix(in srgb, var(--stage-accent) 38%, var(--line));
  background: var(--surface);
  box-shadow: 0 20px 52px rgba(37, 111, 216, 0.13);
}

.stage-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid color-mix(in srgb, var(--stage-accent) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--stage-accent) 10%, var(--surface));
  color: var(--stage-accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.arch-stage h3 {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  font-size: 1.06rem;
  line-height: 1.35;
  font-weight: 900;
}

.arch-stage p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.62;
}

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

.artifact-card {
  min-height: 276px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contribution-card {
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.contribution-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.12);
}

.artifact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.artifact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  color: var(--blue);
  font-weight: 900;
}

.artifact-kicker {
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.artifact-card h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.artifact-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.cred-list {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.cred-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.62;
}

.cred-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.74em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
}

.artifact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.artifact-tags span {
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--chip);
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 750;
}

.artifact-link {
  margin-top: auto;
  padding-top: 24px;
  color: var(--blue);
  font-weight: 850;
}

.artifact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.artifact-actions a {
  color: var(--blue);
  font-weight: 850;
}

.artifact-actions a:hover,
.artifact-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 46px;
  margin-top: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 84px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 28px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 78px;
  top: 7px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--blue);
  border-radius: 999px;
  background: var(--bg);
}

.timeline-item time {
  color: var(--blue);
  font-weight: 900;
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.timeline-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.stack-column {
  min-height: 205px;
}

.stack-column h3 {
  margin: 0 0 20px;
  padding-left: 14px;
  border-left: 4px solid var(--blue);
  font-size: 1.2rem;
  font-weight: 900;
}

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

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: center;
}

.contact-card h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 900;
}

.contact-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  text-align: center;
}

.contact-links a {
  display: block;
  color: var(--text);
  font-weight: 850;
  transition: color 180ms ease, transform 180ms ease;
}

.contact-links a::before {
  content: attr(data-mark);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  border: 1px solid var(--line);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.contact-links a:hover {
  color: var(--blue);
  transform: translateY(-2px);
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 30px 20px 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

  .project-grid,
  .artifact-grid,
  .focus-grid,
  .stack-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-grid.two-up,
  .artifact-grid.two-up {
    max-width: none;
  }

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

@media (max-width: 680px) {
  .container,
  .container.narrow {
    width: min(100% - 30px, var(--content));
  }

  .nav-shell {
    width: min(100% - 30px, var(--content));
    height: 64px;
    gap: 10px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand span:last-child {
    max-width: 156px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .control-btn {
    min-width: 58px;
    height: 36px;
    padding: 0 11px;
  }

  .hero {
    min-height: 560px;
  }

  .avatar-wrap,
  .avatar {
    width: 116px;
    height: 116px;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-pad {
    padding: 68px 0;
  }

  .project-grid,
  .artifact-grid,
  .focus-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .project-media {
    height: 210px;
  }

  .architecture-panel {
    padding: 18px;
  }

  .arch-flow {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .arch-stage {
    min-height: 0;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 36px;
  }

  .timeline-item::before {
    left: 2px;
  }

  .contact-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}
