/*
 * Site-level overrides for the Pure theme.
 * Keep custom styles here instead of editing themes/pure/source/css/style.css.
 */

:root {
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ink-strong: #172033;
  --ink: #344054;
  --ink-muted: #667085;
  --accent: #1769aa;
  --accent-soft: #eef6fc;
  --line: #e6ebf0;
  --surface: #f7f9fb;
}

html {
  font-size: 16px;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

body {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}

h1,
h2,
h3,
h4,
h5,
h6,
.article-title,
#name,
#title {
  font-family: var(--font-display);
  color: var(--ink-strong);
  letter-spacing: -0.015em;
}

code,
kbd,
pre,
samp,
.highlight {
  font-family: var(--font-mono);
}

/* Long-form technical articles */

#page- > .article-header {
  display: none;
}

.article-type-post > .article-header {
  margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.article-type-post > .article-header .article-title {
  max-width: 900px;
  margin: 4px 0 14px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 720;
  line-height: 1.3;
}

.article-type-post .article-meta {
  line-height: 1.8;
}

.article-type-post .article-entry {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.88;
}

.article-type-post .article-entry p {
  margin: 0 0 1.25em;
}

.article-type-post .article-entry strong {
  color: var(--ink-strong);
  font-weight: 650;
}

.article-type-post .article-entry h2 {
  margin: 2.8em 0 1em;
  padding: 0 0 0.55em;
  border-bottom: 1px solid var(--line);
  color: var(--ink-strong);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.4;
}

.article-type-post .article-entry h3 {
  margin: 2.1em 0 0.8em;
  color: #22324a;
  font-size: 19px;
  font-weight: 680;
  line-height: 1.5;
}

.article-type-post .article-entry h4 {
  margin: 1.8em 0 0.7em;
  font-size: 17px;
  font-weight: 650;
}

.article-type-post .article-entry ul,
.article-type-post .article-entry ol {
  margin: 0 0 1.35em 1.2em;
  padding-left: 1.1em;
}

.article-type-post .article-entry li {
  margin: 0.36em 0;
  padding-left: 0.18em;
}

.article-type-post .article-entry li::marker {
  color: #7793aa;
}

.article-type-post .article-entry blockquote {
  margin: 1.6em 0;
  padding: 0.85em 1.15em;
  border-left: 4px solid #6ca6cf;
  border-radius: 0 6px 6px 0;
  background: var(--accent-soft);
  color: #40556d;
  font-size: 0.97em;
}

.article-type-post .article-entry blockquote p:last-child {
  margin-bottom: 0;
}

.article-type-post .article-entry :not(pre) > code {
  margin: 0 0.08em;
  padding: 0.15em 0.38em;
  border: 1px solid #e1e7ed;
  border-radius: 4px;
  background: #f3f5f7;
  color: #a33a4a;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.article-type-post .article-entry .highlight,
.article-type-post .article-entry > pre {
  margin: 1.5em 0 1.8em;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(22, 34, 51, 0.06);
  font-size: 13.5px;
  line-height: 1.65;
}

.article-type-post .article-entry .highlight pre {
  font-family: var(--font-mono);
}

.article-type-post .article-entry > table {
  display: block;
  width: 100%;
  margin: 1.6em 0 2em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
}

.article-type-post .article-entry > table th,
.article-type-post .article-entry > table td {
  min-width: 110px;
  padding: 10px 13px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.article-type-post .article-entry > table th {
  background: #f1f5f8;
  color: #26374c;
  font-weight: 650;
  white-space: nowrap;
}

.article-type-post .article-entry > table tr:last-child td {
  border-bottom: 0;
}

.article-type-post .article-entry > table th:last-child,
.article-type-post .article-entry > table td:last-child {
  border-right: 0;
}

.article-type-post .article-entry > table tbody tr:nth-child(even) td {
  background: #fafbfd;
}

.article-type-post .article-entry img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.9em auto 0.75em;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(24, 39, 56, 0.1);
}

.article-type-post .article-entry p > em:only-child {
  display: block;
  margin-top: -0.15em;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

.article-type-post .article-entry .katex-display {
  margin: 1.5em 0;
  padding: 0.8em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.article-type-post .article-entry h3[id^="q"] {
  margin: 1.15em 0 0;
  padding: 14px 17px 10px;
  border: 1px solid #d9e7f2;
  border-bottom: 0;
  border-left: 4px solid var(--accent);
  border-radius: 8px 8px 0 0;
  background: var(--accent-soft);
  color: #173e61;
  font-size: 17px;
}

.article-type-post .article-entry h3[id^="q"] + p {
  margin: 0 0 1.1em;
  padding: 4px 17px 16px;
  border: 1px solid #d9e7f2;
  border-top: 0;
  border-left: 4px solid var(--accent);
  border-radius: 0 0 8px 8px;
  background: var(--accent-soft);
  color: #354c63;
}

.article-type-post .article-entry hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.resume-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 0 48px;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.75;
}

.resume-hero {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 42px;
  padding: 30px;
  border: 1px solid #dfe8ef;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fbfe 0%, #f5f8fb 55%, #fff 100%);
  box-shadow: 0 14px 36px rgba(30, 55, 78, 0.08);
}

.resume-avatar {
  width: 138px;
  height: 138px;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(25, 48, 70, 0.18);
}

.resume-hero h1 {
  margin: 0 0 6px;
  color: #15283b;
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 730;
  line-height: 1.25;
}

.resume-subtitle {
  margin: 0 0 14px;
  color: #3c5f7b;
  font-size: 16px;
  font-weight: 560;
}

.resume-summary {
  max-width: 720px;
  margin: 0 0 16px;
  color: #435469;
  line-height: 1.8;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: #52657a;
  font-size: 13px;
}

.resume-contact span {
  padding: 5px 9px;
  border: 1px solid #dce6ee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.resume-page a {
  color: #1769aa;
  text-decoration-color: rgba(23, 105, 170, 0.3);
  text-underline-offset: 3px;
}

.resume-page a:hover {
  color: #0c4f86;
  text-decoration: underline;
}

.resume-section {
  margin: 40px 0;
}

.resume-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  color: #1f3449;
  font-size: 21px;
  font-weight: 700;
}

.resume-section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #cfdae4, transparent);
}

.resume-item {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 22px;
  margin: 0;
  padding: 17px 0 17px 15px;
  border-left: 2px solid #e0e8ef;
}

.resume-item + .resume-item {
  border-top: 1px solid #eef2f5;
}

.resume-time {
  color: #60768a;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.resume-time span {
  display: block;
  margin-top: 3px;
  color: #8495a5;
  font-size: 11px;
  font-weight: 560;
}

.resume-item h3 {
  margin: 0 0 7px;
  color: #21364b;
  font-size: 17px;
  font-weight: 680;
  line-height: 1.45;
}

.resume-item p {
  margin: 0;
  color: #4b5d70;
}

.resume-item ul {
  margin: 9px 0 0;
  padding-left: 20px;
}

.resume-item li {
  margin: 6px 0;
  color: #4b5d70;
  line-height: 1.72;
}

.resume-item li::marker {
  color: #7f9ab0;
}

.resume-awards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.resume-awards li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f4;
  color: #45576a;
  font-size: 14px;
  line-height: 1.55;
}

