:root {
  --bg: #0f1419;
  --surface: #1a222d;
  --surface2: #232d3a;
  --text: #e8eef4;
  --muted: #8b9cb0;
  --accent: #3d9cf5;
  --accent2: #5ce1c5;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1a3a52 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

header.hero {
  text-align: center;
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero .title {
  color: var(--accent2);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.title-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.title-with-icon .ico {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--accent2);
  filter: drop-shadow(0 0 8px rgba(92, 225, 197, 0.35));
}

.hero .tagline {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36em;
  margin: 0 auto 1.25rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  font-size: 0.9rem;
}

.contact-row span {
  color: var(--muted);
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.contact-pill .ico {
  color: var(--accent2);
  opacity: 0.95;
}

nav.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.toc-title {
  display: none;
}

nav.toc a {
  color: var(--muted);
  font-size: 0.85rem;
}

nav.toc a:hover {
  color: var(--accent);
}

.toc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.toc-link .ico {
  width: 1rem;
  height: 1rem;
  color: var(--accent2);
  opacity: 0.9;
}

.toc-link:hover {
  color: var(--accent);
  border-color: var(--border);
  background: var(--surface2);
  text-decoration: none;
}

.toc-link:hover .ico {
  color: var(--accent);
}

@media (min-width: 1400px) {
  nav.toc {
    position: fixed;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 10.5rem;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 0;
    padding: 0.7rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(26, 34, 45, 0.92);
    backdrop-filter: blur(4px);
  }

  .toc-title {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
    padding: 0 0.45rem;
  }

  .toc-link {
    width: 100%;
    padding: 0.42rem 0.52rem;
    border-radius: 10px;
    justify-content: flex-start;
  }
}

section {
  margin-bottom: 2.75rem;
}

section h2,
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(61, 156, 245, 0.12), var(--surface2));
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(92, 225, 197, 0.06);
  flex-shrink: 0;
}

.section-title__mark .ico {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--accent);
}

.ico {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
  flex-shrink: 0;
  color: var(--accent2);
}

.ico--sm {
  width: 1rem;
  height: 1rem;
}

.ico--xs {
  width: 0.92rem;
  height: 0.92rem;
}

.ico--cert {
  width: 1.3rem;
  height: 1.3rem;
}

.ico--rpa {
  width: 1.05rem;
  height: 1.05rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}

.card + .card {
  margin-top: 0.85rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.card.story {
  padding: 1.35rem 1.35rem 1.1rem;
}

.story-section {
  margin-bottom: 1.5rem;
}

.story-section:last-child {
  margin-bottom: 0;
}

.story-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent2);
  margin: 0 0 0.65rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.story-heading .ico {
  margin-top: 0.18rem;
  color: var(--accent2);
  opacity: 0.85;
}

.story-heading__text {
  flex: 1;
  min-width: 0;
}

.story-section:first-child .story-heading {
  margin-top: 0;
}

.story-p {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--text);
  text-align: justify;
  text-justify: inter-ideograph;
}

.story-p:last-child {
  margin-bottom: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1.5rem;
}

dl.basic dt {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

dl.basic dt:first-child {
  margin-top: 0;
}

dl.basic dd {
  margin: 0.15rem 0 0;
}

.basic-motto-label {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.basic-motto-text {
  font-style: italic;
  color: var(--muted);
  line-height: 1.7;
}

ul.skills-list {
  margin: 0;
  padding-left: 1.1rem;
}

ul.skills-list li {
  margin: 0.35rem 0;
}

.certs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.4rem;
}

.cert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(61, 156, 245, 0.18), rgba(92, 225, 197, 0.06));
  border: 1px solid rgba(61, 156, 245, 0.28);
  flex-shrink: 0;
}

.cert-icon .ico {
  color: var(--accent);
}

.cert-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.cert-block {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cert-block:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.cert-body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.cert-more {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}

.media-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.media-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 7.2rem;
  padding: 0.95rem 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(61, 156, 245, 0.4);
  background: linear-gradient(160deg, rgba(61, 156, 245, 0.2), rgba(92, 225, 197, 0.08));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.media-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(92, 225, 197, 0.5);
  background: linear-gradient(160deg, rgba(61, 156, 245, 0.28), rgba(92, 225, 197, 0.12));
  text-decoration: none;
}

