/* Dark mode styling */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background-color: #121212;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Responsive media queries */
@media (max-width: 850px) {
  body {
    max-width: 95%;
  }
}

@media (max-width: 600px) {
  body {
    padding: 15px;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  h2 {
    font-size: 1.3em;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  h1 {
    font-size: 1.6em;
  }
  
  h2 {
    font-size: 1.2em;
  }
  
  nav a {
    margin-right: 10px;
  }
}

header {
  margin-bottom: 30px;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

header .title {
  margin-bottom: 10px;
}

nav a {
  margin-right: 15px;
  text-decoration: none;
  color: #58a6ff;
}

nav a:hover {
  text-decoration: underline;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0;
}

@media (max-width: 480px) {
  .nav-links {
    gap: 10px;
  }
  
  nav a {
    margin-right: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #e0e0e0;
}

/* Blog list styles */
.blog-list, .blog-posts {
  list-style-type: none;
  padding: 0;
}
.blog-list li, .blog-posts li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.blog-title {
  text-align: left;
  margin-right: 20px;
  flex: 1;
}
.blog-date {
  text-align: right;
  color: #9e9e9e;
  white-space: nowrap;
}

/* Responsive blog list for small screens */
@media (max-width: 480px) {
  .blog-list li, .blog-posts li {
    flex-direction: column;
  }
  .blog-title {
    margin-right: 0;
    margin-bottom: 5px;
  }
  .blog-date {
    text-align: left;
    font-size: 0.9em;
  }
}

/* Style for blog-posts in tagged pages */
.blog-posts li span {
  white-space: nowrap;
  color: #9e9e9e;
  margin-right: 15px;
}

@media (max-width: 480px) {
  .blog-posts li {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .blog-posts li span {
    margin-right: 0;
    margin-bottom: 5px;
    font-size: 0.9em;
  }
}

/* Make images responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Make code blocks responsive */
pre {
  max-width: 100%;
  overflow-x: auto;
}

h1 {
  font-size: 2em;
  padding-bottom: 0.3em;
}

h2 {
  font-size: 1.5em;
  padding-bottom: 0.3em;
}

p, ul, ol {
  margin-bottom: 16px;
}

code {
  font-family: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  background-color: rgba(240, 246, 252, 0.15);
  border-radius: 3px;
}

pre {
  font-family: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  word-wrap: normal;
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  background-color: #1e1e1e;
  border-radius: 3px;
}

pre code {
  background-color: transparent;
  padding: 0;
}

blockquote {
  padding: 0 1em;
  color: #9e9e9e;
  border-left: 0.25em solid #444;
  margin: 0 0 16px 0;
}

blockquote.callout {
  padding: 0.75em 1em;
  color: #c9d1d9;
  background-color: #161b22;
  border-left: none;
  border-radius: 4px;
  margin: 1.5em 0;
}

blockquote.callout p:last-child,
blockquote.callout ul:last-child,
blockquote.callout ol:last-child {
  margin-bottom: 0;
}

a {
  color: #58a6ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

hr {
  height: 0.2em;
  padding: 0;
  margin: 24px 0;
  background-color: #333;
  border: 0;
}

/* Ensure code blocks have proper styling */
.highlight pre {
  margin-bottom: 0;
}

/* Tags */
.tag {
  background-color: #2a2a2a;
  border-radius: 3px;
  color: #ddd;
  display: inline-block;
  font-size: 0.8em;
  margin-right: 0.5em;
  padding: 0.2em 0.5em;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #3a3a3a;
}

.tag:hover {
  background-color: #3a3a3a;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  border-color: #4a4a4a;
}

/* Dark mode benchmark table */
.benchmark-table {
  border-collapse: collapse;
  font-size: 0.9em;
  width: 80%;
  margin: 0 auto;
}

.benchmark-table th,
.benchmark-table td {
  border: 1px solid #444;
  padding: 6px;
  text-align: right;
}

.benchmark-table thead th {
  background-color: #1e1e1e;
  font-weight: 600;
  color: #e0e0e0;
}

.benchmark-table .highlight-row {
  background-color: #1a2e1a;
}

.taxonomy-table {
  border-collapse: collapse;
  font-size: 0.9em;
  width: 100%;
}

.taxonomy-table th,
.taxonomy-table td {
  border: 1px solid #444;
  padding: 6px 10px;
  text-align: left;
}

.taxonomy-table thead th {
  background-color: #1e1e1e;
  font-weight: 600;
  color: #e0e0e0;
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Dark mode Graphviz SVGs */
svg[aria-label^="graphviz"] > g > polygon {
  fill: #121212 !important;
}

svg[aria-label^="graphviz"] .edge polygon {
  fill: #e0e0e0 !important;
  stroke: #e0e0e0 !important;
}

svg[aria-label^="graphviz"] text {
  fill: #e0e0e0 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

svg[aria-label^="graphviz"] ellipse {
  stroke: #e0e0e0 !important;
}

svg[aria-label^="graphviz"] path {
  stroke: #e0e0e0 !important;
}

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

.microblog-date {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 1em;
}
