/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

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

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

/* Prevent flash of animations on page load */
.no-animations *,
.no-animations *::before,
.no-animations *::after {
  transition-duration: 0s !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  color: #2d2a26;
  background-color: #ffffff;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: #1e40af;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.skip-link:nth-of-type(2):focus {
  top: 60px;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible improvements */
.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  transform: translateY(-1px);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .skip-link {
    background: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
  }
  
  .search-input:focus {
    border-color: #000000;
    box-shadow: 0 0 0 4px #000000;
  }
  
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  a:focus-visible {
    outline: 3px solid #000000;
    outline-offset: 2px;
  }
}

/* Layout */
.container {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: #1a1612;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

h2 {
  font-size: 1.875rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  color: #1e3a5f;
  line-height: 1.3;
}

h3 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #2563eb;
  line-height: 1.35;
}

h4 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #5c5854;
  line-height: 1.4;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #4a453f;
}

a {
  color: #1a1612;
  text-decoration: none;
  outline-offset: 2px;
}

a:hover {
  color: #1a1612;
  text-decoration-color: #d97706;
}

a:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Enhanced focus styles for better keyboard navigation */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 4px;
  }
}

/* Focus styles for interactive elements */
.post-card:focus-within {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  margin: 0 -1rem;
  padding: 1.5rem 1rem;
  border-radius: 8px;
  border-bottom: 1px solid transparent;
  box-shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.1);
}

.post-card:last-child:focus-within {
  border-bottom: 1px solid transparent;
}

/* Skip link enhanced focus */
.skip-link:focus {
  top: 16px;
  z-index: 9999;
}

/* Header */
.site-header {
  padding: 1.5rem 0;
  margin-bottom: 3rem;
  background: #ffffff;
  border-bottom: none;
  position: static;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  position: relative;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Search */
.search-container {
  position: relative;
  width: 300px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  font-weight: 400;
}

.search-input::placeholder {
  color: #6b635c;
  font-style: italic;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  transform: translateY(-1px);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 0.5rem;
  backdrop-filter: blur(8px);
}

.search-results.show {
  display: block;
}


/* RSS Link */
.rss-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #6b635c;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 8px;
  background: transparent;
}

.rss-link:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.search-result-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
}

.search-result-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 2px 2px 0;
}

.search-result-item:hover::before {
  transform: scaleY(1);
}

.search-result-item:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  transform: translateX(2px);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  color: #1a1612;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.search-result-description {
  color: #6b635c;
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.search-result-type {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  border: 1px solid #93c5fd;
}

.search-no-results {
  padding: 2rem 1.25rem;
  text-align: center;
  color: #6b635c;
  font-size: 0.875rem;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-style: italic;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
}

.site-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  transition: border-color 0.2s ease;
}

.site-avatar:hover {
  border-color: #3b82f6;
}

.site-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.site-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1612;
  letter-spacing: -0.015em;
  margin: 0 0 0.125rem 0;
  display: block;
  text-transform: none;
  text-decoration: none;
  line-height: 1.2;
}


.site-title:hover {
  color: #1a1612;
  text-decoration: none;
}

.site-description {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 0.875rem;
  color: #6b635c;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
  font-style: italic;
}

/* Main content */
.main-content {
  min-height: calc(100vh - 200px);
  margin-bottom: 4rem;
}

/* Homepage */
.post-header {
  margin-bottom: 1rem;
}

.post-footer {
  margin-top: auto;
}

.meta-separator {
  color: #cbd5e1;
  margin: 0 0.5rem;
}

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

/* Posts */
.posts-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.post-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

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

.post-card:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  transform: none;
  box-shadow: none;
  border-color: transparent;
  border-radius: 0.375rem;
}

.post-card:last-child:hover {
  border-bottom: 1px solid transparent;
}

.post-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  letter-spacing: -0.025em;
  word-wrap: break-word;
  hyphens: auto;
}

