:root {
  --color: #243746;
  --color-primary: #d8002d;
  --color-secondary: #0e2233;
  --bg: #f3f5f4;
  --bg-secondary: #fff;
  --border-color: #ddd;
}

.dark {
  --color: #ebf4f1;
  --color-primary: #d8002d;
  --color-secondary: #fdf9f3;
  --bg: #091a28;
  --bg-secondary: #071521;
  --border-color: #0d2538;
}
.sepia-mode {
  --color: #433422;
  --color-secondary: #504231;
  --bg: #f1e7d0;
  --bg-secondary: #eae0c9;
  --border-color: #ded0bf;
}
body {
  background-color: var(--bg);
  color: var(--color);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.5px;
  word-wrap: break-word;
  font-weight: 400;
  font-family: "Roboto", sans-serif;
  @apply font-sans;
}

.dark .prose,
.dark .prose h1,
.dark .prose h2,
.dark .prose h2 a,
.dark .prose h3,
.dark .prose h3 a {
  color: white;
  text-decoration: none;
}
.dark .prose a {
  color: white;
  text-decoration: underline;
}

.dark .prose strong {
  color: white;
}

.prose code {
  color: inherit;
}
.prose blockquote {
  color: dark;
}
.dark .prose blockquote {
  color: white;
}

.img-cont img {
  @apply h-full w-full object-cover;
}

/* Code block styling */
.prose pre {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.prose pre code {
  color: #24292e;
  font-family: 'Menlo', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Inline code styling */
.prose :not(pre) > code {
  background-color: #f3f4f6;
  color: #1f2937;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Menlo', monospace;
  border: 1px solid #e5e7eb;
}

/* Dark mode code block styling */
.dark .prose pre {
  background-color: #1e1e1e;
  border-color: #2d2d2d;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.dark .prose pre code {
  color: #e5e7eb;
}

/* Code block line numbers */
.prose pre code[data-line-numbers] {
  counter-reset: line;
}

.prose pre code[data-line-numbers] > .line::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  padding: 0 0.75rem;
  margin-right: 0.75rem;
  color: #6b7280;
  -webkit-user-select: none;
  user-select: none;
  border-right: 1px solid #e5e7eb;
  font-size: 0.8em;
}

.dark .prose pre code[data-line-numbers] > .line::before {
  border-right-color: #2d2d2d;
  color: #9ca3af;
}

/* Code block scrollbar styling */
.prose pre::-webkit-scrollbar {
  height: 8px;
}

.prose pre::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
  margin: 0 4px;
}

.prose pre::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
  border: 2px solid #f1f1f1;
}

.prose pre::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.dark .prose pre::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.dark .prose pre::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-color: #2d2d2d;
}

.dark .prose pre::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}
