:root {
  --bg-primary: #0f1419;
  --bg-secondary: #1a1f2e;
  --bg-tertiary: #242938;

  --text-primary: #e6e8eb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-primary: #8b7fb8;
  --accent-secondary: #6366f1;
  --link-color: #818cf8;
  --link-hover: #a5b4fc;

  --border-color: #374151;
  --code-bg: #1e293b;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-size: 16px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-bottom: 2px solid var(--accent-primary);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

header h1 a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

header h1 a:hover {
  color: var(--accent-primary);
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

header nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

header nav a:hover {
  color: var(--accent-primary);
}

/* Main content */
main {
  min-height: 60vh;
  margin-bottom: 3rem;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

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

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Code */
code {
  background-color: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

pre {
  background-color: var(--code-bg);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-left: 3px solid var(--accent-primary);
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-secondary);
  font-weight: 600;
  color: var(--accent-primary);
}

/* Blog posts */
.post-list {
  list-style: none;
  padding: 0;
}

.post-preview {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

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

.post-preview h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.post-preview h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-preview h2 a:hover {
  color: var(--accent-primary);
}

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

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.post-header h1 {
  margin-bottom: 0.5rem;
}

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

.tag {
  background-color: var(--bg-secondary);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  font-size: 0.85rem;
  text-decoration: none;
}

.tag:hover {
  background-color: var(--bg-tertiary);
  text-decoration: none;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.project-card {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, border-color 0.2s;
}

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

.project-card h3 {
  margin-top: 0;
  color: var(--accent-primary);
}

.project-card p {
  margin-bottom: 0.5rem;
}

.project-status {
  display: inline-block;
  background-color: var(--code-bg);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  header nav ul {
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}
