/* Modern Web Responsive Blog Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Colors */
  --bg-primary: #0b0c10;
  --bg-secondary: #13151c;
  --bg-tertiary: #1b1e28;
  --bg-glass: rgba(19, 21, 28, 0.75);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #7c3aed; /* violet-600 */
  --accent-secondary: #06b6d4; /* cyan-500 */
  --accent-magenta: #ec4899; /* pink-500 */
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(124, 58, 237, 0.5);
  
  --gradient-accent: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  --gradient-magenta: linear-gradient(135deg, var(--accent-magenta) 0%, var(--accent-primary) 100%);
  --gradient-card-hover: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(6, 118, 212, 0.05) 100%);

  /* Layout and Spacing */
  --max-width-content: 1200px;
  --max-width-reading: 72ch;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Font Stacks */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadow */
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 24px -4px rgba(124, 58, 237, 0.35);
}

/* CSS Resets & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  color: #ffffff;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.85rem; margin-bottom: 1.25rem; margin-top: 2rem; }
h3 { font-size: 1.4rem; margin-bottom: 1rem; margin-top: 1.5rem; }

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

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

/* Layout Containers */
.container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Sticky Header with Backdrop Blur */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: "</>";
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  background: var(--gradient-magenta);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Layout: Centered Feed Layout for Homepage */
.main-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.tag:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-1px);
}



.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Simple, Minimalist Tech Blog List Item Styling */
.post-card {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 0 0 2.25rem 0;
  position: relative;
  transition: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: visible;
  box-shadow: none;
}

.post-card::before {
  display: none;
}

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

.post-card:hover {
  transform: none;
  border-color: var(--border-subtle);
  background: transparent;
  box-shadow: none;
}

.post-card:hover::before {
  display: none;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.post-read-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-read-time::before {
  content: "•";
  margin-right: 0.5rem;
  color: var(--text-muted);
}

.post-card-title {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0.25rem;
}

.post-card-title a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.post-card-title a:hover {
  color: var(--accent-secondary);
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0.25rem;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.post-card-link {
  align-self: flex-start;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.post-card-link:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

/* Single Post layout page */
.post-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

.post-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
  transition: var(--transition-fast);
}

.post-back-btn:hover {
  color: var(--text-primary);
  transform: translateX(-4px);
}

.post-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2rem;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.post-header-date {
  color: var(--accent-secondary);
  font-weight: 600;
}

.post-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}



/* Article content styling */
article {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #cbd5e1; /* slate-300 */
}

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

article strong {
  color: #ffffff;
  font-weight: 600;
}

article em {
  font-style: italic;
}

article h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

article h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

article ul, article ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

article li {
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

article blockquote {
  border-left: 4px solid var(--accent-primary);
  background-color: var(--bg-secondary);
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

article blockquote p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* Code Syntax Highlighting */
article pre {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e2e8f0;
}

article code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--accent-magenta);
}

article pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

/* Image formatting */
article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.post-featured-image {
  margin: 0 0 2rem 0;
}

.post-featured-image img {
  width: 100%;
  margin: 0;
}

/* Post navigation page footer */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.post-nav-card {
  flex: 1;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.post-nav-card:hover {
  border-color: var(--accent-secondary);
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
}

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

.post-nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

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

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Code styling token colors */
.token.comment { color: var(--text-muted); font-style: italic; }
.token.keyword { color: var(--accent-magenta); font-weight: 600; }
.token.string { color: var(--accent-secondary); }
.token.function { color: #60a5fa; }
.token.number { color: #f59e0b; }

/* Responsive adjustments */
@media (max-width: 968px) {
  .main-layout {
    padding-top: 2rem;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 60px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .site-header {
    height: var(--header-height);
  }
  
  .nav-links {
    gap: 1.25rem;
  }
  
  .post-card {
    padding: 1.5rem;
  }
  
  .post-card-title {
    font-size: 1.25rem;
  }
  
  .post-layout {
    padding-top: 1.5rem;
  }
  
  .post-title {
    font-size: 2rem;
  }
  
  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .site-footer .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
