/*
 * Blog typography + accessibility baseline.
 * Tuned for readable, WCAG-AA contrast on the dark theme (#1e1e1e).
 * Tailwind (CDN) handles layout/spacing utilities; this owns article prose.
 */

/* Visible keyboard focus for everyone (Tailwind CDN resets the default ring). */
:focus-visible {
  outline: 2px solid #ff6c37;
  outline-offset: 2px;
  border-radius: 2px;
}

html {
  scroll-behavior: smooth;
}

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Article body ---- */
.prose {
  color: #d4d4d4; /* ~11:1 on #1e1e1e */
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 70ch;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2,
.prose h3,
.prose h4 {
  color: #ffffff;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 5rem; /* clear the sticky header on anchor jumps */
}

.prose h2 {
  font-size: 1.6rem;
  margin-top: 2.25em;
}

.prose h3 {
  font-size: 1.3rem;
  margin-top: 1.85em;
}

.prose h4 {
  font-size: 1.1rem;
  margin-top: 1.5em;
}

/* markdown-it-anchor adds ids; keep heading anchors free of link styling. */
.prose h2 a,
.prose h3 a,
.prose h4 a {
  color: inherit;
  text-decoration: none;
}

.prose a {
  color: #ff8c5a; /* ~5.3:1 on #1e1e1e */
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: #ffa775;
}

.prose strong {
  color: #ffffff;
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose li::marker {
  color: #858585;
}

.prose blockquote {
  border-left: 3px solid #ff6c37;
  padding-left: 1em;
  color: #b9b9b9;
  font-style: italic;
}

.prose code {
  background: #2d2d2d;
  color: #ffd9c7;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.prose pre {
  background: #161616;
  border: 1px solid #3e3e3e;
  border-radius: 8px;
  padding: 1em 1.25em;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.prose pre code {
  background: transparent;
  color: #d4d4d4;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.prose hr {
  border: 0;
  border-top: 1px solid #3e3e3e;
  margin: 2.5em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.prose th,
.prose td {
  border: 1px solid #3e3e3e;
  padding: 0.5em 0.75em;
  text-align: left;
}

.prose th {
  background: #252526;
  color: #ffffff;
}
