/*:root {*/
/*  --bg: #ffffff;*/
/*  --bg-alt: #f5f5f7;*/
/*  --fg: #111111;*/
/*  --muted: #666666;*/
/*  --accent: #0070f3;*/
/*  --border: #e0e0e0;*/
/*  --card-bg: #ffffff;*/
/*  !*#F7F7F5*!*/
/*  --primary: #FF0000;*/
/*  --bold: color-mix(in srgb, var(--primary) 80%, black);*/
/*}*/

/*:root.dark {*/
/*  --bg: #050509;*/
/*  --bg-alt: #101018;*/
/*  --fg: #f5f5f7;*/
/*  --muted: #a0a0b0;*/
/*  --accent: #4ea1ff;*/
/*  --border: #2a2a3a;*/
/*  --card-bg: #14141f;*/
/*  --primary: #00FF00;*/
/*  --bold: color-mix(in srgb, var(--primary) 80%, white);*/
/*}*/

/* LIGHT MODE — warm grayscale, content-first */
:root {
  /* Base neutrals */
  --bg: #F7F7F5; /* main background */
  --fg: #1A1A1A; /* primary text */
  /* Muted text */
  --muted: color-mix(in srgb, var(--fg) 50%, var(--bg));
  /* Accent is neutralized (illustrations carry color identity) */
  --accent: #6A4FA3; /* optional: muted purple if you want links to have identity */
  /* Derived surfaces */
  --bg-alt: color-mix(in srgb, var(--bg) 85%, black); /* header/footer slight contrast */
  --card-bg: color-mix(in srgb, var(--bg) 96%, black); /* blog index cards */
  /* Borders */
  --border: color-mix(in srgb, var(--bg) 70%, black);
  /* Primary brand color for illustrations (purple) */
  --primary: #6A4FA3;
  /* Bold text uses primary but stays readable */
  --bold: color-mix(in srgb, var(--primary) 70%, var(--fg));
  /* Blog heading palette: all shades derive from the brand purple. */
  --heading-strong: color-mix(in srgb, var(--primary) 80%, var(--fg));
  --heading-color: var(--primary);
  --heading-rule: color-mix(in srgb, var(--primary) 35%, var(--bg));
  --heading-surface: color-mix(in srgb, var(--primary) 7%, var(--bg));
}

/* DARK MODE — deep neutral grayscale */
:root.dark {
  --bg: #121212;
  --fg: #E6E6E6;
  --muted: color-mix(in srgb, var(--fg) 55%, var(--bg));
  /* Optional: keep accent same or slightly lighter */
  --accent: #A38ED1;
  /* Derived surfaces */
  --bg-alt: color-mix(in srgb, var(--bg) 80%, white); /* header/footer */
  --card-bg: color-mix(in srgb, var(--bg) 92%, white); /* cards */
  /* Borders */
  --border: color-mix(in srgb, var(--bg) 65%, white);
  /* Primary brand color for illustrations (purple) */
  --primary: #A38ED1;
  /* Bold text mixes primary with white for clarity */
  --bold: color-mix(in srgb, var(--primary) 75%, var(--fg));
}

/*Light mode neutrals*/
/*• Background: #F7F7F5 (soft warm gray)*/
/*• Surface: #E8E8E6*/
/*• Borders: #D0D0CE*/
/*• Text primary: #1A1A1A*/
/*• Text secondary: #555555*/
/*Dark mode neutrals*/
/*• Background: #121212*/
/*• Surface: #1C1C1C*/
/*• Borders: #2A2A2A*/
/*• Text primary: #E6E6E6*/
/*• Text secondary: #A0A0A0*/



*,
*::before,
*::after {
  box-sizing: border-box;
}

body.site-body {
  margin: 0;
  /*font-family: "Gill Sans", "Trebuchet MS", Calibri, sans-serif;*/
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
  Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

  /*font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",*/
  /*  "Segoe UI", sans-serif;*/
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  /*text-decoration: underline;*/
}

.site-header,
.site-footer {
  background: var(--heading-surface);
  border-color: var(--heading-rule);
}

.site-header { border-bottom: 1px solid var(--heading-rule); }
.site-footer { border-top: 1px solid var(--heading-rule); }

.header-inner,
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-right: auto;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--heading-strong);
}

.site-brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 4.5rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--primary);
  color: var(--bg);
}

/* Header variant: fixed sizing and heavier strokes for the miniature topology. */
.site-brand-mark .site-brand-stream { display: block; width: 4rem; height: 2.5rem; }
.site-brand-mark :is(.stream-track, .stream-track-secondary) {
  stroke: currentColor;
  stroke-width: 6;
  opacity: 0.65;
}
.site-brand-mark .stream-packets { fill: currentColor; }
.site-brand-mark .stream-hub { fill: currentColor; }
.site-brand-mark .stream-hub-mark { stroke: var(--primary); stroke-width: 6; }

.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading-strong);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { background: color-mix(in srgb, var(--primary) 12%, transparent); }

.footer-inner { padding-top: 2rem; padding-bottom: 2rem; }
.footer-title { color: var(--heading-strong); font-weight: 650; }
.footer-brand p, .footer-copyright { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.85rem; }
.footer-copyright { white-space: nowrap; }

.site-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.page-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  transition: border-color 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
}

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

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.96);
}

