@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg: #f6f5f1;
    --surface: #ffffff;
    --surface-2: #edecea;
    --text: #1a1917;
    --text-2: #52504b;
    --text-3: #918e87;
    --accent: #0f766e;
    --accent-2: #14b8a6;
    --accent-glow: rgba(15, 118, 110, 0.08);
    --hot: #dc2626;
    --hot-soft: #fef2f2;
    --amber: #d97706;
    --amber-soft: #fffbeb;
    --border: #e2e0da;
    --border-2: #cfccc4;
    --mono-bg: #1a1917;
    --mono-text: #e8e6e1;
    --shadow: 0 2px 8px rgba(0,0,0,.05);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.08);
    --radius: 6px;
    --font: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
    --max-w: 1280px;
}
[data-theme="dark"] {
    --bg: #131311;
    --surface: #1e1e1c;
    --surface-2: #282826;
    --text: #edecea;
    --text-2: #b8b5ae;
    --text-3: #737069;
    --accent: #2dd4bf;
    --accent-2: #5eead4;
    --accent-glow: rgba(45, 212, 191, 0.08);
    --hot: #f87171;
    --hot-soft: #1c1210;
    --amber: #fbbf24;
    --amber-soft: #1c1708;
    --border: #2e2e2b;
    --border-2: #3e3e3a;
    --mono-bg: #0a0a09;
    --mono-text: #d4d2cc;
    --shadow: 0 2px 8px rgba(0,0,0,.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.3);
}

*, *::before, *::after { 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.8; font-size: 17px; -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 32px 32px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* === Header === */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 28px;
    height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 18px; letter-spacing: -0.5px; }
.brand-slash { font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: 20px; }
.site-nav { display: flex; gap: 2px; font-family: var(--mono); font-size: 15px; }
.site-nav a { padding: 6px 14px; border-radius: 4px; color: var(--text-3); transition: all .15s; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a.active { color: var(--accent); font-weight: 700; }
.site-nav a::before { content: '/ '; opacity: .4; }

/* === Hero === */
.hero { padding: 88px 0 64px; }
.hero-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }
.hero-left { flex: 1; }
.hero-name { font-size: clamp(42px, 7vw, 64px); font-weight: 900; letter-spacing: -3px; line-height: 1.1; margin-bottom: 20px; }
.hero-name .accent { color: var(--accent); }
.hero-tagline { font-family: var(--mono); font-size: 16px; color: var(--text-2); margin-bottom: 28px; line-height: 2; }
.hero-tagline .prompt { color: var(--accent); font-weight: 700; }
.hero-desc { font-size: 17px; color: var(--text-3); max-width: 420px; line-height: 1.9; }

