/* ==========================================================================
   cfworx.tech, hand-written stylesheet. No framework, no build tools.
   The only JavaScript on the site is the small title-search script.

   Notes:
   - Light, warm, early-2000s feel. Georgia for reading, Verdana for
     labels and UI, real monospace for terminal output.
   - Accent color is patch-cable blue (#0057b8).
   - The 3px stripe under the header is the T568B pin order:
     wht/org, org, wht/grn, blu, wht/blu, grn, wht/brn, brn.
     Delete the .site-header::after rule to remove it.
   - All color pairs meet WCAG 2.1 AA contrast (most exceed 6:1).
   ========================================================================== */

:root {
  --bg:           #faf9f5;   /* warm paper */
  --ink:          #22201b;   /* near-black, warm */
  --muted:        #63604f;   /* secondary text, 6.0:1 on --bg */
  --link:         #0057b8;   /* ethernet patch-cable blue, 6.4:1 on --bg */
  --link-hover:   #003c80;
  --link-visited: #6a44a8;   /* classic "you've read this" purple */
  --rule:         #ddd8c9;   /* hairlines */
  --box:          #f1efe7;   /* code / quote background */
  --box-border:   #dcd7c6;
  --enet:         #0057b8;

  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans:  Verdana, Geneva, Tahoma, 'DejaVu Sans', sans-serif;
  --mono:  Consolas, 'Cascadia Mono', Menlo, 'DejaVu Sans Mono', monospace;
}

/* ---- base ------------------------------------------------------------- */

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 0 1.05rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  line-height: 1.35;
  overflow-wrap: break-word;
}

p { margin: 0.95em 0; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 1px;
}

::selection { background: #cfe0f5; }

:target { scroll-margin-top: 1.5rem; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

img { max-width: 100%; height: auto; border: 1px solid var(--rule); }

ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

/* ---- skip link (visible on keyboard focus) ----------------------------- */

.skip {
  position: absolute;
  left: -999rem;
  top: 0.5rem;
  z-index: 10;
  background: var(--enet);
  color: #fff;
  padding: 0.55em 1em;
  font: 0.85rem var(--sans);
  text-decoration: none;
}
.skip:focus { left: 0.5rem; }

/* ---- header ------------------------------------------------------------ */

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding-top: 1.35rem;
}

.site-title {
  margin: 0;
  font: 700 1.3rem/1.3 var(--sans);
  letter-spacing: 0.01em;
}
.site-title a { color: var(--ink); text-decoration: none; }
.site-title a:visited { color: var(--ink); }
.site-title a:hover { color: var(--enet); }
.rj45 { color: var(--enet); margin-right: 0.4rem; vertical-align: -0.15em; }

.site-header nav {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font: 0.8rem var(--sans);
}
.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 0.9rem;
  padding: 0.2em 0;
}
.site-header nav a:visited { color: var(--ink); }
.site-header nav a:hover { color: var(--link-hover); text-decoration: underline; }
.site-header nav a[aria-current="page"] {
  font-weight: 700;
  border-bottom: 2px solid var(--enet);
}

.tagline {
  grid-column: 1;
  grid-row: 2;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font: 0.8rem var(--sans);
}

/* T568B pin order, left to right:
   wht/org, org, wht/grn, blu, wht/blu, grn, wht/brn, brn.
   The four wht/x pairs are drawn as real candy stripes (diagonal
   repeating gradients laid over their eighth of the bar); the solid
   wires come from the bottom linear-gradient layer. */
