/* ============ Lin's Dev Space — 蓝色科技主题 ============ */
:root {
  --bg: #070d1a;
  --bg-2: #0b1425;
  --panel: rgba(23, 42, 74, .45);
  --panel-border: rgba(64, 132, 255, .22);
  --primary: #3d8bff;
  --accent: #38e1ff;
  --text: #d7e4ff;
  --text-dim: #8ba3cc;
  --glow: 0 0 24px rgba(61, 139, 255, .35);
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(43, 88, 178, .28), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(28, 60, 130, .22), transparent 55%),
    linear-gradient(180deg, #070d1a 0%, #0a1224 60%, #070d1a 100%);
  color: var(--text);
  font-family: -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-decoration: none; transition: .2s; }
a:hover { text-shadow: 0 0 12px rgba(56, 225, 255, .6); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 13, 26, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: .5px; }
.logo-mark {
  color: var(--accent); font-family: var(--mono); font-weight: 700;
  text-shadow: var(--glow); margin-right: 6px;
}
nav a {
  color: var(--text-dim); margin-left: 22px; font-size: 15px; position: relative; padding: 4px 0;
}
nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px; transition: width .25s;
}
nav a:hover::after, nav a.active::after { width: 100%; }
nav a.active { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-tag { font-family: var(--mono); color: var(--accent); margin-bottom: 10px; text-shadow: var(--glow); }
.hero h1 {
  font-size: clamp(28px, 5vw, 44px); line-height: 1.25; margin-bottom: 16px;
  background: linear-gradient(90deg, #e8f1ff 30%, #7ab5ff 70%, #38e1ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-dim); font-size: 16px; max-width: 640px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 40px; }
.btn {
  display: inline-block; padding: 10px 26px; border-radius: 8px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--panel-border); color: var(--text);
}
.btn.primary {
  background: linear-gradient(135deg, #2f6fe0, #1e49a8);
  border-color: transparent; box-shadow: var(--glow);
}
.btn.primary:hover { filter: brightness(1.15); text-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); background: rgba(56, 225, 255, .06); }

.terminal {
  background: rgba(10, 20, 40, .75); border: 1px solid var(--panel-border);
  border-radius: 12px; overflow: hidden; box-shadow: 0 12px 40px rgba(10, 30, 80, .45), var(--glow);
  max-width: 720px;
}
.term-bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: rgba(30, 52, 96, .5); border-bottom: 1px solid var(--panel-border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.term-title { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.terminal pre {
  font-family: var(--mono); font-size: 13.5px; padding: 18px 20px; color: #a8c6ff; overflow-x: auto;
}
.terminal .hl { color: var(--accent); text-shadow: var(--glow); }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 26px 24px 10px;
}
.stat {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px;
  padding: 18px 12px; text-align: center; transition: .25s;
}
.stat:hover { transform: translateY(-3px); border-color: rgba(61, 139, 255, .55); box-shadow: var(--glow); }
.stat b {
  display: block; font-size: 26px;
  background: linear-gradient(90deg, #7ab5ff, #38e1ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--text-dim); font-size: 13px; }

/* ---------- sections ---------- */
section { padding: 44px 0; }
.sec-title {
  font-size: 24px; margin-bottom: 24px; display: flex; align-items: center; gap: 12px;
}
.sec-title::before {
  content: ''; width: 5px; height: 26px; border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent)); box-shadow: var(--glow);
}

/* ---------- cards ---------- */
.grid.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  display: block; background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 14px; padding: 22px 24px; color: var(--text); transition: .25s; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(61, 139, 255, .12), transparent 45%);
  opacity: 0; transition: .3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(61, 139, 255, .6); box-shadow: var(--glow); }
.card:hover::before { opacity: 1; }
.card p { color: var(--text-dim); font-size: 14.5px; margin: 10px 0 14px; }
.card-head { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.dot-lang { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 10px currentColor; background: currentColor; }
.card-head.java { color: #ff9e64; }
.card-head.py   { color: #ffe066; }
.card-head.cs   { color: #b48cff; }
.card-head.cpp  { color: #63a4ff; }
.snippet {
  font-family: var(--mono); font-size: 12.5px; color: #9ec2ff;
  background: rgba(7, 14, 30, .8); border: 1px solid rgba(64, 132, 255, .16);
  border-radius: 8px; padding: 12px 14px; overflow-x: auto; line-height: 1.6;
}

/* ---------- post list ---------- */
.post-list { list-style: none; }
.post-list li a {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px; color: var(--text);
  border: 1px solid transparent; border-bottom: 1px solid rgba(64, 132, 255, .14); border-radius: 8px;
}
.post-list li a:hover {
  background: rgba(23, 42, 74, .5); border-color: var(--panel-border); text-shadow: none;
}
.post-list time { margin-left: auto; color: var(--text-dim); font-size: 13px; font-family: var(--mono); }
.tag {
  font-family: var(--mono); font-size: 12px; padding: 2px 10px; border-radius: 20px;
  border: 1px solid currentColor; flex-shrink: 0;
}
.tag.java { color: #ff9e64; } .tag.py { color: #ffe066; }
.tag.cs { color: #b48cff; } .tag.cpp { color: #63a4ff; }

/* ---------- about ---------- */
.about-box {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px;
  padding: 26px 30px; color: var(--text-dim);
}
.about-box p { margin-bottom: 12px; }
.about-box b { color: var(--accent); }
.about-box .contact span { font-family: var(--mono); color: var(--text); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--panel-border); padding: 30px 0 40px; margin-top: 30px;
  color: var(--text-dim); font-size: 14px; text-align: center;
}
.foot-quote { font-family: var(--mono); font-size: 12.5px; color: rgba(139, 163, 204, .6); margin-top: 6px; }

/* ---------- article page ---------- */
.article-head { padding: 56px 0 10px; }
.article-head h1 { font-size: 30px; margin-bottom: 8px; }
.article-meta { color: var(--text-dim); font-size: 14px; font-family: var(--mono); }
.article-body { padding: 24px 0; }
.article-body h2 { font-size: 21px; margin: 34px 0 12px; color: #9ecbff; }
.article-body h3 { font-size: 17px; margin: 24px 0 10px; color: var(--text); }
.article-body p { margin-bottom: 14px; color: var(--text-dim); }
.article-body pre {
  font-family: var(--mono); font-size: 13px; color: #a8c6ff;
  background: rgba(7, 14, 30, .85); border: 1px solid rgba(64, 132, 255, .18);
  border-left: 3px solid var(--primary);
  border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 16px 0; line-height: 1.7;
}
.article-body ul, .article-body ol { margin: 0 0 14px 22px; color: var(--text-dim); }
.article-body li { margin-bottom: 6px; }
.back-link { display: inline-block; margin: 10px 0 30px; font-size: 14px; }

/* ---------- 404 ---------- */
.err-page { text-align: center; padding: 90px 24px 60px; }
.err-code {
  font-family: var(--mono); font-size: clamp(72px, 16vw, 140px); font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, #7ab5ff, #38e1ff 60%, transparent 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(56, 225, 255, .35));
}
.err-sub { color: var(--text-dim); font-size: 16px; margin: 14px 0 26px; }
.err-term {
  max-width: 520px; margin: 0 auto 30px; text-align: left;
  background: rgba(10, 20, 40, .75); border: 1px solid var(--panel-border);
  border-radius: 12px; overflow: hidden; box-shadow: 0 12px 40px rgba(10, 30, 80, .45);
}
.err-term pre { font-family: var(--mono); font-size: 13px; padding: 16px 18px; color: #a8c6ff; }
.err-term .hl { color: #ff5f7a; }
.err-term .ok { color: #28c840; }

/* ---------- projects ---------- */
.proj-meta { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.proj-meta .tag { border-style: dashed; }
.stars { color: #ffe066; font-family: var(--mono); font-size: 13px; }

/* ---------- archive ---------- */
.archive-group { margin-bottom: 26px; }
.archive-month {
  font-family: var(--mono); color: var(--accent); font-size: 16px; margin-bottom: 10px;
  text-shadow: var(--glow);
}

@media (max-width: 760px) {
  .grid.cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  nav a { margin-left: 12px; font-size: 13.5px; }
  .hero { padding-top: 46px; }
}