.media-pill-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.58rem;
}

.media-logo {
  width: 1.55rem;
  height: 1.55rem;
  color: var(--accent2);
}

.media-pill-text {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

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

  .media-pill {
    min-height: 5.8rem;
  }
}

.timeline .item {
  border-left: 2px solid var(--accent);
  padding: 0 0 1.25rem 1.1rem;
  margin-left: 0.35rem;
  position: relative;
}

.timeline .item:last-child {
  padding-bottom: 0;
}

.timeline .item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.job-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.job-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  border-radius: 9px;
  background: var(--surface2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.job-icon .ico {
  color: var(--accent2);
}

.job-head-text {
  min-width: 0;
}

.timeline .role {
  font-weight: 600;
}

.timeline .company {
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline .period {
  font-size: 0.85rem;
  color: var(--accent2);
  margin-top: 0.25rem;
}

.intro-with-icon {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.intro-with-icon .ico {
  margin-top: 0.12rem;
  color: var(--accent2);
  opacity: 0.9;
}

.intro-with-icon span {
  flex: 1;
  min-width: 0;
}

.rpa-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.rpa-ico {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.88;
}

.rpa-name-text {
  min-width: 0;
}

.edu-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.edu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  background: rgba(92, 225, 197, 0.1);
  border: 1px solid rgba(92, 225, 197, 0.22);
  flex-shrink: 0;
}

.edu-icon .ico {
  color: var(--accent2);
}

.job-block {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  line-height: 1.7;
}

.job-label {
  color: var(--accent2);
  font-weight: 600;
  margin-right: 0.25rem;
}

.job-text {
  color: var(--muted);
}

.rpa-list {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.rpa-row {
  display: grid;
  grid-template-columns: minmax(8.5rem, 11rem) 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.rpa-row:last-child {
  border-bottom: none;
}

.rpa-cell {
  font-size: 0.88rem;
  min-width: 0;
}

.rpa-name {
  font-weight: 600;
  color: var(--text);
}

.rpa-summary {
  color: var(--muted);
  line-height: 1.55;
}

.rpa-action {
  flex-shrink: 0;
}

.rpa-detail-btn {
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
}

.rpa-detail-btn:hover {
  background: rgba(61, 156, 245, 0.12);
}

@media (max-width: 640px) {
  .rpa-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .rpa-action {
    justify-self: start;
  }
}

.rpa-dialog {
  max-width: min(56rem, calc(100vw - 2rem));
  width: 100%;
  max-height: min(86vh, 48rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.48);
}

.rpa-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.rpa-dialog-inner {
  padding: 1.2rem 1.35rem 1.35rem;
  max-height: min(86vh, 48rem);
  display: flex;
  flex-direction: column;
}

.rpa-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.rpa-dialog-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

.rpa-dialog-close {
  font: inherit;
  line-height: 0;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 1.15rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.rpa-dialog-close:hover {
  background: rgba(61, 156, 245, 0.15);
  border-color: rgba(61, 156, 245, 0.45);
  transform: translateY(-1px);
}

.rpa-dialog-content {
  font-size: 0.92rem;
  line-height: 1.78;
  color: var(--text);
  max-height: min(72vh, 40rem);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.detail-section {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: var(--accent2);
}

.detail-subtitle {
  margin: 0.7rem 0 0.35rem;
  font-size: 0.92rem;
  color: var(--accent);
}

.detail-kv,
.detail-p {
  margin: 0.45rem 0 0;
}

.detail-kv:first-child,
.detail-p:first-child {
  margin-top: 0;
}

.detail-k {
  color: var(--accent2);
  font-weight: 600;
}

.detail-v {
  color: var(--text);
}

.detail-p {
  color: var(--muted);
}

@media (max-width: 640px) {
  .rpa-dialog {
    max-width: calc(100vw - 1rem);
    border-radius: 12px;
  }

  .rpa-dialog-inner {
    padding: 1rem;
  }

  .rpa-dialog-title {
    font-size: 1.02rem;
  }
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
