/* lostsignals — retro web-1.0 layout, signal-blue CRT theme.
   All themeable values are CSS variables set at runtime by site.js from config. */

:root {
  --accent: #1f6feb;
  --bg: #eef3fb;
  --surface: #ffffff;
  --text: #0b1f3a;
  --muted: #4a5b73;
  --link: #0a51c5;
  --link-visited: #5a3fb0;
  --font: "Courier New", "Lucida Console", monospace;
  --maxw: 940px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0 16px 48px;
  line-height: 1.55;
  font-size: 16px;
}

/* ---- CRT scanline overlay (toggled by .crt on <html>) ---- */
html.crt::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(11, 31, 58, 0.04) 0px,
    rgba(11, 31, 58, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}
html.crt::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(11,31,58,0.06) 100%);
}

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ---- header ---- */
header.site { text-align: center; padding: 22px 0 6px; }
header.site .title {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-shadow: 0 0 1px var(--accent), 0 0 10px rgba(31,111,235,0.35);
  margin: 0;
}
html.flicker header.site .title { animation: crtflicker 4.5s infinite steps(60); }
header.site .logo-link { display: inline-block; text-decoration: none; line-height: 0; }
header.site .logo { height: 72px; max-width: 100%; filter: drop-shadow(0 0 8px rgba(31,111,235,0.35)); }
html.flicker header.site .logo-link { animation: crtflicker 4.5s infinite steps(60); }
@keyframes crtflicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.82; }
  98% { opacity: 1; }
  99% { opacity: 0.9; }
}
header.site .pronouns { font-size: 0.7em; color: var(--muted); vertical-align: super; }
header.site .tagline { color: var(--muted); margin: 4px 0 0; font-size: 0.95rem; }

nav.site { text-align: center; margin: 14px 0 0; }
nav.site a { margin: 0 2px; white-space: nowrap; }
nav.site .sep { color: var(--muted); }
nav.site a[aria-current="page"] { font-weight: 700; text-decoration: none; }

hr.rule { border: 0; border-top: 1px solid var(--accent); opacity: 0.55; margin: 12px 0; }