.card-title {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.card-body {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.img-wrapper {
  flex-shrink: 0;
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.single {
  max-width: 1200px;
  margin: 0 auto;
}


.img-breakout {
  width: min(100vw, 1000px);
  margin-left: calc(50% - min(100vw, 1000px) / 2);
}

.img-breakout img {
  width: 100%;
  height: auto;
  display: block;
}



.single-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 3px solid var(--heading-color);
  color: var(--heading-strong);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.single-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.single-content {
  font-size: 1.2rem;
}

/* Blog sections use spacing, weight and purple accents to show hierarchy. */
.single-content :is(h1, h2, h3, h4) {
  margin: 2.25em 0 0.75em;
  color: var(--heading-color);
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  text-wrap: balance;
  scroll-margin-top: 1.5rem;
}

.single-content h1 {
  padding-bottom: 0.45em;
  border-bottom: 3px solid var(--heading-color);
  color: var(--heading-strong);
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
}

.single-content h2 {
  padding: 0.4em 0.65em;
  border-left: 4px solid var(--heading-color);
  border-bottom: 1px solid var(--heading-rule);
  border-radius: 0 0.3rem 0.3rem 0;
  background: var(--heading-surface);
  color: var(--heading-strong);
  font-size: clamp(1.55rem, 3vw, 1.85rem);
}

.single-content h3 {
  padding-left: 0.6em;
  border-left: 3px solid var(--heading-color);
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
}

.single-content h4 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.015em;
}

/* Markdown emphasis in a heading keeps the same visual hierarchy. */
.single-content :is(h1, h2, h3, h4) :is(em, strong) {
  color: inherit;
  font-style: normal;
  font-weight: inherit;
}

.single-content > :is(h1, h2, h3, h4):first-child {
  margin-top: 0;
}

.single-content pre {
  background: var(--bg-alt);
  padding: 0.75rem;
  border-radius: 4px;
  overflow-x: auto;
}

.single-content code {
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.9rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.page-link {
  color: var(--muted);
}

.theme-checkbox {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.theme-toggle-label {
  display: inline-block;
  width: 48px;
  height: 26px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.theme-toggle-ball {
  background-color: #fff;
  width: 20px;
  height: 20px;
  position: absolute;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

:root.dark .theme-toggle-label {
  background: var(--accent);
}

:root.dark .theme-toggle-label .theme-toggle-ball {
  transform: translateX(22px);
}


.old-theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}



strong {
  color: var(--bold);
  font-weight: bold;
}



.fa-moon {color: #f1c40f;}

.fa-sun {color: #f39c12;}

/* Posts landing page: an editorial cover with a stream topology motif. */
.posts-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
  padding: 0.75rem clamp(1.5rem, 4vw, 3rem);
  margin: 0.5rem 0 1.75rem;
  border: 1px solid var(--heading-rule);
  border-radius: 1.25rem;
  background:
    radial-gradient(ellipse at 90% 20%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 65%),
    var(--heading-surface);
}
.posts-eyebrow {
  margin: 0 0 0.85rem;
  color: var(--heading-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.posts-title {
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.posts-title-dot { color: var(--primary); }
.posts-intro {
  max-width: 31rem;
  margin: 0.85rem 0 1.1rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}
.posts-intro p { margin: 0; }
.posts-browse {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--heading-strong);
  font-size: 0.9rem;
  font-weight: 650;
}
.posts-browse span { font-size: 1.5rem; }
/* The SVG viewBox fits the artwork; use .posts-hero padding for outer spacing. */
.stream-art { display: block; width: 100%; height: auto; }
.posts-hero > .stream-art { transform: translateX(-1rem); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.stream-track, .stream-track-secondary {
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.45;
}
.stream-track-secondary { opacity: 0.25; }
.stream-packets { fill: var(--primary); }
.stream-hub-outer { fill: var(--heading-surface); stroke: var(--heading-rule); }
.stream-hub { fill: var(--primary); }
.stream-hub-mark { stroke: var(--bg); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.posts-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--heading-rule);
  scroll-margin-top: 1.5rem;
}
.posts-section-heading h2 { margin: 0; font-size: 1.2rem; letter-spacing: -0.025em; }
.posts-section-heading > span { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
@media (min-width: 1200px) {
  .posts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.post-card {
  padding: 0;
  overflow: hidden;
  border-color: var(--heading-rule);
  border-radius: 1rem;
  background: var(--bg);
}
.post-card:hover {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--fg) 10%, transparent);
}
.post-card .card-link { height: 100%; }
.post-card-image {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 1.25rem;
  overflow: hidden;
  background: var(--heading-surface);
  border-bottom: 1px solid var(--heading-rule);
}
.post-card-image img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.post-card-copy { padding: 1.5rem; }
.post-card .card-meta { margin-bottom: 0.75rem; }
.post-card .card-title { font-size: 1.45rem; line-height: 1.3; letter-spacing: -0.025em; text-wrap: balance; }
.post-card .card-excerpt { margin-top: 0.75rem; line-height: 1.7; }
.post-card-more {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  color: var(--heading-strong);
  font-size: 0.85rem;
  font-weight: 650;
}
.post-card-more > span { font-size: 1.2rem; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.theme-checkbox:focus-visible + .theme-toggle-label { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 0.75rem; }
  .site-title { flex-basis: 100%; }
  .header-inner, .footer-inner { padding-left: 1rem; padding-right: 1rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .site-main { padding: 1.5rem 1rem 3rem; }
  .posts-hero { grid-template-columns: 1fr; gap: 0.5rem; padding-top: 1rem; padding-bottom: 0.5rem; }
  .posts-hero > .stream-art { width: min(100%, 260px); justify-self: center; transform: none; }
  .posts-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .theme-toggle-ball, .theme-toggle-label { transition: none; }
  .card:hover { transform: none; }
}

.single > .img-wrapper img { max-width: 100%; height: auto; }
