/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Fun blue-purple color scheme */
  --color-primary: #3b82f6;        /* Bright blue */
  --color-primary-dark: #2563eb;   /* Darker blue */
  --color-secondary: #8b5cf6;      /* Purple/violet */
  --color-secondary-dark: #6d28d9; /* Dark purple */
  --color-accent: #ec4899;         /* Pink accent */

  --color-text: #1e293b;           /* Slate dark */
  --color-text-muted: #64748b;     /* Slate gray */
  --color-border: #e2e8f0;         /* Light slate */
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;      /* Very light blue-gray */
  --color-bg-highlight: #eff6ff;   /* Light blue tint */
  --color-code-bg: #f1f5f9;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-subtle: linear-gradient(to right, #eff6ff, #f5f3ff);
}

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

.container {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header with gradient */
.site-header {
  background: var(--gradient-hero);
  padding: 3rem 0 2.5rem;
  margin-bottom: 3.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.site-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.site-title a {
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-title a:hover {
  transform: translateY(-2px);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.site-nav {
  margin-top: 1rem;
}

.site-nav a {
  margin-right: 2rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

/* Main content */
.site-main {
  min-height: 60vh;
}

.site-main h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Post and page headers */
.post-header,
.page-header {
  margin-bottom: 2.5rem;
}

.post-title,
.page-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post-meta {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
}

.post-categories {
  margin-left: 1rem;
}

.category {
  display: inline-block;
  background: var(--gradient-accent);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  text-decoration: none;
  color: white;
  font-size: 0.8rem;
  margin-left: 0.4rem;
  font-weight: 600;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.category:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Post and page content */
.post-content,
.page-content {
  margin-bottom: 4rem;
  line-height: 1.8;
}

.post-content h2,
.page-content h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-secondary-dark);
  position: relative;
  padding-bottom: 0.5rem;
}

.post-content h2::after,
.page-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.post-content h3,
.page-content h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

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

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

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

.post-content a,
.page-content a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-decoration-color: rgba(139, 92, 246, 0.3);
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.post-content a:hover,
.page-content a:hover {
  color: var(--color-secondary-dark);
  text-decoration-color: var(--color-secondary-dark);
}

.post-content img,
.page-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.post-content figure,
.page-content figure {
  margin: 2.5rem 0;
}

.post-content figcaption,
.page-content figcaption {
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.75rem;
}

.post-content blockquote,
.page-content blockquote {
  border-left: 4px solid var(--color-secondary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--color-text);
  font-style: italic;
  background: var(--gradient-subtle);
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-content code,
.page-content code {
  background: var(--color-code-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Code", "Droid Sans Mono", monospace;
  font-size: 0.9em;
  color: var(--color-secondary-dark);
  border: 1px solid var(--color-border);
}

.post-content pre,
.page-content pre {
  background: var(--color-code-bg);
  padding: 1.5rem;
  overflow-x: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 2px solid var(--color-border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-content pre code,
.page-content pre code {
  background: none;
  padding: 0;
  color: var(--color-text);
  border: none;
}

/* Post list with card-like design */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list-item {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.post-list-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
  border-color: var(--color-primary);
}

.post-list-item:last-child {
  margin-bottom: 2.5rem;
}

.post-list-title {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-list-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.3s ease;
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary)) no-repeat;
  background-size: 0% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--color-text);
  background-clip: text;
}

.post-list-title a:hover {
  background-size: 100% 100%;
  -webkit-text-fill-color: transparent;
}

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

.post-list-excerpt {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: 0.75rem;
}

.post-list-excerpt a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.post-list-excerpt a:hover {
  border-bottom-color: var(--color-secondary);
}

/* Footer */
.site-footer {
  background: var(--gradient-subtle);
  margin-top: 5rem;
  padding: 2.5rem 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.site-footer a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.site-footer a:hover {
  color: var(--color-secondary-dark);
  text-decoration: underline;
}

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

.pagination-page,
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination-page {
  color: var(--color-text);
  background: white;
  border: 2px solid var(--color-border);
}

.pagination-page:hover {
  background: var(--gradient-accent);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.pagination-page.current {
  background: var(--gradient-accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.pagination-ellipsis {
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: default;
}

/* Post navigation */
.post-nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 2px solid var(--color-border);
}

.post-nav-previous,
.post-nav-next {
  flex: 1;
  padding: 1.5rem;
  background: var(--gradient-subtle);
  border-radius: 12px;
  border: 2px solid var(--color-border);
  transition: all 0.3s ease;
}

.post-nav-previous:hover,
.post-nav-next:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

.post-nav-previous a,
.post-nav-next a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}

.post-nav-previous a:hover,
.post-nav-next a:hover {
  color: var(--color-secondary);
}

/* Back to blog link */
.back-to-blog {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.back-to-blog:hover {
  color: var(--color-secondary);
  transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    font-size: 17px;
  }

  .container {
    padding: 0 20px;
  }

  .site-header {
    padding: 2rem 0 1.75rem;
    margin-bottom: 2.5rem;
  }

  .site-title {
    font-size: 1.65rem;
  }

  .post-title,
  .page-title {
    font-size: 1.9rem;
  }

  .site-nav a {
    margin-right: 1.25rem;
  }

  .post-content h2,
  .page-content h2 {
    font-size: 1.5rem;
  }

  .post-list-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
  }

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