/* 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); }
@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;
  image-rendering: pixelated;
  border: 2px solid var(--accent);
  background: var(--surface);
  padding: 10px;
  max-width: 100%;
}
.home-avatar img { width: 100%; display: block; image-rendering: pixelated; }
.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 { animation: none; }
}
