/* =========================================================
   系统实施运维学习路径 · 站点样式
   纯静态、零依赖、可 file:// 直接打开
   ========================================================= */

:root {
  --bg: #0b1020;
  --bg-soft: #111731;
  --bg-card: #141b34;
  --bg-card-2: #18203d;
  --line: rgba(120, 150, 255, .16);
  --line-strong: rgba(120, 150, 255, .32);
  --text: #e8ecf8;
  --text-dim: #9aa6c7;
  --text-mute: #6f7ba0;
  --brand: #4ea8ff;
  --brand-2: #22d3ee;
  --accent: #8b5cf6;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px -24px rgba(0, 0, 0, .9);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
}

html[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-soft: #eef2f9;
  --bg-card: #ffffff;
  --bg-card-2: #f8fafc;
  --line: rgba(20, 40, 90, .12);
  --line-strong: rgba(20, 40, 90, .24);
  --text: #12203c;
  --text-dim: #4b5b7a;
  --text-mute: #7b8aa6;
  --brand: #1f6feb;
  --brand-2: #0891b2;
  --accent: #7c3aed;
  --shadow: 0 16px 40px -28px rgba(20, 40, 90, .55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(78, 168, 255, .16), transparent 60%),
    radial-gradient(760px 420px at 92% 4%, rgba(139, 92, 246, .14), transparent 62%),
    radial-gradient(700px 500px at 50% 108%, rgba(34, 211, 238, .10), transparent 60%);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; position: relative; z-index: 1; }

/* ---------------- 顶栏 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex; align-items: center; gap: 18px;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .3px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo .mark {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; font-size: 15px; font-weight: 900;
  box-shadow: 0 8px 20px -8px var(--brand);
}
.logo small { color: var(--text-mute); font-weight: 600; font-size: 12px; letter-spacing: 1.4px; }

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; transition: .18s;
}
.nav a:hover { color: var(--text); background: var(--bg-card-2); text-decoration: none; }
.nav a.active { color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent)); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--text-dim);
  display: grid; place-items: center; font-size: 16px; transition: .18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }

/* ---------------- 英雄区 ---------------- */
.hero { padding: 72px 0 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--brand-2); border: 1px solid var(--line-strong);
  background: var(--bg-card); padding: 6px 14px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.18; margin: 22px 0 16px;
  letter-spacing: -.5px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--brand), var(--brand-2) 45%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 17px; color: var(--text-dim); max-width: 760px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 14px;
  border: 1px solid var(--line-strong); color: var(--text); background: var(--bg-card);
  cursor: pointer; transition: .18s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; border-color: var(--brand); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-color: transparent; color: #fff;
  box-shadow: 0 14px 30px -16px var(--brand);
}

/* ---------------- 统计 ---------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 44px; }
.stat {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.stat b { display: block; font-size: 28px; line-height: 1.2; font-family: var(--mono); color: var(--brand-2); }
.stat span { font-size: 13px; color: var(--text-mute); }

/* ---------------- 通用区块 ---------------- */
section.block { padding: 54px 0; }
.section-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0; letter-spacing: -.3px; }
.section-head p { margin: 0; color: var(--text-mute); font-size: 14px; }
.section-head .spacer { flex: 1; }

h3 { font-size: 17px; margin: 0 0 10px; }

.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------------- 时间线 ---------------- */
.timeline { position: relative; margin: 8px 0 0; padding: 0; list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--brand), var(--accent), transparent);
  opacity: .5;
}
.tl-item { position: relative; padding: 0 0 26px 72px; }
.tl-node {
  position: absolute; left: 12px; top: 4px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  background: var(--bg-card); border: 2px solid var(--line-strong); color: var(--brand-2);
  box-shadow: 0 0 0 6px var(--bg);
}
.tl-body {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; transition: .2s;
}
.tl-body:hover { border-color: var(--line-strong); transform: translateX(2px); }
.tl-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tl-head h3 { margin: 0; font-size: 16.5px; }
.tl-meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-mute); letter-spacing: .6px; }
.tl-goal { color: var(--text-dim); font-size: 14px; margin: 0 0 12px; }
.tl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tl-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-mute); margin: 0 0 8px; font-family: var(--mono); font-weight: 600;
}

