/* ============ 首页 Hero ============ */
.md-typeset .hero {
  text-align: center;
  padding: 3rem 2rem 2.5rem;
  margin: 1.5rem 0 2.5rem;
  background:
    radial-gradient(ellipse at top left, rgba(101, 123, 255, .16), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(239, 71, 111, .14), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(246,247,251,.96));
  border: 1px solid var(--md-default-fg-color--lightest, #e5e5e5);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(76, 84, 135, .08);
}

.md-typeset .hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 900;
  background: linear-gradient(90deg, #1f2a44 0%, #4957d5 35%, #7c4dff 70%, #ea4c89 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.md-typeset .hero > p:first-of-type {
  margin-bottom: .7rem;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 45%, #ef476f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.md-typeset .hero > p:nth-of-type(2) {
  margin-bottom: 1.4rem;
  font-size: .95rem;
  opacity: .78;
}

.md-typeset .hero > p:nth-of-type(3) {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 0;
}

/* ============ 正文排版 ============ */
.md-typeset h1:not([id]) {
  font-weight: 800;
  letter-spacing: -.02em;
}

.md-typeset h2 {
  margin-top: 2.6rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--md-default-fg-color--lightest, #e5e5e5);
  font-weight: 750;
}

.md-typeset h2::before {
  content: "";
  display: inline-block;
  width: .38rem;
  height: 1.15rem;
  margin-right: .6rem;
  border-radius: 2px;
  background: linear-gradient(180deg, #667eea, #764ba2);
  transform: translateY(.13em);
}

.md-typeset h3 {
  font-weight: 700;
}

/* ============ 表格 ============ */
.md-typeset table:not([class]) {
  display: table;
  width: 100%;
  font-size: .86rem;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--md-default-fg-color--lightest, #e8e8e8);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.md-typeset table:not([class]) th {
  background: linear-gradient(180deg, #6b77ff, #6257e6);
  color: #fff;
  font-weight: 650;
  letter-spacing: .01em;
  text-align: left;
}

.md-typeset table:not([class]) th:first-child {
  border-top-left-radius: 9px;
}

.md-typeset table:not([class]) th:last-child {
  border-top-right-radius: 9px;
}

.md-typeset table:not([class]) tr:last-child td:first-child {
  border-bottom-left-radius: 9px;
}

.md-typeset table:not([class]) tr:last-child td:last-child {
  border-bottom-right-radius: 9px;
}

.md-typeset table:not([class]) td {
  border-top: 1px solid var(--md-default-fg-color--lightest, #eee);
}

.md-typeset table:not([class]) tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--md-default-fg-color, #000) 3%, transparent);
}

.md-typeset table:not([class]) tbody tr:hover {
  background: color-mix(in srgb, #667eea 7%, transparent);
}

/* ============ 引用块 ============ */
.md-typeset blockquote {
  border-left: 3px solid #667eea;
  background: linear-gradient(90deg, rgba(102, 126, 234, .07), transparent);
  border-radius: 0 8px 8px 0;
  font-style: normal;
}

.md-typeset blockquote p:first-child {
  font-weight: 550;
}

/* ============ 卡片区 ============ */
.md-typeset .grid.cards > ul > li {
  border: 1px solid var(--md-default-fg-color--lightest, #e5e5e5);
  border-radius: 10px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: #667eea;
  box-shadow: 0 6px 20px rgba(102, 126, 234, .14);
  transform: translateY(-2px);
}

/* ============ 正文里的 inline code 强调 ============ */
.md-typeset :not(pre) > code {
  border-radius: 5px;
  padding: .16em .44em;
  font-size: .87em;
}

/* ============ 页面底部作者区 ============ */
.md-typeset > p:last-child {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--md-default-fg-color--lightest, #e0e0e0);
  font-size: .86rem;
  opacity: .82;
}