/* ONTAO · 元道 — Google 风格浅色主题（参考 mti.entos.top） */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #f5f7fa;
  --bg-soft: #ffffff;
  --bg-card: #ffffff;
  --border: #e8eaed;
  --border-strong: #dadce0;
  --text: #202124;
  --text-dim: #5f6368;
  --text-faint: #9aa0a6;
  --blue: #1a73e8;
  --blue-soft: #4285f4;
  --purple: #9334e6;
  --green: #34a853;
  --red: #ea4335;
  --yellow: #fbbc04;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(60,64,67,0.08);
  --shadow-md: 0 4px 12px rgba(60,64,67,0.12);
  --shadow-lg: 0 12px 32px rgba(60,64,67,0.16);
  --font: "Inter", -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo { width: 34px; height: 34px; border-radius: 9px; }

.brand-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
}

.brand-sub { color: var(--blue); font-weight: 600; margin-left: 4px; font-size: 14px; }

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}

.main-nav::-webkit-scrollbar { display: none; }

.nav-item {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  padding: 7px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-item:hover { color: var(--text); background: #f1f3f4; }
.nav-item.active { color: var(--blue); background: rgba(26,115,232,0.08); font-weight: 600; }

/* 下拉菜单 */
.nav-dropdown { position: relative; }

.chevron { transition: transform 0.2s; opacity: 0.6; }

.nav-dropdown:hover .chevron { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 176px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.18s ease;
  z-index: 200;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.12s;
}

.dropdown-item:hover {
  color: var(--blue);
  background: #f1f3f4;
}

.dropdown-item.active { color: var(--blue); background: rgba(26,115,232,0.08); font-weight: 600; }

.github-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.github-link:hover { color: var(--blue); }

/* ===== Hero ===== */
.hero {
  padding: 84px 0 60px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(26,115,232,0.06), transparent 65%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(147,51,230,0.05), transparent 60%);
}

.hero-logo-wrap { display: flex; justify-content: center; margin-bottom: 26px; }
.hero-logo { width: 128px; height: 128px; filter: drop-shadow(0 12px 40px rgba(26,115,232,0.18)); animation: float 5s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text);
}

.hero-title-cn {
  font-size: 34px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  margin-top: 12px;
  font-size: 19px;
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 4px;
}

.hero-desc {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 15.5px;
}

.hero-badges {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text-dim);
  font-size: 13px;
  transition: all 0.15s;
}

.badge:hover { border-color: var(--blue); color: var(--blue); }

.hero-cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; }

.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #1765cc; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: #fff;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ===== Cards ===== */
.cards-section { padding: 30px 0 50px; }
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* 卡片分组 */
.card-group { margin-bottom: 34px; }

.group-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding-left: 2px;
}

.group-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

.group-desc {
  font-size: 12.5px;
  color: var(--text-faint);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.18s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-soft);
  box-shadow: var(--shadow-md);
}

.card-num {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(26,115,232,0.08);
  border: 1px solid rgba(26,115,232,0.25);
  color: var(--blue);
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-body h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 4px; }
.card-body p { font-size: 13.5px; color: var(--text-dim); }
.card-section {
  display: inline-block;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--blue);
  opacity: 0.85;
  letter-spacing: 1px;
}

/* ===== Quote ===== */
.quote-section { padding: 30px 0 60px; }
.big-quote {
  text-align: center;
  font-size: 20px;
  font-style: italic;
  color: var(--text-dim);
  padding: 30px 20px;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.9;
}

.big-quote strong { color: var(--blue); }

/* ===== Article page ===== */
.article { padding: 40px 0 70px; }

.article-head { margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }

.article-section {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 10px;
}

.article-head h1 { font-size: 34px; font-weight: 800; line-height: 1.3; }
.article-sub { margin-top: 10px; color: var(--text-dim); font-size: 15px; }

.markdown-body { max-width: 860px; }

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  color: var(--text);
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  font-weight: 700;
  line-height: 1.4;
}

.markdown-body h1 { font-size: 26px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.markdown-body h2 { font-size: 21px; }
.markdown-body h3 { font-size: 17px; color: var(--blue); }

.markdown-body p { margin: 0.9em 0; color: #3c4043; }

.markdown-body strong { color: var(--text); }

.markdown-body ul, .markdown-body ol { margin: 0.9em 0 0.9em 1.6em; color: #3c4043; }
.markdown-body li { margin: 0.35em 0; }
.markdown-body li::marker { color: var(--blue); }

.markdown-body blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--blue);
  background: rgba(26,115,232,0.05);
  border-radius: 0 10px 10px 0;
  color: #4d5156;
}

.markdown-body blockquote p { color: #4d5156; margin: 0.3em 0; }
.markdown-body blockquote strong { color: var(--blue); }

.markdown-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(26,115,232,0.08);
  color: var(--blue);
  padding: 2px 6px;
  border-radius: 5px;
}

.markdown-body pre {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 1.2em 0;
  line-height: 1.6;
}

.markdown-body pre code { background: none; color: #37474f; padding: 0; font-size: 13px; }

/* 配图 */
.markdown-body .fig {
  margin: 1.6em 0;
  text-align: center;
}

.markdown-body .fig img {
  width: 100%;
  max-width: 900px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.markdown-body .fig figcaption {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

.table-wrap { overflow-x: auto; margin: 1.2em 0; border-radius: 10px; border: 1px solid var(--border); }

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}

.markdown-body th {
  background: #f1f3f4;
  color: var(--blue);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  white-space: nowrap;
}

.markdown-body td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  color: #3c4043;
}

.markdown-body tr:hover td { background: #f8f9fa; }

.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 2.2em 0; }

.markdown-body a { color: var(--blue); }

/* ===== Pager / Footer ===== */
.article-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.article-pager a { color: var(--text-dim); text-decoration: none; font-size: 14px; }
.article-pager a:hover { color: var(--blue); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  background: #fff;
}

.site-footer .motto { margin-top: 6px; color: var(--text-dim); font-size: 14px; letter-spacing: 3px; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero { padding: 56px 0 40px; }
  .hero-title { font-size: 40px; }
  .hero-title-cn { font-size: 26px; }
  .main-nav { display: none; }
  .cards { grid-template-columns: 1fr; }
  .article-head h1 { font-size: 26px; }
}