.post-title a {
  color: #1a1612;
  transition: color 0.2s ease;
}

.post-title a:hover {
  color: #1a1612;
  text-decoration-color: #d97706;
}

.post-meta {
  font-size: 0.875rem;
  color: #6b635c;
  margin-bottom: 1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: 0;
}

.post-excerpt {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  color: #4a453f;
  line-height: 1.65;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 400;
}

.read-more {
  font-size: 0.875rem;
  font-weight: 500;
  color: #d97706;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  min-height: 44px;
  transition: all 0.2s ease;
}

.read-more:hover {
  color: #dc2626;
  gap: 0.5rem;
}

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 400;
  color: #6b7280;
  background: #f9fafb;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.tag:hover {
  color: #374151;
  background: #e5e7eb;
  border-color: #d1d5db;
}

.tag:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 2px;
}

/* Article */
.blog-post {
  max-width: 100%;
}

.article-header {
  margin-bottom: 3rem;
}


.article-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 2rem;
  letter-spacing: -0.035em;
  color: #1a1612;
  position: relative;
  display: inline-block;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.article-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40%;
  height: 4px;
  background: linear-gradient(90deg, #d97706 0%, #dc2626 100%);
  border-radius: 2px;
}

.article-meta {
  font-size: 0.875rem;
  color: #6b635c;
  margin-bottom: 0;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  line-height: 1.5;
}

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

.article-content {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #4a453f;
  margin-top: 3rem;
}

.article-content a {
  color: #d97706;
}

.article-content a:hover {
  color: #d97706;
  text-decoration: underline;
  text-decoration-color: #d97706;
}

.article-content p {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.75;
}

.article-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #f1f5f9;
}

/* Related Posts */
.related-posts {
  margin-bottom: 2rem;
}

.related-posts-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: #1a1612;
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}

.related-posts-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.related-post-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  transition: all 0.15s ease;
  overflow: visible;
  padding: 0;
}

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

.related-post-card:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  transform: none;
  box-shadow: none;
  border-color: transparent;
  margin: 0 -0.75rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
}

.related-post-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
  min-height: 3.5rem;
  gap: 1rem;
}

.related-post-link:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

.related-post-content {
  flex: 1;
}

.related-post-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1612;
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.related-post-date {
  font-size: 0.875rem;
  color: #6b635c;
  margin: 0;
  display: block;
  font-weight: 400;
}

.related-post-tags {
  display: none;
}

.related-post-arrow {
  color: #94a3b8;
  font-size: 1.25rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.related-post-card:hover .related-post-arrow {
  color: #d97706;
  transform: translateX(0.25rem);
}

.back-to-blog {
  font-size: 0.875rem;
  font-weight: 500;
  color: #d97706;
  transition: color 0.2s ease;
}

.back-to-blog:hover {
  color: #dc2626;
}

/* Error state */
.error-state {
  text-align: center;
  padding: 4rem 0;
}

.error-state h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #374151;
}

.error-state p {
  color: #64748b;
  margin-bottom: 2rem;
}

.back-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #d97706;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #dc2626;
}

/* Tag page */
.tag-header {
  margin-bottom: 3rem;
}

.tag-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: #1a1612;
}

.tag-description {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  font-style: italic;
  color: #5c5854;
  margin-bottom: 0;
  line-height: 1.5;
}

/* Tags cloud for /tags page */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}

.tags-cloud .tag {
  transition: all 0.2s ease;
}

.tags-cloud .tag .tag-count {
  font-weight: 400;
  opacity: 0.7;
  font-size: 0.75rem;
}

.tags-cloud .tag:hover .tag-count {
  opacity: 1;
}

