:root {
  --bg: #0b0f14;
  --bg-alt: #111823;
  --bg-card: #141d29;
  --border: #253242;
  --text: #d7e0ea;
  --text-dim: #8a99a8;
  --accent: #3ddc84;
  --accent-dim: #2a9d61;
  --warn: #e6b455;
  --danger: #e6555a;
  --tag-bg: #1b2735;
  --radius: 8px;
  font-family: "Segoe UI", Roboto, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); }

.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  font-family: "Consolas", "Courier New", monospace;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.brand h1 a { color: var(--text); text-decoration: none; }

.tagline {
  margin: 0.15rem 0 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  max-width: 46ch;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.site-nav a { color: var(--text-dim); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

.layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.post-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.post-card-thumb {
  width: 140px;
  height: 90px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.post-card-body { min-width: 0; }

.post-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.post-meta {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.post-excerpt {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin: 0 0 0.6rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  background: var(--tag-bg);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
}

.article-header { margin-bottom: 1.5rem; }

.article-header h1 {
  font-size: 1.8rem;
  margin: 0.5rem 0;
}

.back-link {
  display: inline-block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.back-link:hover { color: var(--accent); }

.article-feature img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1rem 0;
}

.article-body {
  font-size: 1rem;
}

.article-body h2, .article-body h3 {
  color: var(--text);
  margin-top: 1.75rem;
}

.article-body p { color: var(--text); }

.article-body a { text-decoration: underline; }

.article-body img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.article-body pre, .article-body code {
  font-family: "Consolas", "Courier New", monospace;
  background: #060a0e;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.article-body pre {
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
}

.article-body code {
  padding: 0.1rem 0.35rem;
  font-size: 0.9em;
}

.article-body pre code {
  padding: 0;
  border: none;
  background: none;
}

.article-body blockquote {
  border-left: 3px solid var(--accent-dim);
  margin: 1rem 0;
  padding: 0.25rem 1rem;
  color: var(--text-dim);
}

.article-body figure { margin: 1rem 0; }
.article-body figcaption { color: var(--text-dim); font-size: 0.8rem; text-align: center; }

.notice-banner {
  background: #1c1508;
  border-bottom: 1px solid #3a2c10;
  color: var(--warn);
  padding: 0.7rem 1.5rem;
  font-size: 0.85rem;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .post-card { flex-direction: column; }
  .post-card-thumb { width: 100%; height: 160px; }
}