.resume-awards span {
  color: #60788e;
  font-size: 12px;
  font-weight: 680;
}

.resume-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.resume-tags span {
  padding: 7px 11px;
  border: 1px solid #d9e4ec;
  border-radius: 999px;
  background: #f5f9fc;
  color: #37546d;
  font-size: 13px;
  font-weight: 540;
}

.sidebar-simple-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.sidebar-simple-list li {
  margin: 7px 0;
  line-height: 1.55;
}

.sidebar-contact-label {
  display: inline-block;
  min-width: 56px;
  color: #777;
  font-weight: 600;
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .article-type-post > .article-header {
    margin-bottom: 26px;
    padding-bottom: 17px;
  }

  .article-type-post > .article-header .article-title {
    font-size: 27px;
  }

  .article-type-post .article-entry {
    font-size: 15.5px;
    line-height: 1.82;
  }

  .article-type-post .article-entry h2 {
    margin-top: 2.35em;
    font-size: 22px;
  }

  .article-type-post .article-entry h3 {
    font-size: 18px;
  }

  .article-type-post .article-entry .highlight,
  .article-type-post .article-entry > pre {
    margin-right: -8px;
    margin-left: -8px;
    border-radius: 6px;
    font-size: 12.5px;
  }

  .article-type-post .article-entry > table {
    font-size: 13px;
  }

  .resume-page {
    padding-top: 0;
    font-size: 15px;
  }

  .resume-hero,
  .resume-item {
    grid-template-columns: 1fr;
  }

  .resume-hero {
    gap: 20px;
    padding: 22px 20px;
    text-align: left;
  }

  .resume-avatar {
    width: 112px;
    height: 112px;
  }

  .resume-contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-item {
    gap: 7px;
    padding: 15px 0 15px 12px;
  }

  .resume-awards {
    grid-template-columns: 1fr;
  }

  .resume-awards li {
    grid-template-columns: 70px 1fr;
    gap: 10px;
  }
}
