:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #1a1a1a;
  --text-secondary: #6c757d;
  --accent: #0066cc;
  --accent-hover: #0052a3;
  --border: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e4e4e4;
    --text-secondary: #a0a0a0;
    --accent: #4d9fff;
    --accent-hover: #6db0ff;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.container p {
  margin-bottom: 1rem;
}

/* Header */
.site-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background-color: rgba(248, 249, 250, 0.9);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background-color: rgba(45, 45, 45, 0.9);
  }
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

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

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

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

/* Main content */
main {
  padding: 3rem 0;
  flex: 1;
}

/* Hero section */
.hero {
  text-align: center;
  padding-top: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

/* Posts list */
/*
.posts-list {
}
*/

.posts-list h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.post-preview {
  padding: 2rem;
  margin-bottom: 2rem;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-preview:hover {
  box-shadow: 0 4px 12px var(--shadow);
}

.post-preview h3 {
  margin-bottom: 0.5rem;
}

.post-preview h3 a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.5rem;
}

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

.post-preview time {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 1rem;
}

.post-preview p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: var(--accent-hover);
}

/* Post page */
.post {
  max-width: 700px;
  margin: 0 auto;
}

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

.post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

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

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.post-content h2 {
  font-size: 1.75rem;
}

.post-content h3 {
  font-size: 1.4rem;
}

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

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

.post-content a:hover {
  text-decoration: underline;
}

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

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

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

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

.post-content pre {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

/* Footer */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  text-align: center;
}

.site-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

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

  .post-header h1 {
    font-size: 2rem;
  }

  .post-content {
    font-size: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .post-preview {
    padding: 1.5rem;
  }
}