@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
/* ================================
   ENTRANCE ANIMATIONS
   ================================ */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  animation: fadeSlideIn 0.5s ease-out forwards;
}

.animate-fade {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Stagger children animations */
.home-info {
  animation: fadeSlideIn 0.5s ease-out forwards;
}

.post-entry:nth-child(1) { animation: fadeSlideIn 0.4s ease-out 0.05s both; }
.post-entry:nth-child(2) { animation: fadeSlideIn 0.4s ease-out 0.1s both; }
.post-entry:nth-child(3) { animation: fadeSlideIn 0.4s ease-out 0.15s both; }
.post-entry:nth-child(4) { animation: fadeSlideIn 0.4s ease-out 0.2s both; }
.post-entry:nth-child(5) { animation: fadeSlideIn 0.4s ease-out 0.25s both; }

.post-single {
  animation: fadeSlideIn 0.5s ease-out forwards;
}

/* ================================
   PROFESSIONAL BLOG STYLING
   ================================ */

:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #eff6ff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --code-bg: #f8f9fa;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-hover: 0 10px 40px rgba(0,0,0,0.1);
  --radius: 12px;
  --max-width: 1400px;
}

[data-theme="dark"] {
  --bg: #0f0f14;
  --surface: #1a1a24;
  --text: #f1f3f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: #1e2a3a;
  --border: #2d2d3a;
  --border-light: #252530;
  --code-bg: #1e1e28;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 10px 40px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
[data-theme="dark"] .header {
  background: rgba(26,26,36,0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.site-title:hover { text-decoration: none; color: var(--accent); }
.nav-right { display: flex; gap: 1rem; align-items: center; }
.search-box { position: relative; }
.search-box input {
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  width: 140px;
  transition: all 0.2s;
}
.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  width: 180px;
}
.search-icon {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.5;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  min-width: 200px;
  max-width: 300px;
  z-index: 1000;
  overflow: hidden;
  animation: searchPopIn 0.2s ease-out;
}
@keyframes searchPopIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  font-size: 0.85rem;
  animation: searchItemIn 0.25s ease-out both;
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--accent-light); text-decoration: none; }
.search-result-item strong { color: var(--text); }
.search-result-item small { color: var(--text-muted); }
@keyframes searchItemIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.search-no-results { padding: 0.75rem 1rem; color: var(--text-muted); font-size: 0.85rem; }
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  transition: transform 0.3s;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.1); }
.nav-right a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-right a:hover { color: var(--accent); text-decoration: none; }

/* Main */
.main { max-width: var(--max-width); margin: 0 auto; padding: 1.5rem; }

/* Hero */
.home-info { text-align: center; padding: 4rem 0 3rem; }
.home-info p { font-size: 1.125rem; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }

/* Two Column Home Layout */
.home-two-col {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  align-items: flex-start;
}
.home-col-left {
  width: 200px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.home-col-right {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.posts-section .post-entry {
  padding: 1.75rem;
}
.about-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  animation: fadeSlideIn 0.5s ease-out forwards;
}
.about-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--text);
}
.about-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.about-content h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.875rem 0 0.5rem;
  color: var(--text);
}
.about-content ul {
  list-style: none;
  padding: 0;
}
.about-content li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
}
.home-tags {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeSlideIn 0.5s ease-out 0.1s both;
}
.home-archive {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeSlideIn 0.5s ease-out 0.2s both;
  position: relative;
  z-index: 10;
}
.home-tags h2, .home-archive h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--text);
}
.posts-section { animation: fadeSlideIn 0.5s ease-out 0.05s both; }
.posts-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.posts-section .post-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
}
.posts-section .post-entry:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.posts-section .entry-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.posts-section .entry-header h3 a { color: var(--text); }
.posts-section .entry-header h3 a:hover { color: var(--accent); text-decoration: none; }
.posts-section .entry-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.posts-section .entry-footer {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
}
.home-tags .tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.home-tags .tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
}
.home-tags .tag-item:hover {
  background: var(--accent);
  color: white;
  text-decoration: none;
}
.home-tags .tag-count {
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  padding: 0 0.25rem;
  font-size: 0.7rem;
}
.home-archive .archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.home-archive .archive-post {
  display: flex;
  align-items: baseline;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border-light);
  gap: 0.5rem;
  position: relative;
}
.home-archive .archive-post:last-child { border-bottom: none; }
.home-archive .archive-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.home-archive .archive-title {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  cursor: pointer;
}
.home-archive .archive-title:hover {
  color: var(--accent);
}
.home-archive .archive-title[data-full]:hover::after {
  content: attr(data-full);
  position: absolute;
  left: 3rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
  animation: tooltipPop 0.2s ease-out;
  pointer-events: none;
}
@keyframes tooltipPop {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}
.view-more {
  display: inline-block;
  margin-top: 0.875rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}
