:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --border: rgba(74, 222, 128, 0.12);
  --border-bright: rgba(74, 222, 128, 0.3);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.6);
  --green-glow: rgba(74, 222, 128, 0.08);
  --text: #d4d4d4;
  --text-bright: #e8e8e8;
  --text-dim: #888888;
  --text-muted: #555555;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;
  --max-width: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

/* Layout */
#app {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.brand {
  text-decoration: none;
  color: inherit;
}

.brand h1 {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 1px;
}

.brand .subtitle {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

nav {
  display: flex;
  gap: 16px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}

.nav-link:hover {
  color: var(--green);
  background: var(--green-glow);
}

/* Main */
main {
  flex: 1;
}

/* Post card (list view) */
.post-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.post-card:first-child {
  padding-top: 0;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.post-meta time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.tags {
  display: flex;
  gap: 6px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green-dim);
  background: var(--green-glow);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.post-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}

.post-title a {
  color: var(--text-bright);
  text-decoration: none;
  transition: color 0.15s;
}

.post-title a:hover {
  color: var(--green);
}

.post-summary {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

/* Full post view */
.post-full {
  padding-bottom: 60px;
}

.post-header {
  margin-bottom: 40px;
}

.back {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 20px;
  transition: color 0.15s;
}

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

.post-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.25;
  margin-top: 12px;
}

/* Post body (markdown) */
.post-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

.post-body h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 36px 0 16px;
}

.post-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 28px 0 12px;
}

.post-body p {
  margin-bottom: 18px;
}

.post-body a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
}

.post-body a:hover {
  border-color: var(--green);
}

.post-body blockquote {
  border-left: 3px solid var(--green-dim);
  padding: 8px 20px;
  margin: 20px 0;
  color: var(--text-dim);
  font-style: italic;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--green-dim);
}

.post-body pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin: 20px 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

.post-body ul, .post-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.post-body li {
  margin-bottom: 6px;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.post-body strong {
  color: var(--text-bright);
  font-weight: 600;
}

.post-body img {
  max-width: 100%;
  border-radius: 6px;
  margin: 20px 0;
}

/* States */
.loading {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  padding: 40px 0;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.empty {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  padding: 60px 0;
  text-align: center;
}

/* Footer */
footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
  #app { padding: 0 16px; }
  header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .post-header h1 { font-size: 22px; }
  .post-body { font-size: 14px; }
}
