/* ============================================================
   肥牛大魔王 · 个人网站样式（TeraEdge 品牌蓝）
   ============================================================ */

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --border: #dde6f2;
  --steel: #eaf0f8;
  --heading: #1a2536;
  --text: #3d4f63;
  --muted: #5a7290;
  --dim: #8c9fb5;
  --accent: #5b82c9;
  --accent-text: #3d65b0;
  --accent-d: #2d4d8c;

  --sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Menlo", "Consolas", "SF Mono", "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-d); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-weight: 700;
  font-size: 18px;
}
.brand:hover { color: var(--heading); }
.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--muted);
  font-size: 15px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent-text); }
.site-nav a.active {
  color: var(--accent-text);
  border-bottom-color: var(--accent-text);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 88px 0 72px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 16px;
}
.hero-title {
  font-size: 52px;
  line-height: 1.1;
  color: var(--heading);
  letter-spacing: 1px;
}
.hero-tagline {
  margin-top: 16px;
  font-size: 19px;
  color: var(--muted);
}
.hero-desc {
  margin-top: 10px;
  font-size: 16px;
  color: var(--dim);
  max-width: 560px;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}
.hero-avatar {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 10px 32px rgba(45, 77, 140, 0.18);
}

/* ---------- 区块标题 ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.section-title { font-size: 22px; color: var(--heading); }
.section-more { font-family: var(--mono); font-size: 13px; color: var(--dim); }

/* ---------- 文章列表 ---------- */
.articles { padding: 64px 0; }
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 28px 30px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.article-card:hover {
  border-color: rgba(61, 101, 176, 0.45);
  box-shadow: 0 2px 12px rgba(61, 101, 176, 0.08);
}
.article-card-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent-text);
  margin-bottom: 12px;
}
.article-card-title {
  font-size: 28px;
  color: var(--heading);
  line-height: 1.3;
}
.article-card-sub {
  margin-top: 6px;
  font-size: 16px;
  color: var(--muted);
}
.article-card-excerpt {
  margin-top: 16px;
  font-size: 15px;
  color: var(--text);
  max-width: 680px;
}
.article-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 13px;
  color: var(--dim);
}
.read-more { font-family: var(--mono); color: var(--accent-text); font-size: 13px; }

/* ---------- 关于 ---------- */
.about {
  padding: 40px 0 72px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 28px 30px;
}
.about-card p { font-size: 15px; }
.about-card p + p { margin-top: 10px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  text-align: center;
}
.site-footer p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.04em;
}

/* ============================================================
   文章页
   ============================================================ */
.article-page { padding: 64px 0 80px; }
.article-header { margin-bottom: 40px; }
.article-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.article-title {
  font-size: 40px;
  line-height: 1.2;
  color: var(--heading);
}
.article-subtitle {
  margin-top: 12px;
  font-size: 18px;
  color: var(--muted);
}
.article-meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--dim);
}

.article-body {
  max-width: 760px;
}
.article-body h2 {
  font-size: 24px;
  color: var(--heading);
  margin: 44px 0 16px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-text);
}
.article-body h3 {
  font-size: 18px;
  color: var(--heading);
  margin: 28px 0 10px;
}
.article-body p {
  font-size: 16px;
  margin-bottom: 16px;
  text-align: justify;
}
.article-body strong { color: var(--heading); }
.article-body ul { margin: 0 0 16px 4px; list-style: none; }
.article-body ul li {
  font-size: 16px;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent-text);
}
.article-body code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--accent-d);
  background: var(--steel);
  padding: 1px 6px;
  border-radius: 2px;
}

/* 代码块 */
.article-body pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 20px;
}
.article-body pre code {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--accent-d);
  background: none;
  padding: 0;
}

/* 表格 */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 20px;
  font-size: 15px;
}
.article-body th {
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border);
}
.article-body td {
  color: var(--text);
  padding: 11px 16px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.article-body td:first-child { color: var(--heading); font-weight: 600; white-space: nowrap; }

/* 图片与题注 */
.article-body figure {
  margin: 24px 0;
  text-align: center;
}
.article-body figure img {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.article-body figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--dim);
}

/* 回首页 */
.back-home {
  display: inline-block;
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 14px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .hero-inner { flex-direction: column; gap: 28px; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-avatar { width: 128px; height: 128px; }
  .hero-title { font-size: 38px; }
  .article-title { font-size: 30px; }
  .article-card-title { font-size: 24px; }
  .site-nav { gap: 18px; }
}