.view-more:hover { text-decoration: underline; }

/* Home Related Posts */
.home-related {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  animation: fadeSlideIn 0.5s ease-out 0.15s both;
}
.home-related h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--text);
}
.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.related-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
  border-radius: 6px;
  padding: 0.375rem;
}
.related-item:last-child { border-bottom: none; }
.related-item:hover { background: var(--accent-light); text-decoration: none; }
.related-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.related-title {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-item:hover .related-title { color: var(--accent); }

/* Post Entry */
.post-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  transition: all 0.25s ease;
  box-shadow: var(--shadow);
}
.post-entry:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.entry-header { margin-bottom: 0.75rem; }
.entry-header h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.entry-header h2 a { color: var(--text); }
.entry-header h2 a:hover { color: var(--accent); text-decoration: none; }
.entry-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.entry-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.entry-footer .date { color: var(--text-secondary); font-weight: 500; }
.entry-footer .divider { color: var(--border); }

/* Post Single */
.post-single, .page-single {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.post-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-light); }
.post-title, .page-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.post-meta .date { color: var(--text-secondary); font-weight: 500; }

/* Post Content */
.post-content { font-size: 1.0625rem; line-height: 1.8; }
.post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}
.post-content h3 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 1.25rem 0; padding-left: 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
}
.post-content code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--code-bg);
  padding: 0.2em 0.45em;
  border-radius: 6px;
  font-size: 0.875em;
  color: var(--accent);
}
.post-content pre {
  background: #1e1e2e;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.7;
}
.post-content pre code { background: transparent; padding: 0; color: #a9b1d6; font-size: inherit; }
.post-content a { color: var(--accent); font-weight: 500; }
.post-content a:hover { text-decoration: underline; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.post-content img { max-width: 100%; height: auto; }

/* Page Content */
.page-content { font-size: 1rem; }
.page-content h2 { font-size: 1.5rem; font-weight: 600; margin: 2rem 0 1rem; }
.page-content p { margin-bottom: 1rem; color: var(--text-secondary); line-height: 1.75; }

/* Comments */
.comments-section {
  margin-top: 2rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-light);
  width: 100%;
  position: relative;
  z-index: 1;
  display: block !important;
  visibility: visible !important;
}
.comments-section .comments-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
#disqus_thread {
  min-height: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.comments-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0;
}
.giscus, .giscus-frame {
  width: 100% !important;
  min-width: 100% !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border) !important;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 0 1rem;
}
.pagination a {
  padding: 0.625rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.pagination a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  text-decoration: none;
}
.pagination .page-info { padding: 0.5rem 1rem; color: var(--text-muted); font-size: 0.9rem; }

/* Archive List */
.archive-list { list-style: none; }
.archive-year {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
}
.archive-posts { list-style: none; }
.archive-post {
  display: flex;
  align-items: baseline;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-light);
  gap: 1rem;
}
.archive-date { font-size: 0.85rem; color: var(--text-muted); min-width: 60px; font-family: 'JetBrains Mono', monospace; }
.archive-title { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.archive-title:hover { color: var(--accent); }

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}
.tag:hover { background: var(--accent); color: white; text-decoration: none; }

/* Share Buttons */
.share-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.share-label { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); }
.share-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
  transition: all 0.2s;
}
.share-btn:hover { opacity: 0.85; text-decoration: none; transform: translateY(-1px); }
.share-twitter { background: #000000; }
.share-facebook { background: #1877f2; }
.share-whatsapp { background: #25d366; }

/* Single Page Two Column Layout */
.single-two-col {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  align-items: flex-start;
}
.single-col-left {
  width: 180px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}
.single-col-right {
  flex: 1;
  min-width: 0;
}

/* Single Widgets (TOC, Related, Popular) */
.single-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeSlideIn 0.5s ease-out forwards;
}
.single-widget h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--text);
}
.widget-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.widget-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.widget-item:last-child { border-bottom: none; }
.widget-item:hover {
  color: var(--accent);
  transform: translateX(3px);
}
.widget-date, .widget-rank {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  min-width: 35px;
}
.widget-rank {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  min-width: auto;
}
.widget-title {
  font-weight: 500;
  color: var(--text);
}

/* TOC in sidebar */
#toc {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#toc a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
  transition: all 0.15s;
}
#toc a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}
#toc .toc-3 { padding-left: 1rem; font-size: 0.75rem; }

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}
.back-to-top span {
  display: block;
  line-height: 48px;
  text-align: center;
}

/* TOC */
.toc-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 2rem 0;
}
.toc-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--text);
}
.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.toc-nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: all 0.2s;
}
.toc-nav a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}
.toc-3 { padding-left: 1.5rem; font-size: 0.8rem; }

