:root {
  --bg: #1a1a2e;
  --bg-card: #16213e;
  --bg-surface: #0f3460;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.12);
  --text: #c8c8d4;
  --text-muted: #7a7a96;
  --text-bright: #ffffff;
  --border: rgba(0, 255, 136, 0.15);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Layout */
.site-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 3rem;
}

.site-header .site-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.site-logo:hover { text-decoration: none; opacity: 0.85; }

.site-nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 1.5rem;
  transition: color 0.2s;
}
.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* Homepage */
.home-hero {
  margin-bottom: 3.5rem;
}

.home-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.home-hero h1 span {
  color: var(--accent);
}

.home-hero .tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.home-hero .bio {
  font-size: 0.95rem;
  color: var(--text);
  max-width: 580px;
  line-height: 1.7;
}

/* Post list */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }

.post-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-bright);
  line-height: 1.4;
}
.post-title:hover { color: var(--accent); text-decoration: none; }

.post-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Single post */
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

/* Post content */
.post-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.post-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2rem 0 0.75rem;
}

.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 1.5rem 0 0.5rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-content a { color: var(--accent); }

.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--accent); text-decoration: none; }

/* Mobile */
@media (max-width: 600px) {
  .site-wrap { padding: 0 1rem; }
  .home-hero h1 { font-size: 1.6rem; }
  .post-header h1 { font-size: 1.5rem; }
  .post-item { flex-direction: column; gap: 0.25rem; }
  .post-date { font-size: 0.75rem; }
  .site-header .site-wrap { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .site-nav a:first-child { margin-left: 0; }
}
