.data-walk { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.data-walk h4 { margin: 0 0 10px; font-size: 15px; }
.data-walk .example-label { font-size: 12px; color: var(--ink-soft); }
.data-walk pre { max-width: 100%; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; background: white; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.8; }
.data-walk p { font-size: 14px; }
.implementation-deep { margin: 14px 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.implementation-deep summary { color: var(--teal); font-weight: 600; cursor: pointer; }
.implementation-deep summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.implementation-deep ol { margin: 16px 0 0; padding-left: 24px; font-size: 14px; }
.implementation-deep li { padding: 4px 0; overflow-wrap: anywhere; }
.method-steps { padding-left: 0; list-style: none; }
.method-steps > li { padding: 8px 0 18px 8px; border-bottom: 1px solid var(--line); }
.method-steps > li:last-child { border-bottom: 0; }
.method-steps h3 { font-size: 17px; margin: 8px 0; }
.method-steps .implementation-detail { padding: 14px 16px; background: var(--surface); border-left: 3px solid var(--line-strong); font-size: 14px; overflow-wrap: anywhere; }
.section-card code { overflow-wrap: anywhere; }
:root {
  --navy: #f7faf9;
  --navy-soft: #d9e5e1;
  --ink: #263438;
  --ink-soft: #56676d;
  --muted: #7b8b8f;
  --paper: #ffffff;
  --canvas: #f4f7f5;
  --surface: #f7faf9;
  --line: #dce6e2;
  --line-strong: #c8d6d1;
  --blue: #16857d;
  --blue-dark: #0f6f69;
  --blue-soft: #edf8f5;
  --teal: #0f766e;
  --teal-soft: #ecfdf5;
  --amber: #b45309;
  --amber-soft: #fff7ed;
  --rose: #be123c;
  --rose-soft: #fff1f2;
  --shadow: 0 12px 36px rgba(38, 52, 56, 0.07);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* Portfolio imagery and public, print-friendly resume. */
.homepage .hero-header { border-top: 4px solid var(--teal); }
.resume-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; margin-bottom: 24px; background: #e9f2ef; border: 1px solid var(--line); border-radius: 14px; scroll-margin-top: 24px; }
.resume-banner h2 { margin: 8px 0; font-size: 22px; line-height: 1.4; }
.resume-banner p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.resume-banner .primary-action { flex-shrink: 0; }
.project-image-link { display: block; margin: 24px 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 10px; }
.project-image-link img { display: block; width: 100%; height: auto; }
.project-image-link > span { display: flex; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.project-image-link:hover { border-color: var(--teal); }
.project-figure { margin: 24px 0; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.project-figure img { display: block; width: 100%; height: auto; }
.project-figure figcaption { padding: 12px 8px 4px; color: var(--ink-soft); font-size: 12px; }
.portrait-figure { max-width: 640px; margin-inline: auto; }
.diagram-details { border-top: 1px solid var(--line); padding-top: 16px; }
.diagram-details summary { cursor: pointer; color: var(--teal); font-weight: 600; padding: 8px 0; }
.diagram-details summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
caption { text-align: left; padding-bottom: 10px; font-size: 13px; color: var(--ink-soft); }
.resume-toolbar { max-width: 900px; margin: 24px auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; }
.resume-sheet { max-width: 900px; margin: 0 auto 48px; padding: 48px 56px; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.resume-sheet h1 { margin: 8px 0; font-size: 38px; line-height: 1.25; }
.resume-sheet header { border-bottom: 2px solid var(--teal); padding-bottom: 12px; }
.resume-sheet h2 { margin: 24px 0 10px; color: var(--teal); font-size: 18px; }
.resume-sheet h3 { margin: 14px 0 5px; font-size: 15px; }
.resume-sheet p, .resume-sheet li { font-size: 14px; }
.resume-sheet ul { padding-left: 20px; }
.resume-sheet li + li { margin-top: 8px; }
.resume-date { float: right; color: var(--ink-soft); font-size: 13px; }
@media(max-width: 760px) { .resume-banner { align-items: flex-start; flex-direction: column; padding: 24px; } .resume-sheet { margin: 0 12px 24px; padding: 28px 20px; } .resume-date { float: none; display: block; } }
@media print { @page { size: A4; margin: 12mm; } .resume-page { background: white; } .resume-toolbar { display: none; } .resume-sheet { padding: 0; margin: 0; border: 0; box-shadow: none; max-width: none; } .resume-sheet h1 { font-size: 25px; } .resume-sheet h2 { margin: 12px 0 6px; font-size: 14px; break-after: avoid; } .resume-sheet h3 { margin-top: 8px; font-size: 11px; break-after: avoid; } .resume-sheet p, .resume-sheet li { font-size: 10px; line-height: 1.5; } .resume-sheet p { margin-bottom: 6px; } .resume-sheet li { break-inside: avoid; } .resume-sheet li + li { margin-top: 4px; } .resume-date { font-size: 10px; } }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue-dark);
  text-decoration: none;
  text-underline-offset: 3px;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin-top: 0;
}

strong {
  color: var(--ink);
  font-weight: 700;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.main-wrapper {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.toc-wrapper {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 48px 26px;
  color: var(--ink-soft);
  background: #fbfdfc;
  border-right: 1px solid var(--line);
}

.toc {
  width: 100%;
}

.toc-wrapper .toc-title {
  margin: 0 10px 28px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.toc-wrapper .toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: homepage-nav;
}

.toc-item {
  margin: 3px 0;
  counter-increment: homepage-nav;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 11px;
  color: var(--ink-soft);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease;
}

.toc-link::before {
  content: "0" counter(homepage-nav);
  width: 24px;
  color: #97a5a2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.toc-link:hover {
  color: var(--teal);
  background: var(--teal-soft);
}

.toc-link.active {
  color: var(--teal);
  background: #e2f3ee;
}

.toc-link.active::before {
  color: var(--teal);
}

.mobile-nav-toggle {
  display: none;
}

.content-wrapper {
  min-width: 0;
  padding: 34px 0 64px;
}

.container {
  width: min(100% - 48px, 1040px);
  margin: 0 auto;
}

.header {
  margin-bottom: 24px;
  padding: 44px 48px;
  color: var(--ink-soft);
  background: linear-gradient(135deg, #ffffff 0%, #eef7f4 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.header h1 {
  max-width: 860px;
  margin: 10px 0 16px;
  color: var(--ink);
  font-size: clamp(2.15rem, 4.5vw, 3.35rem);
  line-height: 1.13;
  letter-spacing: -0.035em;
}

.hero-header {
  padding: 54px 56px 46px;
}

.hero-header h1 {
  font-size: clamp(2.75rem, 5.4vw, 4.45rem);
}

.name-en {
  color: var(--teal);
  font-weight: 500;
}

.eyebrow,
.section-kicker {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subtitle {
  display: grid;
  gap: 8px;
  max-width: 800px;
  color: var(--ink-soft);
}

.subtitle strong {
  color: var(--ink);
  font-size: 19px;
}

.muted {
  color: var(--ink-soft);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 36px 0 30px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-metric {
  min-width: 0;
  padding: 0 20px;
  border-left: 1px solid var(--line);
}

.hero-metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.metric-value,
.metric-label {
  display: block;
}

.metric-value {
  margin-bottom: 3px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.35;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.hero-actions,
.detail-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.secondary-action,
.back-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.primary-action:hover {
  color: #fff;
  background: #3b82f6;
  transform: translateY(-1px);
}

.secondary-action {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line-strong);
}

.secondary-action:hover {
  color: var(--teal);
  background: #fff;
  border-color: #9dcfc3;
}

.card,
.section-card {
  --accent: var(--blue);
  position: relative;
  margin-bottom: 20px;
  padding: 42px 46px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.035);
}

#about {
  --accent: var(--blue);
}

#internship {
  --accent: var(--teal);
}

#projects {
  --accent: #6385a5;
}

#competitions {
  --accent: var(--amber);
}

#research {
  --accent: #4f8da2;
}

#awards {
  --accent: var(--rose);
}

.card h2,
.section-card h2 {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 5px 0 22px;
  color: var(--ink);
  font-size: clamp(1.65rem, 3.5vw, 2.05rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.card h2::before,
.section-card h2::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, white);
}

.card h3,
.section-card h3 {
  margin: 30px 0 12px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.4;
}

.section-kicker {
  color: var(--accent);
}

.section-intro,
.lead-copy {
  max-width: 790px;
  color: var(--ink-soft);
}

.lead-copy {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.75;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.about-grid > div {
  display: grid;
  gap: 5px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.about-grid strong:not(:first-of-type) {
  margin-top: 8px;
}

.about-grid span:not(.about-label) {
  color: var(--ink-soft);
  font-size: 14px;
}

.about-label,
.award-category {
  margin-bottom: 4px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.research-pill-list span,
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #445067;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.research-pill-list span {
  padding: 7px 11px;
}

.project-item {
  margin-top: 24px;
}

.project-item-featured {
  padding: 26px 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.project-item-featured + .project-item-featured {
  margin-top: 14px;
}

.project-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.project-title-row {
  min-width: 0;
}

.project-title,
.project-mini-card > a:first-of-type {
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
  line-height: 1.48;
}

.project-title:hover,
.project-mini-card > a:first-of-type:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.project-index {
  padding-top: 3px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.project-meta {
  display: block;
  margin: 8px 0 14px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.header .project-meta,
.header .project-meta strong {
  color: var(--ink-soft);
}

.project-item p {
  margin-bottom: 18px;
  color: #38455a;
}

.project-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  margin: 18px 0;
  padding: 13px 15px;
  color: #334155;
  background: #fff;
  border-left: 3px solid var(--accent, var(--blue));
  border-radius: 0 8px 8px 0;
  font-size: 13px;
}

.project-result strong {
  white-space: nowrap;
  color: var(--accent, var(--blue-dark));
}

.project-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.project-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-footer > .project-resource-links {
  gap: 10px 16px;
  align-items: center;
}

.research-project-footer {
  justify-content: flex-end;
  margin-top: auto;
}

.badge {
  margin: 0;
  padding: 5px 9px;
}

.badge-ccf,
.badge-status {
  color: #1d4ed8;
  background: var(--blue-soft);
  border-color: #bfdbfe;
}

.badge-role {
  color: #0f766e;
  background: var(--teal-soft);
  border-color: #a7f3d0;
}

.badge-venue {
  color: #475569;
}

.text-link {
  flex: 0 0 auto;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
}

.subsection-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px !important;
  font-size: 17px !important;
}

.subsection-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.project-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

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

.project-mini-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 23px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.project-mini-card > a:first-of-type {
  font-size: 16px;
}

.project-mini-card > span {
  margin: 6px 0 11px;
  color: var(--muted);
  font-size: 12px;
}

.project-mini-card p {
  margin-bottom: 15px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.project-mini-card .text-link {
  margin-top: auto;
}

.pub-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.pub-item {
  display: grid;
  gap: 7px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.pub-item:first-child {
  border-top: 0;
}

.pub-item > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.venue,
.ccf,
.author-role {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.venue {
  color: #1d4ed8;
  background: var(--blue-soft);
}

.ccf {
  color: #0f766e;
  background: var(--teal-soft);
}

.author-role {
  color: #5b6473;
  background: #eef2f7;
}

.pub-title {
  font-weight: 650;
  line-height: 1.55;
}

.publication-status {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.publication-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-published {
  color: #15765f;
}

.status-published::before {
  background: #22a67a;
  box-shadow: 0 0 0 3px #e1f5ee;
}

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

.award-section {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.award-section ul {
  margin: 10px 0 0;
  padding-left: 19px;
}

.award-section li + li {
  margin-top: 9px;
}

.footer {
  padding: 34px 12px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.footer p {
  margin-bottom: 6px;
}

.footer-highlight {
  color: var(--ink-soft);
  font-weight: 700;
}

/* Detail pages */

body > .container {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  width: min(100% - 48px, 1280px);
  max-width: 1280px;
  padding: 24px 0 36px;
}

body > .container > .back-button,
body > .container > .header {
  grid-column: 1 / -1;
}

body > .container > .back-button {
  justify-self: start;
  min-height: auto;
  margin: 0;
  padding: 2px 1px;
  color: var(--teal);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 13px;
}

body > .container > .back-button:hover {
  color: var(--blue-dark);
  background: transparent;
  text-decoration: underline;
}

body > .container > .detail-content {
  grid-column: 2;
  min-width: 0;
}

.detail-content > .section-card:last-of-type {
  margin-bottom: 16px;
}

.back-button,
.link-button {
  margin-bottom: 16px;
  color: var(--ink-soft);
  background: var(--paper);
  border-color: var(--line-strong);
}

.back-button:hover,
.link-button:hover {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #bfdbfe;
}

.header > .badge,
.header > div > .badge {
  color: var(--teal);
  background: #ffffff;
  border-color: #b9dcd4;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detail-summary > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 16px 17px;
  background: rgba(255, 255, 255, 0.76);
}

.detail-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-summary strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.toc-container {
  grid-column: 1;
  position: sticky;
  z-index: 20;
  top: 20px;
  align-self: start;
  margin: 0;
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.toc-container .toc-title {
  display: block;
  margin: 0 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.toc-container .toc-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-container .toc-list a {
  display: block;
  padding: 9px 10px;
  color: var(--ink-soft);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.toc-container .toc-list a:hover,
.toc-container .toc-list a.active {
  color: var(--teal);
  background: var(--teal-soft);
}

.toc-toggle {
  display: none;
}

.section-card {
  --accent: var(--blue);
  scroll-margin-top: 90px;
}

.section-card p,
.section-card li {
  color: #38455a;
}

.section-card li + li {
  margin-top: 7px;
}

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

.stat-card {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.stat-number {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
  color: var(--blue-dark);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.stat-label {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

table {
  width: 100%;
  margin: 20px 0 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  font-size: 14px;
}

th,
td {
  padding: 13px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: #334155;
  background: #eef3f8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

td {
  color: #445067;
  background: #fff;
}

.highlight-box,
.warning-box,
.challenge-box {
  margin: 22px 0;
  padding: 18px 20px;
  color: #334155;
  background: var(--blue-soft);
  border-left: 4px solid var(--blue);
  border-radius: 0 10px 10px 0;
}

.warning-box {
  background: var(--amber-soft);
  border-left-color: var(--amber);
}

.challenge-box {
  background: var(--teal-soft);
  border-left-color: var(--teal);
}

.highlight-box p:last-child,
.warning-box p:last-child,
.challenge-box p:last-child {
  margin-bottom: 0;
}

.implementation-list,
.topic-grid,
.bot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.implementation-item,
.topic-card,
.bot-card {
  min-width: 0;
  padding: 18px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.62;
}

.implementation-item strong,
.topic-card strong,
.bot-card strong {
  display: block;
  margin-bottom: 6px;
}

.pipeline-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.pipeline-step {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  color: #334155;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.detail-footer-actions {
  justify-content: flex-end;
  padding: 0 0 10px;
}

.detail-content > div[style] {
  margin-top: 0 !important;
  padding-bottom: 10px;
  text-align: right !important;
}

.detail-content .link-button {
  min-height: auto;
  margin: 0;
  padding: 3px 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #b9dcd4;
  border-radius: 0;
}

.detail-content .link-button:hover {
  color: var(--blue-dark);
  background: transparent;
  border-color: var(--teal);
}

.emoji {
  display: none;
}

@media (max-width: 1100px) {
  .main-wrapper {
    display: block;
  }

  .content-wrapper {
    padding-top: 22px;
  }

  .toc-wrapper {
    position: fixed;
    z-index: 100;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(82vw, 290px);
    height: 100vh;
    padding-top: 76px;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.22);
  }

  .toc-wrapper.show {
    transform: translateX(0);
  }

  .mobile-nav-toggle {
    position: fixed;
    z-index: 110;
    right: 16px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 40px;
    padding: 8px 12px;
    color: #fff;
    background: var(--teal);
    border: 1px solid var(--teal);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    font-weight: 700;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 72px;
  }

  body {
    font-size: 15px;
  }

  .content-wrapper {
    padding: 22px 0 36px;
  }

  .container {
    width: min(100% - 24px, 1040px);
  }

  body > .container {
    display: block;
    width: min(100% - 24px, 1040px);
    padding-top: 18px;
  }

  body > .container > .detail-content {
    margin-left: 0;
  }

  .header,
  .hero-header {
    padding: 30px 24px;
    border-radius: 14px;
  }

  .hero-header h1 {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
  }

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

  .subtitle strong {
    font-size: 17px;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 26px;
    padding: 0;
  }

  .hero-metric {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
  }

  .hero-metric:first-child {
    padding-left: 12px;
  }

  .hero-metric:nth-child(odd) {
    border-left: 0;
  }

  .hero-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .card,
  .section-card {
    padding: 30px 22px;
    border-radius: 14px;
  }

  .card h2,
  .section-card h2 {
    margin-bottom: 18px;
  }

  .lead-copy {
    font-size: 16px;
  }

  .about-grid,
  .award-grid,
  .project-mini-grid,
  .stats-grid,
  .implementation-list,
  .topic-grid,
  .bot-grid,
  .detail-summary {
    grid-template-columns: 1fr;
  }

  .project-item-featured {
    padding: 22px 19px;
  }

  .project-title {
    font-size: 17px;
  }

  .project-result {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .project-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-index {
    display: none;
  }

  .project-heading {
    grid-template-columns: 1fr;
  }

  .detail-summary {
    gap: 0;
  }

  .detail-summary > div + div {
    border-top: 1px solid var(--line);
  }

  .toc-container {
    position: fixed;
    z-index: 90;
    top: 70px;
    right: 14px;
    left: 14px;
    display: none;
    max-height: 66vh;
    overflow-y: auto;
    margin: 0;
    padding: 18px;
  }

  .toc-container.show {
    display: block;
  }

  .toc-container .toc-title {
    display: block;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
  }

  .toc-container .toc-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .toc-toggle {
    position: fixed;
    z-index: 95;
    right: 16px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #fff;
    background: var(--teal);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.25);
    font-size: 18px;
  }

  .section-card {
    scroll-margin-top: 70px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }

  th,
  td {
    min-width: 130px;
  }

  .footer {
    padding-right: 4px;
    padding-left: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
.resume-image-page .resume-toolbar { max-width: 1100px; flex-wrap: wrap; }
.resume-image-sheet { max-width: 1100px; margin: 0 auto 40px; background: white; box-shadow: var(--shadow); }
.resume-image-sheet img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .resume-image-page .resume-toolbar { padding: 0 12px; } .resume-image-page .hero-actions { gap: 8px; } }
@media print { .resume-image-sheet { width: 100%; max-width: none; margin: 0; box-shadow: none; } .resume-image-sheet img { width: auto; height: auto; max-width: 100%; max-height: 272mm; margin: auto; } .resume-image-sheet a { display: block; } }

/* Quiet portfolio pass: let evidence and writing carry the page. */
body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.header {
  background: var(--paper);
  box-shadow: 0 4px 18px rgba(38, 52, 56, 0.045);
}

.card,
.section-card {
  border-top-width: 1px;
  border-radius: 12px;
  box-shadow: none;
}

.card h2::before,
.section-card h2::before {
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.1);
}

#about,
#internship,
#competitions,
#research,
#projects,
#awards {
  --accent: var(--teal);
}

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

.project-item-featured,
.project-mini-card {
  background: transparent;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-radius: 0;
}

.project-item-featured:last-child,
.project-mini-card:last-child {
  border-bottom: 0;
}

.research-pill-list span,
.badge {
  border-radius: 6px;
  font-weight: 650;
}

.project-result {
  background: #fbfdfc;
}

.detail-content > .section-card {
  border-top-width: 1px;
}

@media (max-width: 960px) {
  body > .container {
    display: block;
    width: min(100% - 32px, 900px);
  }

  body > .container > .detail-content {
    margin-left: 0;
  }

  .toc-container {
    position: fixed;
    z-index: 90;
    top: 70px;
    right: 14px;
    left: 14px;
    display: none;
    max-height: 66vh;
    overflow-y: auto;
  }

  .toc-container.show {
    display: block;
  }

  .toc-toggle {
    position: fixed;
    z-index: 95;
    right: 16px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #fff;
    background: var(--teal);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    font-size: 18px;
  }
}

@media (max-width: 760px) {
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-metric,
  .hero-metric:first-child {
    padding: 14px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-metric:last-child {
    border-bottom: 0;
  }

  .project-item-featured,
  .project-mini-card {
    padding-right: 0;
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toc-wrapper,
  .toc-container {
    transition: none;
  }
}