/* Terminal card */
.hero-terminal {
    width: 340px; flex-shrink: 0;
    background: var(--mono-bg); border-radius: 10px;
    overflow: hidden; box-shadow: var(--shadow-lg);
    font-family: var(--mono); font-size: 14px; line-height: 1.9;
    color: var(--mono-text); transform: rotate(1deg); transition: transform .3s;
}
.hero-terminal:hover { transform: rotate(0deg); }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: rgba(255,255,255,.06); }
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot:nth-child(1) { background: #ff5f57; }
.term-dot:nth-child(2) { background: #febc2e; }
.term-dot:nth-child(3) { background: #28c840; }
.term-title { margin-left: 8px; font-size: 12px; opacity: .5; }
.term-body { padding: 16px 20px; }
.term-line { margin-bottom: 2px; }
.term-line .cmd { color: #28c840; }
.term-line .val { color: #6ee7b7; }
.term-line .comment { color: #6b7280; font-style: italic; }
.term-cursor { display: inline-block; width: 8px; height: 15px; background: #28c840; animation: blink 1s step-end infinite; vertical-align: middle; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* === Section === */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.section { padding: 56px 0; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; font-family: var(--mono); font-size: 15px; color: var(--text-3); }
.section-head .line { flex: 1; height: 1px; background: var(--border); }
.section-head .label { font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 1px; }
.section-head .more { color: var(--accent); }
.section-head .more:hover { text-decoration: underline; }

/* === Featured === */
.featured {
    background: var(--mono-bg); color: var(--mono-text);
    border-radius: 12px; padding: 40px; margin-bottom: 40px;
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
    transition: box-shadow .25s;
}
.featured:hover { box-shadow: var(--shadow-lg); }
.featured::before { content: '//'; position: absolute; top: -20px; right: 24px; font-family: var(--mono); font-size: 120px; font-weight: 700; opacity: .06; color: #fff; }
.featured-tag { font-family: var(--mono); font-size: 13px; font-weight: 700; color: #fbbf24; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px; }
.featured-title { font-size: 24px; font-weight: 900; line-height: 1.35; margin-bottom: 12px; letter-spacing: -0.5px; color: #fff; }
.featured-summary { font-size: 16px; line-height: 1.8; opacity: .7; margin-bottom: 20px; }
.featured-meta { font-family: var(--mono); font-size: 14px; opacity: .5; }
.featured-cover { border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; }
.featured-cover img { width: 100%; height: 100%; object-fit: cover; }

/* === Post List === */
.post-list { display: flex; flex-direction: column; }
.post-item {
    display: grid; grid-template-columns: 72px 1fr auto;
    gap: 20px; align-items: baseline; padding: 24px 0;
    border-bottom: 1px solid var(--border); transition: all .15s;
}
.post-item:hover { padding-left: 12px; border-color: var(--accent); }
.post-item:last-child { border-bottom: none; }
.post-date { font-family: var(--mono); font-size: 14px; color: var(--text-3); text-align: right; line-height: 1.4; }
.post-date .day { font-size: 24px; font-weight: 700; color: var(--text); display: block; }
.post-cat { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.post-title { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; transition: color .15s; letter-spacing: -0.3px; }
.post-item:hover .post-title { color: var(--accent); }
.post-summary { font-size: 16px; color: var(--text-2); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-views { font-family: var(--mono); font-size: 14px; color: var(--text-3); white-space: nowrap; }

/* === Article Detail === */
.article-header { padding: 64px 0 32px; }
.article-header h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 900; line-height: 1.3; letter-spacing: -1px; }
.article-header-meta { margin-top: 16px; font-family: var(--mono); font-size: 14px; color: var(--text-3); }
.article-content { font-size: 17px; line-height: 1.9; }
.article-content h2 { font-size: 24px; font-weight: 800; margin: 48px 0 16px; }
.article-content h3 { font-size: 20px; font-weight: 700; margin: 36px 0 12px; }
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol { margin: 0 0 20px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote { border-left: 3px solid var(--accent); padding: 12px 20px; margin: 24px 0; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-2); }
.article-content code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.article-content pre { background: var(--mono-bg); color: var(--mono-text); padding: 20px; border-radius: var(--radius); overflow-x: auto; margin: 24px 0; }
.article-content pre code { background: none; padding: 0; }
.article-content img { border-radius: var(--radius); margin: 24px 0; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* === Nav === */
.nav-group { margin-bottom: 44px; }
.nav-group-head { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.nav-group-head::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: all .15s; font-size: 16px; }
.nav-item:hover { border-color: var(--accent); transform: translateX(4px); }
.nav-icon { width: 32px; height: 32px; border-radius: 6px; background: var(--accent-glow); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.nav-name { font-weight: 600; }
.nav-domain { font-family: var(--mono); font-size: 13px; color: var(--text-3); margin-top: 1px; }

/* === Tools === */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tool-card { padding: 24px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; transition: all .15s; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.tool-icon { font-size: 26px; margin-bottom: 8px; display: block; }
.tool-name { font-size: 14px; font-weight: 600; color: var(--text-2); }

/* === Search === */
.search-box { position: relative; max-width: 380px; margin-bottom: 28px; }
.search-box input { width: 100%; padding: 12px 16px 12px 36px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-family: var(--mono); font-size: 14px; outline: none; transition: all .15s; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-3); }

/* === Filter Tags === */
.filter-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-tag { padding: 6px 16px; border-radius: 4px; font-family: var(--mono); font-size: 14px; border: 1px solid var(--border); color: var(--text-2); transition: all .15s; }
.filter-tag:hover { border-color: var(--accent); color: var(--accent); }
.filter-tag.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* === Footer === */
.site-footer { margin-top: 72px; padding: 36px 0; border-top: 2px solid var(--text); }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; display: flex; justify-content: space-between; align-items: flex-end; }
.footer-brand { font-weight: 900; font-size: 16px; }
.footer-brand .sub { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--text-3); margin-top: 4px; display: block; }
.footer-links { font-family: var(--mono); font-size: 14px; color: var(--text-3); display: flex; gap: 16px; }
.footer-links a:hover { color: var(--accent); }

/* === Theme Toggle === */
.theme-toggle { position: fixed; bottom: 24px; right: 24px; z-index: 99; width: 44px; height: 44px; border-radius: 8px; background: var(--mono-bg); color: var(--mono-text); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: var(--shadow-lg); transition: all .15s; font-family: var(--mono); }
.theme-toggle:hover { transform: scale(1.05); }

/* === 404 === */
.page-404 { text-align: center; padding: 120px 24px; font-family: var(--mono); }
.page-404 h1 { font-size: 72px; font-weight: 700; color: var(--text-3); opacity: .3; }
.page-404 p { margin-top: 16px; color: var(--text-2); font-size: 16px; }
.page-404 a { color: var(--accent); font-weight: 700; margin-top: 24px; display: inline-block; }

/* === Responsive === */
@media (max-width: 900px) {
    .hero-top { flex-direction: column; }
    .hero-terminal { width: 100%; transform: none; }
    .featured { grid-template-columns: 1fr; padding: 28px; }
    .featured-cover { display: none; }
    .post-item { grid-template-columns: 56px 1fr; }
    .post-views { display: none; }
}
@media (max-width: 640px) {
    .header-inner { padding: 0 16px; }
    .wrap, .hero-inner { padding: 0 16px; }
    .hero { padding: 56px 0 40px; }
    .hero-name { font-size: 36px; letter-spacing: -2px; }
    .nav-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .site-nav a::before { display: none; }
}
.wrap-narrow{max-width:1140px;margin:0 auto;padding:0 28px}.article-card-cat{font-family:var(--mono);font-size:13px;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:1px}.article-header{text-align:center}.article-header h1{font-size:clamp(26px,4vw,36px);font-weight:900;line-height:1.3;letter-spacing:-1px}.article-header-meta{margin-top:16px;font-family:var(--mono);font-size:14px;color:var(--text-3)}.article-content table{width:100%;border-collapse:collapse;margin:24px 0;font-size:15px}.article-content th,.article-content td{padding:12px;text-align:left;border-bottom:1px solid var(--border)}.article-content th{background:var(--surface-2);font-weight:700}
