/* Roadster Light Mode (Dark Reader-style) by us 
   Goal: recolor only (no layout changes).
   Notes:
   - Single @media block.
   - No width/max-width/margin/padding/display/flex/position overrides.
*/

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/wikijs_fonts/ibm-plex-sans--v21-normal-400.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal
}

@font-face {
  font-family: 'Epilogue';
  src: url('/fonts/wikijs_fonts/epilogue--v17-normal-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal
}

@font-face {
  font-family: "Apple II";
  src: url("/fonts/apple_ii.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Epilogue';
  src: url('/fonts/epilogue/Epilogue-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@media all {
  :root {
    color-scheme: light;

    /* Palette – matched to your screenshot */
    --dr-bg: #F2F4F7;          /* page background */
    --dr-panel: #FFFFFF;       /* cards / post panels */
    --dr-panel2: #F7F8FA;      /* sidebar */
    --dr-nav: #2A2A2A;         /* header/nav bar */
    --dr-border: #D5DCE3;      /* rules/dividers */
    --dr-border-soft: #E6EBF0;
    --dr-text: #1C232B;        /* main text */
    --dr-muted: #5F6B77;       /* dates, meta */
    --dr-link: #1C232B;        /* default links */
    --dr-accent: #C01616;      /* RED rule + headers */

    /* Code */
    --dr-code-bg: #F3F5F8;
    --dr-code-text: #1C232B;

    /* Inputs */
    --dr-input-bg: #FFFFFF;
  } 

  /* Global */
  html, body {
    background: var(--dr-bg) !important;
    color: var(--dr-text) !important;
  }

  /* Layout rails (COLOR ONLY): Roadster uses white backgrounds on outer wrappers.
     We only set background-color to eliminate the white page margins. */
  .container--outer,
  .container,
  .wrap,
  .wrapper,
  .content,
  .content__inner,
  .page,
  .page__body,
  .site,
  main {
    background-color: var(--dr-panel) !important;
  }

  /* Header / logo */
  header.header, .header {
    background: var(--dr-panel2) !important;
    border-bottom-color: var(--dr-border) !important;
  }

  .logo__title {
    color: var(--dr-accent) !important;
    -webkit-text-fill-color: var(--dr-accent) !important;
  }

  /* Menu */
  nav.menu, .menu {
    background: var(--dr-nav) !important;
    border-bottom-color: var(--dr-accent) !important;
  }

  .menu__link {
    color: var(--dr-text) !important;
    background: transparent !important;
    border-right-color: var(--dr-border-soft) !important;
  }

  .menu__item--active .menu__link,
  .menu__link[aria-current="page"] {
    background: var(--dr-accent) !important;
  }

  .menu__link:hover {
    background: rgba(0, 0, 0, 0.05) !important;
  }

  /* Section/list headers (color only – match panel background, do not change layout) */
  .page__header,
  .list__header,
  .section__header,
  .taxonomy__header,
  .content__header,
  .page-header,
  .list-header {
    background-color: var(--dr-panel) !important;
    border-bottom-color: var(--dr-muted) !important;
  }

  /* Panels / cards / widgets: only colors + borders */
  article, .post, .entry, .list, .card,
  .widget, .sidebar, .sidebar .widget,
  .sidebar__content, .block, .box {
    background: var(--dr-panel) !important;
    color: var(--dr-text) !important;
    border-color: var(--dr-border) !important;
  }

  /* Titles */
  h1, h2, h3, h4, h5, h6,
  .page__title, .post__title, .list__title,
  .entry__title, .post-title, .entry-title {
  color: var(--dr-text) !important; 
  }

  /* Body text font */
  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-style: normal;
  }

  /* Body text size (keep headings independent) */
  .post__content,
  .entry__content,
  .page__body,
  .content__inner,
  .list__excerpt,
  .post__excerpt,
  .entry__excerpt {
    font-size: 1.0rem;
    line-height: 1.65;
  }

  /* Explicit heading sizes so they don't track body text tweaks */
  h1 { font-size: 2.1rem; line-height: 1.15; }
  h2 { font-size: 1.7rem; line-height: 1.2; }
  h3 { font-size: 1.35rem; line-height: 1.25; }
  h4 { font-size: 1.15rem; line-height: 1.3; }
  h5 { font-size: 1.0rem; line-height: 1.35; }
  h6 { font-size: 0.95rem; line-height: 1.4; }

  /* Headings (H1–H6 + theme title classes) */
  h1, h2, h3, h4, h5, h6,
  .page__title, .post__title, .list__title,
  .entry__title, .post-title, .entry-title {
    font-family: "Epilogue", "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-style: normal;
  }

  /* Logo (site title) — keep independent from headings */
  .logo__title {
    font-family: "Apple II" !important;
    font-weight: 400; /* use 700 face if available */
    letter-spacing: -0.06em; /* optional, Apple II looks better with a touch of spacing */
    word-spacing: -0.45em;    /* try 0.20–0.40em */
    font-size: 1.4rem;

  }

  /* Post titles: keep single-page titles white, but make list/recent titles accent red */
  .post__title, .post-title {
    color: var(--dr-text) !important;
  }

  /* List titles (accent red): ONLY the main content lists, not sidebar widgets */
  .list .post__title a,
  .list .entry__title a,
  .list .post-title a,
  .list .entry-title a {
    color: var(--dr-accent) !important;
  }

  /* Hover: brighten (lists only) */
  .list .post__title a:hover,
  .list .entry__title a:hover,
  .list .post-title a:hover,
  .list .entry-title a:hover {
    color: #0f1419 !important;
  }

  /* Meta */
  .meta, .post-meta, .entry-meta,
  .date, time, small {
    color: var(--dr-muted) !important;
  }

  /* Links */
  a {
    color: var(--dr-link) !important;
    text-decoration-color: rgba(0, 0, 0, 0.2) !important;
  }

  a:hover {
    color: #0f1419 !important;
    text-decoration-color: rgba(0, 0, 0, 0.45) !important;
  }

  /* Section/widget headings with accent underline */
  .sidebar .widget__title, .widget__title,
  .section__title, .recent__title,
  .taxonomy__title {
    border-bottom-color: var(--dr-accent) !important;
  }

  /* Tags / badges */
  .tag, .tags a, a.tag, .taxonomy a {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: var(--dr-border) !important;
    color: var(--dr-text) !important;
  }

  /* Code */
  pre, code, kbd, samp {
    background: var(--dr-code-bg) !important;
    color: var(--dr-code-text) !important;
    border-color: var(--dr-border) !important;
  }

  /* Inputs */
  input, textarea, select, button {
    background: var(--dr-input-bg) !important;
    color: var(--dr-text) !important;
    border-color: var(--dr-border) !important;
  }

  /* Tables */
  table {
    color: var(--dr-text) !important;
  }

  th, td {
    border-color: var(--dr-border-soft) !important;
  }

  thead th {
    background: var(--dr-panel2) !important;
  }

  /* Horizontal rules */
  hr {
    border-color: var(--dr-border) !important;
  }

  /* Footer (color only; DO NOT change widths) */
  footer.footer, .footer {
    background: var(--dr-panel2) !important;
    border-top-color: var(--dr-border) !important;
  }

  /* Blockquotes */
  blockquote {
    border-left-color: var(--dr-accent) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--dr-text) !important;
  }

  /* SVG icons */
  svg, svg * {
    stroke: currentColor;
    fill: currentColor;
  }

  /* Search widget (COLOR ONLY – kill white box) */
  .widget-search,
  .widget-search__form {
    background: var(--dr-panel2) !important;
    border-color: var(--dr-border) !important;
  }

  .widget-search__input {
    background: var(--dr-input-bg) !important;
    color: var(--dr-text) !important;
    border-color: var(--dr-border) !important;
  }

  /* Dotted separators (meta/header) — force style/width for Blink/WebKit */
  .post__meta,
  .post__info,
  .post__header,
  .page__header,
  .entry__meta,
  .meta,
  .post-meta {
    /* Chrome/Safari can drop 1px dotted when the color is too close to the background.
       Use a slightly brighter tone than --dr-border-soft, but still subtle. */
    border-top-color: rgba(214, 222, 230, 0.22) !important;
    border-bottom-color: rgba(214, 222, 230, 0.22) !important;
    border-top-style: dotted !important;
    border-bottom-style: dotted !important;
    border-top-width: 1px !important;
    border-bottom-width: 1px !important;
  }

  /* Catch dotted borders anywhere in the header/meta row */
  .post__meta *,
  .post__info * {
    border-color: var(--dr-border-soft) !important;
  }

  /* If the theme uses dotted HRs for separators */
  hr {
    border-color: var(--dr-border-soft) !important;
  }
}

/* Restore list title size (theme regression fix) */
.list__title.post__title {
  font-size: 1.6rem;
  line-height: 1.2;
}

/* Constrain post images (Roadster/Hugo figures) */
.post__content img,
.post__content figure img,
.content img,
.content figure img {
  max-width: 900px;
  width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border: 1px solid rgba(20, 26, 34, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 2px 10px rgba(12, 18, 28, 0.14);
}

/* List pages: make the "before <!--more-->" image a thumbnail and prevent clipping */
.list figure,
.list .post__content figure,
.list .entry__content figure {
  max-width: 520px;
  margin: 1rem 0;
}

.list figure img,
.list .post__content figure img,
.list .entry__content figure img {
  max-width: 520px;
  width: 100%;
  height: auto;
  border: 1px solid rgba(20, 26, 34, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 2px 10px rgba(12, 18, 28, 0.14);
}

/* Some themes clamp list summaries; ensure the thumbnail isn't cropped */
.list__item,
.list__content,
.list__excerpt,
.post__excerpt,
.entry__excerpt {
  overflow: visible !important;
  max-height: none !important;
}

/* Nuke all dotted separators in sidebar widgets */
.sidebar li,
.sidebar .widget li,
.sidebar .recent__item,
.sidebar .widget__item,
.sidebar .categories__item,
.sidebar .tags__item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
}

.menu button.menu__link.theme-toggle {
  background: transparent !important;
  border: 0 !important;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font: inherit;
}

@media screen and (min-width: 767px) {
  .menu button.menu__link.theme-toggle {
    width: auto;
  }
}


/* Light theme: restore contrast for controls that intentionally stay dark */
.menu__btn,
.menu__btn-title,
.menu__link,
.submenu__link {
  color: #eef3f8 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45) !important;
}

.menu__item--active .menu__link,
.menu__link[aria-current="page"],
.menu__link:hover,
.submenu__item:hover > .submenu__link,
.submenu__link:hover {
  color: #ffffff !important;
}

/* Roadster uses .btn for read-more, tag widgets, pagination, etc. */
.btn,
.btn:visited,
a.btn,
.list__footer-readmore,
.list__footer-readmore.btn,
.pagination__item,
.widget__link.btn,
.widget-taglist__link,
.widget-taglist__link.btn,
.tags__link,
.tags__link.btn {
  color: #eef3f8 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5) !important;
}

.btn:hover,
.btn:focus,
a.btn:hover,
.list__footer-readmore:hover,
.pagination__item:hover,
.widget__link.btn:hover,
.widget-taglist__link:hover,
.tags__link:hover {
  color: #ffffff !important;
}

/* Tag pills/badges on dark chips */
.tags__item,
.tag,
.tags a,
a.tag,
.taxonomy a,
.widget-taglist__link.btn {
  background: #2a2a2a !important;
  border-color: #3a3f46 !important;
  color: #eef3f8 !important;
}

.tags__item:hover,
.tag:hover,
.tags a:hover,
a.tag:hover,
.taxonomy a:hover,
.widget-taglist__link.btn:hover {
  background: #c01616 !important;
  color: #ffffff !important;
}

/* Light theme mobile menu trigger sits on a light header background */
.menu__btn,
.menu__btn-title {
  color: #111317 !important;
}

.js .menu__btn--active,
.menu__btn:hover,
.menu__btn:focus,
:focus > .menu__btn-title {
  color: #111317 !important;
}

/* Strong mobile light-mode override for MENU trigger visibility */
@media screen and (max-width: 766px) {
  .header .menu__btn,
  .header .menu__btn.menu__btn--active,
  .header .menu__btn .menu__btn-title,
  .header .menu__btn.menu__btn--active .menu__btn-title,
  .header .menu__btn:hover .menu__btn-title,
  .header .menu__btn:focus .menu__btn-title {
    color: #111317 !important;
    -webkit-text-fill-color: #111317 !important;
    text-shadow: none !important;
  }
}


/* Light mode accent: keep Read more red */
.list__footer-readmore,
.list__footer-readmore.btn,
a.list__footer-readmore,
a.list__footer-readmore.btn {
  background: #c01616 !important;
  border-color: #8f1010 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 -1px 0 rgba(0, 0, 0, 0.16) inset,
    0 2px 6px rgba(12, 18, 28, 0.14) !important;
}

.list__footer-readmore:hover,
.list__footer-readmore.btn:hover,
a.list__footer-readmore:hover,
a.list__footer-readmore.btn:hover {
  background: #a71010 !important;
  border-color: #7c0b0b !important;
  color: #ffffff !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    0 2px 8px rgba(12, 18, 28, 0.18) !important;
}

/* Light mode sidebar tags: color-only override */
.widget-taglist .widget-taglist__link,
.widget-taglist .widget-taglist__link.btn,
.widget-taglist .widget__link.btn {
  background: #e6e6e6 !important;
  color: #1a1d22 !important;
  text-shadow: none !important;
}

.widget-taglist .widget-taglist__link:hover,
.widget-taglist .widget-taglist__link.btn:hover,
.widget-taglist .widget__link.btn:hover {
  background: #c01616 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
}

/* Sidebar tag widget button preview (light mode color tuning) */
.widget-taglist .widget-taglist__link,
.widget-taglist .widget-taglist__link.btn,
.widget-taglist .widget__link.btn {
  border-color: #cfcfcf !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 -1px 0 rgba(0, 0, 0, 0.16) inset,
    0 2px 6px rgba(12, 18, 28, 0.14) !important;
}

.widget-taglist .widget-taglist__link:hover,
.widget-taglist .widget-taglist__link.btn:hover,
.widget-taglist .widget__link.btn:hover {
  border-color: #8f1010 !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    0 2px 8px rgba(12, 18, 28, 0.18) !important;
}

/* Header logo title: crisp black backline offset down-right */
.logo__title {
  text-shadow: 1px 1px 0 #bfc4cb !important;
}

/* Light mode syntax-highlighted code blocks:
   Hugo emits Monokai-like inline token colors (e.g. yellow strings).
   Keep highlighted blocks on a dark panel so token colors remain legible. */
.highlight pre,
.highlight pre[style],
.chroma,
.chroma pre,
.chroma pre[style] {
  background: #0b1016 !important;
  background-color: #0b1016 !important;
  color: #d8e0e8 !important;
  border-color: #25303b !important;
}

.highlight pre code,
.chroma pre code {
  background: transparent !important;
  border: 0 !important;
}

/* Light mode syntax highlighting (real fix):
   Keep highlighted blocks light and remap low-contrast token colors from dark themes. */
.highlight pre,
.highlight pre[style],
.chroma,
.chroma pre,
.chroma pre[style] {
  background: var(--dr-code-bg) !important;
  background-color: var(--dr-code-bg) !important;
  color: var(--dr-code-text) !important;
  border-color: #c9d2dc !important;
}

.highlight pre code,
.chroma pre code {
  background: transparent !important;
  border: 0 !important;
  color: inherit !important;
}

/* Chroma class-based tokens (if classes are used) */
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs { color: #5f6b7a !important; }
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr, .chroma .kt { color: #b0005a !important; }
.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sd, .chroma .s1, .chroma .s2, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx { color: #8a6b00 !important; }
.chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il, .chroma .mo { color: #6a3dc1 !important; }
.chroma .nb, .chroma .nf, .chroma .fm { color: #005f8f !important; }
.chroma .o, .chroma .ow { color: #c2185b !important; }
.chroma .na, .chroma .nt { color: #0f6f96 !important; }

/* Inline-style tokens (Hugo/Chroma inline styles): remap common Monokai colors for light mode */
.highlight [style*="color:#e6db74"],
.highlight [style*="color: #e6db74"],
.chroma [style*="color:#e6db74"],
.chroma [style*="color: #e6db74"] { color: #8a6b00 !important; }

.highlight [style*="color:#a6e22e"],
.highlight [style*="color: #a6e22e"],
.chroma [style*="color:#a6e22e"],
.chroma [style*="color: #a6e22e"] { color: #2f7d32 !important; }

.highlight [style*="color:#66d9ef"],
.highlight [style*="color: #66d9ef"],
.chroma [style*="color:#66d9ef"],
.chroma [style*="color: #66d9ef"] { color: #0b7285 !important; }

.highlight [style*="color:#f92672"],
.highlight [style*="color: #f92672"],
.chroma [style*="color:#f92672"],
.chroma [style*="color: #f92672"] { color: #c2185b !important; }

.highlight [style*="color:#ae81ff"],
.highlight [style*="color: #ae81ff"],
.chroma [style*="color:#ae81ff"],
.chroma [style*="color: #ae81ff"] { color: #6f42c1 !important; }

.highlight [style*="color:#75715e"],
.highlight [style*="color: #75715e"],
.chroma [style*="color:#75715e"],
.chroma [style*="color: #75715e"] { color: #64748b !important; }

/* Some generated blocks set the base foreground inline on <pre> for dark themes */
.highlight pre[style*="color:#f8f8f2"],
.highlight pre[style*="color: #f8f8f2"],
.chroma pre[style*="color:#f8f8f2"],
.chroma pre[style*="color: #f8f8f2"] { color: var(--dr-code-text) !important; }

/* Light mode pagination: keep default page/arrow text dark on pale buttons */
.pagination__item,
.pagination__item:visited {
  color: #1a1d22 !important;
  text-shadow: none !important;
}

.pagination__item:hover,
.pagination__item--current,
.pagination__item--current:visited {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}

/* Inline red highlight */
.danger {
  color: var(--dr-accent) !important;
  font-weight: 600;
}