:root{
  --bg:#0e1116;
  --surface:#161b22;
  --surface-2:#1c222b;
  --text:#e6edf3;
  --muted:#8b949e;
  --accent:#ff8a3d;
  --accent-2:#ffb84d;
  --border:#30363d;
  --link:#79c0ff;
  --green:#3fb950;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg);color:var(--text);font:16px/1.65 -apple-system,Segoe UI,Roboto,Inter,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%}
.wrap{max-width:1100px;margin:0 auto;padding:0 24px}

/* header */
.hdr{background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:5}
.hdr-row{display:flex;align-items:center;justify-content:space-between;height:60px}
.logo{display:flex;align-items:center;gap:8px;font-weight:800;font-size:20px;color:var(--text);text-decoration:none}
.logo-mark{display:inline-flex;width:30px;height:30px;align-items:center;justify-content:center;border-radius:6px;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#0e1116;font-weight:900}
.nav{display:flex;gap:18px;align-items:center}
.nav a{color:var(--muted);font-size:14px;text-decoration:none;font-weight:500}
.nav a:hover{color:var(--text)}
.search{display:flex;align-items:center;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:6px 10px;color:var(--muted);font-size:13px;cursor:pointer}
.search:hover{border-color:var(--accent)}

/* hero */
.hero{padding:48px 0 24px}
.hero h1{font-size:38px;line-height:1.15;margin-bottom:12px;font-weight:800;letter-spacing:-.01em}
.hero p{color:var(--muted);font-size:17px;max-width:720px}

/* categories */
.cats{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:28px 0 36px}
.cats a{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:18px 16px;color:var(--text);text-align:center;font-weight:600;font-size:14px;text-decoration:none;transition:.15s}
.cats a:hover{border-color:var(--accent);text-decoration:none;color:var(--text)}
.cats .ico{display:block;font-size:24px;margin-bottom:8px}

/* layout */
.layout{display:grid;grid-template-columns:1fr 280px;gap:32px;padding:24px 0 60px}
@media(max-width:840px){.layout{grid-template-columns:1fr}.cats{grid-template-columns:repeat(2,1fr)}}

/* feed */
.section-h{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:18px}
.section-h h2{font-size:22px;font-weight:800}
.section-h a{font-size:13px;color:var(--muted)}
.feed{display:flex;flex-direction:column;gap:14px}
.post{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:18px 22px}
.post a.title{font-size:18px;font-weight:700;color:var(--text);display:inline-block;margin-bottom:6px;text-decoration:none}
.post a.title:hover{color:var(--accent)}
.post .meta{font-size:13px;color:var(--muted);display:flex;gap:12px;margin-bottom:10px}
.post .meta b{color:var(--text);font-weight:600}
.post .lead{color:var(--muted);font-size:14.5px;line-height:1.6}
.tag{display:inline-block;background:rgba(255,138,61,.12);color:var(--accent);font-size:12px;padding:2px 8px;border-radius:999px;font-weight:600}

/* sidebar */
.aside{display:flex;flex-direction:column;gap:18px}
.box{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:18px}
.box h3{font-size:14px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:12px;font-weight:700}
.box ul{list-style:none}
.box li{padding:6px 0;border-top:1px solid var(--border);font-size:14px}
.box li:first-child{border-top:0;padding-top:0}
.box a{color:var(--text)}
.box .num{display:inline-block;width:22px;color:var(--accent);font-weight:700}

/* footer */
.ftr{border-top:1px solid var(--border);background:var(--surface);padding:32px 0;margin-top:24px}
.ftr-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:32px}
.ftr-grid h4{font-size:13px;text-transform:uppercase;color:var(--muted);margin-bottom:12px;letter-spacing:.05em}
.ftr-grid a{display:block;color:var(--text);font-size:14px;margin-bottom:6px;opacity:.85}
.ftr-grid a:hover{opacity:1;text-decoration:none}
.ftr-bot{text-align:center;color:var(--muted);font-size:13px;margin-top:24px;padding-top:18px;border-top:1px solid var(--border)}
@media(max-width:840px){.ftr-grid{grid-template-columns:1fr 1fr}}

/* article */
.article{padding:24px 0 60px}
.article .crumbs{font-size:13px;color:var(--muted);margin-bottom:16px}
.article .crumbs a{color:var(--muted)}
.article h1{font-size:36px;line-height:1.18;font-weight:800;letter-spacing:-.01em;margin-bottom:14px}
.article .meta{font-size:13px;color:var(--muted);display:flex;gap:14px;margin-bottom:24px;flex-wrap:wrap}
.article-body{max-width:760px;margin:0 auto;font-size:17px}
.article-body h2{font-size:24px;font-weight:800;margin:32px 0 12px}
.article-body h3{font-size:19px;font-weight:700;margin:24px 0 8px}
.article-body p{margin:14px 0;color:var(--text);line-height:1.75}
.article-body ul,.article-body ol{margin:14px 0 14px 26px;color:var(--text)}
.article-body li{margin:6px 0;line-height:1.65}
.article-body blockquote{border-left:3px solid var(--accent);background:var(--surface);padding:14px 18px;margin:18px 0;color:var(--text);border-radius:0 8px 8px 0}
.article-body code{background:var(--surface-2);padding:2px 6px;border-radius:4px;font-family:Menlo,Consolas,monospace;font-size:14px}

/* about/legal */
.legal-page{max-width:760px;margin:0 auto;padding:32px 24px 60px}
.legal-page h1{font-size:30px;font-weight:800;margin-bottom:12px}
.legal-page h2{font-size:18px;font-weight:700;margin:24px 0 8px}
.legal-page p{color:var(--muted);line-height:1.7;margin:8px 0}
