/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --max-width: 800px;
  --spacing: 2rem;
}

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

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

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

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

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

.nav-menu a:hover {
  color: var(--primary-color);
}

/* Main Content */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  min-height: calc(100vh - 250px);
}

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

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Recent Posts Section */
.recent-posts h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.posts-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.post-card h3 a {
  color: var(--text-color);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--primary-color);
}

.post-card time {
  color: var(--text-light);
  font-size: 0.875rem;
  display: block;
  margin-bottom: 1rem;
}

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

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: gap 0.2s;
}

.read-more:hover {
  gap: 0.5rem;
}

/* Blog Listing */
.page-header {
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.page-header p {
  color: var(--text-light);
  font-size: 1.125rem;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

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

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

.post-item h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

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

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

.post-item time {
  color: var(--text-light);
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.75rem;
}

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

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

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

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

.post-header {
  margin-bottom: 3rem;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.post-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  color: var(--text-light);
  flex-wrap: wrap;
}

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

.post-content h2 {
  font-size: 1.875rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.post-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

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

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

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

.post-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-color);
}

.post-content a:hover {
  border-bottom: 2px solid var(--primary-color);
}

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

.post-content pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.back-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

/* About Page */
.about-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.about-content h2 {
  font-size: 1.875rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

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

.about-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

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

/* Button */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.view-all {
  text-align: center;
  margin-top: 2rem;
}

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

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  color: var(--text-light);
}

.footer-container a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-container a:hover {
  text-decoration: underline;
}

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

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

  .post-title {
    font-size: 2rem;
  }

  .nav-menu {
    gap: 1rem;
  }
}
