/* Self-hosted (latin, variable) so no visitor request goes to a font CDN. */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/fonts/inter.woff2") format("woff2-variations"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/fonts/inter-tight.woff2") format("woff2-variations"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800; src: url("/fonts/jetbrains-mono.woff2") format("woff2-variations"); }

/* sogaard.us — prototype v2, "high tech". AgentParley's deep-sea palette pushed toward a technical console:
   sans display type, mono everywhere data lives, chart grid, HUD corner marks, live agent-network diagram. */

:root {
  color-scheme: dark;
  --bg: #040d16;
  --bg-2: #061320;
  --surface: #08182a;
  --surface-2: #0b1f33;
  --surface-tint: #0d2537;
  --line: #13283c;
  --line-2: #1d3650;
  --text: #e4eef7;
  --text-tint: #b8d4e6;
  --muted: #8399ac;
  --faint: #4b6a84;
  --accent: #38bdf8;
  --accent-hover: #6ad3ff;
  --accent-glow: rgba(56,189,248,.35);
  --on-accent: #031019;
  --link: #7dd8ff;
  --ok: #3ecf8e;
  --warn: #d99e3f;
  --pennant: #e5484d;
  --code-bg: #050f1a;
  --grid: rgba(56,189,248,.055);
  --shadow: 0 30px 70px -30px rgba(0,0,0,.8);
  --col: 1200px;
  --prose: 700px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 60px;
  --display: "Inter Tight", Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fa;
  --bg-2: #eaf0f5;
  --surface: #ffffff;
  --surface-2: #f6f9fb;
  --surface-tint: #e9f5fc;
  --line: #dbe4ec;
  --line-2: #c6d3de;
  --text: #0b1a28;
  --text-tint: #23394d;
  --muted: #50657a;
  --faint: #8295a7;
  --accent: #0a84c6;
  --accent-hover: #0870a8;
  --accent-glow: rgba(10,132,198,.2);
  --on-accent: #ffffff;
  --link: #0a75b0;
  --ok: #138a59;
  --warn: #a8701a;
  --code-bg: #0b1a28;
  --grid: rgba(10,60,100,.06);
  --shadow: 0 24px 50px -28px rgba(10,30,50,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 56px 56px; background-attachment: fixed; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }
.wrap { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--link); display: inline-flex; gap: 10px; align-items: center; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
@media (max-width: 760px) { .hide-sm { display: none !important; } }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; height: var(--nav-h); display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand .path { font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--faint); }
.mark { position: relative; width: 20px; height: 24px; flex: none; }
.mark::before { content: ""; position: absolute; left: 2px; top: 0; width: 2px; height: 24px; background: var(--faint); border-radius: 1px; }
.mark::after { content: ""; position: absolute; left: 4px; top: 2px; width: 14px; height: 10px; background: var(--pennant);
  clip-path: polygon(0 0, 100% 20%, 78% 50%, 100% 80%, 0 100%); transform-origin: left center; animation: pennant 2.8s ease-in-out infinite; }
@keyframes pennant { 0%,100% { transform: skewY(-6deg); } 50% { transform: skewY(5deg) scaleX(.92); } }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.kbd { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 10px; display: inline-flex; gap: 8px; align-items: center; background: var(--surface); }
.kbd b { font-weight: 500; font-size: 11px; color: var(--faint); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; }
.theme-btn { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 14px; }
.theme-btn:hover { color: var(--text); border-color: var(--accent); }

