@charset "UTF-8";
* {
  box-sizing: border-box; }

html {
  overflow-x: hidden !important;
  max-width: 100vw !important; }

body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  position: relative; }

*, *::before, *::after {
  max-width: 100vw; }

body {
  font-family: "Space Mono", monospace !important;
  background-color: #ffffff !important; }

.navbar {
  background-color: #ffffff !important;
  font-family: "Space Mono", monospace !important; }

.navbar-item {
  color: #2d3748 !important;
  font-family: "Space Mono", monospace !important;
  font-weight: 500; }
  .navbar-item:hover {
    color: #805ad5 !important;
    background-color: transparent !important; }

.site-logo {
  height: 32px !important;
  width: auto !important; }

.post-card-link {
  display: block;
  text-decoration: none;
  color: inherit; }
  .post-card-link:hover {
    text-decoration: none;
    color: inherit; }

.post-card {
  padding: 0;
  background-color: #ffffff;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
  overflow: hidden; }
  .post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }

.post-featured-image {
  width: 100%;
  border-radius: 12px 12px 0 0; }
  .post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s ease; }
  .post-card:hover .post-featured-image img {
    transform: scale(1.02); }

.post-card-content {
  padding: 2rem; }

.post-meta {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #718096;
  font-weight: 500; }

.post-category {
  color: #805ad5;
  font-weight: 600; }

.post-tags {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem; }

.post-tags .tag {
  background-color: #e2e8f0;
  color: #2d3748;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.2s ease; }
  .post-tags .tag:hover {
    background-color: #805ad5;
    color: #ffffff;
    border-color: #805ad5;
    transform: translateY(-1px); }

.post-title a {
  color: #2d3748 !important;
  text-decoration: none !important; }
  .post-title a:hover {
    color: #805ad5 !important; }

.post-excerpt {
  color: #718096;
  line-height: 1.6; }

.author-box {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }

.author-avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #e2e8f0; }

.author-name {
  margin-bottom: 0.5rem !important;
  color: #2d3748 !important;
  font-weight: 600; }

.author-bio {
  color: #718096;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-weight: 400; }

.author-social {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap; }
  .author-social .button {
    font-family: "Space Mono", monospace !important;
    border-color: #e2e8f0 !important;
    color: #2d3748 !important;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease; }
    .author-social .button:hover {
      border-color: #805ad5 !important;
      color: #805ad5 !important;
      background-color: white !important;
      transform: translateY(-1px); }

.image-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer; }

.image-popup-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center; }

.image-popup-image {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }

.post-content img {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 4px;
  height: 500px;
  width: auto;
  display: block;
  margin: 1.5rem auto;
  object-fit: contain; }
  .post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }

@media screen and (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important; }

  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100vw !important;
    width: 100% !important; }

  .columns {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100vw !important; }

  .column {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    max-width: 100vw !important; }

  .section {
    padding: 1.5rem 0 !important;
    max-width: 100vw !important; }

  .post-content {
    max-width: 100vw !important;
    overflow-x: hidden !important; }
    .post-content * {
      max-width: 100% !important;
      box-sizing: border-box !important; }
    .post-content pre {
      overflow-x: auto !important;
      word-wrap: break-word !important;
      white-space: pre-wrap !important;
      max-width: calc(100vw - 2rem) !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      padding: 0.5rem !important; }
    .post-content code {
      word-wrap: break-word !important;
      word-break: break-all !important;
      max-width: 100% !important; }
    .post-content table {
      display: block !important;
      overflow-x: auto !important;
      white-space: nowrap !important;
      max-width: calc(100vw - 2rem) !important;
      margin: 0 !important; }
    .post-content a {
      word-wrap: break-word !important;
      word-break: break-all !important;
      max-width: 100% !important; }
    .post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {
      word-wrap: break-word !important;
      max-width: 100% !important; }
    .post-content p {
      word-wrap: break-word !important;
      max-width: 100% !important; }
    .post-content img, .post-content iframe, .post-content embed, .post-content object, .post-content video, .post-content svg {
      max-width: calc(100vw - 2rem) !important;
      height: auto !important;
      margin-left: auto !important;
      margin-right: auto !important;
      display: block !important; }

  .post-content img {
    height: 300px;
    margin: 1rem auto;
    max-width: calc(100vw - 2rem) !important; }

  .post-title {
    word-wrap: break-word;
    line-height: 1.2; }

  .author-box {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1rem !important; } }
/**
 * Reset some basic elements
 */
body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
  margin: 0;
  padding: 0; }

/**
 * Basic styling
 */
body {
  font: 400 16px/1.5 "Space Mono", monospace;
  color: #2d3748 !important;
  /* Force consistent text color */
  background-color: #ffffff;
  -webkit-text-size-adjust: 100%;
  -webkit-font-feature-settings: "kern" 1;
  -moz-font-feature-settings: "kern" 1;
  -o-font-feature-settings: "kern" 1;
  font-feature-settings: "kern" 1;
  font-kerning: normal;
  display: flex;
  min-height: 100vh;
  flex-direction: column; }

/**
 * Bold text styling
 */
strong, b {
  font-weight: 600 !important;
  color: #2d3748 !important;
  /* Force dark color for bold text */ }

/**
 * Paragraph styling  
 */
p {
  color: #2d3748 !important;
  /* Ensure consistent paragraph color */ }

/**
 * Set `margin-bottom` to maintain vertical rhythm
 */
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure,
.highlight {
  margin-bottom: 15px; }

/**
 * `main` element
 */
main {
  display: block;
  /* Default value of `display` of `main` element is 'inline' in IE 11. */ }

/**
 * Images
 */
img {
  max-width: 100%;
  vertical-align: middle; }

/**
 * Figures
 */
figure > img {
  display: block; }

figcaption {
  font-size: 14px; }

/**
 * Lists
 */
ul, ol {
  margin-left: 30px; }

li > ul,
li > ol {
  margin-bottom: 0; }

/**
 * Headings
 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  /* Bolder for better visibility */
  color: #2d3748 !important;
  /* Force consistent color across devices */ }

/**
 * Links
 */
a {
  color: #805ad5;
  text-decoration: none; }
  a:visited {
    color: #582eb5; }
  a:hover {
    color: #2d3748;
    text-decoration: none; }
  .social-media-list a:hover {
    text-decoration: none; }
    .social-media-list a:hover .username {
      text-decoration: none; }

/**
 * Blockquotes
 */
blockquote {
  color: #718096;
  border-left: 4px solid #e2e8f0;
  padding-left: 15px;
  font-size: 18px;
  letter-spacing: -1px;
  font-style: italic; }
  blockquote > :last-child {
    margin-bottom: 0; }

/**
 * Code formatting - Clean modern theme with JetBrains Mono
 */
pre,
code {
  font-size: 15px;
  border: 1px solid #e2e8f0;
  /* Clean light border */
  border-radius: 8px;
  /* Rounded corners */
  background-color: #f1f5f9;
  /* Distinct light blue-gray background */
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace !important;
  color: #2d3748;
  /* Clean dark gray text */
  font-weight: normal !important;
  /* Normal weight for code blocks */
  font-variant-ligatures: none;
  /* Disable font ligatures */ }

code {
  padding: 1px 5px;
  color: #805ad5;
  /* Clean purple for inline code */
  font-weight: 500;
  /* Slightly bolder for better visibility */
  background-color: #f1f5f9;
  /* Distinct light blue-gray background */
  font-variant-ligatures: none;
  /* Disable font ligatures */ }

pre {
  padding: 8px 12px;
  overflow-x: auto;
  background-color: #f1f5f9;
  /* Distinct light blue-gray background */ }
  pre > code {
    border: 0;
    padding-right: 0;
    padding-left: 0;
    background-color: transparent;
    /* Inherit pre background */ }

/**
 * Wrapper
 */
.wrapper {
  max-width: -webkit-calc(800px - (30px * 2));
  max-width: calc(800px - (30px * 2));
  margin-right: auto;
  margin-left: auto;
  padding-right: 30px;
  padding-left: 30px; }
  @media screen and (max-width: 800px) {
    .wrapper {
      max-width: -webkit-calc(800px - (30px));
      max-width: calc(800px - (30px));
      padding-right: 15px;
      padding-left: 15px; } }

/**
 * Clearfix
 */
.wrapper:after, .footer-col-wrapper:after {
  content: "";
  display: table;
  clear: both; }

/**
 * Icons
 */
.svg-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  fill: #718096;
  padding-right: 5px;
  vertical-align: text-top; }

.social-media-list li + li {
  padding-top: 5px; }

/**
 * Tables
 */
