:root {
  --bg: #0e1220; --bg-2: #131a2b; --surface: #182036; --surface-2: #1f2a44; --border: #2a3654;
  --fg: #e9edf6; --fg-2: #c4cce0; --muted: #8b97b4;
  --accent: #ff8a4c; --accent-2: #ffb06b; --teal: #3fd3c2; --violet: #9b8cff; --pink: #ff6b9d;
  --code-bg: #0b0f1a; --mark: rgba(255, 138, 76, .28);
  --sky: #5fd0ff; --azure: #4f8dff; --indigo: #7f7cff;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1100px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); line-height: 1.7;
  background-image: radial-gradient(1200px 600px at 10% -10%, rgba(155, 140, 255, .14), transparent 60%),
                    radial-gradient(900px 500px at 95% 0%, rgba(63, 211, 194, .10), transparent 60%);
  background-attachment: fixed; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.01em; line-height: 1.2; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.site-header { border-bottom: 1px solid var(--border); padding: 1.1rem 0; backdrop-filter: blur(8px); background: rgba(14, 18, 32, .7); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
.brand { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.site-title { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--fg);
  background: linear-gradient(90deg, var(--sky), var(--azure) 55%, var(--indigo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-title:hover { text-decoration: none; filter: brightness(1.15); }
.tagline { color: var(--muted); font-size: .95rem; }
.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; font-size: .92rem; font-weight: 500; }
.site-nav a { color: var(--fg-2); }
.site-nav a.cta { background: linear-gradient(90deg, var(--sky), var(--azure) 60%, var(--indigo)); color: #0b1024; padding: .35rem .8rem; border-radius: 999px; font-weight: 600; box-shadow: 0 0 0 1px rgba(95, 208, 255, .25), 0 4px 18px rgba(79, 141, 255, .25); }
.site-nav a.cta:hover { text-decoration: none; filter: brightness(1.08); }
.search { display: flex; align-items: center; }
.search input { font: inherit; font-size: .9rem; padding: .4rem .75rem; width: 12rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); transition: width .2s ease, border-color .2s; }
.search input:focus { outline: none; border-color: var(--teal); width: 16rem; }
.search input::placeholder { color: var(--muted); }
main.wrap { padding: 2.25rem 1.25rem 3.5rem; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 3rem; }
@media (max-width: 820px) { .columns { grid-template-columns: 1fr; } .sidebar { order: 2; } .search input { width: 100%; } }
.page-title { margin: 0 0 1.5rem; font-size: 1.7rem; }
.page-title span { color: var(--accent); }
.post-card { padding: 1.4rem 1.5rem; margin: 0 0 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .2s, transform .2s; }
.post-card:hover { border-color: rgba(63, 211, 194, .5); transform: translateY(-1px); }
.post-card h2 { margin: 0 0 .35rem; font-size: 1.45rem; }
.post-card h2 a { color: var(--fg); }
.post-card h2 a:hover { color: var(--accent-2); text-decoration: none; }
.meta { color: var(--muted); font-size: .84rem; display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; margin: .25rem 0 .8rem; }
.meta .cats { display: flex; gap: .35rem; flex-wrap: wrap; }
.meta .cat { background: var(--surface-2); border: 1px solid var(--border); padding: .05rem .55rem; border-radius: 999px; color: var(--teal); font-size: .78rem; }
.meta .cat:hover { border-color: var(--teal); text-decoration: none; }
.excerpt { margin: 0 0 .6rem; color: var(--fg-2); }
.more { font-size: .9rem; font-weight: 500; color: var(--accent); }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; font-size: .92rem; }
.page-of { color: var(--muted); }
.sidebar h3 { margin-top: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.categories { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.categories li { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.categories li a { color: var(--fg-2); }
.categories span { color: var(--muted); font-variant-numeric: tabular-nums; }
article.post h1 { font-size: 2.35rem; margin: 0 0 .5rem; background: linear-gradient(90deg, var(--fg), var(--fg-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.content { font-size: 1.05rem; color: var(--fg-2); }
.content p, .content li { color: var(--fg-2); }
.content strong { color: var(--fg); }
.content img { max-width: 100%; height: auto; border-radius: 10px; }
.content pre { background: var(--code-bg); border: 1px solid var(--border); padding: 1rem 1.1rem; overflow-x: auto; border-radius: 10px; font-size: .86rem; line-height: 1.55; }
.content code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); border: 1px solid var(--border); padding: .08em .35em; border-radius: 5px; color: var(--accent-2); }
.content pre code { background: none; border: 0; padding: 0; font-size: inherit; color: #dbe4ff; }
.content blockquote { border-left: 3px solid var(--violet); margin: 1.2rem 0; padding: .3rem 1.1rem; color: var(--muted); background: rgba(155, 140, 255, .06); border-radius: 0 8px 8px 0; }
.content table { border-collapse: collapse; width: 100%; font-size: .95rem; display: block; overflow-x: auto; }
.content th, .content td { border: 1px solid var(--border); padding: .45rem .7rem; }
.content th { background: var(--surface-2); color: var(--fg); }
.content h2 { margin-top: 2.2rem; font-size: 1.55rem; color: var(--fg); }
.content h3 { margin-top: 1.6rem; font-size: 1.2rem; color: var(--fg); }
.content h2 a, .content h3 a { color: inherit; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 2.5rem 0; font-size: .95rem; }
.post-nav a { padding: .6rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--fg-2); max-width: 48%; }
.post-nav a:hover { border-color: var(--teal); text-decoration: none; color: var(--fg); }
.comments-section { border-top: 1px solid var(--border); padding-top: 1.75rem; }
.comments-section h2 { font-size: 1.3rem; }
ul.comments, ul.comments ul { list-style: none; padding: 0; margin: 0; }
ul.comments ul { margin-left: 1.25rem; border-left: 2px solid var(--border); padding-left: 1rem; }
.comment { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment-head { font-size: .9rem; display: flex; gap: .75rem; align-items: baseline; }
.comment-head .author { font-weight: 600; color: var(--fg); }
.comment-head .when, .comment-head .reply { color: var(--muted); font-size: .8rem; }
.comment-head .reply { color: var(--teal); }
.comment-body { font-size: .97rem; color: var(--fg-2); }
.comment-body p { margin: .4rem 0; }
.respond { margin-top: 2rem; }
.respond form { display: grid; gap: .8rem; max-width: 640px; }
.respond label { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
.respond .row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.respond input, .respond textarea { font: inherit; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--fg); }
.respond input:focus, .respond textarea:focus { outline: none; border-color: var(--teal); }
.respond button, button.primary { justify-self: start; font: inherit; font-weight: 600; padding: .6rem 1.2rem; background: linear-gradient(90deg, var(--accent), var(--pink)); color: #14101a; border: 0; border-radius: 8px; cursor: pointer; }
.respond .hp { position: absolute; left: -9999px; }
.respond .note, .replying { font-size: .82rem; color: var(--muted); margin: 0; }
.flash { background: rgba(63, 211, 194, .12); border-left: 3px solid var(--teal); padding: .6rem .9rem; border-radius: 0 8px 8px 0; }
.no-comments, .closed { color: var(--muted); font-style: italic; }
.search-page form { display: flex; gap: .6rem; margin: 0 0 1.5rem; max-width: 560px; }
.search-page input { flex: 1; font: inherit; padding: .6rem .9rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); }
.search-page input:focus { outline: none; border-color: var(--teal); }
.result { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.result h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.result h2 a { color: var(--fg); }
.result h2 a:hover { color: var(--accent-2); text-decoration: none; }
.snippet { color: var(--fg-2); margin: .3rem 0 0; font-size: .97rem; }
mark { background: var(--mark); color: var(--fg); padding: 0 .15em; border-radius: 3px; }
.results-count { color: var(--muted); margin: 0 0 1rem; font-size: .92rem; }
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0 2.5rem; font-size: .86rem; color: var(--muted); }
.site-footer .wrap { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--fg-2); }