/* ---- links ---- */
a { color: var(--link); text-underline-offset: 2px; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- main ---- */
main { padding: 18px 0 8px; }
main h2 { color: var(--accent); font-size: 1.4rem; margin: 0 0 4px; }
main p { margin: 0 0 14px; }
.lead { color: var(--muted); margin-bottom: 22px; }

/* home two-column */
.home-grid { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.home-avatar {
  flex: 0 0 260px;
  max-width: 100%;
}
.home-avatar img { width: 100%; display: block; }
.home-intro { flex: 1 1 360px; min-width: 280px; }

/* lists / cards */
.entry {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 12px 16px;
  margin: 0 0 16px;
}
.entry .head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.entry .etitle { font-weight: 700; font-size: 1.08rem; color: var(--text); }
.entry .meta { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.entry .summary { margin: 6px 0 0; }
.entry .body { margin: 10px 0 0; display: none; }
.entry.open .body { display: block; }
.entry .toggle { background: none; border: 0; color: var(--link); cursor: pointer; font-family: inherit; padding: 0; margin-top: 8px; font-size: 0.85rem; }

.badge { display: inline-block; font-size: 0.72rem; padding: 1px 7px; border: 1px solid var(--accent); border-radius: 2px; color: var(--accent); margin-left: 8px; }
.badge.sev-Critical, .badge.sev-High { border-color: #b3261e; color: #b3261e; }
.badge.sev-Medium { border-color: #b07b00; color: #b07b00; }

/* contact + certs */
table.kv { border-collapse: collapse; width: 100%; }
table.kv td { padding: 7px 10px; border-bottom: 1px solid rgba(31,111,235,0.2); vertical-align: top; }
table.kv td.k { color: var(--muted); width: 130px; white-space: nowrap; }

/* ---- footer ---- */
footer.site { text-align: center; color: var(--muted); font-size: 0.9rem; }
footer.site .links { margin: 4px 0; }
footer.site .credits { font-size: 0.8rem; margin-top: 10px; }
footer.site .badges { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
footer.site .badges img { width: 88px; height: 31px; image-rendering: pixelated; border: 0; }

/* utility */
.center { text-align: center; }
.tiny { font-size: 0.8rem; }
#loadstatus { text-align: center; color: var(--muted); padding: 40px 0; }

@media (max-width: 640px) {
  header.site .title { font-size: 2rem; }
  nav.site a { display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
  html.flicker header.site .title,
  html.flicker header.site .logo-link { animation: none; }
}

/* ---- custom 8-bit cursors ---- */
html, body {
  cursor: url('/assets/cursors/cursor-arrow.png') 6 6, auto;
}
a, button, [role="button"], input[type="submit"], input[type="button"],
.clickable, summary, .toggle, .add, .mini, label, select {
  cursor: url('/assets/cursors/cursor-pointer.png') 10 6, pointer;
}
input[type="text"], input[type="email"], input[type="search"],
input[type="url"], input[type="password"], input[type="number"],
input[type="date"], textarea, [contenteditable="true"] {
  cursor: url('/assets/cursors/cursor-text.png') 12 12, text;
}
main p, main li, main td, .entry, .summary, .body, table.kv td {
  cursor: url('/assets/cursors/cursor-text.png') 12 12, text;
}

/* ---- POC burn-link viewer ---- */
.poc-wrap { display: flex; justify-content: center; padding: 8vh 0; }
.poc-card {
  max-width: 560px; width: 100%; background: var(--surface);
  border: 2px solid var(--accent); padding: 26px; text-align: center;
}
.poc-card .poc-logo { height: 54px; margin-bottom: 6px; }
.poc-card h2 { color: var(--accent); margin: 4px 0 8px; }
.poc-card label { display: block; text-align: left; font-size: 0.8rem; color: var(--muted); margin: 14px 0 4px; }
.poc-card input[type="password"] {
  width: 100%; padding: 9px 10px; font-family: var(--font);
  border: 1px solid var(--accent); background: var(--bg); color: var(--text);
}
.poc-card button {
  margin-top: 16px; padding: 10px 18px; cursor: pointer; font-family: var(--font);
  background: var(--accent); color: #fff; border: 0; font-size: 1rem; width: 100%;
}
.poc-msg { min-height: 1.2em; margin: 12px 0 0; font-size: 0.85rem; }
.poc-dead { color: #b3261e; }
.poc-video { width: 100%; margin-top: 14px; border: 1px solid var(--accent); background: #000; }

/* ---- dashboard POC manager ---- */
.poc-out { word-break: break-all; background: var(--bg); border: 1px solid var(--accent); padding: 8px 10px; margin-top: 8px; font-size: 0.85rem; }
.poc-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface); border-left: 3px solid var(--accent); padding: 10px 12px; margin-bottom: 8px; flex-wrap: wrap; }
.poc-row .meta { color: var(--muted); font-size: 0.78rem; }
.poc-row .u { word-break: break-all; font-size: 0.8rem; flex: 1 1 240px; }

/* copy button needs room for its label, unlike the 30px icon buttons */
button.poc-copy { width: auto; min-width: 46px; padding: 0 12px; }
.poc-row .u { min-width: 0; }

/* ---- blog read-more link + individual post page ---- */
.entry .more { display: inline-block; color: var(--link); font-size: 0.85rem; margin-top: 8px; text-decoration: none; }
.entry .more:hover { text-decoration: underline; }
.entry .etitle a { color: var(--text); text-decoration: none; }
.entry .etitle a:hover { color: var(--accent); text-decoration: underline; }
.post { padding-bottom: 12px; }
.post-back { font-size: 0.85rem; }
.post-title { color: var(--accent); font-size: 1.5rem; margin: 6px 0 2px; }
.post-meta { color: var(--muted); font-size: 0.82rem; margin: 0 0 18px; }
.post-body { line-height: 1.7; }
.post-body h1, .post-body h2, .post-body h3 { color: var(--accent); margin: 26px 0 8px; line-height: 1.25; }
.post-body h1 { font-size: 1.5rem; }
.post-body h2 { font-size: 1.25rem; }
.post-body h3 { font-size: 1.08rem; }
.post-body p { margin: 0 0 14px; }
.post-body ul, .post-body ol { margin: 0 0 14px; padding-left: 1.6em; }
.post-body li { margin: 4px 0; }
.post-body blockquote { margin: 0 0 14px; padding: 6px 14px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--muted); }
.post-body hr { border: 0; border-top: 1px solid var(--accent); opacity: 0.4; margin: 22px 0; }
.post-body a { word-break: break-word; }
/* inline code */
.post-body code {
  background: var(--surface); border: 1px solid rgba(31,111,235,0.3);
  padding: 1px 5px; border-radius: 3px; font-size: 0.9em; word-break: break-word;
}
/* fenced code blocks — terminal panel, scrolls inside its own box */
.post-body pre {
  background: #0b1f3a; color: #d6e4ff;
  border: 1px solid var(--accent); border-left: 3px solid var(--accent);
  border-radius: 4px; padding: 14px 16px; margin: 0 0 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  font-size: 0.86rem; line-height: 1.5;
}
.post-body pre code {
  background: none; border: 0; padding: 0; border-radius: 0;
  color: inherit; font-size: inherit; white-space: pre; word-break: normal;
}
