/* assets/css/style.css */ /* --- Reset --- */ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } /* --- Base --- */ :root { --bg: #0d1117; --bg-secondary: #161b22; --text: #c9d1d9; --text-muted: #8b949e; --accent: #58a6ff; --border: #30363d; --code-bg: #1a1f27; --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace; --font-sans: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; --sidebar-width: 260px; } body { font-family: var(--font-sans); font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg); } a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; } /* --- Layout --- */ .site-wrapper { display: flex; min-height: 100vh; } /* --- Sidebar --- */ .sidebar { width: var(--sidebar-width); flex-shrink: 0; background: var(--bg-secondary); border-right: 1px solid var(--border); padding: 1.5rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; } .sidebar-section { padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); } .sidebar-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .sidebar h2 { color: #e6edf3; font-size: 1.1rem; margin-bottom: 0.75rem; } .sidebar h3 { color: #e6edf3; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6rem; } .sidebar nav { display: flex; flex-direction: column; gap: 0.35rem; } .sidebar nav a { font-size: 0.9rem; } .sidebar p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; } .sidebar-posts { list-style: none; } .sidebar-posts li { margin-bottom: 0.35rem; } .sidebar-posts a { font-size: 0.85rem; line-height: 1.4; } .tag-cloud { display: flex; flex-wrap: wrap; gap: 0.35rem; } .tag-cloud .tag { display: inline-block; background: var(--bg); border: 1px solid var(--border); border-radius: 3px; padding: 0.1em 0.45em; font-size: 0.75rem; font-family: var(--font-mono); color: var(--text-muted); } .tag-cloud .tag:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; } /* --- Main content --- */ main { flex: 1; max-width: 740px; padding: 2rem 2.5rem; } footer { border-top: 1px solid var(--border); padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; } /* --- Typography --- */ h1, h2, h3, h4 { color: #e6edf3; margin-top: 2rem; margin-bottom: 0.75rem; line-height: 1.3; } h1 { font-size: 1.8rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.15rem; } p { margin-bottom: 1rem; } /* --- Code --- */ code { font-family: var(--font-mono); font-size: 0.9em; background: var(--code-bg); padding: 0.15em 0.4em; border-radius: 4px; } pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1rem; overflow-x: auto; margin-bottom: 1.5rem; } pre code { background: none; padding: 0; font-size: 0.85rem; line-height: 1.6; } /* --- Post list (index page) --- */ .post-list { list-style: none; } .post-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); } .post-list li:last-child { border-bottom: none; } .post-list time { display: block; color: var(--text-muted); font-size: 0.85rem; font-family: var(--font-mono); } .post-list a { font-size: 1.15rem; font-weight: 600; } /* --- Post page --- */ article time { display: block; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 0.5rem; } article h1 { margin-top: 0; } .tags { margin-bottom: 2rem; } .tag { display: inline-block; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 3px; padding: 0.1em 0.5em; font-size: 0.8rem; font-family: var(--font-mono); color: var(--text-muted); margin-right: 0.4rem; } /* --- Images --- */ img { max-width: 100%; border-radius: 6px; } /* --- Blockquote --- */ blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--text-muted); margin: 1.5rem 0; } /* --- Tables --- */ table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; } th, td { text-align: left; padding: 0.5rem 0.75rem; border: 1px solid var(--border); } th { background: var(--bg-secondary); font-weight: 600; } /* --- Responsive --- */ @media (max-width: 768px) { .site-wrapper { flex-direction: column; } .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); } main { padding: 1.5rem; } h1 { font-size: 1.5rem; } body { font-size: 15px; } }