html, body {
  font-family: monospace;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #e0e0e0;
  background-color: #111;
}

.container {
  max-width: 650px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

a {
  color: #66b0ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

p {
  margin: 1rem 0;
}

/* Profile styling */
.profile {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.profile img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-right: 1rem;
}

/* Navigation styling */
.nav {
  margin: 2rem 0;
}

.nav ul {
  list-style-type: none;
  padding: 0;
}

.nav li {
  margin: 0.5rem 0;
}

/* Posts styling */
.posts li {
  margin: 0.5rem 0;
}

.post-date {
  font-size: 0.9rem;
  color: #999;
}

/* Footer styling */
.footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Inline navigation */
.nav-inline {
  display: flex;
  list-style-type: none;
  padding: 0;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.nav-inline li {
  margin-right: 1.5rem;
  margin-bottom: 0.5rem;
}

.nav-inline li:last-child {
  margin-right: 0;
}

/* Table styling */
table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  border: 1px solid #333;
}

th, td {
  padding: 0.5rem;
  border: 1px solid #333;
}

th {
  background-color: #222;
}

tr:nth-child(even) {
  background-color: #1a1a1a;
}

/* Blockquote styling */
blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #66b0ff;
  background-color: #222;
  font-style: italic;
}

blockquote p:first-child {
  margin-top: 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Horizontal rule styling */
hr {
  border: none;
  height: 1px;
  background-color: #333;
  margin: 2rem 0;
}

/* Task list styling */
.task-list {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

li.task-list-item {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  position: relative;
}

.task-list-item input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Additional fixes for task lists */
ul li input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Remove default bullets from task lists */
ul li.task-list-item {
  list-style-type: none !important;
  margin-left: -1.5rem;
}

/* Show task list checkboxes */
ul li.task-list-item input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Footnote styling */
.footnotes {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.9rem;
}

.footnotes ol {
  padding-left: 1.5rem;
}

.footnotes li {
  margin-bottom: 0.5rem;
}

a.footnote-ref, sup[id^="fnref"] {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
  text-decoration: none;
}

a.footnote-backref, a[href^="#fnref"] {
  font-size: 0.8em;
  text-decoration: none;
}

/* Fix footnotes */
.footnote-ref {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
}

.footnotes {
  margin-top: 2rem;
  border-top: 1px solid #333;
  padding-top: 1rem;
}

.footnotes hr {
  display: none;
}

/* Image styling */
figure {
  margin: 1.5rem 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #999;
  font-style: italic;
}

/* Table of Contents styling */
.toc {
  background-color: #222;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.toc h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

#TableOfContents ul {
  padding-left: 1.5rem;
}

#TableOfContents li {
  margin: 0.25rem 0;
}

/* Emoji styling - ensure good vertical alignment */
.emoji {
  vertical-align: -0.1em;
}

/* Code block background override */
.highlight {
  background-color: #222 !important;
  overflow-x: auto !important; /* Add overflow to parent container */
  max-width: 100% !important;
}

.highlight pre {
  background-color: #222 !important;
  border: none !important; /* Remove border from nested pre */
  white-space: pre !important; /* Preserve whitespace and line breaks */
  word-wrap: normal !important; /* Don't wrap code */
  overflow-x: visible !important; /* Let parent handle scrolling */
  max-width: none !important; /* Allow content to be wider than container */
}

div.highlight, pre.chroma {
  background-color: #222 !important;
  border-radius: 4px;
  padding: 1rem;
  margin: 1.5rem 0;
  border: 1px solid #333;
  overflow-x: auto !important; /* Ensure horizontal scrolling */
  max-width: 100%;
}

/* Target all descendants of .highlight */
.highlight * {
  background-color: transparent !important;
}

/* Code styling */
pre, code {
  font-family: monospace;
  border-radius: 3px;
}

code {
  padding: 0.2rem 0.4rem;
  background-color: #222;
}

/* Style pre tags that are NOT inside a highlight div */
pre:not(.highlight pre) {
  padding: 1rem;
  overflow-x: auto !important; /* Critical for horizontal scrolling */
  background-color: #222 !important;
  border-radius: 4px;
  margin: 1.5rem 0;
  border: 1px solid #333;
  white-space: pre !important; /* Prevent wrapping */
}

pre code {
  padding: 0;
  background: transparent !important;
  border: none;
  word-wrap: normal !important; /* Prevent wrapping */
  white-space: pre !important; /* Preserve whitespace and line breaks */
}

/* Code block font size - ADD THIS HERE */
.highlight pre, pre.chroma, pre code {
  font-size: 13px !important; /* Smaller than the main 16px font */
}

/* Keep inline code slightly closer to text size but still smaller */
p code, li code, h1 code, h2 code, h3 code, h4 code, h5 code, h6 code, 
table code, blockquote code {
  font-size: 0.9em !important; /* Relative to parent element */
}

/* For inline code */
p code, li code, h1 code, h2 code, h3 code, h4 code, h5 code, h6 code, 
table code, blockquote code {
  background-color: #222 !important;
  color: #e0e0e0;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  white-space: normal !important; /* Allow inline code to wrap */
}