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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Layout */
.nav-container,
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 200px);
}

/* Header and Navigation */
.site-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navigation {
  padding: 1rem 0;
}

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

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.site-title:hover {
  color: #1d4ed8;
}

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

.nav-links a {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #2563eb;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
  line-height: 1.3;
  color: #1e293b;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.5rem;
  color: #475569;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Code Blocks */
pre {
  background: #f1f5f9;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid #e2e8f0;
}

code {
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
}

p code {
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

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

li {
  color: #475569;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid #2563eb;
  margin: 2rem 0;
  padding-left: 1.5rem;
  color: #64748b;
  font-style: italic;
}

/* Page Styles */
.page-header {
  margin-bottom: 3rem;
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.page-title {
  margin-bottom: 1rem;
}

.page-date {
  color: #64748b;
  font-size: 0.9rem;
}

/* Blog Post Styles */
.blog-post {
  max-width: none;
}

.post-header {
  margin-bottom: 3rem;
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.post-title {
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 0.9rem;
}

.post-date {
  font-weight: 500;
}

.post-author {
  font-style: italic;
}

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

.tag {
  background: #f1f5f9;
  color: #2563eb;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.post-content {
  margin: 3rem 0;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.prev-post,
.next-post {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  transition: all 0.2s;
}

.prev-post:hover,
.next-post:hover {
  background: #f8fafc;
  border-color: #2563eb;
  text-decoration: none;
}

/* Blog Feed Styles */
.blog-feed {
  max-width: 1000px;
  margin: 0 auto;
}

.feed-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.feed-title {
  margin-bottom: 1rem;
}

.feed-description {
  font-size: 1.1rem;
  color: #64748b;
}

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

.post-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.2s;
}

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

.card-header {
  margin-bottom: 1rem;
}

.card-title {
  margin-bottom: 0.5rem;
}

.card-title a {
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
}

.card-title a:hover {
  color: #2563eb;
}

.card-date {
  color: #64748b;
  font-size: 0.9rem;
}

.card-excerpt {
  color: #475569;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Pagination */
.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination-prev,
.pagination-next {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  transition: all 0.2s;
}

.pagination-prev:hover,
.pagination-next:hover {
  background: #f8fafc;
  border-color: #2563eb;
  text-decoration: none;
}

.pagination-number,
.pagination-current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination-number {
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.pagination-number:hover {
  background: #f8fafc;
  border-color: #2563eb;
  color: #2563eb;
  text-decoration: none;
}

.pagination-current {
  background: #2563eb;
  color: white;
  border: 1px solid #2563eb;
}

.pagination-info {
  color: #64748b;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  margin-top: 4rem;
  padding: 2rem 0;
  text-align: center;
  color: #64748b;
}

/* Image Styling */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Image with caption */
figure {
  margin: 2rem 0;
  text-align: center;
}

figure img {
  margin-bottom: 0.5rem;
}

figcaption {
  font-style: italic;
  color: #64748b;
  font-size: 0.9rem;
}

/* Image alignment classes */
.img-left {
  float: left;
  margin: 0 1.5rem 1rem 0;
  max-width: 300px;
}

.img-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
  max-width: 300px;
}

.img-center {
  display: block;
  margin: 2rem auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .img-left,
  .img-right {
    float: none;
    margin: 1.5rem auto;
    display: block;
  }
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .nav-links {
    gap: 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .post-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .post-nav {
    flex-direction: column;
    text-align: center;
  }

  .posts-grid {
    gap: 1.5rem;
  }

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