/* Custom Markdown Styling */
/* This file customizes how markdown content is rendered */

/* ============================================
   HEADINGS STYLES - Color and Font Only
   ============================================ */

/* Base color: Blue-green theme with subtle variations */
/* All headings share the same hue family (around 200-210) with slight variations */
/* Only color and font properties vary, no borders or backgrounds */

/* H1 - Main Section Headings - Boldest */
.post-body h1 {
  font-size: 2.2em;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  color: hsl(205, 70%, 30%);
  line-height: 1.25;
  transition: color 0.3s ease;
}

.post-body h1:hover {
  color: hsl(205, 70%, 35%);
}

/* H2 - Subsection Headings - Very Bold */
.post-body h2 {
  font-size: 1.8em;
  font-weight: 600;
  margin-top: 1.3em;
  margin-bottom: 0.7em;
  color: hsl(205, 65%, 32%);
  line-height: 1.25;
  transition: color 0.3s ease;
}

.post-body h2:hover {
  color: hsl(205, 65%, 37%);
}

/* H3 - Sub-subsection Headings - Bold */
.post-body h3 {
  font-size: 1.5em;
  font-weight: 600;
  margin-top: 1.1em;
  margin-bottom: 0.6em;
  color: hsl(205, 60%, 34%);
  line-height: 1.25;
  transition: color 0.3s ease;
}

.post-body h3:hover {
  color: hsl(205, 60%, 39%);
}

/* H4 - Minor Headings - Semi-Bold */
.post-body h4 {
  font-size: 1.25em;
  font-weight: 500;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: hsl(205, 55%, 36%);
  line-height: 1.25;
  transition: color 0.3s ease;
}

.post-body h4:hover {
  color: hsl(205, 55%, 41%);
}

/* H5 - Small Headings - Medium */
.post-body h5 {
  font-size: 1.1em;
  font-weight: 500;
  margin-top: 0.9em;
  margin-bottom: 0.5em;
  color: hsl(205, 50%, 38%);
  line-height: 1.25;
  transition: color 0.3s ease;
}

.post-body h5:hover {
  color: hsl(205, 50%, 43%);
}

/* H6 - Smallest Headings - Lightest */
.post-body h6 {
  font-size: 1.05em;
  font-weight: 400;
  font-style: italic;
  margin-top: 0.9em;
  margin-bottom: 0.5em;
  color: hsl(205, 45%, 40%);
  line-height: 1.25;
  transition: color 0.3s ease;
}

.post-body h6:hover {
  color: hsl(205, 45%, 45%);
}

/* ============================================
   CODE BLOCKS STYLES
   ============================================ */

/* Inline Code */
.post-body code {
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  color: #e83e8c;
  border: 1px solid rgba(27, 31, 35, 0.1);
}

/* Code Blocks */
.post-body pre {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  overflow: auto;
  line-height: 1.45;
  margin: 1em 0;
  font-size: 0.9em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

.post-body pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  color: #24292e;
  font-size: inherit;
  display: block;
  overflow: visible;
  word-wrap: normal;
}

/* Syntax Highlighted Code Blocks */
.post-body .highlight {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  margin: 1em 0;
}

.post-body .highlight pre {
  background-color: transparent;
  border: none;
  padding: 16px;
  margin: 0;
}

/* ============================================
   TEXT STYLES
   ============================================ */

/* Paragraphs */
.post-body p {
  margin: 1em 0;
  line-height: 1.7;
  color: #24292e;
}

/* Links */
.post-body a {
  color: #159957;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.post-body a:hover {
  color: #138a47;
  border-bottom-color: #138a47;
}

/* Strong/Bold */
.post-body strong {
  font-weight: 600;
  color: #24292e;
}

/* Emphasis/Italic */
.post-body em {
  font-style: italic;
  color: #586069;
}

/* ============================================
   LISTS STYLES
   ============================================ */

/* Unordered Lists */
.post-body ul,
.post-body ol {
  margin: 1em 0;
  padding-left: 2em;
  line-height: 1.7;
}

.post-body ul {
  list-style-type: disc;
}

.post-body ol {
  list-style-type: decimal;
}

/* Nested Lists */
.post-body ul ul,
.post-body ol ol,
.post-body ul ol,
.post-body ol ul {
  margin: 0.5em 0;
}

/* List Items */
.post-body li {
  margin: 0.5em 0;
  color: #24292e;
}

.post-body li > p {
  margin: 0.5em 0;
}

/* ============================================
   BLOCKQUOTES STYLES
   ============================================ */

.post-body blockquote {
  margin: 1em 0;
  padding: 0 1em;
  color: #6a737d;
  border-left: 4px solid #dfe2e5;
  background-color: #f6f8fa;
  border-radius: 0 4px 4px 0;
}

.post-body blockquote > :first-child {
  margin-top: 0;
}

.post-body blockquote > :last-child {
  margin-bottom: 0;
}

/* ============================================
   TABLES STYLES
   ============================================ */

.post-body table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
  display: block;
  overflow-x: auto;
}

.post-body table th,
.post-body table td {
  border: 1px solid #dfe2e5;
  padding: 0.75em 1em;
  text-align: left;
}

.post-body table th {
  background-color: #f6f8fa;
  font-weight: 600;
  color: #24292e;
}

.post-body table tr:nth-child(even) {
  background-color: #f6f8fa;
}

/* ============================================
   HORIZONTAL RULES
   ============================================ */

.post-body hr {
  height: 0.25em;
  padding: 0;
  margin: 2em 0;
  background-color: #e1e4e8;
  border: 0;
  border-radius: 2px;
}

/* ============================================
   IMAGES
   ============================================ */

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 1em 0;
}

/* ============================================
   KEYBOARD KEYS
   ============================================ */

.post-body kbd {
  display: inline-block;
  padding: 0.2em 0.4em;
  font-size: 0.9em;
  line-height: 1;
  color: #24292e;
  background-color: #fafbfc;
  border: 1px solid #c6cbd1;
  border-bottom-color: #959da5;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 #959da5;
}

/* ============================================
   MERMAID DIAGRAMS
   ============================================ */

.post-body .mermaid {
  text-align: center;
  margin: 2em 0;
  background-color: #f6f8fa;
  padding: 1.5em;
  border-radius: 8px;
  border: 1px solid #e1e4e8;
  overflow-x: auto;
}

.post-body .mermaid svg {
  max-width: 100%;
  height: auto;
}

/* ============================================
   HEADER NUMBERING
   ============================================ */

.post-body h1.numbered .header-number,
.post-body h2.numbered .header-number,
.post-body h3.numbered .header-number,
.post-body h4.numbered .header-number,
.post-body h5.numbered .header-number,
.post-body h6.numbered .header-number {
  color: hsl(205, 60%, 50%);
  font-weight: 600;
  margin-right: 0.3em;
  user-select: none;
}
