/* ===== tryone · 暗色科技风 ===== */

:root {
  --bg: #07070b;
  --panel: rgba(17, 17, 25, 0.72);
  --text: #e9e9f2;
  --muted: #8a8aa3;
  --cyan: #22d3ee;
  --violet: #a855f7;
  --border: rgba(255, 255, 255, 0.08);
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- 背景：网格 + 光晕 ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 30%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 10% -12%, rgba(34, 211, 238, 0.20), transparent 70%),
    radial-gradient(760px 520px at 92% 4%, rgba(168, 85, 247, 0.18), transparent 70%),
    radial-gradient(900px 700px at 50% 110%, rgba(34, 211, 238, 0.07), transparent 70%);
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---- 顶栏 ---- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 18px 0;
  background: rgba(7, 7, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo .sig { color: var(--cyan); }

.logo::after {
  content: "_";
  color: var(--cyan);
  animation: blink 1.1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

nav { display: flex; align-items: center; gap: 4px; }

nav a {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

/* ---- Hero 终端窗口 ---- */
.hero { padding: 64px 0 20px; }

.terminal {
  background: linear-gradient(180deg, rgba(20, 20, 30, 0.9), rgba(13, 13, 20, 0.9));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(34, 211, 238, 0.06),
    0 0 60px rgba(34, 211, 238, 0.07);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }

.term-title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.term-body { padding: 26px 26px 30px; }

.term-line {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.prompt { color: var(--violet); }

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.25;
  margin: 14px 0 10px;
  background: linear-gradient(100deg, #ffffff 10%, var(--cyan) 55%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typed-wrap {
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--cyan);
  min-height: 26px;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 1s step-end infinite;
}

/* ---- 小节标题 ---- */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 44px 0 18px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ---- 文章卡片 ---- */
.post-list { list-style: none; }

.post-card {
  position: relative;
  display: block;
  padding: 22px 24px 20px 26px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.28s ease,
    opacity 0.4s ease;
}

.post-card.visible { opacity: 1; transform: translateY(0); }

.post-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  opacity: 0.45;
  transition: opacity 0.25s, width 0.25s;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(34, 211, 238, 0.10);
}

.post-card:hover::before { opacity: 1; width: 3px; }

.post-card h2 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 7px;
  transition: color 0.2s;
}

.post-card:hover h2 { color: var(--cyan); }

.post-card p {
  color: var(--muted);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.tag {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.tag.violet {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.30);
}

/* ---- 文章页 ---- */
article.post { padding: 48px 0 30px; }

article.post h1 {
  font-size: 31px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

article.post .post-meta { margin-bottom: 34px; }

article.post h2 {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  margin: 36px 0 14px;
  color: #fff;
}

article.post h2::before {
  content: "# ";
  color: var(--cyan);
}

article.post p { color: #c9c9d8; margin-bottom: 16px; }

article.post ul { padding-left: 22px; margin-bottom: 16px; color: #c9c9d8; }
article.post li { margin-bottom: 6px; }
article.post li::marker { color: var(--cyan); }

article.post blockquote {
  position: relative;
  margin: 24px 0;
  padding: 14px 20px 14px 22px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-left: 3px solid var(--cyan);
  color: #d7e9f5;
  font-size: 15px;
}

article.post code {
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--cyan);
}

article.post pre {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 12px;
  background: #0b0b12;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 40px rgba(34, 211, 238, 0.05);
  overflow-x: auto;
}

article.post pre code {
  background: none;
  border: none;
  padding: 0;
  color: #b9f6ff;
  font-size: 13.5px;
  line-height: 1.8;
}

.back-link {
  display: inline-block;
  margin-bottom: 26px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}

.back-link:hover { color: var(--cyan); transform: translateX(-3px); }

/* ---- 页脚 ---- */
footer.site-footer {
  margin-top: 72px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

footer .heart { color: var(--violet); }

/* ---- 滚动条 ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #07070b; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, 0.35); }

/* ---- 移动端 ---- */
@media (max-width: 600px) {
  .hero { padding: 40px 0 10px; }
  .hero h1 { font-size: 31px; }
  .term-body { padding: 20px 18px 24px; }
  nav a { padding: 6px 8px; font-size: 12.5px; }
  article.post h1 { font-size: 25px; }
}