/* Browse tags link on home page */
.browse-tags-link {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.no-posts {
  text-align: center;
  padding: 4rem 0;
  color: #64748b;
}

.no-posts p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.article-content h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: 1.2rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

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

.article-content li {
  margin-bottom: 0.5rem;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.75;
  font-size: 1.0625rem;
  color: #4a453f;
}

.article-content ul li::marker {
  color: #3b82f6;
}

.article-content ol li::marker {
  color: #1e40af;
  font-weight: 600;
}

.article-content blockquote {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  border-left: 4px solid #d97706;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-weight: 500;
  color: #1e3a5f;
  background: linear-gradient(90deg, #fef3c7 0%, transparent 100%);
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
  letter-spacing: -0.01em;
}

/* Images */
.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.article-content img:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.article-content img:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 4px;
}

/* YouTube Player */
.youtube-player {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.youtube-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Code */
code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 0.875rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #1e40af;
  border: 1px solid #93c5fd;
  font-weight: 500;
}

pre {
  background: linear-gradient(135deg, #0f172a 0%, #172554 100%);
  color: #dbeafe;
  padding: 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 2rem 0;
  font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  border: 1px solid #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2);
  max-width: 100%;
  box-sizing: border-box;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  border-radius: 0;
  border: none;
  font-weight: 400;
}

/* Footer */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-content {
  color: #64748b;
}

.footer-main {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.footer-sections {
  display: flex;
  gap: 3rem;
}

.footer-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem 0;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #3b82f6;
}

.footer-nav a:focus-visible {
  outline: 2px solid #1e40af;
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

/* Section titles */
.section-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: -0.025em;
  color: #1a1612;
  line-height: 1.3;
}

/* Tablet responsiveness */
@media (max-width: 1024px) {
  .container {
    max-width: 44rem;
    padding: 0 1.5rem;
  }
  .article-title {
    font-size: 2rem;
  }
  
}

/* Dark theme with improved contrast */
@media (prefers-color-scheme: dark) {
  body {
    color: #ffffff;
    background-color: #0a0a0a;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
  }
  
  p {
    color: #e5e5e5;
  }
  
  a {
    color: #ffffff;
    text-decoration-color: #525252;
  }
  
  a:hover {
    color: #ffffff;
    text-decoration-color: #ffffff;
  }
  
  .site-header {
    background: #0a0a0a;
  }
  
  .site-title {
    color: #ffffff;
  }
  
  .site-title:hover {
    color: #ffffff;
  }
  
  .site-description {
    color: #b3b3b3;
  }
  
  .post-title a {
    color: #ffffff;
  }
  
  .post-title a:hover {
    color: #ffffff;
  }
  
  .post-meta {
    color: #b3b3b3;
  }
  
  .post-excerpt {
    color: #e5e5e5;
  }
  
  .post-card {
    border-bottom: 1px solid #262626;
  }
  
  .post-card:hover {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: none;
  }
  
  .post-card:focus-within {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: none;
  }
  
  .read-more {
    color: #3b82f6;
  }
  
  .read-more:hover {
    color: #60a5fa;
  }
  
  .tag {
    color: #9ca3af;
    background: #1f2937;
    border: 1px solid #374151;
  }
  
  .tag:hover {
    color: #d1d5db;
    background: #374151;
    border-color: #4b5563;
  }
  
  .article-title {
    color: #ffffff;
  }
  
  .article-meta {
    color: #a3a3a3;
  }
  
  .article-content {
    color: #d4d4d4;
  }
  
  .article-content a {
    color: #fbbf24;
  }
  
  .article-content a:hover {
    color: #fbbf24;
    text-decoration: underline;
    text-decoration-color: #fbbf24;
  }
  
  .article-content h2 {
    color: #ffffff;
  }
  
  .article-content h3 {
    color: #ffffff;
  }
  
  .article-content blockquote {
    border-left: 4px solid #3b82f6;
    color: #d4d4d4;
    background: linear-gradient(90deg, #1e293b 0%, transparent 100%);
  }
  
  code {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #60a5fa;
    border: 1px solid #475569;
  }
  
  pre {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  }
  
  .article-content li {
    color: #d4d4d4;
  }
  
  .article-content ul li::marker {
    color: #3b82f6;
  }
  
  .article-content ol li::marker {
    color: #60a5fa;
  }
  
  
  .back-to-blog {
    color: #3b82f6;
  }
  
  .back-to-blog:hover {
    color: #60a5fa;
  }
  
  .back-link {
    color: #3b82f6;
  }
  
  .back-link:hover {
    color: #60a5fa;
  }
  
  
  .site-footer {
    border-top: 1px solid #262626;
  }
  
  .footer-content {
    color: #a3a3a3;
  }
  
  .footer-info .footer-name {
    color: #ffffff;
  }
  
  .footer-info .footer-title {
    color: #60a5fa;
  }
  
  .footer-info .footer-description {
    color: #a3a3a3;
  }
  
  .footer-section h4 {
    color: #ffffff;
  }
  
  .footer-nav a {
    color: #a3a3a3;
  }
  
  .footer-nav a:hover {
    color: #60a5fa;
  }
  
  .footer-nav a:focus-visible {
    outline: 2px solid #ffffff;
  }
  
  .footer-bottom {
    border-top: 1px solid #262626;
  }
  
  .footer-bottom p {
    color: #737373;
  }
  
  .error-state h1 {
    color: #ffffff;
  }
  
  .error-state p {
    color: #a3a3a3;
  }
  
  .tag-title {
    color: #ffffff;
  }
  
  .tag-description {
    color: #a3a3a3;
  }
  
  .no-posts {
    color: #a3a3a3;
  }
  
  .no-posts p {
    color: #a3a3a3;
  }
  
  .article-footer {
    border-top: 1px solid #262626;
  }
  
  /* Related Posts dark theme */
  .related-posts-title {
    color: #ffffff;
  }
  
  .related-post-card {
    border-bottom: 1px solid #374151;
  }
  
  .related-post-card:hover {
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.3) 0%, rgba(75, 85, 99, 0.3) 100%);
    margin: 0 -0.75rem;
    padding: 0 0.75rem;
    border-color: transparent;
  }
  
  .related-post-title {
    color: #ffffff;
  }
  
  .related-post-date {
    color: #a3a3a3;
  }
  
  .related-post-arrow {
    color: #64748b;
  }
  
  .related-post-card:hover .related-post-arrow {
    color: #fbbf24;
  }
  
  .skip-link {
    background: #3b82f6;
  }
  
  .skip-link:focus {
    background: #3b82f6;
  }
  
  /* Search dark theme */
  .search-input {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
    color: #ffffff;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  }
  
  .search-input::placeholder {
    color: #a3a3a3;
  }
  
  .search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    background: #1e293b;
  }
  
  /* RSS Link dark theme */
  .rss-link {
    color: #a3a3a3;
  }
  
  .rss-link:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
  }
  
  .search-results {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  }
  
  .search-result-item {
    border-bottom-color: #475569;
  }
  
  .search-result-item::before {
    background: linear-gradient(90deg, #60a5fa 0%, #93c5fd 100%);
  }
  
  .search-result-item:hover {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
  }
  
  .search-result-title {
    color: #ffffff;
  }
  
  .search-result-description {
    color: #d4d4d4;
  }
  
  .search-result-meta {
    color: #94a3b8;
  }
  
  .search-result-type {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #93c5fd;
    border: 1px solid #475569;
  }
  
  .search-no-results {
    color: #d4d4d4;
  }
  
  .browse-tags-link {
    border-top: 1px solid #262626;
  }
  
  /* Images dark theme */
  .article-content img {
    border: 1px solid #374151;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  }
  
  .article-content img:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  }
  
  .article-content img:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 4px;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
  
  .container {
    max-width: 100%;
    padding: 0 1.25rem;
  }
  
  .site-header {
    padding: 1rem 0;
    margin-bottom: 2.5rem;
    position: relative;
  }
  
  .header-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }
  
  .header-actions {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
  }
  
  .search-container {
    flex: 1;
    max-width: 320px;
  }
  
  .search-input {
    font-size: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .rss-link {
    width: 44px;
    height: 44px;
    background: rgba(107, 99, 92, 0.08);
    border-radius: 12px;
  }
  
  .rss-link:hover {
    background: rgba(59, 130, 246, 0.15);
  }
  
  .site-avatar {
    width: 80px;
    height: 80px;
  }
  
  .site-title {
    font-size: 1.25rem;
  }
  
  .posts-grid {
    gap: 3rem;
  }
  
  .post-card {
    padding: 1.5rem 0;
  }
  
  .post-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .meta-separator {
    display: none;
  }
  
  .post-excerpt {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .post-card:hover {
    margin: 0;
    padding: 1.5rem 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
  
  .post-card:focus-within {
    margin: 0;
    padding: 1.5rem 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
  
  .article-title {
    font-size: 2rem;
    line-height: 1.1;
  }
  
  .article-title::after {
    width: 60%;
    height: 3px;
  }
  
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.625rem;
    margin-top: 2.5rem;
  }
  
  h3 {
    font-size: 1.375rem;
    margin-top: 2rem;
  }
  
  .footer-main {
    text-align: center;
  }
  
  .footer-sections {
    justify-content: center;
    gap: 2rem;
  }
  
  .footer-info .footer-description {
    max-width: none;
  }
  
  pre {
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    padding: 1rem;
    overflow-x: auto;
    white-space: pre;
  }
  
  .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }
  
  /* Related Posts mobile */
  .related-posts-grid {
    gap: 0.75rem;
  }
  
  .related-post-link {
    padding: 0.75rem 0;
    min-height: 3rem;
    gap: 0.75rem;
  }
  
  .related-post-title {
    font-size: 0.9375rem;
  }
  
  .related-post-date {
    font-size: 0.8125rem;
  }
  
  .related-post-card:hover {
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .site-header {
    padding: 1rem 0;
    margin-bottom: 2rem;
  }
  
  .site-avatar {
    width: 70px;
    height: 70px;
  }
  
  .site-title {
    font-size: 1.125rem;
  }
  
  .post-title {
    font-size: 1.375rem;
  }
  
  .article-title {
    font-size: 2rem;
    word-break: break-word;
  }
  
  .posts-grid {
    gap: 2.5rem;
  }
  
  .search-container {
    flex: 1;
    max-width: 260px;
  }
  
  .header-actions {
    gap: 0.5rem;
  }
  
  .search-input {
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  pre {
    padding: 0.75rem;
    font-size: 0.75rem;
    margin: 1rem 0;
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
  }
}

.blog-section {
  margin-bottom: 2rem;
}

.section-header {
  margin-bottom: 1.5rem;
  position: relative;
}


.section-accent {
  width: 4rem;
  height: 0.25rem;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 0.125rem;
}

.posts-container {
  display: grid;
  gap: 1rem;
}

.post-card-modern {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.post-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.25rem;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 50%, #8b5cf6 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.post-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.post-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  min-height: 5rem;
}

.post-card-link:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 1rem;
}

.post-card-content {
  flex: 1;
}

.post-card-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1612;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  word-wrap: break-word;
  hyphens: auto;
}

.post-card-date {
  font-size: 0.875rem;
  color: #6b635c;
  font-weight: 400;
  line-height: 1.4;
}

.post-card-arrow {
  color: #94a3b8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
}

.post-card-modern:hover .post-card-arrow {
  color: #3b82f6;
  transform: translateX(0.25rem);
}

/* Condensed post cards for non-featured posts */
.post-card-condensed {
  background: transparent;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  transition: all 0.15s ease;
  position: relative;
  overflow: visible;
}

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

.post-card-condensed:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  transform: none;
  box-shadow: none;
  border-color: transparent;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
}

.post-card-condensed-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  text-decoration: none;
  color: inherit;
  min-height: 2.5rem;
  gap: 1rem;
}