/* ---------------- 标签 ---------------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-card-2); border: 1px solid var(--line); color: var(--text-dim);
  font-family: var(--mono); white-space: nowrap;
}
.tag.blue { color: var(--brand); border-color: rgba(78,168,255,.4); background: rgba(78,168,255,.1); }
.tag.cyan { color: var(--brand-2); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.1); }
.tag.violet { color: var(--accent); border-color: rgba(139,92,246,.4); background: rgba(139,92,246,.12); }
.tag.green { color: var(--ok); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.1); }
.tag.warn { color: var(--warn); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.1); }
.tag.pink { color: var(--danger); border-color: rgba(251,113,133,.4); background: rgba(251,113,133,.1); }

/* ---------------- 列表 ---------------- */
ul.clean { margin: 0; padding: 0; list-style: none; }
ul.clean > li { position: relative; padding-left: 18px; margin-bottom: 6px; color: var(--text-dim); font-size: 14px; }
ul.clean > li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: .7;
}
ul.check > li::before {
  content: "✓"; background: none; color: var(--ok);
  top: 0; font-size: 12px; width: auto; height: auto; left: 0;
}
ul.check > li { padding-left: 20px; }
code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg-card-2); border: 1px solid var(--line);
  padding: 1.5px 6px; border-radius: 6px; color: var(--brand-2);
}
pre {
  margin: 0 0 12px; padding: 14px 16px; overflow: auto;
  background: #070b16; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #c8d4f0;
}
html[data-theme="light"] pre { background: #0f172e; }

/* ---------------- 筛选栏 ---------------- */
.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 22px; padding: 14px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
}
.toolbar input[type="search"], .toolbar select {
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; font-size: 14px; font-family: inherit; outline: none;
  min-width: 200px;
}
.toolbar input[type="search"]:focus, .toolbar select:focus { border-color: var(--brand); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 13px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--text-dim);
  font-family: inherit; transition: .16s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.on { background: rgba(78,168,255,.14); border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* ---------------- 面试题 ---------------- */
.q-list { display: grid; gap: 12px; }
.q-item {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s;
}
.q-item:hover { border-color: var(--line-strong); }
.q-item.open { border-color: var(--brand); box-shadow: 0 0 0 1px rgba(78,168,255,.25); }
.q-head {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px;
  cursor: pointer; user-select: none;
}
.q-idx { font-family: var(--mono); font-size: 12px; color: var(--text-mute); padding-top: 3px; min-width: 30px; }
.q-title { flex: 1; font-size: 15px; font-weight: 600; }
.q-badges { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.q-body { display: none; padding: 0 18px 18px 60px; border-top: 1px dashed var(--line); margin-top: -1px; }
.q-item.open .q-body { display: block; padding-top: 14px; }
.q-body p { margin: 0 0 10px; font-size: 14px; color: var(--text-dim); }
.q-body ul { margin: 0 0 12px; }
.q-body pre { font-size: 12px; }
.q-tip {
  margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(34,211,238,.07); border-left: 3px solid var(--brand-2);
  font-size: 13px; color: var(--text-dim);
}
.q-tip b { color: var(--brand-2); }
.star {
  cursor: pointer; font-size: 15px; color: var(--text-mute); transition: .15s;
  background: none; border: none; padding: 0 2px;
}
.star.on { color: var(--warn); }

/* ---------------- 资源链接 ---------------- */
.res-group { margin-bottom: 34px; }
.res-group > h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; letter-spacing: .4px; margin-bottom: 14px;
}
.res-group > h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.link-card {
  display: block; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--line); transition: .16s;
  color: inherit;
}
.link-card:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); }
.link-card .lt { font-size: 14.5px; font-weight: 600; color: var(--text); display: flex; gap: 8px; align-items: baseline; }
.link-card .lu {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px;
}
.link-card .ld { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.link-card .lv { font-family: var(--mono); font-size: 11px; color: var(--brand-2); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); font-family: var(--mono); background: var(--bg-card-2); }
tr:last-child td { border-bottom: none; }
td { color: var(--text-dim); }
td strong { color: var(--text); }

/* ---------------- 知识点模块 ---------------- */
.kmod { margin-bottom: 18px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kmod-head {
  display: flex; align-items: center; gap: 14px; padding: 18px 22px; cursor: pointer;
  background: linear-gradient(90deg, rgba(78,168,255,.08), transparent 60%);
}
.kmod-head:hover { background: linear-gradient(90deg, rgba(78,168,255,.14), transparent 60%); }
.kmod-ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-size: 18px; background: var(--bg-card-2); border: 1px solid var(--line-strong); flex-shrink: 0;
}
.kmod-title { flex: 1; }
.kmod-title h3 { margin: 0; font-size: 16px; }
.kmod-title span { font-size: 12.5px; color: var(--text-mute); }
.kmod-caret { color: var(--text-mute); transition: .2s; }
.kmod.open .kmod-caret { transform: rotate(180deg); }
.kmod-body { display: none; padding: 0 22px 22px; }
.kmod.open .kmod-body { display: block; }
.kp { border-top: 1px dashed var(--line); padding: 14px 0 4px; }
.kp:first-child { border-top: none; }
.kp h4 { margin: 0 0 8px; font-size: 14.5px; color: var(--text); display: flex; gap: 8px; align-items: center; }
.kp h4 .lv {
  font-family: var(--mono); font-size: 10.5px; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-mute); font-weight: 500;
}
.kp .must { color: var(--danger); font-size: 11px; font-family: var(--mono); }

/* ---------------- 页脚 ---------------- */
.site-footer {
  margin-top: 60px; padding: 34px 0 44px;
  border-top: 1px solid var(--line); color: var(--text-mute); font-size: 13px;
}
.site-footer .inner { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* ---------------- 进度 ---------------- */
.progress-bar { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; border: 1px solid var(--line); }
.progress-bar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .4s ease;
}

.note {
  border-left: 3px solid var(--warn); background: rgba(251,191,36,.07);
  padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px; color: var(--text-dim);
}
.note b { color: var(--warn); }

.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.dim { color: var(--text-mute); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }

@media (max-width: 720px) {
  .site-header .inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; }
  .nav a { padding: 7px 12px; font-size: 13px; }
  .hero { padding: 42px 0 24px; }
  .tl-item { padding-left: 60px; }
  .timeline::before { left: 21px; }
  .tl-node { left: 6px; width: 28px; height: 28px; }
  .q-body { padding-left: 18px; }
  .q-badges .tag { display: none; }
}

@media print {
  .site-header, .site-footer, .toolbar, .q-badges, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
  .card, .q-item, .kmod, .tl-body { border-color: #ccc; box-shadow: none; }
  .q-body, .kmod-body { display: block !important; }
}
