/* CSS Variables - Dark Mode (Default) */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-link: #58a6ff;
  --border-color: #30363d;
  --accent-green: #238636;
  --accent-blue: #1f6feb;

  /* Code Block Colors */
  --code-bg: #161b22;
  --code-header-bg: #21262d;
  --code-text: #e6edf3;

  /* Category Colors */
  --java-color: #ED8B00;
  --kotlin-color: #7F52FF;
  --spring-color: #6DB33F;
  --cs-color: #1f6feb;

  /* Heatmap Colors */
  --heatmap-0: #161b22;
  --heatmap-1: #0e4429;
  --heatmap-2: #006d32;
  --heatmap-3: #26a641;
  --heatmap-4: #39d353;
}

/* Light Mode */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-tertiary: #eaeef2;
  --text-primary: #1f2328;
  --text-secondary: #656d76;
  --text-link: #0969da;
  --border-color: #d0d7de;
  --accent-green: #1a7f37;
  --accent-blue: #0969da;

  /* Code Block Colors - Light */
  --code-bg: #f6f8fa;
  --code-header-bg: #eaeef2;
  --code-text: #1f2328;

  /* Heatmap Colors - Light */
  --heatmap-0: #ebedf0;
  --heatmap-1: #9be9a8;
  --heatmap-2: #40c463;
  --heatmap-3: #30a14e;
  --heatmap-4: #216e39;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

/* Navbar */
.navbar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
}

