/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #6c9eff;
  --accent-hover: #8bb4ff;
  --border: #2a2a2a;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 720px;
}

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

/* Navigation */
header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
  width: 100%;
}

/* Hero */
.hero {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Posts */
.recent-posts h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item h2,
.post-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.post-item h2 a,
.post-item h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.post-item h2 a:hover,
.post-item h3 a:hover {
  color: var(--accent);
}

.post-item time {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.post-item p {
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

.view-all {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.view-all:hover {
  color: var(--accent-hover);
}

/* Tags */
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.tag {
  background: var(--bg-secondary);
  color: var(--accent);
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

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

.post-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.post-header time {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
}

.post-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

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

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content code {
  background: var(--bg-secondary);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

.post-content pre code {
  background: none;
  padding: 0;
}

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

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

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

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

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .post-header h1 {
    font-size: 1.4rem;
  }
}