.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; padding: 11px 18px; border-radius: 8px; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 30px -8px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); box-shadow: 0 0 0 1px var(--accent-hover), 0 10px 36px -6px var(--accent-glow); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* hero */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 70% at 78% 45%, var(--accent-glow), transparent 70%), radial-gradient(40% 50% at 10% 0%, rgba(229,72,77,.07), transparent 70%); opacity: .55; }
.hero-inner { max-width: var(--col); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(56px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 650; font-size: clamp(40px, 5.2vw, 68px); line-height: 1.02; letter-spacing: -.035em; margin: 22px 0 20px; }
.hero h1 .hl { background: linear-gradient(90deg, var(--accent), #a5e4ff 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .hero h1 .hl { background: linear-gradient(90deg, #0a84c6, #0a5f91); -webkit-background-clip: text; background-clip: text; }
.hero .lede { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.6; color: var(--text-tint); max-width: 520px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-byline { display: flex; align-items: center; gap: 14px; margin-top: 36px; font-size: 14px; color: var(--muted); }
.hero-byline b { color: var(--text); font-weight: 600; }
.avatar { width: 46px; height: 46px; border-radius: 10px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 650; font-size: 19px; color: var(--link);
  background: linear-gradient(145deg, var(--surface-tint), var(--surface)); border: 1px solid var(--line-2); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .hero-inner { grid-template-columns: minmax(0, 1fr); } .hero-byline div:last-child { min-width: 0; } }

.live-pill { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 10px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--muted); }
.live-pill b { color: var(--text); font-weight: 500; }
.live-pill .tagx { font-family: var(--mono); font-size: 11px; color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); border-radius: 99px; padding: 1px 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* the live agent-network console */
.console { position: relative; border: 1px solid var(--line-2); border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); box-shadow: var(--shadow); }
.console::before, .console::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--accent); pointer-events: none; }
.console::before { left: -6px; top: -6px; border-right: 0; border-bottom: 0; }
.console::after { right: -6px; bottom: -6px; border-left: 0; border-top: 0; }
.console-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.console-bar .t { color: var(--text-tint); }
.console-bar .r { margin-left: auto; display: flex; gap: 8px; align-items: center; color: var(--ok); }
.net { display: block; width: 100%; height: auto; }
.net text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.net .lbl { fill: var(--text); font-size: 12px; }
.net .edge { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 5 6; opacity: .65; animation: march 1.6s linear infinite; }
.net .edge.dim { opacity: .25; animation-duration: 3s; }
@keyframes march { to { stroke-dashoffset: -22; } }
.net .node { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.net .core { fill: var(--accent); filter: drop-shadow(0 0 8px var(--accent)); }
.net .ring { fill: none; stroke: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; animation: ring 2.6s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
.net .pkt { fill: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }
.log { border-top: 1px solid var(--line); padding: 10px 14px 12px; font-family: var(--mono); font-size: 12px; line-height: 1.75; height: 118px; overflow: hidden; }
.log div { display: flex; gap: 10px; white-space: nowrap; overflow: hidden; animation: logIn .35s ease-out both; }
.log .ts { color: var(--faint); }
.log .tool { color: var(--link); }
.log .ok { color: var(--ok); }
.log .warn { color: var(--warn); }
.log .m { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
@keyframes logIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* product strip */
.strip { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.pillars { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }
.pillars-in { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.pillar { display: flex; flex-direction: column; gap: 6px; padding: 22px; color: var(--text); border-right: 1px solid var(--line); position: relative; transition: background .2s; }
.pillar:hover { background: color-mix(in srgb, var(--surface-tint) 70%, transparent); color: var(--text); }
.pillar::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--p); box-shadow: 0 0 14px var(--p); opacity: 0; transition: opacity .2s; }
.pillar:hover::before { opacity: 1; }
.pillar .row { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.pillar .row .st { display: inline-flex; gap: 6px; align-items: center; color: var(--ok); }
.pillar .row .st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.pillar h3 { font-family: var(--display); font-size: 17px; font-weight: 650; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pillar h3 i { width: 8px; height: 8px; border-radius: 2px; background: var(--p); box-shadow: 0 0 8px var(--p); display: inline-block; }
.pillar p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.pillar .go { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.pillar:hover .go { color: var(--link); }
@media (max-width: 980px) { .pillars-in { grid-template-columns: 1fr 1fr; } .pillar:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .pillars-in { grid-template-columns: 1fr; } .pillar + .pillar { border-top: 1px solid var(--line); } }

/* sections */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--display); font-weight: 650; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -.03em; margin-top: 12px; }
.section-head p { color: var(--muted); max-width: 520px; margin-top: 10px; }
.read-more { font-family: var(--mono); font-size: 13px; color: var(--link); }

/* posts */
.featured { display: grid; grid-template-columns: 1.1fr 1fr; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.featured:hover { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px -30px var(--accent-glow); }
.featured .thumb { border-right: 1px solid var(--line); background: #f4f1ea; border-radius: 11px 0 0 11px; overflow: hidden; }
.featured .thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured .body { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.featured h3 { font-family: var(--display); font-weight: 650; font-size: clamp(26px, 2.5vw, 34px); line-height: 1.1; letter-spacing: -.025em; }
.featured p { color: var(--text-tint); line-height: 1.65; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.meta .tag { color: var(--link); }
.meta .tag::before { content: "#"; opacity: .6; }
@media (max-width: 860px) { .featured { grid-template-columns: 1fr; } .featured .thumb { border-right: 0; border-bottom: 1px solid var(--line); border-radius: 11px 11px 0 0; } }

.ls { margin-top: 28px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); padding-bottom: 10px; }
.ls b { color: var(--ok); font-weight: 400; }
.post-list { border-top: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 44px 120px 1fr auto; gap: 20px; align-items: baseline; padding: 20px 8px; border-bottom: 1px solid var(--line); color: var(--text); transition: background .15s; }
.post-row:hover { color: var(--text); background: color-mix(in srgb, var(--surface-tint) 50%, transparent); }
.post-row:hover h3 { color: var(--link); }
.post-row .idx { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.post-row h3 { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.3; letter-spacing: -.015em; transition: color .15s; }
.post-row p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.post-row .when, .post-row .mins { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.scheduled { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--warn); border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
@media (max-width: 700px) { .post-row { grid-template-columns: 1fr; gap: 4px; } .post-row .idx, .post-row .mins { display: none; } }

.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { font-family: var(--mono); font-size: 12.5px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); background: var(--surface); }
.topic::before { content: "#"; color: var(--faint); margin-right: 2px; }
.topic span { color: var(--faint); margin-left: 8px; }
.topic:hover { border-color: var(--accent); color: var(--text); }

/* about */
.about { display: grid; grid-template-columns: 200px 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(28px, 4vw, 44px); border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.portrait { aspect-ratio: 4/5; border-radius: 10px; background: linear-gradient(145deg, var(--surface-tint), var(--bg)); border: 1px solid var(--line-2); display: grid; place-items: center;
  font-family: var(--display); font-weight: 650; font-size: 64px; color: var(--link); position: relative; overflow: hidden; }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(56,189,248,.08) 50%); background-size: 100% 4px; pointer-events: none; }
.portrait small { position: absolute; bottom: 10px; font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: .1em; }
.about h2 { font-family: var(--display); font-weight: 650; font-size: clamp(28px, 3vw, 36px); letter-spacing: -.03em; line-height: 1.1; margin: 12px 0 12px; }
.about p { color: var(--text-tint); max-width: 640px; }
.about .links { display: flex; gap: 18px; margin-top: 20px; font-family: var(--mono); font-size: 13px; flex-wrap: wrap; }
.spec { margin-top: 18px; display: grid; max-width: 640px; }
.spec div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--text-tint); }
.spec div span:first-child { font-family: var(--mono); font-size: 12px; color: var(--faint); padding-top: 2px; }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; } .portrait { max-width: 180px; } .spec div { grid-template-columns: 1fr; gap: 2px; } }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 28px; color: var(--muted); font-size: 14px; background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.footer a { color: var(--muted); display: block; padding: 3px 0; }
.footer a:hover { color: var(--text); }
.statusbar { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.statusbar .ok { color: var(--ok); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------------- article ---------------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); z-index: 40; }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.crumbs a { color: var(--muted); }
.article-head { max-width: 900px; margin: 0 auto; padding: clamp(48px, 7vw, 84px) var(--gutter) 34px; }
.article-head h1 { font-family: var(--display); font-weight: 650; font-size: clamp(38px, 5vw, 60px); line-height: 1.03; letter-spacing: -.035em; margin: 18px 0; }
.article-head .dek { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--text-tint); }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.byline b { color: var(--text); font-weight: 600; display: block; }
.share { margin-left: auto; display: flex; gap: 8px; }
.share a { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); font-size: 13px; background: var(--surface); }
.share a:hover { border-color: var(--accent); color: var(--text); }
.cover { max-width: 1080px; margin: 0 auto 8px; padding: 0 var(--gutter); }
.cover img { width: 100%; border-radius: 12px; border: 1px solid var(--line-2); background: #f4f1ea; }

.article-grid { display: grid; grid-template-columns: 1fr minmax(0, var(--prose)) 1fr; gap: 48px; max-width: 1260px; margin: 0 auto; padding: 48px var(--gutter) 0; }
.toc { position: sticky; top: 92px; align-self: start; justify-self: end; width: 210px; font-size: 13px; }
.toc h4 { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--faint); font-weight: 500; }
.toc a { display: flex; gap: 10px; padding: 6px 0 6px 12px; border-left: 1px solid var(--line-2); color: var(--muted); line-height: 1.4; }
.toc a span { font-family: var(--mono); font-size: 11px; color: var(--faint); padding-top: 1px; }
.toc a.on, .toc a:hover { color: var(--text); border-left-color: var(--accent); }
.toc a.on span { color: var(--link); }
.side-cta { position: sticky; top: 92px; align-self: start; width: 230px; padding: 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-size: 13.5px; color: var(--muted); }
.side-cta b { display: block; color: var(--text); font-size: 15px; margin: 10px 0 6px; font-family: var(--display); }
.side-cta .btn { margin-top: 14px; width: 100%; justify-content: center; }
@media (max-width: 1180px) { .article-grid { grid-template-columns: minmax(0, var(--prose)); justify-content: center; } .toc, .side-cta { display: none; } }

.prose { font-size: 17.5px; line-height: 1.78; color: var(--text); }
.prose > * + * { margin-top: 1.25em; }
.prose p { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.prose h2 { font-family: var(--display); font-weight: 650; font-size: 30px; line-height: 1.15; letter-spacing: -.03em; margin-top: 2.2em; display: flex; gap: 14px; align-items: baseline; }
.prose h2 .n { font-family: var(--mono); font-size: 14px; font-weight: 400; color: var(--link); letter-spacing: 0; }
.prose h3 { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 1.8em; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--link); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 24px; }
.prose li + li { margin-top: .45em; }
.prose li::before { content: "▸"; position: absolute; left: 2px; color: var(--accent); font-size: .85em; top: .1em; }
.prose figure { margin: 2em 0; }
.prose blockquote { margin: 1.8em 0; padding: 18px 22px; border: 1px solid var(--line-2); border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--surface-tint); font-family: var(--display); font-weight: 550; font-size: 22px; line-height: 1.4; letter-spacing: -.015em; color: var(--text); }
.prose code { font-family: var(--mono); font-size: .84em; padding: 2px 6px; border-radius: 5px; background: var(--surface-tint); border: 1px solid var(--line); color: var(--link); }
.prose hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); margin: 2.6em 0; }
.callout { border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 16px 20px; font-size: 16px; line-height: 1.6; display: grid; grid-template-columns: 4px 1fr; gap: 16px; }
.callout::before { content: ""; background: var(--p, var(--accent)); border-radius: 2px; box-shadow: 0 0 10px var(--p, var(--accent)); }
.callout .eyebrow { display: inline-flex; margin-bottom: 6px; font-size: 11px; }
.callout p { color: var(--text-tint) !important; margin-top: 4px; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; border: 1px solid var(--line-2); }
.compare th, .compare td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.compare th { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 500; background: var(--surface); border-top: 0; }
.compare td:first-child { font-family: var(--mono); font-size: 13.5px; color: var(--link); white-space: nowrap; }