.nav-logo:hover {
  text-decoration: none;
  color: var(--accent-green);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-menu a {
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

/* Heatmap Section */
.heatmap-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.heatmap-section h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.heatmap-container {
  overflow-x: auto;
}

#commit-heatmap {
  display: grid;
  grid-template-columns: repeat(53, 12px);
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
  margin-bottom: 0.5rem;
}

.heatmap-day {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background-color: var(--heatmap-0);
}

.heatmap-day.level-1 { background-color: var(--heatmap-1); }
.heatmap-day.level-2 { background-color: var(--heatmap-2); }
.heatmap-day.level-3 { background-color: var(--heatmap-3); }
.heatmap-day.level-4 { background-color: var(--heatmap-4); }

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-colors {
  display: flex;
  gap: 3px;
}

.legend-item {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-item.level-0 { background-color: var(--heatmap-0); }
.legend-item.level-1 { background-color: var(--heatmap-1); }
.legend-item.level-2 { background-color: var(--heatmap-2); }
.legend-item.level-3 { background-color: var(--heatmap-3); }
.legend-item.level-4 { background-color: var(--heatmap-4); }

.heatmap-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-green);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Progress Section */
.progress-section {
  margin-bottom: 2rem;
}

.progress-section h2 {
  margin-bottom: 1rem;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.progress-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-title {
  font-weight: 600;
}

.progress-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.progress-bar {
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-fill.java { background-color: var(--java-color); }
.progress-fill.kotlin { background-color: var(--kotlin-color); }
.progress-fill.spring { background-color: var(--spring-color); }
.progress-fill.cs { background-color: var(--cs-color); }

/* Recent Posts */
.recent-posts {
  margin-bottom: 2rem;
}

.recent-posts h2 {
  margin-bottom: 1rem;
}

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

.post-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 0.2s;
}

.post-card:hover {
  border-color: var(--accent-green);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

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

.post-category {
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.post-category.java { background-color: rgba(237, 139, 0, 0.2); color: var(--java-color); }
.post-category.kotlin { background-color: rgba(127, 82, 255, 0.2); color: var(--kotlin-color); }
.post-category.spring { background-color: rgba(109, 179, 63, 0.2); color: var(--spring-color); }
.post-category.jvm { background-color: rgba(237, 139, 0, 0.2); color: var(--java-color); }
.post-category.cs { background-color: rgba(31, 111, 235, 0.2); color: var(--cs-color); }
.post-category.collections { background-color: rgba(237, 139, 0, 0.2); color: var(--java-color); }
.post-category.core { background-color: rgba(109, 179, 63, 0.2); color: var(--spring-color); }
.post-category.concurrency { background-color: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.post-category.database { background-color: rgba(52, 152, 219, 0.2); color: #3498db; }
.post-category.index { background-color: rgba(155, 89, 182, 0.2); color: #9b59b6; }
.post-category.designpattern { background-color: rgba(230, 126, 34, 0.2); color: #e67e22; }
.post-category.mvc { background-color: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.post-category.operatingsystem { background-color: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.post-category.network { background-color: rgba(52, 73, 94, 0.2); color: #5dade2; }
.post-category.memory { background-color: rgba(231, 76, 60, 0.2); color: #bc3924; }
.post-category.language { background-color: rgba(241, 196, 15, 0.2); color: #e4e311; }
.post-category.jpa { background-color: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.post-category.orm { background-color: rgba(46, 204, 113, 0.2); color: #2ecc71; }


.post-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

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

.post-title a:hover {
  color: var(--text-link);
}

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

.tag {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Categories Section */
.categories-section h2 {
  margin-bottom: 1rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.category-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text-primary);
  transition: all 0.2s;
}

.category-card:hover {
  border-color: var(--accent-green);
  text-decoration: none;
}

.category-count {
  background-color: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Archive Page */
.archive-page {
  max-width: 900px;
  margin: 0 auto;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.archive-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 2rem;
  text-align: center;
}

.category-section, .tag-section, .year-section {
  margin-bottom: 2rem;
}

.category-name, .tag-name, .year-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.category-count, .tag-count, .year-count, .month-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: normal;
}

.month-section {
  margin-left: 1rem;
  margin-bottom: 1.5rem;
}

.month-title {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.archive-page .post-list {
  list-style: none;
}

.archive-page .post-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.archive-page .post-date {
  min-width: 80px;
  font-family: monospace;
  color: var(--text-secondary);
}

.archive-page .post-link {
  flex: 1;
}

/* Tag Cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-radius: 8px;
}

.tag-item {
  padding: 0.5rem 1rem;
  background-color: var(--bg-tertiary);
  border-radius: 20px;
  color: var(--text-primary);
  transition: all 0.2s;
}

.tag-item:hover {
  background-color: var(--accent-green);
  text-decoration: none;
}

/* Post Page */
.post {
  max-width: 900px;
  margin: 0 auto;
}

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

.post-header .post-title {
  font-size: 2rem;
  margin: 0.5rem 0;
}

.post-header .post-tags {
  margin-top: 1rem;
}

.post-content {
  font-size: 1rem;
  line-height: 1.8;
}

.post-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.post-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.post-content p {
  margin-bottom: 1rem;
}

/* Images - max width and centered */
.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.post-content p img {
  margin: 1.5rem auto;
}

.post-content figure {
  margin: 1.5rem 0;
  text-align: center;
}

.post-content figure img {
  margin: 0 auto 0.5rem;
}

.post-content figcaption {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: italic;
}

/* ===========================================
   CODE BLOCK STYLING - Clean Modern Style
   =========================================== */

/* Block Code Container (div.highlighter-rouge) */
.post-content div.highlighter-rouge {
  position: relative;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header Bar with dots and language label */
.post-content div.highlighter-rouge::before {
  content: '';
  display: block;
  height: 40px;
  background: var(--code-header-bg);
  border-bottom: 1px solid var(--border-color);
}

/* Traffic Light Dots (Red/Yellow/Green) */
.post-content div.highlighter-rouge::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 16px;
  width: 10px;
  height: 10px;
  background: #ff5f57;
  border-radius: 50%;
  box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
}

/* Nested highlight div - reset */
.post-content div.highlighter-rouge div.highlight,
.post-content div.highlighter-rouge .highlight {
  background: transparent;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Pre element inside block code */
.post-content div.highlighter-rouge pre {
  margin: 0;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
}

/* Line numbers table styling */
.post-content div.highlighter-rouge table.rouge-table {
  width: 100%;
  border: none;
  margin: 0;
  border-collapse: collapse;
}

.post-content div.highlighter-rouge table.rouge-table td {
  padding: 0;
  border: none;
  vertical-align: top;
}

.post-content div.highlighter-rouge table.rouge-table pre {
  margin: 0;
  padding: 1rem 0;
  background: transparent;
}

/* Line numbers column */
.post-content div.highlighter-rouge .gutter,
.post-content div.highlighter-rouge .lineno {
  width: 50px;
  min-width: 50px;
  padding-right: 1rem;
  text-align: center;
  color: var(--text-secondary);
  user-select: none;
  opacity: 0.5;
}

.post-content div.highlighter-rouge .gutter pre {
  padding: 1rem 0.5rem;
  text-align: center;
}

/* Separator line between line numbers and code */
.post-content div.highlighter-rouge td.gutter {
  border-right: 1px solid var(--border-color);
  padding-right: 0;
}

.post-content div.highlighter-rouge td.gutter + td.code {
  padding-left: 1rem;
}

/* Code column */
.post-content div.highlighter-rouge .code pre {
  padding-left: 1rem;
}

/* Code inside pre */
.post-content pre code {
  display: block;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--code-text);
  background: transparent;
  padding: 0;
  border: none;
}

/* Standalone pre */
.post-content > pre {
  position: relative;
  margin: 1.5rem 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content > pre::before {
  content: '';
  display: block;
  height: 40px;
  background: var(--code-header-bg);
  border-bottom: 1px solid var(--border-color);
}

.post-content > pre::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 16px;
  width: 10px;
  height: 10px;
  background: #ff5f57;
  border-radius: 50%;
  box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
}

.post-content > pre > code {
  display: block;
  padding: 1rem 1.25rem;
  overflow-x: auto;
}

/* ===========================================
   INLINE CODE - Simple styling
   =========================================== */

/* Inline code element (code.highlighter-rouge) */
.post-content code.highlighter-rouge,
.post-content p code,
.post-content li code,
.post-content td code {
  display: inline;
  background: var(--bg-tertiary);
  color: var(--text-link);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  border: 1px solid var(--border-color);
  box-shadow: none;
}

/* Make sure inline code doesn't get block styling */
.post-content code.highlighter-rouge::before,
.post-content code.highlighter-rouge::after {
  display: none;
}

/* Syntax Highlighting Colors - Dark Mode */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp,
.highlight .kr, .highlight .kt { color: #ff7b72; }
.highlight .nc, .highlight .nf, .highlight .nn { color: #d2a8ff; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb,
.highlight .sc, .highlight .sd, .highlight .se, .highlight .sh,
.highlight .si, .highlight .sr, .highlight .ss, .highlight .sx { color: #a5d6ff; }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo { color: #79c0ff; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp, .highlight .cs { color: #8b949e; font-style: italic; }
.highlight .na, .highlight .nb, .highlight .no { color: #79c0ff; }
.highlight .nv, .highlight .vc, .highlight .vg, .highlight .vi { color: #ffa657; }
.highlight .o, .highlight .ow { color: #ff7b72; }
.highlight .p { color: #c9d1d9; }
.highlight .nl, .highlight .nt { color: #7ee787; }
.highlight .err { color: #f85149; }

/* Syntax Highlighting Colors - Light Mode */
[data-theme="light"] .highlight .k, [data-theme="light"] .highlight .kd,
[data-theme="light"] .highlight .kn, [data-theme="light"] .highlight .kp,
[data-theme="light"] .highlight .kr, [data-theme="light"] .highlight .kt { color: #cf222e; }
[data-theme="light"] .highlight .nc, [data-theme="light"] .highlight .nf,
[data-theme="light"] .highlight .nn { color: #8250df; }
[data-theme="light"] .highlight .s, [data-theme="light"] .highlight .s1,
[data-theme="light"] .highlight .s2, [data-theme="light"] .highlight .sb,
[data-theme="light"] .highlight .sc, [data-theme="light"] .highlight .sd,
[data-theme="light"] .highlight .se, [data-theme="light"] .highlight .sh,
[data-theme="light"] .highlight .si, [data-theme="light"] .highlight .sr,
[data-theme="light"] .highlight .ss, [data-theme="light"] .highlight .sx { color: #0a3069; }
[data-theme="light"] .highlight .m, [data-theme="light"] .highlight .mi,
[data-theme="light"] .highlight .mf, [data-theme="light"] .highlight .mh,
[data-theme="light"] .highlight .mo { color: #0550ae; }
[data-theme="light"] .highlight .c, [data-theme="light"] .highlight .c1,
[data-theme="light"] .highlight .cm, [data-theme="light"] .highlight .cp,
[data-theme="light"] .highlight .cs { color: #6e7781; font-style: italic; }
[data-theme="light"] .highlight .na, [data-theme="light"] .highlight .nb,
[data-theme="light"] .highlight .no { color: #0550ae; }
[data-theme="light"] .highlight .nv, [data-theme="light"] .highlight .vc,
[data-theme="light"] .highlight .vg, [data-theme="light"] .highlight .vi { color: #953800; }
[data-theme="light"] .highlight .o, [data-theme="light"] .highlight .ow { color: #cf222e; }
[data-theme="light"] .highlight .p { color: #1f2328; }
[data-theme="light"] .highlight .nl, [data-theme="light"] .highlight .nt { color: #116329; }

/* Code block scrollbar */
.post-content pre::-webkit-scrollbar,
.post-content pre code::-webkit-scrollbar {
  height: 8px;
}
.post-content pre::-webkit-scrollbar-track,
.post-content pre code::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}
.post-content pre::-webkit-scrollbar-thumb,
.post-content pre code::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.post-content pre::-webkit-scrollbar-thumb:hover,
.post-content pre code::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Code Header Content */
.code-header-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

/* Language Label */
.code-language {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.code-icon {
  opacity: 0.7;
}

/* Copy Button */
.copy-button {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  opacity: 0.6;
  transition: all 0.2s;
  z-index: 11;
  pointer-events: auto;
}

.copy-button:hover {
  opacity: 1;
  color: var(--text-primary);
}

.copy-button.copied {
  color: var(--accent-green);
  opacity: 1;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.post-content th, .post-content td {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
}

.post-content th {
  background-color: var(--bg-secondary);
}

.post-content blockquote {
  border-left: 4px solid var(--accent-green);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-secondary);
}

.post-content ul, .post-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

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

/* Post Navigation */
.post-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.post-nav {
  display: flex;
  justify-content: space-between;
}

.nav-prev, .nav-next {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  max-width: 45%;
}

.nav-prev:hover, .nav-next:hover {
  text-decoration: none;
  background-color: var(--bg-tertiary);
}

/* TOC */
.toc {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.toc h3 {
  margin-bottom: 0.5rem;
}

.toc ul {
  list-style: none;
  padding-left: 1rem;
}

.toc li {
  margin: 0.25rem 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }

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

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

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-content {
    padding: 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .heatmap-stats {
    gap: 1.5rem;
  }

  .progress-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-prev, .nav-next {
    max-width: 100%;
  }

  /* Code block responsive */
  .post-content div.highlighter-rouge,
  .post-content > pre {
    margin: 1rem -1rem;
    border-radius: 0;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

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

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  color: var(--text-secondary);
  font-size: 1.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  padding: 0 0.25rem;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

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

.modal-post-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s;
}

.modal-post-card:hover {
  border-color: var(--accent-green);
  transform: translateX(4px);
}

.modal-post-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.modal-post-card h4 a {
  color: var(--text-primary);
  text-decoration: none;
}

.modal-post-card h4 a:hover {
  color: var(--text-link);
}

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

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

/* Heatmap day hover effect */
.heatmap-day[data-count]:not([data-count="0"]) {
  transition: all 0.2s;
}

.heatmap-day[data-count]:not([data-count="0"]):hover {
  transform: scale(1.3);
  outline: 2px solid var(--accent-green);
  outline-offset: 1px;
  z-index: 10;
}

/* Modal responsive */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    max-height: 90vh;
  }

  .modal-header,
  .modal-body {
    padding: 1rem;
  }

  .modal-header h3 {
    font-size: 1rem;
  }
}
