/* Modern SEO Theme - Clean & Simple Design */

/* CSS Variables for Modern Theme */
:root {
  /* Clean Color Palette - Modern & Unique */
  --primary-color: #8b5cf6; /* Violet */
  --primary-dark: #7c3aed;
  --secondary-color: #0ea5e9; /* Sky */
  --accent-color: #f59e0b; /* Amber */
  --success-color: #10b981; /* Emerald */
  --warning-color: #f97316; /* Orange */
  --danger-color: #ef4444; /* Red */
  
  /* Text Colors */
  --text-primary: #0f172a; /* slate-900 */
  --text-secondary: #64748b; /* slate-500 */
  --text-light: #94a3b8; /* slate-400 */
  --text-lighter: #cbd5e1; /* slate-300 */
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc; /* slate-50 */
  --bg-accent: #f1f5f9; /* slate-100 */
  --bg-card: #ffffff;
  
  /* Solid Colors (No Gradients) */
  --solid-primary: #8b5cf6; /* Violet */
  --solid-secondary: #0ea5e9; /* Sky */
  --solid-accent: #f59e0b; /* Amber */
  
  /* Clean Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.15);
  
  /* Border Radius - Clean & Simple */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Layout */
  --main-top-padding: 2rem;
  --section-separation: 2.5rem;
  --container-padding: 1rem;
  
  /* Card Colors */
  --card-background: #ffffff;
  --card-background-selected: #f1f5f9;
  --card-text-color-main: #0f172a;
  --card-text-color-secondary: #64748b;
  --card-text-color-tertiary: #94a3b8;
  --card-separator-color: #e2e8f0;
  
  /* Typography */
  --article-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --article-font-size: 1.05rem;
  --article-line-height: 1.7;
  
  /* Code and Preformatted Text */
  --pre-background-color: #f8fafc;
  --pre-text-color: #0f172a;
  --code-background-color: #f1f5f9;
  --code-text-color: #0f172a;
}

/* Base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

h1 {
  font-size: 2.25rem;
  letter-spacing: -0.025em;
  color: var(--primary-color);
}

h2 { 
  font-size: 1.75rem; 
  letter-spacing: -0.025em;
  margin-top: 2rem;
  color: var(--primary-dark);
}

h3 { 
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

h4 { 
  font-size: 1.25rem; 
  letter-spacing: -0.01em;
  color: var(--secondary-color);
}

h5 { font-size: 1.125rem; color: var(--text-primary); }
h6 { font-size: 1rem; color: var(--text-primary); }

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-weight: 400;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

/* Lists */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--primary-color);
  background-color: var(--bg-accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Code */
code {
  background-color: var(--code-background-color);
  color: var(--code-text-color);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
}

pre {
  background-color: var(--pre-background-color);
  color: var(--pre-text-color);
  border: 1px solid var(--card-separator-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Header */
.header {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-bottom: 1px solid var(--card-separator-color);
  padding: 1.75rem 0;
  box-shadow: var(--shadow-sm);
}

.header-content {
  text-align: center;
}

.site-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: none;
}

.site-title strong {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  letter-spacing: -0.025em;
  color: var(--primary-color);
}

.site-description {
  margin: 0.75rem 0 0 0;
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 400;
  font-style: normal;
}

/* Home page */
.home-page {
  padding: 1.75rem 0;
}

/* Posts grid */
.posts-grid {
  display: block;
  margin-bottom: 2rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--card-separator-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  width: 100%;
}

.post-card:last-child {
  margin-bottom: 0;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 4px;
  background: var(--primary-color);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.post-card:hover::before {
  transform: scaleY(1);
}

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

.post-title a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.post-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 400;
}

.post-summary {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.tag {
  background: var(--bg-accent);
  color: var(--primary-color);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  border: 1px solid var(--card-separator-color);
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--card-separator-color);
}

.pagination-link {
  padding: 0.6rem 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--card-separator-color);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s ease;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.pagination-link:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

/* Single post */
.single-post {
  padding: 1.75rem 0;
}

.post-content-wrapper {
  display: block;
  margin: 1.75rem 0;
}

.post-content {
  max-width: none;
}

/* Table of contents */
.table-of-contents {
  background: var(--bg-accent);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  border: 1px solid var(--card-separator-color);
  box-shadow: var(--shadow-sm);
}

.table-of-contents h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--text-primary);
  font-weight: 700;
}

.table-of-contents ul {
  list-style: none;
  padding-left: 0;
}

.table-of-contents ul ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.table-of-contents li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.table-of-contents li a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
  padding: 0.25rem 0;
}

.table-of-contents li a:hover {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

/* Sidebar */
.post-sidebar {
  display: none;
}

/* Post navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--card-separator-color);
}

.nav-prev, .nav-next {
  flex: 1;
  max-width: 45%;
}

.nav-next {
  text-align: right;
}

.nav-prev a, .nav-next a {
  display: block;
  padding: 0.75rem 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--card-separator-color);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s ease;
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.nav-prev a:hover, .nav-next a:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 2.5rem 0 2rem;
  margin-top: 3.5rem;
  text-align: center;
  border-top: 1px solid var(--card-separator-color);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

.footer-info p {
  margin: 0.25rem 0;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 400;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--container-padding);
  }
  
  .header {
    padding: 1.25rem 0;
  }
  
  .header-content {
    text-align: center;
  }
  
  .site-title strong {
    font-size: 1.65rem;
  }
  
  .site-description {
    font-size: 0.95rem;
  }
  
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .post-title a {
    font-size: 1.25rem;
  }
  
  .post-card {
    padding: 1.25rem;
  }
  
  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-prev, .nav-next {
    max-width: 100%;
    text-align: center;
  }
  
  .table-of-contents {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .post-meta {
    gap: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .meta-item {
    font-size: 0.85rem;
  }
  
  .header-content {
    padding: 0 1rem;
  }
  
  .footer-content {
    padding: 0 1rem;
  }
  
  .post-card {
    padding: 1rem;
  }
}

/* Print styles */
@media print {
  .header,
  .footer,
  .post-navigation,
  .pagination {
    display: none;
  }
  
  .container {
    max-width: none;
    padding: 0;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  .post-card {
    box-shadow: none;
    border: 1px solid #000;
  }
}