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

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --accent-color: #f59e0b;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --border-radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header nav {
  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.3s;
}

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

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin-bottom: 3rem;
  border-radius: var(--border-radius);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.post-card {
  background: var(--bg-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border-color);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-light);
}

.post-content {
  padding: 1.5rem;
}

.post-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.category {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.date {
  color: var(--text-light);
}

.post-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-card h2 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

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

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

.read-more {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s;
}

.read-more:hover {
  transform: translateX(5px);
}

/* Single Post */
.post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.post-header {
  margin-bottom: 2rem;
  text-align: center;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.post-description {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.author-info {
  color: var(--text-light);
  font-size: 0.9rem;
}

.post-featured-image {
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

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

.post-content h2 {
  font-size: 1.875rem;
  margin: 2rem 0 1rem;
  font-weight: 700;
  color: var(--text-color);
}

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

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

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

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

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

.post-content a:hover {
  opacity: 0.8;
}

.post-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
}

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

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

.post-content pre {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 2rem 0;
}

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

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

.post-tags {
  margin-bottom: 1.5rem;
}

.tag {
  display: inline-block;
  background: var(--bg-light);
  padding: 0.25rem 0.75rem;
  margin: 0.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text-color);
}

.post-share {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.post-share a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

.post-share a:hover {
  opacity: 0.8;
}

/* Related Posts */
.related-posts {
  max-width: 800px;
  margin: 4rem auto 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.related-posts h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.related-grid {
  display: grid;
  gap: 1.5rem;
}

.related-post {
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: var(--border-radius);
  transition: background 0.3s;
}

.related-post:hover {
  background: #f3f4f6;
}

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

.related-post h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.related-post p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 3rem 0;
}

.pagination .btn {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.pagination .btn:hover {
  background: var(--secondary-color);
}

.page-number {
  color: var(--text-light);
  font-weight: 500;
}

/* Footer */
.site-footer {
  background: var(--text-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-col p {
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

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

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

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

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

  .nav-menu {
    gap: 1rem;
  }

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

/* Page Content */
.page-content {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
}

.page-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.page-content h2 {
  font-size: 1.875rem;
  margin: 2rem 0 1rem;
  color: var(--text-color);
}

.page-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