.site-header::after {
  content: "";
  grid-column: 1 / -1;
  height: 5px;
  margin-top: 0.95rem;
  background-color: #fff;
  background-image:
    repeating-linear-gradient(45deg, #d97a1f 0 2px, #fff 2px 4px),  /* 1 wht/org */
    repeating-linear-gradient(45deg, #2f9e44 0 2px, #fff 2px 4px),  /* 3 wht/grn */
    repeating-linear-gradient(45deg, #0057b8 0 2px, #fff 2px 4px),  /* 5 wht/blu */
    repeating-linear-gradient(45deg, #7a4a1f 0 2px, #fff 2px 4px),  /* 7 wht/brn */
    linear-gradient(to right,
      transparent 0 12.5%,
      #d97a1f 12.5% 25%,     /* 2 org */
      transparent 25% 37.5%,
      #0057b8 37.5% 50%,     /* 4 blu */
      transparent 50% 62.5%,
      #2f9e44 62.5% 75%,     /* 6 grn */
      transparent 75% 87.5%,
      #7a4a1f 87.5% 100%     /* 8 brn */
    );
  background-size: 12.5% 100%, 12.5% 100%, 12.5% 100%, 12.5% 100%, 100% 100%;
  background-position: 0 0, 28.5714% 0, 57.1429% 0, 85.7143% 0, 0 0;
  background-repeat: no-repeat;
}

/* ---- home -------------------------------------------------------------- */

.intro { margin-top: 1.6rem; }
.intro p { margin: 0.6em 0; }

.post-block h2,
.year {
  font: 700 0.8rem var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3rem;
  margin: 2.3rem 0 0.65rem;
}
.post-block h2 a,
.post-block h2 a:visited { color: inherit; text-decoration: none; }
.post-block h2 a:hover { color: var(--enet); text-decoration: underline; }

.blurb {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.3rem 0 0.55rem;
}

.more { font: 0.8rem var(--sans); margin: 0.45rem 0 0; }

/* ---- post lists ----------------------------------------------------------
   date / title rows */

.postlist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.postlist li {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.85em;
  align-items: baseline;
  padding: 0.26em 0;
  margin: 0;
}
.postlist time {
  font: 0.78rem/1.6 var(--mono);
  color: var(--muted);
  white-space: nowrap;
}

/* ---- search (home page) --------------------------------------------------
   The wrapper ships hidden; search.js reveals it. Results reuse .postlist. */

.site-search { margin: 1.8rem 0 0; }
.site-search input[type="search"] {
  width: 100%;
  max-width: 24rem;
  font: 0.9rem var(--sans);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--box-border);
  border-radius: 3px;
  padding: 0.5em 0.7em;
}
.search-count {
  font: 0.8rem var(--sans);
  color: var(--muted);
  margin: 0.5rem 0 0;
}

/* tiny inline animated GIFs, the 90s way (see the render-image hook) */
.gif-icon {
  display: inline-block;
  height: 1.15em;
  width: auto;
  border: 0;
  vertical-align: -0.18em;
  image-rendering: pixelated;
}

/* ---- section pages ------------------------------------------------------ */

.subsections {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.4rem;
  font: 0.9rem var(--sans);
}
.subsections li {
  border: 1px solid var(--rule);
  background: var(--box);
  border-radius: 3px;
  padding: 0.45em 0.8em;
  margin: 0.4em 0;
}

/* ---- articles ------------------------------------------------------------ */

.post-header h1 {
  font-size: 1.45rem;
  margin: 1.9rem 0 0.35rem;
}

.post-meta {
  font: 0.8rem var(--sans);
  color: var(--muted);
  margin: 0 0 1.4rem;
}
.post-meta a { color: var(--muted); }
.post-meta a:visited { color: var(--muted); }
.post-meta a:hover { color: var(--link-hover); }

article h2 { font-size: 1.02rem; margin: 2rem 0 0.5rem; }
article h3 { font-size: 0.92rem; margin: 1.7rem 0 0.4rem; }

blockquote {
  margin: 1.1em 0;
  padding: 0.1em 0 0.1em 1rem;
  border-left: 3px solid var(--enet);
  color: #4a463c;
}
blockquote p { margin: 0.5em 0; }

/* code blocks */

pre {
  background: var(--box);
  border: 1px solid var(--box-border);
  border-radius: 3px;
  padding: 0.8rem 1rem;
  overflow-x: auto;
  font: 0.82rem/1.55 var(--mono);
  margin: 1.1em 0;
}
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--box);
  border: 1px solid var(--box-border);
  border-radius: 2px;
  padding: 0.06em 0.3em;
}
pre code {
  font-size: 1em;
  background: none;
  border: 0;
  padding: 0;
}
.highlight { margin: 1.1em 0; }
.highlight pre { margin: 0; }

/* tables */

table {
  border-collapse: collapse;
  font-size: 0.92em;
  margin: 1.1em 0;
}
th {
  font: 700 0.85em var(--sans);
  text-align: left;
  border-bottom: 2px solid var(--ink);
  padding: 0.3em 1em 0.3em 0;
}
td {
  border-bottom: 1px solid var(--rule);
  padding: 0.35em 1em 0.35em 0;
  vertical-align: top;
}

/* prev / next */

.post-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.6rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font: 0.85rem var(--sans);
}
.post-nav .older { margin-left: auto; text-align: right; }