.post-card-condensed-link:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 0.375rem;
}

.post-card-condensed-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.005em;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  hyphens: auto;
}

.post-card-condensed-date {
  font-size: 0.8125rem;
  color: #6b7280;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.post-card-condensed:hover .post-card-condensed-title {
  color: #1f2937;
}

.post-card-condensed:hover .post-card-condensed-date {
  color: #374151;
}

.empty-state-modern {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 28rem;
  margin: 0 auto;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 50%;
  margin-bottom: 1.5rem;
  color: #64748b;
}

.empty-state-modern h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.empty-state-modern p {
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* Dark theme styles for modern design */
@media (prefers-color-scheme: dark) {
  
  .section-title {
    color: #ffffff;
  }
  
  .section-accent {
    background: linear-gradient(90deg, #60a5fa 0%, #93c5fd 100%);
  }
  
  .post-card-modern {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
  }
  
  .post-card-modern:hover {
    border-color: #64748b;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  }
  
  .post-card-title {
    color: #ffffff;
  }
  
  .post-card-date {
    color: #a3a3a3;
  }
  
  .post-card-arrow {
    color: #64748b;
  }
  
  .post-card-modern:hover .post-card-arrow {
    color: #60a5fa;
  }
  
  .empty-icon {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #a3a3a3;
  }
  
  .empty-state-modern h3 {
    color: #ffffff;
  }
  
  .empty-state-modern p {
    color: #a3a3a3;
  }
  
  /* Condensed post cards dark theme */
  .post-card-condensed {
    border-bottom: 1px solid #374151;
  }
  
  .post-card-condensed:hover {
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.3) 0%, rgba(75, 85, 99, 0.3) 100%);
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
  }
  
  .post-card-condensed-title {
    color: #d1d5db;
  }
  
  .post-card-condensed-date {
    color: #9ca3af;
  }
  
  .post-card-condensed:hover .post-card-condensed-title {
    color: #ffffff;
  }
  
  .post-card-condensed:hover .post-card-condensed-date {
    color: #d1d5db;
  }
}

/* Mobile responsive adjustments for modern design */
@media (max-width: 768px) {
  
  .section-title {
    font-size: 2rem;
  }
  
  .post-card-link {
    padding: 1.25rem;
    min-height: 4.5rem;
  }
  
  .post-card-title {
    font-size: 1.125rem;
  }
  
  .empty-state-modern {
    padding: 3rem 1.5rem;
  }
  
  /* Mobile styles for condensed posts */
  .post-card-condensed-link {
    padding: 0.75rem 0;
    min-height: 3.25rem;
    gap: 0.75rem;
  }
  
  .post-card-condensed-title {
    font-size: 1rem;
    font-weight: 600;
  }
  
  .post-card-condensed-date {
    font-size: 0.8rem;
  }
  
  .post-card-condensed:hover {
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0.5rem;
  }
}

@media (max-width: 480px) {
  .post-card-link {
    padding: 1rem;
    min-height: 4rem;
  }
  
  .post-card-title {
    font-size: 1rem;
  }
  
  .post-card-date {
    font-size: 0.8rem;
  }
  
  .empty-icon {
    width: 4rem;
    height: 4rem;
  }
  
  .empty-state-modern h3 {
    font-size: 1.25rem;
  }
  
  /* Small mobile styles for condensed posts */
  .post-card-condensed-link {
    padding: 0.75rem 0;
    min-height: 3rem;
    gap: 0.625rem;
    align-items: flex-start;
  }
  
  .post-card-condensed-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: normal;
    -webkit-line-clamp: 3;
  }
  
  .post-card-condensed-date {
    font-size: 0.75rem;
    margin-top: 0.125rem;
  }
  
  .post-card-condensed:hover {
    margin: 0 -0.375rem;
    padding: 0 0.375rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 0.5rem;
  }
}