table {
  margin-bottom: 30px;
  width: 100%;
  text-align: left;
  color: #506280;
  border-collapse: collapse;
  border: 1px solid #e2e8f0; }
  table tr:nth-child(even) {
    background-color: #f6f8fa; }
  table th, table td {
    padding: 10px 15px; }
  table th {
    background-color: #ecf0f5;
    border: 1px solid #d5dde9;
    border-bottom-color: #bac8db; }
  table td {
    border: 1px solid #e2e8f0; }

/**
 * Site footer
 */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 30px 0; }

.footer-heading {
  font-size: 18px;
  margin-bottom: 15px; }

.contact-list,
.social-media-list {
  list-style: none;
  margin-left: 0; }

.footer-col-wrapper {
  font-size: 15px;
  color: #718096;
  margin-left: -15px; }

.footer-col {
  float: left;
  margin-bottom: 15px;
  padding-left: 15px; }

.footer-col-1 {
  width: -webkit-calc(35% - (30px / 2));
  width: calc(35% - (30px / 2)); }

.footer-col-2 {
  width: -webkit-calc(20% - (30px / 2));
  width: calc(20% - (30px / 2)); }

.footer-col-3 {
  width: -webkit-calc(45% - (30px / 2));
  width: calc(45% - (30px / 2)); }

@media screen and (max-width: 800px) {
  .footer-col-1,
  .footer-col-2 {
    width: -webkit-calc(50% - (30px / 2));
    width: calc(50% - (30px / 2)); }

  .footer-col-3 {
    width: -webkit-calc(100% - (30px / 2));
    width: calc(100% - (30px / 2)); } }
@media screen and (max-width: 600px) {
  .footer-col {
    float: none;
    width: -webkit-calc(100% - (30px / 2));
    width: calc(100% - (30px / 2)); } }
/**
 * Page content
 */
.page-content {
  padding: 30px 0;
  flex: 1; }

.page-heading {
  font-size: 32px; }

/**
 * Home page styles
 */
.home {
  padding-top: 30px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 30px; }

.post-card {
  padding: 30px;
  background-color: #ffffff; }

.post-meta {
  font-size: 14px;
  color: #718096;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center; }

.post-category {
  background-color: #e2e8f0;
  color: #2d3748;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12.6px;
  font-weight: 600; }

.post-title {
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: 600; }
  .post-title a {
    color: #2d3748;
    text-decoration: none; }
    .post-title a:hover {
      color: #805ad5; }

.post-excerpt {
  color: #718096;
  line-height: 1.5;
  margin: 0; }

.post-list-heading {
  font-size: 28px; }

.post-list {
  margin-left: 0;
  list-style: none; }
  .post-list > li {
    margin-bottom: 30px; }

.post-link {
  display: block;
  font-size: 24px; }

/**
 * Posts
 */
.post-header {
  margin-bottom: 30px; }

.post-title {
  font-size: 42px;
  letter-spacing: -1px;
  line-height: 1;
  font-weight: 600 !important;
  /* Ensure bold font weight */
  color: #2d3748 !important;
  /* Force dark color on all devices */ }
  @media screen and (max-width: 800px) {
    .post-title {
      font-size: 36px; } }

.post-content {
  margin-bottom: 30px; }
  .post-content h2 {
    font-size: 32px; }
    @media screen and (max-width: 800px) {
      .post-content h2 {
        font-size: 28px; } }
  .post-content h3 {
    font-size: 26px; }
    @media screen and (max-width: 800px) {
      .post-content h3 {
        font-size: 22px; } }
  .post-content h4 {
    font-size: 20px; }
    @media screen and (max-width: 800px) {
      .post-content h4 {
        font-size: 18px; } }

/**
 * Syntax highlighting styles
 * Using Rouge GitHub theme - see assets/css/syntax.css
 */
.highlight {
  background: #f8fafc;
  /* Clean light gray background */
  border-radius: 8px;
  /* Rounded corners */ }
  .highlighter-rouge .highlight {
    background: #f8fafc;
    /* Clean light gray background */
    border-radius: 8px;
    /* Rounded corners */ }

/* Override Bulma CSS Variables for Light Theme */
:root {
  --bulma-scheme-main: #ffffff;
  --bulma-scheme-main-bis: #ffffff;
  --bulma-scheme-main-ter: #e2e8f0;
  --bulma-text: #2d3748;
  --bulma-text-strong: #1a202c;
  --bulma-background: #ffffff; }

/* Dark Mode CSS Variables */
:root.night-shift {
  --bulma-scheme-main: #1a1b23;
  --bulma-scheme-main-bis: #1a1b23;
  --bulma-scheme-main-ter: #252630;
  --bulma-text: #e2e8f0;
  --bulma-text-strong: #f7fafc;
  --bulma-background: #1a1b23;
  --bulma-border: #363846;
  --bulma-link: #63b3ed;
  --bulma-link-hover: #90cdf4; }

/* Override Bulma body and main elements */
body {
  background-color: #ffffff !important;
  color: #2d3748 !important;
  transition: background-color 0.3s ease, color 0.3s ease; }

.section {
  background-color: #ffffff !important;
  transition: background-color 0.3s ease; }

.container {
  background-color: transparent !important; }

/* Override Bulma content class */
.content {
  color: #2d3748 !important;
  transition: color 0.3s ease; }

/* Navbar base styling with transitions */
.navbar {
  transition: background-color 0.3s ease, color 0.3s ease; }

.navbar-item {
  transition: background-color 0.3s ease, color 0.3s ease; }

.navbar-burger {
  transition: background-color 0.3s ease, color 0.3s ease; }

/* Dark Mode Theme Overrides */
:root.night-shift body {
  background-color: #1a1b23 !important;
  color: #e2e8f0 !important; }

:root.night-shift .section {
  background-color: #1a1b23 !important; }

:root.night-shift .content {
  color: #e2e8f0 !important; }

:root.night-shift .content h1,
:root.night-shift .content h2,
:root.night-shift .content h3,
:root.night-shift .content h4,
:root.night-shift .content h5,
:root.night-shift .content h6 {
  color: #f7fafc !important; }

:root.night-shift .content a {
  color: #63b3ed !important; }

:root.night-shift .content a:hover {
  color: #90cdf4 !important; }

:root.night-shift .content strong {
  color: #f7fafc !important; }

:root.night-shift .content blockquote {
  background-color: #252630 !important;
  border-left-color: #4a5568 !important; }

:root.night-shift .content code {
  background-color: #252630 !important;
  color: #f0abfc !important; }

:root.night-shift .content pre {
  background-color: #252630 !important; }

:root.night-shift .content pre code {
  color: #e2e8f0 !important; }

:root.night-shift .content hr {
  background-color: #363846 !important; }

:root.night-shift .content table th {
  background-color: #252630 !important;
  color: #f7fafc !important;
  border-color: #363846 !important; }

:root.night-shift .content table td {
  border-color: #363846 !important; }

:root.night-shift .content table tr:hover {
  background-color: #252630 !important; }

/* Dark Mode Navbar Styling */
:root.night-shift .navbar {
  background-color: #1a1b23 !important;
  color: #e2e8f0 !important; }

/* Ensure consistent navbar item styling in dark mode */
:root.night-shift .navbar-item {
  color: #e2e8f0 !important;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

/* Override Bulma's default navbar background */
:root.night-shift .navbar.has-shadow {
  background-color: #1a1b23 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important; }

:root.night-shift .navbar.is-fixed-top {
  background-color: #1a1b23 !important; }

:root.night-shift .navbar.is-fixed-bottom {
  background-color: #1a1b23 !important; }

:root.night-shift .navbar-menu {
  background-color: #1a1b23 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

:root.night-shift .navbar-end {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

:root.night-shift .navbar-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f7fafc !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

:root.night-shift .navbar-brand .navbar-item {
  color: #e2e8f0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

:root.night-shift .navbar-brand .navbar-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

:root.night-shift .navbar-burger {
  color: #e2e8f0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

:root.night-shift .navbar-burger:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

:root.night-shift .navbar-burger span {
  background-color: #e2e8f0 !important; }

/* Additional Bulma navbar overrides for dark mode */
:root.night-shift .navbar.is-white {
  background-color: #1a1b23 !important;
  color: #e2e8f0 !important; }

:root.night-shift .navbar.is-light {
  background-color: #1a1b23 !important;
  color: #e2e8f0 !important; }

:root.night-shift .navbar .navbar-brand .navbar-item {
  color: #e2e8f0 !important; }

:root.night-shift .navbar .navbar-menu .navbar-item {
  color: #e2e8f0 !important; }

:root.night-shift .navbar .navbar-menu .navbar-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f7fafc !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

/* Force navbar background override for all possible Bulma variants */
:root.night-shift nav.navbar {
  background-color: #1a1b23 !important; }

:root.night-shift .navbar.is-transparent {
  background-color: #1a1b23 !important; }

:root.night-shift .navbar.is-spaced {
  background-color: #1a1b23 !important; }

/* Ultra-specific override to ensure navbar styling */
html:root.night-shift body nav.navbar {
  background-color: #1a1b23 !important;
  color: #e2e8f0 !important; }

html:root.night-shift body nav.navbar .navbar-item {
  color: #e2e8f0 !important; }

html:root.night-shift body nav.navbar .navbar-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f7fafc !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important; }

/* Final override - should work no matter what */
html.night-shift body nav.navbar {
  background-color: #1a1b23 !important;
  color: #e2e8f0 !important; }

/* Ultra-specific shadow removal for any remaining shadows */
html.night-shift body nav.navbar .navbar-item,
html.night-shift body nav.navbar .navbar-item:hover,
html.night-shift body nav.navbar .navbar-item:focus,
html.night-shift body nav.navbar .navbar-item:active,
html.night-shift body nav.navbar .navbar-item::before,
html.night-shift body nav.navbar .navbar-item::after {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  text-shadow: none !important;
  -webkit-text-shadow: none !important;
  -moz-text-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important; }

html.night-shift body nav.navbar .navbar-item {
  color: #e2e8f0 !important; }

html.night-shift body nav.navbar .navbar-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f7fafc !important; }

/* Night Shift Toggle Button Styling */
.night-shift-toggle {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d3748; }

.night-shift-toggle:hover {
  background-color: rgba(45, 55, 72, 0.1);
  transform: scale(1.05); }

.night-shift-toggle:active {
  transform: scale(0.95); }

.night-shift-icon {
  transition: color 0.3s ease, transform 0.2s ease; }

:root.night-shift .night-shift-toggle {
  color: #e2e8f0; }

:root.night-shift .night-shift-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1); }

/* D2 Diagram Styling */
.d2-diagram {
  text-align: center;
  margin: 20px 0; }

/* Theme-swapped diagram: two pre-rendered SVGs (light + dark baked in), only the
   one matching the active theme is shown. Used for the ECS composition figure. */
/* Theme-swapped diagram — native SVG from the story project (real <rect>/<text>/<path>,
   embedded fonts, own viewBox, no <foreignObject>). It behaves like an ordinary image,
   so this is just a plain responsive <img> — no JS, no transforms, no Safari special-
   casing, no per-diagram bookkeeping. Re-export overwrites the files and it just works. */
.theme-diagram {
  text-align: center;
  margin: 24px 0; }

.theme-diagram img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  /* match the peeps comic figures (.peeps-strip) */
  cursor: pointer;
  /* click to zoom — vector stays crisp at any size */ }

.theme-diagram video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 14px; }

/* !important: a mobile (<768px) rule un-hides post images, which would stack both
   themes — these keep only the active-theme image visible. */
.theme-diagram .theme-diagram__dark {
  display: none !important; }

:root.night-shift .theme-diagram .theme-diagram__light {
  display: none !important; }

:root.night-shift .theme-diagram .theme-diagram__dark {
  display: block !important; }

.d2-svg {
  max-width: 100%;
  height: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace !important;
  cursor: pointer;
  transition: background-color 0.3s ease; }

/* Plain screenshots/images in the post body (markdown ![]() render inside a <p>).
   Rounded corners to match the rest of the blog's imagery. The figure-based systems
   (.theme-diagram, .peeps-comic) set their own radius and live in <figure>, so this
   only affects ordinary inline images like chapter screenshots. */
.post-content p > img {
  border-radius: 8px; }

/* Inline videos (e.g. demo clips) — match the screenshot rounding. */
.post-content video {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
  display: block; }

/* Comic Panel Styling */
.comic-panel {
  text-align: center;
  margin: 30px 0; }

.comic-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: pointer; }

/* Image Popup Modal Styles */
.image-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer; }

.image-popup-content {
  max-width: 95vw;
  max-height: 95vh;
  position: relative;
  cursor: default; }

.image-popup-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }

/* Ensure D2 images display properly in popup */
.image-popup-image.d2-svg {
  background-color: #ffffff !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace !important;
  width: auto !important;
  height: auto !important;
  max-width: 80vw !important;
  max-height: 80vh !important;
  min-width: 500px !important;
  min-height: 375px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 20px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  object-fit: contain !important;
  transform: scale(1.2) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease; }

/* Override any D2-specific styling in popup */
.image-popup-content .d2-svg {
  background-color: #ffffff !important;
  color: #2d3748 !important;
  width: auto !important;
  height: auto !important;
  transition: background-color 0.3s ease, color 0.3s ease; }

/* Force SVG background in popup */
.image-popup-image[src*="d2_"] {
  background-color: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  padding: 20px !important;
  width: auto !important;
  height: auto !important;
  min-width: 500px !important;
  min-height: 375px !important;
  max-width: 80vw !important;
  max-height: 80vh !important;
  transform: scale(1.2) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease; }

/* Dark Mode D2 Diagram Styling */
:root.night-shift .d2-svg {
  background-color: #252630 !important;
  color: #e2e8f0 !important; }

:root.night-shift .image-popup-image.d2-svg {
  background-color: #252630 !important;
  border: 2px solid #363846 !important; }

:root.night-shift .image-popup-content .d2-svg {
  background-color: #252630 !important;
  color: #e2e8f0 !important; }

:root.night-shift .image-popup-image[src*="d2_"] {
  background-color: #252630 !important;
  border: 2px solid #363846 !important; }

html {
  scroll-behavior: smooth; }

.post-toc-column {
  position: relative; }

.post-toc-wrapper {
  position: -webkit-sticky;
  position: sticky;
  top: 6rem;
  align-self: flex-start;
  width: 100%; }

.post-toc-wrapper.is-fixed {
  position: fixed;
  top: 6rem;
  z-index: 3; }

.post-toc-placeholder {
  display: block;
  width: 100%; }

.post-toc {
  width: 100%;
  max-height: calc(100vh - 6rem);
  font-size: 0.95rem;
  color: #4a5568;
  padding-left: 1.25rem;
  padding-right: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column; }

.post-toc__title {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  margin-bottom: 0.75rem;
  color: #4a5568; }

.post-toc__links {
  max-height: inherit;
  overflow-y: auto;
  padding-left: 0;
  padding-bottom: 0.75rem;
  scrollbar-width: none; }

.post-toc__links::-webkit-scrollbar {
  width: 0;
  height: 0; }

.post-toc:hover .post-toc__links {
  scrollbar-width: thin; }

.post-toc:hover .post-toc__links::-webkit-scrollbar {
  width: 6px; }

.post-toc:hover .post-toc__links::-webkit-scrollbar-thumb {
  background-color: rgba(203, 213, 224, 0.8); }

.post-toc__list,
.post-toc__sublist {
  list-style: none;
  margin: 0;
  padding: 0; }

.post-toc__sublist {
  margin-left: 0;
  padding-left: 0; }

.post-toc__item {
  margin: 0; }

.post-toc__item--level3 .post-toc__link {
  padding-left: 1.5rem; }

.post-toc__link {
  display: block;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 2px solid transparent;
  color: #4a5568;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  font-size: 0.75rem; }

.post-toc__link:hover,
.post-toc__link:focus {
  color: #2d3748;
  border-left-color: #cbd5e0;
  outline: none; }

.post-toc__link.is-active {
  color: #2d3748;
  border-left-color: #2d3748;
  font-weight: 600; }

.post-toc__link.is-active:focus {
  border-left-color: #2d3748; }

/* Dark Mode Table of Contents Styling */
:root.night-shift .post-toc {
  color: #a0aec0; }

:root.night-shift .post-toc__title {
  color: #a0aec0; }

:root.night-shift .post-toc__link {
  color: #a0aec0; }

:root.night-shift .post-toc__link:hover,
:root.night-shift .post-toc__link:focus {
  color: #e2e8f0;
  border-left-color: #4a5568; }

:root.night-shift .post-toc__link.is-active {
  color: #f7fafc;
  border-left-color: #63b3ed; }

:root.night-shift .post-toc__link.is-active:focus {
  border-left-color: #63b3ed; }

:root.night-shift .post-toc:hover .post-toc__links::-webkit-scrollbar-thumb {
  background-color: rgba(74, 85, 104, 0.8); }

/* Dark Mode Additional Bulma Elements */
:root.night-shift .title {
  color: #f7fafc !important; }

:root.night-shift .subtitle {
  color: #a0aec0 !important; }

:root.night-shift .box {
  background-color: #252630 !important;
  color: #e2e8f0 !important; }

:root.night-shift .card {
  background-color: #252630 !important;
  color: #e2e8f0 !important; }

:root.night-shift .card-header {
  background-color: #1a1b23 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important; }

:root.night-shift .card-header-title {
  color: #f7fafc !important; }

:root.night-shift .card-content {
  background-color: #252630 !important; }

:root.night-shift .card-footer {
  background-color: #252630 !important;
  border-top-color: #363846 !important; }

:root.night-shift .card-footer-item {
  border-right-color: #363846 !important;
  color: #63b3ed !important; }

:root.night-shift .tag {
  background-color: #363846 !important;
  color: #e2e8f0 !important; }

:root.night-shift .tag.is-primary {
  background-color: #3182ce !important;
  color: #ffffff !important; }

:root.night-shift .tag.is-link {
  background-color: #4299e1 !important;
  color: #ffffff !important; }

:root.night-shift .footer {
  background-color: #1a1b23 !important;
  color: #a0aec0 !important; }

:root.night-shift .footer a {
  color: #63b3ed !important; }

:root.night-shift .footer a:hover {
  color: #90cdf4 !important; }

:root.night-shift .button {
  background-color: #363846 !important;
  color: #e2e8f0 !important;
  border-color: #4a5568 !important; }

:root.night-shift .button:hover {
  background-color: #4a5568 !important;
  color: #f7fafc !important; }

:root.night-shift .button.is-primary {
  background-color: #3182ce !important;
  border-color: #3182ce !important;
  color: #ffffff !important; }

:root.night-shift .button.is-primary:hover {
  background-color: #2b6cb0 !important; }

:root.night-shift .button.is-link {
  background-color: #4299e1 !important;
  border-color: #4299e1 !important;
  color: #ffffff !important; }

:root.night-shift .input,
:root.night-shift .textarea,
:root.night-shift .select select {
  background-color: #252630 !important;
  color: #e2e8f0 !important;
  border-color: #4a5568 !important; }

:root.night-shift .input::placeholder,
:root.night-shift .textarea::placeholder {
  color: #718096 !important; }

:root.night-shift .input:focus,
:root.night-shift .textarea:focus,
:root.night-shift .select select:focus {
  border-color: #63b3ed !important;
  box-shadow: 0 0 0 0.125em rgba(99, 179, 237, 0.25) !important; }

:root.night-shift .label {
  color: #e2e8f0 !important; }

:root.night-shift .help {
  color: #a0aec0 !important; }

:root.night-shift .menu-label {
  color: #a0aec0 !important; }

:root.night-shift .menu-list a {
  color: #e2e8f0 !important; }

:root.night-shift .menu-list a:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f7fafc !important; }

:root.night-shift .menu-list a.is-active {
  background-color: #3182ce !important;
  color: #ffffff !important; }

:root.night-shift .pagination-link,
:root.night-shift .pagination-previous,
:root.night-shift .pagination-next {
  background-color: #252630 !important;
  color: #e2e8f0 !important;
  border-color: #4a5568 !important; }

:root.night-shift .pagination-link:hover,
:root.night-shift .pagination-previous:hover,
:root.night-shift .pagination-next:hover {
  border-color: #63b3ed !important;
  color: #63b3ed !important; }

:root.night-shift .pagination-link.is-current {
  background-color: #3182ce !important;
  border-color: #3182ce !important;
  color: #ffffff !important; }

:root.night-shift .message {
  background-color: #252630 !important; }

:root.night-shift .message-header {
  background-color: #363846 !important;
  color: #f7fafc !important; }

:root.night-shift .message-body {
  border-color: #363846 !important;
  color: #e2e8f0 !important; }

:root.night-shift .tabs a {
  color: #e2e8f0 !important;
  border-bottom-color: #4a5568 !important; }

:root.night-shift .tabs a:hover {
  color: #f7fafc !important;
  border-bottom-color: #a0aec0 !important; }

:root.night-shift .tabs li.is-active a {
  color: #63b3ed !important;
  border-bottom-color: #63b3ed !important; }

:root.night-shift .tabs ul {
  border-bottom-color: #4a5568 !important; }

:root.night-shift .breadcrumb a {
  color: #63b3ed !important; }

:root.night-shift .breadcrumb a:hover {
  color: #90cdf4 !important; }

:root.night-shift .breadcrumb li.is-active a {
  color: #a0aec0 !important; }

:root.night-shift .dropdown-content {
  background-color: #252630 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important; }

:root.night-shift .dropdown-item {
  color: #e2e8f0 !important; }

:root.night-shift .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #f7fafc !important; }

:root.night-shift .dropdown-divider {
  background-color: #363846 !important; }

/* Dark Mode Highlight/Selection */
:root.night-shift ::selection {
  background-color: #3182ce !important;
  color: #ffffff !important; }

:root.night-shift ::-moz-selection {
  background-color: #3182ce !important;
  color: #ffffff !important; }

/* Dark Mode Hero Section */
:root.night-shift .hero {
  background-color: #1a1b23 !important; }

:root.night-shift .hero.is-primary {
  background-color: #2b6cb0 !important; }

:root.night-shift .hero-body {
  color: #e2e8f0 !important; }

:root.night-shift .hero .title {
  color: #f7fafc !important; }

:root.night-shift .hero .subtitle {
  color: #a0aec0 !important; }

/* Dark Mode Panel */
:root.night-shift .panel {
  background-color: #252630 !important; }

:root.night-shift .panel-heading {
  background-color: #363846 !important;
  color: #f7fafc !important; }

:root.night-shift .panel-block {
  border-color: #363846 !important;
  color: #e2e8f0 !important; }

:root.night-shift .panel-block:hover {
  background-color: rgba(255, 255, 255, 0.08) !important; }

:root.night-shift .panel-block.is-active {
  border-left-color: #63b3ed !important;
  color: #63b3ed !important; }

:root.night-shift .panel-tabs a {
  color: #a0aec0 !important; }

:root.night-shift .panel-tabs a.is-active {
  border-bottom-color: #63b3ed !important;
  color: #63b3ed !important; }

/* Dark Mode Progress */
:root.night-shift .progress {
  background-color: #363846 !important; }

/* Dark Mode Notification */
:root.night-shift .notification {
  background-color: #252630 !important;
  color: #e2e8f0 !important; }

/* Dark Mode Level */
:root.night-shift .level-item .title,
:root.night-shift .level-item .heading {
  color: #f7fafc !important; }

/* ========================================
   DARK MODE FIXES - Logo, Text, Alerts, Code
   ======================================== */
/* Logo Swap - Hide dark logo in light mode, show in dark mode */
.site-logo-dark {
  display: none !important; }

.site-logo-light {
  display: block !important; }

:root.night-shift .site-logo-dark {
  display: block !important; }

:root.night-shift .site-logo-light {
  display: none !important; }

/* Fix paragraph text color for better contrast in dark mode */
:root.night-shift p,
:root.night-shift .content p,
:root.night-shift article p {
  color: #f0f0f5 !important; }

:root.night-shift li,
:root.night-shift .content li {
  color: #f0f0f5 !important; }

:root.night-shift em,
:root.night-shift .content em {
  color: #d0d0d8 !important; }

/* Fix blockquote text in dark mode */
:root.night-shift blockquote,
:root.night-shift .content blockquote {
  color: #f0f0f5 !important;
  background-color: #252630 !important;
  border-left-color: #4a5568 !important; }

:root.night-shift blockquote p,
:root.night-shift .content blockquote p {
  color: #f0f0f5 !important; }

/* ========================================
   Alert/Info Box Fixes - Force dark text on light backgrounds
   ======================================== */
/* Blue info boxes - light blue background needs dark text */
:root.night-shift div[style*="background-color: #e3f2fd"],
:root.night-shift div[style*="background-color:#e3f2fd"] {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #e3f2fd"] *,
:root.night-shift div[style*="background-color:#e3f2fd"] * {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #e3f2fd"] a,
:root.night-shift div[style*="background-color:#e3f2fd"] a {
  color: #1565c0 !important; }

/* Cyan info boxes */
:root.night-shift div[style*="background-color: #d1ecf1"],
:root.night-shift div[style*="background-color:#d1ecf1"] {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #d1ecf1"] *,
:root.night-shift div[style*="background-color:#d1ecf1"] * {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #d1ecf1"] a,
:root.night-shift div[style*="background-color:#d1ecf1"] a {
  color: #0c7c8c !important; }

/* Green success boxes - light green background needs dark text */
:root.night-shift div[style*="background-color: #d4edda"],
:root.night-shift div[style*="background-color:#d4edda"] {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #d4edda"] *,
:root.night-shift div[style*="background-color:#d4edda"] * {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #d4edda"] a,
:root.night-shift div[style*="background-color:#d4edda"] a {
  color: #1b7a3d !important; }

/* Bright green boxes */
:root.night-shift div[style*="background-color: #90EE90"],
:root.night-shift div[style*="background-color:#90EE90"] {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #90EE90"] *,
:root.night-shift div[style*="background-color:#90EE90"] * {
  color: #1a202c !important; }

/* Light green spans/badges */
:root.night-shift span[style*="background-color: #c8e6c9"],
:root.night-shift span[style*="background-color:#c8e6c9"],
:root.night-shift div[style*="background-color: #c8e6c9"],
:root.night-shift div[style*="background-color:#c8e6c9"] {
  color: #1a202c !important; }

/* Yellow/warning boxes */
:root.night-shift div[style*="background-color: #fff3cd"],
:root.night-shift div[style*="background-color:#fff3cd"] {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #fff3cd"] *,
:root.night-shift div[style*="background-color:#fff3cd"] * {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #fff3cd"] a,
:root.night-shift div[style*="background-color:#fff3cd"] a {
  color: #856404 !important; }

/* Red/danger boxes and spans */
:root.night-shift div[style*="background-color: #ffcdd2"],
:root.night-shift div[style*="background-color:#ffcdd2"],
:root.night-shift span[style*="background-color: #ffcdd2"],
:root.night-shift span[style*="background-color:#ffcdd2"],
:root.night-shift td[style*="background-color: #ffcdd2"],
:root.night-shift td[style*="background-color:#ffcdd2"] {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #ffcdd2"] *,
:root.night-shift div[style*="background-color:#ffcdd2"] * {
  color: #1a202c !important; }

/* Light red/pink alert boxes (#f8d7da) */
:root.night-shift div[style*="background-color: #f8d7da"],
:root.night-shift div[style*="background-color:#f8d7da"] {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #f8d7da"] *,
:root.night-shift div[style*="background-color:#f8d7da"] * {
  color: #1a202c !important; }

/* Light gray boxes */
:root.night-shift div[style*="background-color: #f8f9fa"],
:root.night-shift div[style*="background-color:#f8f9fa"],
:root.night-shift div[style*="background-color: #f0f0f0"],
:root.night-shift div[style*="background-color:#f0f0f0"] {
  color: #1a202c !important; }

:root.night-shift div[style*="background-color: #f8f9fa"] *,
:root.night-shift div[style*="background-color:#f8f9fa"] *,
:root.night-shift div[style*="background-color: #f0f0f0"] *,
:root.night-shift div[style*="background-color:#f0f0f0"] * {
  color: #1a202c !important; }

/* Light gray boxes (#f5f5f5) — e.g. the "On AI assistance" disclaimer */
:root.night-shift div[style*="background-color: #f5f5f5"],
:root.night-shift div[style*="background-color:#f5f5f5"] {
  background-color: #252630 !important;
  border-left-color: #4a5568 !important;
  color: #cbd5e0 !important; }

:root.night-shift div[style*="background-color: #f5f5f5"] *,
:root.night-shift div[style*="background-color:#f5f5f5"] * {
  color: #cbd5e0 !important; }

:root.night-shift div[style*="background-color: #f5f5f5"] a,
:root.night-shift div[style*="background-color:#f5f5f5"] a {
  color: #63b3ed !important; }

/* ========================================
   Code Syntax Highlighting - Dark Mode
   ======================================== */
/* Code block background - remove borders and outlines */
:root.night-shift .highlight,
:root.night-shift .highlight .w,
:root.night-shift .highlighter-rouge .highlight {
  background-color: #1e1e2e !important;
  color: #cdd6f4 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important; }

:root.night-shift pre,
:root.night-shift .content pre {
  background-color: #1e1e2e !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important; }

:root.night-shift .highlighter-rouge {
  border: none !important;
  outline: none !important;
  box-shadow: none !important; }

/* Inline code styling - remove borders */
:root.night-shift code,
:root.night-shift .content code,
:root.night-shift p code,
:root.night-shift li code,
html.night-shift code {
  background-color: #252630 !important;
  color: #f0abfc !important;
  border: none !important;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important; }

/* Code inside pre blocks */
:root.night-shift pre code,
:root.night-shift .content pre code,
:root.night-shift .highlight code,
html.night-shift pre code {
  background-color: transparent !important;
  color: #cdd6f4 !important;
  border: none !important;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important; }

/* Remove any selection/highlight effects on code tokens */
:root.night-shift .highlight span,
html.night-shift .highlight span,
:root.night-shift .highlight *,
html.night-shift .highlight * {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important; }

/* Ensure highlight container has proper background */
:root.night-shift .highlight,
html.night-shift .highlight {
  background-color: #1e1e2e !important;
  background: #1e1e2e !important; }

/* Force remove border from pre and code in dark mode */
html.night-shift pre,
html.night-shift code,
html.night-shift pre code,
html.night-shift .highlighter-rouge pre,
html.night-shift .highlighter-rouge code,
html.night-shift .highlight pre {
  border: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important; }

/* Punctuation, operators, and brackets - make them visible */
:root.night-shift .highlight .p,
:root.night-shift .highlight .pi {
  color: #cdd6f4 !important; }

:root.night-shift .highlight .o,
:root.night-shift .highlight .ow {
  color: #89dceb !important; }

/* Comments */
:root.night-shift .highlight .c,
:root.night-shift .highlight .ch,
:root.night-shift .highlight .cd,
:root.night-shift .highlight .cm,
:root.night-shift .highlight .cpf,
:root.night-shift .highlight .c1,
:root.night-shift .highlight .cs {
  color: #6c7086 !important; }

/* Keywords */
:root.night-shift .highlight .k,
:root.night-shift .highlight .kn,
:root.night-shift .highlight .kp,
:root.night-shift .highlight .kr,
:root.night-shift .highlight .kv,
:root.night-shift .highlight .kc,
:root.night-shift .highlight .kd {
  color: #cba6f7 !important; }

/* Keyword types */
:root.night-shift .highlight .kt {
  color: #f9e2af !important; }

/* Strings */
:root.night-shift .highlight .s,
:root.night-shift .highlight .sb,
:root.night-shift .highlight .sc,
:root.night-shift .highlight .dl,
:root.night-shift .highlight .sd,
:root.night-shift .highlight .s2,
:root.night-shift .highlight .sh,
:root.night-shift .highlight .sx,
:root.night-shift .highlight .s1,
:root.night-shift .highlight .si,
:root.night-shift .highlight .sr {
  color: #a6e3a1 !important; }

/* String escapes */
:root.night-shift .highlight .se {
  color: #f38ba8 !important; }

/* Numbers */
:root.night-shift .highlight .m,
:root.night-shift .highlight .mb,
:root.night-shift .highlight .mf,
:root.night-shift .highlight .mh,
:root.night-shift .highlight .mi,
:root.night-shift .highlight .il,
:root.night-shift .highlight .mo,
:root.night-shift .highlight .mx {
  color: #fab387 !important; }

/* Names/identifiers */
:root.night-shift .highlight .n,
:root.night-shift .highlight .nv,
:root.night-shift .highlight .vi,
:root.night-shift .highlight .vg,
:root.night-shift .highlight .vc {
  color: #cdd6f4 !important; }

/* Function names */
:root.night-shift .highlight .nf,
:root.night-shift .highlight .fm {
  color: #89b4fa !important; }

/* Class names */
:root.night-shift .highlight .nc,
:root.night-shift .highlight .nn,
:root.night-shift .highlight .no {
  color: #f9e2af !important; }

/* Attributes */
:root.night-shift .highlight .na {
  color: #89dceb !important; }

/* Tags */
:root.night-shift .highlight .nt {
  color: #f38ba8 !important; }

/* Errors */
:root.night-shift .highlight .err {
  color: #f38ba8 !important;
  background-color: transparent !important; }

/* Preprocessor */
:root.night-shift .highlight .cp {
  color: #f38ba8 !important; }

/* String attributes */
:root.night-shift .highlight .sa {
  color: #cba6f7 !important; }

/* Symbols */
:root.night-shift .highlight .ss {
  color: #f2cdcd !important; }

/* Git diff additions/deletions */
:root.night-shift .highlight .gi {
  color: #a6e3a1 !important;
  background-color: rgba(166, 227, 161, 0.1) !important; }

:root.night-shift .highlight .gd {
  color: #f38ba8 !important;
  background-color: rgba(243, 139, 168, 0.1) !important; }

:root.night-shift .highlight .gh {
  color: #89b4fa !important; }

/* ========================================
   Post Card Fixes - Dark text on white cards
   ======================================== */
/* Post cards stay white, so titles need to be dark */
:root.night-shift .post-card {
  background-color: #ffffff !important; }

:root.night-shift .post-card .post-title,
:root.night-shift .post-card .post-title.title,
:root.night-shift .post-card .title {
  color: #1a202c !important; }

:root.night-shift .post-card .post-excerpt {
  color: #4a5568 !important; }

:root.night-shift .post-card .post-meta {
  color: #718096 !important; }

:root.night-shift .post-card .post-meta time {
  color: #718096 !important; }

:root.night-shift .post-card .post-category {
  color: #805ad5 !important; }

/* Keep tag styling consistent on white cards */
:root.night-shift .post-card .tag {
  background-color: #e2e8f0 !important;
  color: #2d3748 !important; }

/* ========================================
   Author Box - Dark text on white background
   ======================================== */
:root.night-shift .author-box {
  background-color: #252630 !important;
  border-color: #363846 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important; }

:root.night-shift .author-avatar {
  border-color: #363846 !important; }

:root.night-shift .author-box,
:root.night-shift .author-box * {
  color: #e2e8f0 !important; }

:root.night-shift .author-box .author-name {
  color: #f7fafc !important; }

:root.night-shift .author-box .author-bio {
  color: #cbd5e0 !important; }

:root.night-shift .author-box a:not(.button) {
  color: #63b3ed !important; }

:root.night-shift .author-box a:not(.button):hover {
  color: #90cdf4 !important; }

/* Author box buttons — dark-outlined, transparent on the page background. */
:root.night-shift .author-box .button {
  background-color: transparent !important;
  color: #e2e8f0 !important;
  border: 1px solid #4a5568 !important; }

:root.night-shift .author-box .button .icon svg {
  fill: currentColor; }

:root.night-shift .author-box .button:hover {
  background-color: #252630 !important;
  color: #f7fafc !important;
  border-color: #63b3ed !important; }

/* ========================================
   Dark Mode Toggle Icons (Phosphor)
   ======================================== */
/* In light mode: show sun, hide moon */
.night-shift-icon-moon {
  display: none !important; }

.night-shift-icon-sun {
  display: inline-block !important; }

/* In dark mode: show moon, hide sun */
:root.night-shift .night-shift-icon-moon {
  display: inline-block !important; }

:root.night-shift .night-shift-icon-sun {
  display: none !important; }

/* ========================================
   Print Book Output
   ======================================== */
.d3-print-frame-group {
  display: none; }

.d3-print-frame {
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff; }

.d3-print-frame img {
  display: block;
  width: 100%;
  height: auto; }

/* ========================================
   Post Book CTA
   ======================================== */
.post-book-cta {
  margin: 1.1rem 0 1.4rem;
  padding: 1.1rem;
  border: 1px solid #dbe3ed;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center; }

.post-book-cta--bottom {
  margin-top: 2rem; }

.post-book-cta__cover-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
  border: 1px solid #dbe3ed;
  background: #ffffff; }

.post-book-cta__cover {
  display: block;
  width: 100%;
  height: auto; }

#shader-glow-viz .shader-glow-print-only {
  display: none; }

@media print {
  @page {
    size: A3 portrait;
    margin: 14mm 16mm; }
  html,
  body {
    background: #ffffff !important; }

  .navbar,
  .post-toc-column,
  .post-toc-wrapper,
  .post-toc,
  .author-box,
  .chapter-end-footer,
  .site-footer {
    display: none !important; }

  .post-meta {
    display: none !important; }

  .container,
  .section,
  .post-layout-columns,
  .post-main-column,
  .post,
  .post-content {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important; }

  .post-main-column {
    flex: 0 0 100% !important;
    padding: 0 !important; }

  #shader-glow-viz .shader-glow-live {
    display: none !important; }

  #shader-glow-viz {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important; }

  #shader-glow-viz .shader-glow-print-only {
    display: block !important; }

  #shader-glow-viz .shader-glow-print-only img {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: auto; }

  #astar-viz {
    break-before: page;
    page-break-before: always; }

  #waypoint-viz {
    break-before: page;
    page-break-before: always; }

  #variance-viz {
    break-before: page;
    page-break-before: always; }

  #flex-primer-viz {
    break-before: page;
    page-break-before: always; }

  /* Prevent clipped code lines in PDF output. */
  .highlighter-rouge,
  .highlighter-rouge .highlight,
  .highlight,
  pre,
  pre.highlight,
  .highlight pre {
    max-width: 100% !important;
    overflow: visible !important; }

  pre,
  pre.highlight,
  .highlight pre {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important; }

  pre code,
  pre.highlight code,
  .highlight code,
  .highlighter-rouge code {
    display: block !important;
    white-space: inherit !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    max-width: 100% !important; }

  [data-d3-print-frames].d3-print-frames-ready .d3-print-live-source {
    display: none !important; }

  [data-d3-print-frames].d3-print-frames-ready .d3-print-frame-group {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px; }

  .d3-print-frame {
    break-inside: avoid;
    page-break-inside: avoid; } }
.post-book-cta__content {
  min-width: 0; }

.post-book-cta__message {
  margin: 0;
  color: #1a202c;
  line-height: 1.5;
  font-size: 0.95rem; }

.post-book-cta__actions {
  margin-top: 1rem;
  padding: 0.22rem 0 0.12rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem; }

.post-book-cta__actions-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem; }

.post-book-cta__actions-main .post-book-cta__button {
  margin: 0;
  width: 188px;
  min-width: 188px;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1); }

.post-book-cta__actions-main .post-book-cta__button:hover,
.post-book-cta__actions-main .post-book-cta__button:focus {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14); }

.post-book-cta__actions-aux {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0; }

.post-book-cta__actions-aux .post-book-cta__button {
  margin: 0;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1); }

.post-book-cta__actions-aux .post-book-cta__button:hover,
.post-book-cta__actions-aux .post-book-cta__button:focus {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14); }

.post-book-cta__button .icon i {
  font-size: 1rem;
  line-height: 1; }

.post-book-cta__actions-aux .book-hero-button--icon-only {
  width: 2.35rem;
  min-width: 2.35rem;
  padding: 0 !important; }

.post-book-cta__actions-aux .book-hero-button--icon-only .icon {
  margin-right: 0; }

@media screen and (max-width: 768px) {
  .post-book-cta {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.95rem; }

  .post-book-cta__cover-link {
    width: 168px;
    margin: 0 auto; }

  .post-book-cta__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem; }

  .post-book-cta__actions-main {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem; }

  .post-book-cta__actions-main .post-book-cta__button {
    width: 100%;
    min-width: 0;
    justify-content: center; }

  .post-book-cta__actions-aux {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start; }

  .post-book-cta__actions-aux .book-hero-button--icon-only {
    width: 2.35rem;
    min-width: 2.35rem; } }
:root.night-shift .post-book-cta {
  background: #252630 !important;
  border-color: #363846 !important; }

:root.night-shift .post-book-cta__message {
  color: #cbd5e0 !important; }

:root.night-shift .post-book-cta__cover-link {
  background: #1a1b23 !important;
  border-color: #363846 !important; }

/* ========================================
   Home Featured Book Card
   ======================================== */
.home-book-card {
  margin: 0;
  padding: 1.2rem;
  border: 1px solid #dbe3ed;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%); }

.home-book-card--clickable {
  cursor: pointer; }

.home-book-card--clickable:focus-visible {
  outline: 2px solid #9aa9c0;
  outline-offset: 2px; }

.home-book-card .book-hero {
  margin-bottom: 0 !important; }

.home-book-card .book-title {
  font-size: clamp(1.8rem, 3vw, 3rem) !important;
  max-width: 32ch; }

.home-book-card .home-book-intro p:last-child {
  margin-bottom: 0; }

@media screen and (min-width: 769px) {
  .home-book-card .book-cover {
    width: 114%;
    max-width: 114%; } }
@media screen and (max-width: 768px) {
  .home-book-card {
    padding: 1rem; } }
:root.night-shift .home-book-card {
  background: #252630 !important;
  border-color: #363846 !important; }

:root.night-shift .home-book-card .book-title {
  color: #f7fafc !important; }

:root.night-shift .home-book-card .book-subtitle {
  color: #cbd5e0 !important; }

:root.night-shift .home-book-card .book-eyebrow {
  color: #a0aec0 !important; }

:root.night-shift .home-book-card .home-book-intro,
:root.night-shift .home-book-card .home-book-intro p {
  color: #cbd5e0 !important; }

/* ========================================
   Book Landing Pages
   ======================================== */
.book-landing .book-landing-container.container {
  width: min(1240px, calc(100% - 2rem));
  max-width: 1240px !important; }

.book-scan-banner {
  border: 1px solid #c6e7ca;
  background: #f5fff3 !important;
  color: #1f3b2a !important;
  margin-bottom: 1.75rem !important; }

.book-scan-banner strong {
  color: #1f3b2a !important; }

.book-scan-banner-text p {
  margin: 0 !important; }

.book-scan-banner-text strong {
  color: #1f3b2a !important; }

.book-hero {
  margin-bottom: 2.25rem !important; }

.book-title {
  font-size: clamp(1.95rem, 3.35vw, 3.65rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.01em;
  max-width: 27ch;
  margin-bottom: 0.8rem !important;
  text-wrap: balance; }

.book-subtitle {
  font-size: clamp(1.2rem, 1.95vw, 2rem) !important;
  line-height: 1.28 !important;
  max-width: 44ch;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
  color: #2f3b52 !important;
  text-wrap: pretty; }

.book-summary-block {
  border-left: none;
  padding-left: 0; }

.book-cover {
  margin: 0; }

.book-cover img,
.book-cover video {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  display: block; }

/* Feature videos (e.g. the series preview) are phone-portrait and taller than
   the 2:3 book cover. Constrain them to the same 2:3 footprint so their height
   matches the book cover; cover-fit fills the frame. */
.book-cover video {
  aspect-ratio: 2 / 3;
  object-fit: cover; }

/* In dark mode the light cover border reads as a harsh outline; soften it. */
:root.night-shift .book-cover img,
:root.night-shift .book-cover video {
  border-color: #363846 !important; }

@media screen and (min-width: 769px) {
  .book-cover {
    width: 112%;
    max-width: 112%;
    margin-left: 0; } }
.book-eyebrow {
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: #4a5568;
  font-weight: 700; }

.book-intro p {
  line-height: 1.7;
  margin-bottom: 0.85rem;
  max-width: 74ch; }

.book-hero-actions {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem; }

.book-hero-actions-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem; }

.book-hero-actions-main .book-hero-button:not(.book-hero-button--icon-only) {
  width: 188px;
  min-width: 188px;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1); }

.book-hero-actions-main .book-hero-button:not(.book-hero-button--icon-only):hover,
.book-hero-actions-main .book-hero-button:not(.book-hero-button--icon-only):focus {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14); }

.book-hero-actions-aux {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0; }

.book-hero-actions-aux .book-hero-button {
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1); }

.book-hero-actions-aux .book-hero-button:hover,
.book-hero-actions-aux .book-hero-button:focus {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14); }

.book-hero-button {
  font-family: "Space Mono", monospace !important;
  border-color: #dbe3ed !important;
  color: #2d3748 !important;
  background-color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  min-height: 2.35rem !important;
  padding: 0.42rem 0.88rem !important;
  transition: all 0.2s ease; }

.book-hero-button--read {
  border-color: #b9daf7 !important;
  background-color: #eef8ff !important;
  color: #194f7a !important; }

.book-hero-button--buy {
  border-color: #cdc0ff !important;
  background-color: #f3eeff !important;
  color: #4f2ea6 !important; }

.book-hero-button--reviews {
  border-color: #f1dfaf !important;
  background-color: #fff8e8 !important;
  color: #775200 !important; }

.book-hero-button--github {
  border-color: #dbe3ed !important;
  background-color: #ffffff !important;
  color: #2d3748 !important; }

.book-hero-button--discord {
  border-color: #dbe3ed !important;
  background-color: #ffffff !important;
  color: #2d3748 !important; }

.book-hero-button .icon i {
  font-size: 1.08rem;
  line-height: 1; }

.book-hero-button--icon-only {
  min-width: 2.35rem;
  width: 2.35rem;
  padding: 0 !important;
  justify-content: center; }

.book-hero-button--icon-only .icon {
  margin-right: 0; }

.book-hero-button:hover,
.book-hero-button:focus {
  border-color: #9aa9c0 !important;
  color: #2d3748 !important;
  background-color: #f5f8fc !important;
  transform: translateY(-1px); }

.book-hero-button--read:hover,
.book-hero-button--read:focus {
  border-color: #90c7f3 !important;
  background-color: #e0f2ff !important;
  color: #0f436d !important; }

.book-hero-button--buy:hover,
.book-hero-button--buy:focus {
  border-color: #b7a3ff !important;
  background-color: #e8ddff !important;
  color: #43238f !important; }

.book-hero-button--reviews:hover,
.book-hero-button--reviews:focus {
  border-color: #e6ce8f !important;
  background-color: #fff1d2 !important;
  color: #624300 !important; }

.book-hero-button--github:hover,
.book-hero-button--github:focus {
  border-color: #9aa9c0 !important;
  background-color: #ffffff !important;
  color: #1f2937 !important; }

.book-hero-button--discord:hover,
.book-hero-button--discord:focus {
  border-color: #9aa9c0 !important;
  background-color: #ffffff !important;
  color: #1f2937 !important; }

.book-chapter-header {
  margin-bottom: 1rem !important;
  align-items: center;
  gap: 0.8rem; }

.book-chapter-header .level-right .tags {
  justify-content: flex-end; }

.book-chapter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem; }

.book-chapter-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%; }

.book-chapter-card {
  height: 100%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }

.book-chapter-card-link:hover .book-chapter-card {
  transform: translateY(-3px);
  border-color: #cbd5e0;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1); }

.book-chapter-image {
  aspect-ratio: 16 / 9;
  background: #f8fafc;
  overflow: hidden; }

.book-chapter-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; }

.book-chapter-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; }

.book-chapter-image--placeholder,
.book-chapter-image--incoming {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a5568;
  font-weight: 700; }

.book-chapter-image--incoming {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%); }

.book-chapter-image--incoming span {
  font-size: 2.5rem;
  color: #2b6cb0; }

.book-chapter-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1; }

.book-chapter-number {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: #718096;
  font-weight: 700; }

.book-chapter-card .title {
  margin: 0 !important;
  color: #1a202c !important; }

.book-chapter-excerpt {
  margin: 0;
  color: #4a5568;
  line-height: 1.55;
  flex: 1; }

.book-chapter-footer {
  margin-top: auto; }

.book-chapter-card--locked {
  border-style: dashed; }

.book-chapter-card--locked .book-chapter-image img {
  filter: saturate(0.85); }

.book-reviews-section {
  margin-top: 2.6rem; }

.book-reviews-header {
  margin-bottom: 0.6rem !important; }

.book-reviews-slider {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0.35rem 0 0;
  box-shadow: none; }

.book-review-slide {
  display: none; }

.book-review-slide.is-active {
  display: block; }

.book-review-quote {
  margin: 0;
  font-size: clamp(0.74rem, 0.98vw, 0.92rem);
  line-height: 1.6;
  color: #243042;
  max-width: 132ch;
  font-style: italic;
  letter-spacing: 0.01em; }

.book-review-name {
  margin: 1rem 0 0;
  font-size: 1.02rem;
  color: #4a5568;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: right;
  width: 100%;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem; }

.book-review-author-icon i {
  font-size: 1rem;
  color: #60718a; }

.book-reviews-controls {
  margin-top: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem; }

.book-reviews-controls-spacer {
  width: 4.8rem;
  height: 1px; }

.book-reviews-nav-group {
  display: flex;
  gap: 0.5rem; }

.book-reviews-nav-group--header {
  align-items: center; }

.book-reviews-nav.button {
  border-radius: 10px !important;
  border: 1px solid #d4deeb !important;
  color: #2d3748 !important;
  background-color: #f8fbff !important;
  width: 2.25rem;
  height: 2.25rem; }

.book-reviews-nav.button:hover {
  border-color: #bfcde0 !important;
  background-color: #edf4fc !important; }

.book-reviews-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem; }

.book-review-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  border: 1px solid #c8d3e4;
  background: #f6f9ff;
  padding: 0;
  cursor: pointer; }

.book-review-dot.is-active {
  background: #4f2ea6;
  border-color: #4f2ea6; }

@media screen and (max-width: 768px) {
  .book-reviews-header.level {
    align-items: center;
    flex-wrap: nowrap; }

  .book-reviews-header .level-left,
  .book-reviews-header .level-right {
    display: flex;
    align-items: center; }

  .book-reviews-slider {
    padding: 0.2rem 0 0; }

  .book-review-quote {
    max-width: 100%;
    font-size: clamp(0.84rem, 3.5vw, 0.98rem); }

  .book-reviews-controls {
    gap: 0.6rem; } }
@media screen and (max-width: 1023px) {
  .book-chapter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media screen and (max-width: 768px) {
  .book-landing .book-landing-container.container {
    width: calc(100% - 1.25rem); }

  .book-title {
    font-size: clamp(1.7rem, 8.2vw, 2.55rem) !important;
    line-height: 1.08 !important;
    max-width: 16.5ch; }

  .book-subtitle {
    font-size: clamp(1.05rem, 4.9vw, 1.35rem) !important;
    max-width: 24ch; }

  .book-summary-block {
    padding-left: 0; }

  .book-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem; }

  .book-hero-actions-main {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem; }

  .book-hero-actions-main .book-hero-button:not(.book-hero-button--icon-only) {
    width: 100%;
    min-width: 0; }

  .book-hero-actions-aux {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start; }

  .book-chapter-grid {
    grid-template-columns: 1fr; } }
:root.night-shift .book-scan-banner {
  border-color: #35523f;
  background: #1f2d24 !important;
  color: #d6e6da !important; }

:root.night-shift .book-scan-banner strong {
  color: #d6e6da !important; }

:root.night-shift .book-scan-banner-text strong {
  color: #d6e6da !important; }

:root.night-shift .book-eyebrow {
  color: #a0aec0 !important; }

:root.night-shift .book-subtitle {
  color: #b8c2d9 !important; }

:root.night-shift .book-summary-block {
  border-left: none !important; }

:root.night-shift .book-hero-button {
  background-color: #ffffff !important;
  color: #2d3748 !important;
  border-color: #dbe3ed !important; }

:root.night-shift .book-hero-button:hover,
:root.night-shift .book-hero-button:focus {
  background-color: #f5f8fc !important;
  color: #2d3748 !important;
  border-color: #9aa9c0 !important; }

:root.night-shift .book-hero-button--read {
  border-color: #b9daf7 !important;
  background-color: #eef8ff !important;
  color: #194f7a !important; }

:root.night-shift .book-hero-button--buy {
  border-color: #cdc0ff !important;
  background-color: #f3eeff !important;
  color: #4f2ea6 !important; }

:root.night-shift .book-hero-button--reviews {
  border-color: #f1dfaf !important;
  background-color: #fff8e8 !important;
  color: #775200 !important; }

:root.night-shift .book-hero-button--github {
  border-color: #dbe3ed !important;
  background-color: #ffffff !important;
  color: #2d3748 !important; }

:root.night-shift .book-hero-button--discord {
  border-color: #dbe3ed !important;
  background-color: #ffffff !important;
  color: #2d3748 !important; }

:root.night-shift .book-reviews-slider {
  background: transparent !important;
  border-color: transparent !important; }

:root.night-shift .book-review-quote {
  color: #ffffff !important; }

:root.night-shift .book-review-name {
  color: #ffffff !important; }

:root.night-shift .book-review-author-icon i {
  color: #ffffff !important; }

:root.night-shift .book-chapter-card {
  background: #252630 !important;
  border-color: #363846 !important; }

:root.night-shift .book-chapter-card-link:hover .book-chapter-card {
  border-color: #4a5568 !important;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.45) !important; }

:root.night-shift .book-chapter-card .title {
  color: #f7fafc !important; }

:root.night-shift .book-chapter-number {
  color: #a0aec0 !important; }

:root.night-shift .book-chapter-excerpt {
  color: #cbd5e0 !important; }

:root.night-shift .book-chapter-image {
  background: #1a1b23 !important; }

:root.night-shift .book-chapter-image--placeholder {
  color: #a0aec0 !important; }

:root.night-shift .book-chapter-image--incoming {
  background: linear-gradient(135deg, #1e293b 0%, #1a2030 100%) !important; }

:root.night-shift .book-chapter-image--incoming span {
  color: #7cb3ef !important; }

/* Peeps comic strips (next-gen comic generator) */
.peeps-comic {
  text-align: center;
  margin: 1.75rem 0; }

/* width:100% (not just max-width) on purpose: the strip is a replaced <img>, and with only
   max-width:100% it resolved its width against the Bulma .column padding-box (24px wider than
   the content box), overflowing on the right on mobile so the rightmost panel got clipped.
   width:100% resolves against the figure's content box, so it caps cleanly. The SVG is 1080px
   wide, always wider than the column, so width:100% only ever downscales (stays crisp). */
.peeps-comic .peeps-strip {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 14px; }

/* Light/dark strip swap. !important: a mobile (<768px) rule un-hides post
   images, which would otherwise stack both themes. */
.peeps-comic .peeps-strip--dark {
  display: none !important; }

:root.night-shift .peeps-comic .peeps-strip--light,
html.night-shift .peeps-comic .peeps-strip--light {
  display: none !important; }

:root.night-shift .peeps-comic .peeps-strip--dark,
html.night-shift .peeps-comic .peeps-strip--dark {
  display: block !important; }

.peeps-comic .peeps-caption {
  margin-top: 10px;
  font-family: 'Architects Daughter', 'Space Mono', monospace;
  font-size: 1rem;
  color: #1a1a1a;
  /* near-black in light mode */
  letter-spacing: 0.02em; }

:root.night-shift .peeps-comic .peeps-caption,
html.night-shift .peeps-comic .peeps-caption {
  color: #ffffff !important;
  /* white in dark mode */ }

/* ========================================
   Book Extras Section (stories / visual extras)
   ======================================== */
.book-extras-section {
  margin-top: 2.5rem; }

.book-extras-header {
  margin-bottom: 1rem !important; }

.book-extras-list {
  display: flex;
  flex-direction: column;
  gap: 1rem; }

.book-extra-card-link {
  text-decoration: none;
  color: inherit;
  display: block; }

.book-extra-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }

.book-extra-card--locked {
  border-style: dashed; }

.book-extra-card-link:hover .book-extra-card {
  transform: translateY(-2px);
  border-color: #cbd5e0;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08); }

.book-extra-image {
  background: #f8fafc;
  overflow: hidden;
  margin: 0; }

.book-extra-image img,
.book-extra-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; }

.book-extra-image--placeholder {
  background: linear-gradient(135deg, #eff6ff 0%, #fdf4ff 100%); }

.book-extra-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: center; }

.book-extra-type {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: #718096;
  font-weight: 700; }

.book-extra-card .title {
  margin: 0 !important;
  color: #1a202c !important; }

.book-extra-excerpt {
  margin: 0;
  color: #4a5568;
  line-height: 1.6;
  font-size: 0.95rem; }

.book-extra-footer {
  margin-top: 0.25rem; }

@media screen and (max-width: 768px) {
  .book-extra-card {
    grid-template-columns: 1fr; }

  .book-extra-image {
    aspect-ratio: 16 / 7; } }
/* Dark mode */
:root.night-shift .book-extra-card {
  background: #252630 !important;
  border-color: #363846 !important; }

:root.night-shift .book-extra-card-link:hover .book-extra-card {
  border-color: #4a5568 !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45) !important; }

:root.night-shift .book-extra-image {
  background: #1a1b23 !important; }

:root.night-shift .book-extra-image--placeholder {
  background: linear-gradient(135deg, #1e293b 0%, #1a2030 100%) !important; }

:root.night-shift .book-extra-card .title {
  color: #f7fafc !important; }

:root.night-shift .book-extra-type {
  color: #a0aec0 !important; }

:root.night-shift .book-extra-excerpt {
  color: #cbd5e0 !important; }

/* ========================================
   Story Layout
   ======================================== */
.story-header {
  margin-bottom: 1.5rem; }

.story-book-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem; }

.story-book-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  text-decoration: none;
  transition: color 0.2s ease; }

.story-book-back:hover {
  color: #2d3748; }

.story-type-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: linear-gradient(135deg, #eff6ff 0%, #fdf4ff 100%);
  border: 1px solid #c3dafe;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3730a3; }

/* Post meta row: date on the left, the Chapter/Episode button on the right. */
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap; }

.post-meta-row .post-meta {
  margin-bottom: 0; }

/* "Chapter N / Episode N" button beside the date — reuses the landing button
   look (.book-hero-button--read), just more compact. */
.post-collection-pill.book-hero-button {
  min-height: 0 !important;
  padding: 0.28rem 0.72rem !important;
  font-size: 0.78rem !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1); }

.post-collection-pill.book-hero-button:hover,
.post-collection-pill.book-hero-button:focus {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14); }

.post-collection-pill .icon i {
  font-size: 0.95rem; }

.story-hero-image {
  margin: 0 0 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0; }

.story-hero-image img {
  width: 100%;
  height: auto;
  display: block; }

.story-title {
  margin-bottom: 0.35rem !important; }

.story-content {
  margin-top: 1.5rem; }

/* Dark mode */
:root.night-shift .story-book-back {
  color: #a0aec0 !important; }

:root.night-shift .story-book-back:hover {
  color: #e2e8f0 !important; }

:root.night-shift .story-type-badge {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d1b69 100%) !important;
  border-color: #4a6fa5 !important;
  color: #a5b4fc !important; }

:root.night-shift .story-hero-image {
  border-color: #363846 !important; }