/* ---- footer -------------------------------------------------------------- */

.site-footer {
  margin-top: 3.4rem;
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0 2.4rem;
  color: var(--muted);
  font: 0.78rem/1.9 var(--sans);
}
.site-footer p { margin: 0.2em 0; }
.site-footer a { color: inherit; }
.site-footer a:visited { color: inherit; }
.site-footer a:hover { color: var(--link-hover); }

/* ---- small screens -------------------------------------------------------- */

@media (max-width: 26rem) {
  body { font-size: 1rem; }
  .site-header { grid-template-columns: 1fr; }
  .site-header nav {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    margin-top: 0.45rem;
  }
  .site-header nav a { margin-left: 0; margin-right: 0.9rem; }
}

/* ---- print ----------------------------------------------------------------- */

@media print {
  .skip, .site-header nav, .site-footer, .post-nav { display: none; }
  .site-header::after { display: none; }
  body { max-width: none; color: #000; background: #fff; }
  a, a:visited { color: #000; }
}
/* Chroma syntax-highlighting palette (Hugo's built-in highlighter),
   base: 'tango', with greens/oranges darkened to meet WCAG AA contrast
   on this site's code-block background. Regenerate with:
   hugo gen chromastyles --style=tango   (then re-apply the tweaks) */
/* chroma: PreWrapper */ .chroma { background: transparent; }
/* chroma: Other */ .chroma .x { color: #000000 }
/* chroma: Error */ .chroma .err { color: #a40000 }
/* chroma: CodeLine */ .chroma .cl {  }
/* chroma: LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
/* chroma: LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* chroma: LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* chroma: LineHighlight */ .chroma .hl { background-color: #dfdfdf }
/* chroma: LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* chroma: LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* chroma: Line */ .chroma .line { display: flex; }
/* chroma: Keyword */ .chroma .k { color: #204a87; font-weight: bold }
/* chroma: KeywordConstant */ .chroma .kc { color: #204a87; font-weight: bold }
/* chroma: KeywordDeclaration */ .chroma .kd { color: #204a87; font-weight: bold }
/* chroma: KeywordNamespace */ .chroma .kn { color: #204a87; font-weight: bold }
/* chroma: KeywordPseudo */ .chroma .kp { color: #204a87; font-weight: bold }
/* chroma: KeywordReserved */ .chroma .kr { color: #204a87; font-weight: bold }
/* chroma: KeywordType */ .chroma .kt { color: #204a87; font-weight: bold }
/* chroma: Name */ .chroma .n { color: #000000 }
/* chroma: NameAttribute */ .chroma .na { color: #c4a000 }
/* chroma: NameBuiltin */ .chroma .nb { color: #204a87 }
/* chroma: NameBuiltinPseudo */ .chroma .bp { color: #3465a4 }
/* chroma: NameClass */ .chroma .nc { color: #000000 }
/* chroma: NameConstant */ .chroma .no { color: #000000 }
/* chroma: NameDecorator */ .chroma .nd { color: #5c35cc; font-weight: bold }
/* chroma: NameEntity */ .chroma .ni { color: #a34a00 }
/* chroma: NameException */ .chroma .ne { color: #cc0000; font-weight: bold }
/* chroma: NameFunction */ .chroma .nf { color: #000000 }
/* chroma: NameFunctionMagic */ .chroma .fm { color: #000000 }
/* chroma: NameLabel */ .chroma .nl { color: #f57900 }
/* chroma: NameNamespace */ .chroma .nn { color: #000000 }
/* chroma: NameOther */ .chroma .nx { color: #000000 }
/* chroma: NameProperty */ .chroma .py { color: #000000 }
/* chroma: NameTag */ .chroma .nt { color: #204a87; font-weight: bold }
/* chroma: NameVariable */ .chroma .nv { color: #000000 }
/* chroma: NameVariableClass */ .chroma .vc { color: #000000 }
/* chroma: NameVariableGlobal */ .chroma .vg { color: #000000 }
/* chroma: NameVariableInstance */ .chroma .vi { color: #000000 }
/* chroma: NameVariableMagic */ .chroma .vm { color: #000000 }
/* chroma: Literal */ .chroma .l { color: #000000 }
/* chroma: LiteralDate */ .chroma .ld { color: #000000 }
/* chroma: LiteralString */ .chroma .s { color: #3a7404 }
/* chroma: LiteralStringAffix */ .chroma .sa { color: #3a7404 }
/* chroma: LiteralStringBacktick */ .chroma .sb { color: #3a7404 }
/* chroma: LiteralStringChar */ .chroma .sc { color: #3a7404 }
/* chroma: LiteralStringDelimiter */ .chroma .dl { color: #3a7404 }
/* chroma: LiteralStringDoc */ .chroma .sd { color: #8f5902; font-style: italic }
/* chroma: LiteralStringDouble */ .chroma .s2 { color: #3a7404 }
/* chroma: LiteralStringEscape */ .chroma .se { color: #3a7404 }
/* chroma: LiteralStringHeredoc */ .chroma .sh { color: #3a7404 }
/* chroma: LiteralStringInterpol */ .chroma .si { color: #3a7404 }
/* chroma: LiteralStringOther */ .chroma .sx { color: #3a7404 }
/* chroma: LiteralStringRegex */ .chroma .sr { color: #3a7404 }
/* chroma: LiteralStringSingle */ .chroma .s1 { color: #3a7404 }
/* chroma: LiteralStringSymbol */ .chroma .ss { color: #3a7404 }
/* chroma: LiteralNumber */ .chroma .m { color: #0000cf; font-weight: bold }
/* chroma: LiteralNumberBin */ .chroma .mb { color: #0000cf; font-weight: bold }
/* chroma: LiteralNumberFloat */ .chroma .mf { color: #0000cf; font-weight: bold }
/* chroma: LiteralNumberHex */ .chroma .mh { color: #0000cf; font-weight: bold }
/* chroma: LiteralNumberInteger */ .chroma .mi { color: #0000cf; font-weight: bold }
/* chroma: LiteralNumberIntegerLong */ .chroma .il { color: #0000cf; font-weight: bold }
/* chroma: LiteralNumberOct */ .chroma .mo { color: #0000cf; font-weight: bold }
/* chroma: Operator */ .chroma .o { color: #a34a00; font-weight: bold }
/* chroma: OperatorWord */ .chroma .ow { color: #204a87; font-weight: bold }
/* chroma: Punctuation */ .chroma .p { color: #000000; font-weight: bold }
/* chroma: Comment */ .chroma .c { color: #8f5902; font-style: italic }
/* chroma: CommentHashbang */ .chroma .ch { color: #8f5902; font-style: italic }
/* chroma: CommentMultiline */ .chroma .cm { color: #8f5902; font-style: italic }
/* chroma: CommentSingle */ .chroma .c1 { color: #8f5902; font-style: italic }
/* chroma: CommentSpecial */ .chroma .cs { color: #8f5902; font-style: italic }
/* chroma: CommentPreproc */ .chroma .cp { color: #8f5902; font-style: italic }
/* chroma: CommentPreprocFile */ .chroma .cpf { color: #8f5902; font-style: italic }
/* chroma: Generic */ .chroma .g { color: #000000 }
/* chroma: GenericDeleted */ .chroma .gd { color: #a40000 }
/* chroma: GenericEmph */ .chroma .ge { color: #000000; font-style: italic }
/* chroma: GenericError */ .chroma .gr { color: #ef2929 }
/* chroma: GenericHeading */ .chroma .gh { color: #000080; font-weight: bold }
/* chroma: GenericInserted */ .chroma .gi { color: #00a000 }
/* chroma: GenericOutput */ .chroma .go { color: #000000; font-style: italic }
/* chroma: GenericPrompt */ .chroma .gp { color: #8f5902 }
/* chroma: GenericStrong */ .chroma .gs { color: #000000; font-weight: bold }
/* chroma: GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold }
/* chroma: GenericTraceback */ .chroma .gt { color: #a40000; font-weight: bold }
/* chroma: GenericUnderline */ .chroma .gl { color: #000000; text-decoration: underline }
/* chroma: TextWhitespace */ .chroma .w { color: #f8f8f8; text-decoration: underline }