.frame { border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--faint); }
.frame-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.frame-bar span { margin-left: 8px; }
.frame img { width: 100%; background: #f4f1ea; }
.cap { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.cap .fig { color: var(--link); margin-right: 10px; }

.code { border: 1px solid var(--line-2); border-radius: 10px; background: var(--code-bg); overflow: hidden; font-family: var(--mono); font-size: 13.5px; }
.code .head { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid #13283c; font-size: 11px; color: #4b6a84; }
.code pre { margin: 0; padding: 14px; overflow-x: auto; line-height: 1.7; color: #b8d4e6; }
.code .k { color: #7dd8ff; } .code .s { color: #3ecf8e; } .code .c { color: #4b6a84; }

.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; margin-top: 56px; padding: 24px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.author-box .avatar { width: 64px; height: 64px; font-size: 26px; }
.author-box b { font-family: var(--display); font-size: 17px; }
.author-box p { font-size: 15px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related a { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--text); }
.related a:hover { border-color: var(--accent); color: var(--text); }
.related h3 { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.3; letter-spacing: -.015em; }
@media (max-width: 860px) { .related { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .log .m { display: none; } .console-bar span:nth-child(2) { display: none; } }

/* ---- v3: about Kasper ---- */
.hero-id { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.hero-photo { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 40px -6px var(--accent-glow); flex: none; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-id .role { font-family: var(--mono); font-size: 13px; color: var(--muted); line-height: 1.6; }
.hero-id .role b { color: var(--text); font-weight: 500; }
.hero h1.name { font-size: clamp(44px, 6vw, 80px); margin: 18px 0 18px; }
.creds { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.cred { padding: 22px; border-right: 1px solid var(--line); }
.cred .big { font-family: var(--display); font-weight: 650; font-size: clamp(30px, 3vw, 40px); letter-spacing: -.03em; line-height: 1; color: var(--text); }
.cred .big small { font-size: .5em; color: var(--link); margin-left: 4px; letter-spacing: 0; }
.cred p { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) { .creds { grid-template-columns: 1fr 1fr; } .cred:nth-child(n+3) { border-top: 1px solid var(--line); } }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 18px 22px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--muted); letter-spacing: -.01em; }
.logos .lbl { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-right: 6px; }
.story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.story .prose-sm p { color: var(--text-tint); font-size: 17px; line-height: 1.75; }
.story .prose-sm p + p { margin-top: 1em; }
.story .prose-sm .pull { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.3; letter-spacing: -.02em; color: var(--text); border-left: 2px solid var(--accent); padding-left: 18px; margin: 1.4em 0; }
@media (max-width: 900px) { .story { grid-template-columns: minmax(0, 1fr); } }
.timeline { position: relative; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); padding: 8px 0; }
.tl { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 20px; position: relative; }
.tl + .tl { border-top: 1px solid var(--line); }
.tl .dot { width: 12px; height: 12px; margin: 6px auto 0; border-radius: 50%; border: 1.5px solid var(--c, var(--faint)); background: var(--surface); box-shadow: 0 0 10px color-mix(in srgb, var(--c, transparent) 60%, transparent); }
.tl b { font-family: var(--display); font-weight: 650; font-size: 16px; letter-spacing: -.01em; display: block; }
.tl span { font-size: 14px; color: var(--muted); }
.tl .k { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.net .past { stroke: var(--faint); }
.net .edge.out { stroke: var(--faint); opacity: .5; }

/* ---- v3: calmer ---- */
.v3 .hero-inner { padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(40px, 5vw, 64px); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.v3 .hero h1.name { font-size: clamp(42px, 5.4vw, 72px); margin: 0 0 6px; }
.v3 .tagline { font-family: var(--mono); font-size: 14px; color: var(--link); margin-bottom: 22px; }
.v3 .me { display: flex; gap: 22px; align-items: center; }
.v3 .hero-photo { width: 104px; height: 104px; border-radius: 20px; }
.v3 .console .net { padding: 6px 4px 2px; }
.v3 .console .foot { border-top: 1px solid var(--line); padding: 10px 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 10px; white-space: nowrap; overflow: hidden; }
.v3 .console .foot .ok { color: var(--ok); }
.v3 .creds-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 26px; padding: 18px 0; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--muted); }
.v3 .creds-line .lbl { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.v3 .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.v3 .two p { color: var(--text-tint); font-size: 17px; line-height: 1.75; }
.v3 .two p + p { margin-top: 1em; }
.v3 .cos { display: grid; gap: 0; border-top: 1px solid var(--line); }
.v3 .co { display: grid; grid-template-columns: 10px 130px 1fr auto; gap: 14px; align-items: baseline; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.v3 .co:hover { color: var(--text); background: color-mix(in srgb, var(--surface-tint) 50%, transparent); }
.v3 .co i { width: 8px; height: 8px; border-radius: 2px; background: var(--p); box-shadow: 0 0 8px var(--p); align-self: center; }
.v3 .co b { font-family: var(--display); font-weight: 650; }
.v3 .co span { color: var(--muted); font-size: 14.5px; }
.v3 .co em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.v3 .posts { border-top: 1px solid var(--line); }
.v3 .post { display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: baseline; padding: 18px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.v3 .post:hover { color: var(--text); background: color-mix(in srgb, var(--surface-tint) 50%, transparent); }
.v3 .post:hover h3 { color: var(--link); }
.v3 .post h3 { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.015em; }
.v3 .post time, .v3 .post .meta { font-family: var(--mono); font-size: 12px; color: var(--faint); }
@media (max-width: 860px) { .v3 .two { grid-template-columns: minmax(0,1fr); } .v3 .hero-inner { grid-template-columns: minmax(0,1fr); } .v3 .co { grid-template-columns: 10px 1fr; } .v3 .co span, .v3 .co em { grid-column: 2; } .v3 .post { grid-template-columns: 1fr; gap: 4px; } }
.v3 .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.v3 .card { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface); color: var(--text); transition: border-color .2s, box-shadow .2s, transform .2s; }
.v3 .card:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px -28px var(--accent-glow); transform: translateY(-2px); }
.v3 .card .img { aspect-ratio: 16 / 9; background: #f4f1ea; border-bottom: 1px solid var(--line); overflow: hidden; }
.v3 .card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.v3 .card:hover .img img { transform: scale(1.03); }
.v3 .card .b { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.v3 .card h3 { font-family: var(--display); font-weight: 650; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.v3 .card p { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.v3 .card.lead { grid-column: span 3; flex-direction: row; }
.v3 .card.lead .img { flex: 1.2; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); }
.v3 .card.lead .b { flex: 1; padding: clamp(22px, 3vw, 40px); justify-content: center; }
.v3 .card.lead h3 { font-size: clamp(24px, 2.4vw, 32px); }
.v3 .card.lead p { font-size: 16px; color: var(--text-tint); }
@media (max-width: 900px) { .v3 .cards { grid-template-columns: minmax(0,1fr); } .v3 .card.lead { grid-column: auto; flex-direction: column; } .v3 .card.lead .img { aspect-ratio: 16/9; border-right: 0; border-bottom: 1px solid var(--line); } }


/* Anime concept: LoreStage's method (painted hero with the guide on the right third, a day/night pair, a cut-out
   pose beside a section) on top of the v3 layout. */
:root { --art: url("/img/hero-night.webp"); --wash: linear-gradient(90deg, rgba(4,13,22,.94) 0%, rgba(4,13,22,.8) 32%, rgba(4,13,22,.15) 58%, rgba(4,13,22,0) 72%), linear-gradient(0deg, var(--bg) 0%, rgba(4,13,22,0) 22%); }
:root[data-theme="light"] { --art: url("/img/hero-day.webp"); --wash: linear-gradient(90deg, rgba(244,247,250,.95) 0%, rgba(244,247,250,.82) 32%, rgba(244,247,250,.15) 58%, rgba(244,247,250,0) 72%), linear-gradient(0deg, var(--bg) 0%, rgba(244,247,250,0) 22%); }
body { background-image: none; }
.ahero { position: relative; isolation: isolate; overflow: hidden; min-height: max(600px, calc(100vw * 9 / 21)); display: flex; align-items: center; }
.ahero-art { position: absolute; inset: 0; z-index: -2; background: var(--art) right top / cover no-repeat; animation: settle 1.8s ease-out both; }
.ahero-art::after { content: ""; position: absolute; inset: 0; background: var(--wash); }
@keyframes settle { from { transform: scale(1.05); } to { transform: none; } }
.motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.motes i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #7dd8ff; box-shadow: 0 0 10px #38bdf8; opacity: 0; animation: mote 7s linear infinite; }
@keyframes mote { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-160px); opacity: 0; } }
.ahero-inner { width: 100%; max-width: var(--col); margin: 0 auto; padding: 32px var(--gutter) 72px; }
.ahero-copy { max-width: 560px; }
.ahero h1 { font-family: var(--display); font-weight: 650; font-size: clamp(46px, 6vw, 84px); line-height: .98; letter-spacing: -.04em; margin: 18px 0 18px; }
.ahero h1 .hl { background: linear-gradient(90deg, var(--accent), #a5e4ff 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .ahero h1 .hl { background: linear-gradient(90deg, #0a84c6, #0a5f91); -webkit-background-clip: text; background-clip: text; }
.ahero .tagline { font-family: var(--mono); font-size: 14px; color: var(--link); }
.ahero .lede { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--text-tint); }
.ahero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.ahero .ticker { margin-top: 36px; display: inline-flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 99px; background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(6px); }
.ahero .ticker b { color: var(--ok); font-weight: 400; }
@media (max-width: 860px) {
  .ahero { min-height: 0; align-items: flex-end; }
  .ahero-art { background-position: 84% top; background-size: auto 340px; background-color: var(--bg); }
  .ahero-art::after { background: linear-gradient(180deg, transparent 0%, transparent 62%, var(--bg) 80%); }
  .ahero-inner { padding-top: 330px; }
}
.about-a { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
.about-a .wave { align-self: end; margin-bottom: -1px; }
.about-a .wave img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.about-a p { color: var(--text-tint); font-size: 17px; line-height: 1.75; }
.about-a p + p { margin-top: 1em; }
.about-a .cos { align-self: center; }
@media (max-width: 900px) { .about-a { grid-template-columns: minmax(0,1fr); } .about-a .wave { display: none; } .about-a > div { padding-bottom: 0 !important; } .section-head h2 { margin-bottom: 12px; } }
.v3 .card .img.paint { background: #071420; }
.concept-note { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--faint); }

.footbar { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-family: var(--mono); font-size: 12.5px; }
.footbar a { display: inline; }
.footbar span:first-child { color: var(--faint); }
.footbar .ok { margin-left: auto; color: var(--ok); }
.rule-line { border-top: 1px solid var(--line); }
.footer { margin-top: 24px; }
.ahero { min-height: max(560px, calc(100vw * 9 / 21 - 60px)); }
.prose figure .frame img { width: 100%; height: auto; }
.byline .mono a { color: var(--muted); }
.side-cta b { font-size: 16px; }
.cards:has(> .card:only-child) .card.lead { grid-column: 1 / -1; }

/* Logo: a small "KS" monogram badge in the site's cyan (replaces the borrowed red pennant). */
.mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--link); font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: -.02em;
  box-shadow: 0 0 14px -4px var(--accent-glow); }
.mark::before, .mark::after { content: none; display: none; }

/* Readable small text (WCAG AA): the faint grey was too faint for captions and labels. */
:root { --faint: #7590a8; }
:root[data-theme="light"] { --faint: #5b6e82; }
/* Phones and small screens get the 1200 px copy of the painting. */
@media (max-width: 1200px) {
  :root { --art: url("/img/hero-night-1200.webp"); }
  :root[data-theme="light"] { --art: url("/img/hero-day-1200.webp"); }
}
.share a svg { display: block; }
.about-a .links { display: flex; gap: 18px; margin-top: 18px; font-family: var(--mono); font-size: 13px; flex-wrap: wrap; }
.author-box .links { font-family: var(--mono); font-size: 12.5px; margin-top: 10px; }

/* /marketing/posts */
.marketing { padding-block: clamp(40px, 6vw, 72px); }
.marketing .section-head p { color: var(--muted); max-width: 70ch; }
.mhead { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--link); margin: 36px 0 14px; font-weight: 500; }
.mpost { border-top: 1px solid var(--line); padding: 22px 0 26px; display: grid; gap: 14px; }
.mtop { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.mtop img { width: 240px; height: auto; border-radius: 8px; border: 1px solid var(--line-2); }
.mtop h2 { font-family: var(--display); font-weight: 650; font-size: 21px; letter-spacing: -.015em; line-height: 1.25; }
.mlink { margin-top: 6px; font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.pill { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 11.5px; border-radius: 99px; padding: 2px 10px; border: 1px solid currentColor; }
.pill.sched { color: var(--warn); } .pill.draft { color: var(--muted); border-style: dashed; } .pill.live { color: var(--ok); }
.sgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
@media (max-width: 800px) { .sgrid { grid-template-columns: minmax(0, 1fr); } .mtop img { width: 100%; } }
.sbox { border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); min-width: 0; }
.shead { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.shead button { margin-left: auto; font: 600 13px Inter, sans-serif; color: var(--link); background: none; border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 12px; cursor: pointer; }
.xcount { font-family: var(--mono); font-size: 12px; color: var(--ok); } .xcount.over { color: var(--pennant); }
.sbox pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; word-wrap: break-word; font: 14.5px/1.6 Inter, system-ui, sans-serif; color: var(--text-tint); }
.sbox.missing p { padding: 12px 14px; color: var(--muted); font-size: 14px; }
.mfoot { margin-top: 28px; font-size: 13px; color: var(--faint); }
.preview-banner { padding-block: 9px; padding-inline: var(--gutter); text-align: center; font-family: var(--mono); font-size: 12.5px; color: var(--text); background: color-mix(in srgb, var(--warn) 20%, var(--bg)); border-bottom: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); }
.preview-banner b { color: var(--warn); }