/* Related Posts */
.related-posts {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.related-title, .popular-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}
.related-list, .popular-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.related-item, .popular-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  transition: all 0.2s;
}
.related-item:hover, .popular-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
  transform: translateX(3px);
}
.related-date, .popular-rank {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  min-width: 45px;
}
.related-name, .popular-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

/* Popular Posts */
.popular-posts {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.popular-rank {
  min-width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Tags Page */
.tags-page { max-width: 700px; margin: 0 auto; }
.page-header { text-align: center; margin-bottom: 3rem; }
.page-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-desc { color: var(--text-secondary); font-size: 1rem; }
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 25px;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s;
}
.tag-item:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--accent);
}
.back-link:hover { text-decoration: underline; }

.tag-posts { max-width: 700px; margin: 0 auto; }
.tag-posts .post-entry { margin-bottom: 1.5rem; }

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer p { margin: 0; }
.footer-share {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.footer-share-label { font-size: 0.85rem; color: var(--text-secondary); }
.footer-share .share-btn {
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: white;
  transition: all 0.2s;
}
.footer-share .share-btn:hover { opacity: 0.85; text-decoration: none; transform: translateY(-1px); }
.footer-share .share-twitter { background: #000000; }
.footer-share .share-facebook { background: #1877f2; }
.footer-share .share-whatsapp { background: #25d366; }

/* Reading Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 9999;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  border-radius: 0 2px 2px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .home-two-col { flex-direction: column; gap: 1.5rem; }
  .home-col-left { width: 100%; }
  .home-col-right { width: 100%; }
}
@media (max-width: 768px) {
  .single-two-col { flex-direction: column; }
  .single-col-left { width: 100%; position: static; }
  .single-col-right { width: 100%; }
}
@media (max-width: 640px) {
  .main { padding: 1.5rem 1rem; }
  .post-single, .page-single { padding: 1.25rem; }
  .post-title { font-size: 1.375rem; }
  .post-meta { font-size: 0.8rem; flex-wrap: wrap; gap: 0.25rem; }
  .entry-footer { flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; }
  .nav { padding: 0.75rem 1rem; }
  .nav-right { gap: 1rem; }
  .nav-right a { font-size: 0.85rem; }
  .post-entry { padding: 1.25rem; }
  .entry-header h2 { font-size: 1.1rem; }
  .entry-content { font-size: 0.875rem; }
  .pagination { padding: 2rem 0 0.5rem; }
  .pagination a { padding: 0.5rem 1rem; font-size: 0.85rem; }
  .post-tags { gap: 0.375rem; }
  .tag { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
  .share-section { flex-wrap: wrap; gap: 0.5rem; }
  .share-btn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
  .page-title { font-size: 1.5rem; }
  .tags-cloud { gap: 0.625rem; }
  .tag-item { padding: 0.375rem 1rem; font-size: 0.85rem; }
  .about-section, .home-tags, .home-archive { padding: 1.25rem; }
  .back-to-top { bottom: 1.5rem; right: 1.5rem; width: 42px; height: 42px; font-size: 1.25rem; }
}

:root { --theme: auto; }
[data-theme="dark"] { --theme: dark; }
@media (prefers-color-scheme: dark) { :root { --theme: dark; } }

.archive-controls {
  margin: 1.5rem 0 2rem;
}
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-btn {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.tag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tag-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.tag-count, .tag-total {
  opacity: 0.7;
  font-size: 0.75rem;
}
.archive-year {
  margin-bottom: 2rem;
}
.year-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.archive-timeline .archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.archive-timeline .archive-post {
  display: flex;
  align-items: baseline;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-light);
  gap: 1rem;
  transition: background 0.15s;
}
.archive-timeline .archive-post:hover {
  background: var(--accent-light);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.archive-timeline .archive-post:last-child {
  border-bottom: none;
}
.archive-timeline .archive-post.hidden {
  display: none;
}
.archive-timeline .archive-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.archive-timeline .archive-title {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}
.archive-timeline .archive-title:hover {
  color: var(--accent);
  text-decoration: none;
}
.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  display: none;
}
.no-results.visible {
  display: block;
}

.pagination-sentinel {
  height: 20px;
  margin: 2rem 0;
}

.load-more-indicator {
  display: none;
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
}
.load-more-indicator.is-visible {
  display: block;
}

.dynamic-entry {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.dynamic-entry.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

.search-result-stagger-0 { animation-delay: 0s; }
.search-result-stagger-1 { animation-delay: 0.05s; }
.search-result-stagger-2 { animation-delay: 0.1s; }
.search-result-stagger-3 { animation-delay: 0.15s; }
.search-result-stagger-4 { animation-delay: 0.2s; }

.tag-size-sm { font-size: 0.85rem; }
.tag-size-md { font-size: 0.95rem; }
.tag-size-lg { font-size: 1.05rem; }
.tag-size-xl { font-size: 1.15rem; }

