/* ============================================================
   osama/os — styles.css
   Design tokens, layout, components. No preprocessor, no build.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
	--bg: #0b0f17;
	--bg-2: #0d121c;
	--panel: #101624;
	--panel-2: #131a2a;
	--line: rgba(148, 163, 184, 0.14);
	--line-strong: rgba(148, 163, 184, 0.28);
	--text: #e2e8f0;
	--text-dim: #93a1b5;
	--text-faint: #5d6b80;
	--cyan: #22d3ee;
	--violet: #a78bfa;
	--blue: #60a5fa;
	--green: #34d399;
	--amber: #fbbf24;
	--red: #f87171;
	--mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--radius: 10px;
	--nav-h: 56px;
	--glow-cyan: 0 0 24px rgba(34, 211, 238, 0.18);
  }
  
  /* ---------- reset / base ---------- */
  *,
  *::before,
  *::after {
	box-sizing: border-box;
  }
  html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--nav-h) + 16px);
  }
  body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
  }
  h1,
  h2,
  h3,
  h4 {
	margin: 0;
	line-height: 1.2;
	font-weight: 600;
  }
  p {
	margin: 0;
  }
  a {
	color: var(--cyan);
	text-decoration: none;
  }
  a:hover {
	text-decoration: underline;
  }
  button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
  }
  code,
  pre,
  kbd {
	font-family: var(--mono);
  }
  ::selection {
	background: rgba(34, 211, 238, 0.25);
  }
  
  :focus-visible {
	outline: 2px solid var(--cyan);
	outline-offset: 2px;
	border-radius: 4px;
  }
  
  .skip-link {
	position: fixed;
	top: -48px;
	left: 16px;
	z-index: 200;
	padding: 8px 14px;
	background: var(--cyan);
	color: #04141a;
	font-family: var(--mono);
	font-size: 13px;
	border-radius: 6px;
	transition: top 0.15s ease;
  }
  .skip-link:focus {
	top: 12px;
  }
  
  /* ---------- background layers ---------- */
  .bg-grid {
	position: fixed;
	inset: 0;
	z-index: -2;
	pointer-events: none;
	background-image: linear-gradient(
		rgba(148, 163, 184, 0.045) 1px,
		transparent 1px
	  ),
	  linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: radial-gradient(
	  ellipse 90% 80% at 50% 0%,
	  #000 40%,
	  transparent 100%
	);
	-webkit-mask-image: radial-gradient(
	  ellipse 90% 80% at 50% 0%,
	  #000 40%,
	  transparent 100%
	);
  }
  .bg-vignette {
	position: fixed;
	inset: 0;
	z-index: -3;
	pointer-events: none;
	background: radial-gradient(
		600px 400px at 85% -10%,
		rgba(167, 139, 250, 0.07),
		transparent 70%
	  ),
	  radial-gradient(
		700px 500px at 10% 0%,
		rgba(34, 211, 238, 0.06),
		transparent 70%
	  ),
	  var(--bg);
  }
  .cursor-glow {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(
	  320px circle at var(--mx, -400px) var(--my, -400px),
	  rgba(34, 211, 238, 0.05),
	  transparent 70%
	);
  }
  
  /* ---------- boot overlay ---------- */
  .boot {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: var(--bg);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.45s ease;
  }
  .boot.done {
	opacity: 0;
	pointer-events: none;
  }
  .boot-inner {
	width: min(640px, 88vw);
	font-family: var(--mono);
	font-size: 13.5px;
  }
  .boot-log {
	min-height: 200px;
	color: var(--text-dim);
  }
  .boot-log .ok {
	color: var(--green);
  }
  .boot-log .val {
	color: var(--cyan);
  }
  .boot-log div {
	white-space: pre-wrap;
  }
  .boot-skip {
	margin-top: 24px;
	color: var(--text-faint);
	font-size: 12px;
	animation: blink-soft 1.6s ease-in-out infinite;
  }
  @keyframes blink-soft {
	50% {
	  opacity: 0.35;
	}
  }
  
  /* ---------- nav ---------- */
  .nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 0 clamp(16px, 4vw, 40px);
	background: rgba(11, 15, 23, 0.78);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
	font-family: var(--mono);
	font-size: 13px;
  }
  .nav-logo {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-weight: 600;
  }
  .nav-logo:hover {
	text-decoration: none;
  }
  .nav-logo .prompt-char {
	color: var(--cyan);
  }
  .nav-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text-faint);
	font-size: 11.5px;
	margin-left: 4px;
	padding: 3px 8px;
	border: 1px solid var(--line);
	border-radius: 99px;
  }
  .nav-links {
	display: flex;
	gap: 4px;
	margin-left: auto;
  }
  .nav-links a {
	color: var(--text-dim);
	padding: 6px 10px;
	border-radius: 6px;
  }
  .nav-links a:hover {
	color: var(--text);
	background: rgba(148, 163, 184, 0.08);
	text-decoration: none;
  }
  .nav-links a.active {
	color: var(--cyan);
  }
  .nav-kbd {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text-dim);
	border: 1px solid var(--line);
	padding: 5px 10px;
	border-radius: 6px;
	font-size: 12px;
  }
  .nav-kbd:hover {
	border-color: var(--line-strong);
	color: var(--text);
  }
  .nav-kbd kbd {
	background: var(--panel-2);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 1px 5px;
	font-size: 11px;
  }
  
  /* ---------- shared layout ---------- */
  .wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 clamp(16px, 4vw, 40px);
  }
  section {
	padding: clamp(56px, 9vh, 96px) 0;
  }
  
  .sec-head {
	margin-bottom: 36px;
  }
  .sec-path {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--cyan);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
  }
  .sec-path::before {
	content: "$ cd";
	color: var(--text-faint);
  }
  .sec-title {
	font-size: clamp(24px, 3.4vw, 34px);
	letter-spacing: -0.02em;
  }
  .sec-sub {
	color: var(--text-dim);
	margin-top: 10px;
	max-width: 640px;
  }
  
  .led {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
	background: var(--green);
	box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
	animation: led-pulse 2.4s ease-in-out infinite;
  }
  .led.amber {
	background: var(--amber);
	box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
  }
  .led.violet {
	background: var(--violet);
	box-shadow: 0 0 8px rgba(167, 139, 250, 0.6);
  }
  @keyframes led-pulse {
	50% {
	  opacity: 0.55;
	}
  }
  
  .chip {
	display: inline-block;
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--text-dim);
	background: rgba(148, 163, 184, 0.07);
	border: 1px solid var(--line);
	border-radius: 5px;
	padding: 2px 8px;
  }
  
  /* ---------- hero ---------- */
  .hero {
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding-top: calc(var(--nav-h) + 24px);
  }
  .hero-grid {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: clamp(32px, 5vw, 64px);
	align-items: center;
	width: 100%;
  }
  .hero-tag {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--violet);
	margin-bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
  }
  .hero h1 {
	font-size: clamp(34px, 5vw, 56px);
	font-weight: 700;
	letter-spacing: -0.03em;
  }
  .hero h1 .accent {
	background: linear-gradient(
	  100deg,
	  var(--cyan),
	  var(--blue) 55%,
	  var(--violet)
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
  }
  .hero-role {
	font-family: var(--mono);
	font-size: clamp(14px, 1.6vw, 16px);
	color: var(--text-dim);
	margin-top: 14px;
  }
  .hero-role .cursor-block {
	display: inline-block;
	width: 8px;
	height: 1em;
	margin-left: 2px;
	background: var(--cyan);
	vertical-align: text-bottom;
	animation: blink-soft 1.1s steps(1) infinite;
  }
  .hero-desc {
	color: var(--text-dim);
	margin-top: 18px;
	max-width: 520px;
  }
  .hero-desc strong {
	color: var(--text);
	font-weight: 600;
  }
  
  .hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 26px;
  }
  .stat {
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 8px 14px;
	background: rgba(16, 22, 36, 0.6);
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--text-dim);
  }
  .stat b {
	color: var(--cyan);
	font-weight: 600;
	display: block;
	font-size: 16px;
  }
  
  .hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
  }
  .btn {
	font-family: var(--mono);
	font-size: 13.5px;
	border-radius: 8px;
	padding: 10px 18px;
	border: 1px solid var(--line-strong);
	color: var(--text);
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
	display: inline-flex;
	align-items: center;
	gap: 8px;
  }
  .btn:hover {
	text-decoration: none;
	border-color: var(--cyan);
	box-shadow: var(--glow-cyan);
  }
  .btn-primary {
	background: rgba(34, 211, 238, 0.1);
	border-color: rgba(34, 211, 238, 0.45);
	color: var(--cyan);
  }
  
  /* terminal window (hero + reusable) */
  .term {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	overflow: hidden;
  }
  .term-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: var(--panel-2);
	border-bottom: 1px solid var(--line);
  }
  .term-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
  }
  .term-dot.r {
	background: #ff5f57;
  }
  .term-dot.y {
	background: #febc2e;
  }
  .term-dot.g {
	background: #28c840;
  }
  .term-title {
	margin-left: 8px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--text-faint);
  }
  .term-body {
	padding: 16px 18px;
	font-family: var(--mono);
	font-size: 13px;
	line-height: 1.75;
	min-height: 300px;
	max-height: 380px;
	overflow-y: auto;
  }
  .term-body .t-prompt {
	color: var(--green);
  }
  .term-body .t-path {
	color: var(--blue);
  }
  .term-body .t-cmd {
	color: var(--text);
  }
  .term-body .t-out {
	color: var(--text-dim);
	white-space: pre-wrap;
  }
  .term-body .t-accent {
	color: var(--cyan);
  }
  .term-body .t-warn {
	color: var(--amber);
  }
  .term-input-row {
	display: flex;
	gap: 8px;
	align-items: baseline;
  }
  .term-input {
	flex: 1;
	background: none;
	border: 0;
	outline: 0;
	color: var(--text);
	font-family: var(--mono);
	font-size: 13px;
	padding: 0;
	caret-color: var(--cyan);
  }
  
  /* ---------- architecture ---------- */
  .arch {
	position: relative;
  }
  .arch-core {
	margin: 0 auto 0;
	width: fit-content;
	text-align: center;
	border: 1px solid rgba(34, 211, 238, 0.4);
	border-radius: 12px;
	background: linear-gradient(
	  180deg,
	  rgba(34, 211, 238, 0.09),
	  rgba(34, 211, 238, 0.03)
	);
	padding: 16px 34px;
	font-family: var(--mono);
	box-shadow: var(--glow-cyan);
  }
  .arch-core b {
	color: var(--cyan);
	font-size: 15px;
	display: block;
  }
  .arch-core span {
	color: var(--text-faint);
	font-size: 11.5px;
  }
  .arch-trunk {
	width: 2px;
	height: 34px;
	margin: 0 auto;
	background: linear-gradient(var(--cyan), var(--line-strong));
	position: relative;
  }
  .arch-bus {
	height: 2px;
	background: var(--line-strong);
	margin: 0 auto;
	width: min(78%, 720px);
	position: relative;
  }
  .arch-bus::before,
  .arch-bus::after {
	content: "";
	position: absolute;
	top: 0;
	width: 2px;
	height: 24px;
	background: var(--line-strong);
  }
  .arch-bus::before {
	left: 0;
  }
  .arch-bus::after {
	right: 0;
  }
  .packet {
	position: absolute;
	top: -2px;
	left: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--cyan);
	box-shadow: 0 0 8px var(--cyan);
	animation: packet-run 5s linear infinite;
  }
  .packet.p2 {
	animation-delay: 2.5s;
	background: var(--violet);
	box-shadow: 0 0 8px var(--violet);
  }
  @keyframes packet-run {
	0% {
	  left: 0%;
	  opacity: 0;
	}
	6% {
	  opacity: 1;
	}
	94% {
	  opacity: 1;
	}
	100% {
	  left: 100%;
	  opacity: 0;
	}
  }
  .arch-nodes {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-top: 22px;
  }
  .arch-node {
	position: relative;
	text-align: left;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	padding: 18px 16px;
	transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  }
  .arch-node::before {
	content: "";
	position: absolute;
	top: -22px;
	left: 50%;
	width: 2px;
	height: 22px;
	background: var(--line-strong);
	transform: translateX(-50%);
  }
  .arch-node:hover {
	transform: translateY(-3px);
	border-color: var(--line-strong);
  }
  .arch-node[aria-expanded="true"] {
	border-color: var(--node-c, var(--cyan));
	box-shadow: 0 0 0 1px var(--node-c, var(--cyan)),
	  0 0 26px -6px var(--node-c, var(--cyan));
  }
  .arch-node .n-name {
	font-family: var(--mono);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--node-c, var(--cyan));
	display: flex;
	align-items: center;
	gap: 8px;
  }
  .arch-node .n-desc {
	display: block;
	font-size: 12.5px;
	color: var(--text-dim);
	margin-top: 8px;
  }
  .arch-node .n-hint {
	display: block;
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--text-faint);
	margin-top: 12px;
  }
  
  .arch-detail {
	margin-top: 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	overflow: hidden;
	display: none;
  }
  .arch-detail.open {
	display: block;
	animation: fade-up 0.28s ease;
  }
  .arch-detail-head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 14px 20px;
	border-bottom: 1px solid var(--line);
	background: var(--panel-2);
	font-family: var(--mono);
	font-size: 13px;
  }
  .arch-detail-head b {
	color: var(--cyan);
  }
  .arch-detail-head .status {
	margin-left: auto;
	color: var(--green);
	font-size: 11.5px;
  }
  .arch-detail-body {
	padding: 20px;
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 24px;
  }
  .arch-detail-body p {
	color: var(--text-dim);
	font-size: 14.5px;
  }
  .arch-detail-body h4 {
	font-family: var(--mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-faint);
	margin-bottom: 10px;
  }
  .arch-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
  }
  
  /* ---------- systems (projects) ---------- */
  .sys-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
  }
  .sys-grid.two {
	grid-template-columns: repeat(2, 1fr);
  }
  .sys-card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: border-color 0.18s, transform 0.18s;
	position: relative;
	overflow: hidden;
  }
  .sys-card::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	background: radial-gradient(
	  400px circle at var(--cx, 50%) var(--cy, 0%),
	  rgba(34, 211, 238, 0.06),
	  transparent 60%
	);
	transition: opacity 0.25s;
  }
  .sys-card:hover {
	transform: translateY(-3px);
	border-color: var(--line-strong);
  }
  .sys-card:hover::after {
	opacity: 1;
  }
  .sys-top {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--mono);
	font-size: 13.5px;
  }
  .sys-top b {
	color: var(--text);
	font-weight: 600;
  }
  .sys-top .env {
	margin-left: auto;
	font-size: 10px;
	color: var(--text-faint);
	border: 1px solid var(--line);
	padding: 1px 7px;
	border-radius: 99px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
  }
  .sys-desc {
	font-size: 13.5px;
	color: var(--text-dim);
	flex: 1;
  }
  .sys-metrics {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	font-family: var(--mono);
  }
  .sys-metric {
	border: 1px solid var(--line);
	border-radius: 7px;
	padding: 8px 10px;
	background: rgba(11, 15, 23, 0.5);
  }
  .sys-metric b {
	display: block;
	color: var(--cyan);
	font-size: 15px;
	font-weight: 600;
  }
  .sys-metric span {
	font-size: 10.5px;
	color: var(--text-faint);
	text-transform: uppercase;
	letter-spacing: 0.05em;
  }
  .sys-stack {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
  }
  .sys-note {
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--text-faint);
	border-top: 1px dashed var(--line);
	padding-top: 10px;
  }
  .sys-note::before {
	content: "// ";
	color: var(--text-faint);
  }
  .sys-card.wide {
	grid-column: 1 / -1;
	flex-direction: row;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
  }
  .sys-card.wide .sys-desc {
	min-width: 260px;
  }
  .sys-card.wide .sys-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
  }
  
  /* ---------- code window ---------- */
  .code-win {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  }
  .code-tabs {
	display: flex;
	align-items: center;
	background: var(--panel-2);
	border-bottom: 1px solid var(--line);
	overflow-x: auto;
  }
  .code-tab {
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--text-faint);
	padding: 11px 18px;
	border-right: 1px solid var(--line);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 8px;
  }
  .code-tab .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--text-faint);
	opacity: 0.5;
  }
  .code-tab[aria-selected="true"] {
	color: var(--text);
	background: var(--panel);
	box-shadow: inset 0 2px 0 var(--cyan);
  }
  .code-tab[aria-selected="true"] .dot {
	background: var(--cyan);
	opacity: 1;
  }
  .code-pane {
	display: none;
  }
  .code-pane.active {
	display: block;
	animation: fade-up 0.25s ease;
  }
  .code-pane pre {
	margin: 0;
	padding: 20px 0;
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.1;
	tab-size: 2;
  }
  .code-pane code {
	display: block;
	min-width: max-content;
	counter-reset: ln;
  }
  .code-pane .cl {
	display: block;
	padding: 0 20px 0 0;
	counter-increment: ln;
  }
  .code-pane .cl::before {
	content: counter(ln);
	display: inline-block;
	width: 52px;
	padding-right: 20px;
	margin-right: 4px;
	text-align: right;
	color: var(--text-faint);
	opacity: 0.55;
	user-select: none;
	-webkit-user-select: none;
  }
  .tok-k {
	color: var(--violet);
  } /* keyword */
  .tok-t {
	color: var(--cyan);
  } /* type */
  .tok-s {
	color: #a5d6a7;
  } /* string */
  .tok-f {
	color: var(--blue);
  } /* function */
  .tok-c {
	color: var(--text-faint);
	font-style: italic;
  } /* comment */
  .tok-n {
	color: #f0abfc;
  } /* number/const */
  .tok-p {
	color: var(--text-dim);
  } /* punctuation-ish default */
  .code-status {
	display: flex;
	gap: 18px;
	align-items: center;
	border-top: 1px solid var(--line);
	background: var(--panel-2);
	padding: 7px 16px;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--text-faint);
  }
  .code-status .ok {
	color: var(--green);
  }
  
  /* ---------- principles ---------- */
  .prin-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
  }
  .prin {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	padding: 20px;
  }
  .prin-head {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--text);
	display: flex;
	gap: 10px;
	align-items: baseline;
	margin-bottom: 12px;
  }
  .prin-head::before {
	content: "TRACE";
	font-size: 10px;
	color: var(--bg);
	background: var(--violet);
	border-radius: 4px;
	padding: 1px 6px;
	font-weight: 600;
  }
  .prin-body {
	font-family: var(--mono);
	font-size: 12.5px;
	line-height: 1.8;
  }
  .prin-body .k {
	color: var(--text-faint);
	display: inline-block;
	min-width: 92px;
  }
  .prin-body .v {
	color: var(--text-dim);
  }
  .prin-body .hl {
	color: var(--cyan);
  }
  .prin-body div {
	padding-left: 14px;
	text-indent: -14px;
  }
  
  /* ---------- event log ---------- */
  .log-list {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	overflow: hidden;
	font-family: var(--mono);
	font-size: 13px;
  }
  .log-row {
	display: grid;
	grid-template-columns: 76px 110px 1fr;
	gap: 16px;
	padding: 13px 20px;
	border-bottom: 1px solid var(--line);
	align-items: baseline;
  }
  .log-row:last-child {
	border-bottom: 0;
  }
  .log-row:hover {
	background: rgba(148, 163, 184, 0.04);
  }
  .log-date {
	color: var(--text-faint);
  }
  .log-type {
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.05em;
  }
  .log-type.init {
	color: var(--blue);
  }
  .log-type.ship {
	color: var(--green);
  }
  .log-type.scale {
	color: var(--amber);
  }
  .log-type.pub {
	color: var(--violet);
  }
  .log-type.deploy {
	color: var(--cyan);
  }
  .log-msg {
	color: var(--text-dim);
  }
  .log-msg b {
	color: var(--text);
	font-weight: 600;
  }
  
  /* ---------- contact ---------- */
  .contact-grid {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 24px;
	align-items: start;
  }
  .proto {
	font-family: var(--mono);
	font-size: 13px;
  }
  .proto-req {
	padding: 18px 20px;
	line-height: 1.8;
  }
  .proto-req .m {
	color: var(--green);
	font-weight: 600;
  }
  .proto-req .u {
	color: var(--text);
  }
  .proto-req .h {
	color: var(--text-faint);
  }
  .proto-req .key {
	color: var(--violet);
  }
  .proto-req .str {
	color: #a5d6a7;
  }
  .proto-fields {
	padding: 0 20px 18px;
	display: grid;
	gap: 12px;
  }
  .proto-fields label {
	font-size: 11px;
	color: var(--text-faint);
	text-transform: uppercase;
	letter-spacing: 0.07em;
	display: block;
	margin-bottom: 6px;
  }
  .proto-fields input,
  .proto-fields textarea {
	width: 100%;
	background: var(--bg-2);
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: 7px;
	font-family: var(--mono);
	font-size: 13px;
	padding: 9px 12px;
	outline: none;
	resize: vertical;
  }
  .proto-fields input:focus,
  .proto-fields textarea:focus {
	border-color: rgba(34, 211, 238, 0.5);
  }
  .intent-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
  }
  .intent {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--text-dim);
	border: 1px solid var(--line);
	border-radius: 99px;
	padding: 5px 14px;
	transition: all 0.15s;
  }
  .intent[aria-pressed="true"] {
	color: var(--cyan);
	border-color: rgba(34, 211, 238, 0.55);
	background: rgba(34, 211, 238, 0.09);
  }
  .proto-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 0 20px 20px;
	flex-wrap: wrap;
  }
  .proto-hint {
	padding: 0 20px 18px;
	font-size: 12px;
	color: var(--text-faint);
	font-family: var(--sans);
  }
  .mode-toggle {
	white-space: nowrap;
  }
  .mode-toggle[aria-pressed="true"] {
	color: var(--green);
	border-color: rgba(52, 211, 153, 0.5);
  }
  .proto-resp {
	margin: 0 20px 20px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg-2);
	padding: 12px 16px;
	font-size: 12.5px;
	display: none;
  }
  .proto-resp.show {
	display: block;
	animation: fade-up 0.3s ease;
  }
  .proto-resp .code201 {
	color: var(--green);
	font-weight: 600;
  }
  
  .channels {
	display: grid;
	gap: 12px;
  }
  .channel {
	display: flex;
	align-items: center;
	gap: 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	padding: 16px 18px;
	transition: border-color 0.18s, transform 0.18s;
	color: var(--text);
	font-family: var(--mono);
	font-size: 13px;
	text-align: left;
	width: 100%;
  }
  .channel:hover {
	text-decoration: none;
	border-color: var(--line-strong);
	transform: translateX(4px);
  }
  .channel .proto-name {
	color: var(--text-faint);
	font-size: 11px;
	min-width: 64px;
  }
  .channel b {
	font-weight: 600;
  }
  .channel .addr {
	color: var(--text-dim);
	font-size: 12px;
  }
  .channel .arrow {
	margin-left: auto;
	color: var(--text-faint);
  }
  .channel:hover .arrow {
	color: var(--cyan);
  }
  
  /* ---------- command palette ---------- */
  .palette-overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(4, 7, 12, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 14vh 16px 0;
  }
  .palette-overlay.open {
	display: flex;
  }
  .palette {
	width: min(560px, 100%);
	background: var(--panel);
	border: 1px solid var(--line-strong);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), var(--glow-cyan);
	animation: fade-up 0.18s ease;
  }
  .palette-input-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--line);
	font-family: var(--mono);
  }
  .palette-input-row .chev {
	color: var(--cyan);
  }
  .palette-input {
	flex: 1;
	background: none;
	border: 0;
	outline: 0;
	color: var(--text);
	font-family: var(--mono);
	font-size: 14px;
  }
  .palette-list {
	max-height: 320px;
	overflow-y: auto;
	padding: 6px;
	margin: 0;
	list-style: none;
  }
  .palette-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	cursor: pointer;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--text-dim);
  }
  .palette-item .pi-type {
	font-size: 10px;
	color: var(--text-faint);
	margin-left: auto;
	text-transform: uppercase;
	letter-spacing: 0.06em;
  }
  .palette-item.sel {
	background: rgba(34, 211, 238, 0.09);
	color: var(--text);
  }
  .palette-item.sel .pi-type {
	color: var(--cyan);
  }
  .palette-empty {
	padding: 20px;
	text-align: center;
	color: var(--text-faint);
	font-family: var(--mono);
	font-size: 13px;
  }
  
  /* ---------- footer ---------- */
  footer {
	border-top: 1px solid var(--line);
	padding: 28px 0 36px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--text-faint);
  }
  .foot-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: center;
  }
  .foot-row .uptime {
	color: var(--text-dim);
  }
  .foot-row .uptime b {
	color: var(--green);
	font-weight: 600;
  }
  .foot-links {
	margin-left: auto;
	display: flex;
	gap: 16px;
  }
  .foot-links a {
	color: var(--text-faint);
  }
  .foot-links a:hover {
	color: var(--cyan);
  }
  
  /* ---------- reveal / motion ---------- */
  @keyframes fade-up {
	from {
	  opacity: 0;
	  transform: translateY(14px);
	}
	to {
	  opacity: 1;
	  transform: translateY(0);
	}
  }
  .reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.in {
	opacity: 1;
	transform: none;
  }
  .reveal-d1 {
	transition-delay: 0.08s;
  }
  .reveal-d2 {
	transition-delay: 0.16s;
  }
  .reveal-d3 {
	transition-delay: 0.24s;
  }
  .reveal-d4 {
	transition-delay: 0.32s;
  }
  
  @media (prefers-reduced-motion: reduce) {
	html {
	  scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
	  animation: none !important;
	  transition: none !important;
	}
	.reveal {
	  opacity: 1;
	  transform: none;
	}
	.boot {
	  display: none;
	}
	.cursor-glow {
	  display: none;
	}
  }
  
  /* ---------- responsive ---------- */
  @media (max-width: 980px) {
	.hero-grid {
	  grid-template-columns: 1fr;
	}
	.arch-nodes {
	  grid-template-columns: repeat(2, 1fr);
	}
	.arch-node::before {
	  display: none;
	}
	.arch-bus,
	.arch-trunk {
	  display: none;
	}
	.arch-core {
	  margin-bottom: 6px;
	}
	.sys-grid {
	  grid-template-columns: repeat(2, 1fr);
	}
	.arch-detail-body {
	  grid-template-columns: 1fr;
	}
	.contact-grid {
	  grid-template-columns: 1fr;
	}
  }
  @media (max-width: 640px) {
	.nav-links {
	  display: none;
	}
	.nav-status {
	  display: none;
	}
	.mode-toggle {
	  margin-left: auto;
	}
	.sys-grid,
	.sys-grid.two {
	  grid-template-columns: 1fr;
	}
	.prin-grid {
	  grid-template-columns: 1fr;
	}
	.arch-nodes {
	  grid-template-columns: 1fr;
	}
	.log-row {
	  grid-template-columns: 62px 1fr;
	}
	.log-msg {
	  grid-column: 1 / -1;
	  padding-left: 0;
	}
	.term-body {
	  min-height: 240px;
	}
	.hero {
	  min-height: auto;
	  padding-bottom: 24px;
	}
  }
  
  /* noscript: keep content visible without JS */
  .no-js .reveal {
	opacity: 1;
	transform: none;
  }
  .no-js .boot {
	display: none;
  }
  /* no-js visitors get the full engineer site */
  .no-js .client-only {
	display: none;
  }

  /* ============================================================
     Client view ⇄ engineer view
     body.human = client view (default). .client-only / .eng-only
     gate whole sections and nav links per audience.
     ============================================================ */
  body.human .eng-only,
  body.human .eng-item {
	display: none;
  }
  body:not(.human) .client-only,
  body:not(.human) .client-item {
	display: none;
  }

  /* warmer, softer treatment in client view */
  body.human .bg-grid {
	opacity: 0.35;
  }
  body.human .bg-vignette {
	background: radial-gradient(
		600px 400px at 85% -10%,
		rgba(251, 191, 36, 0.05),
		transparent 70%
	  ),
	  radial-gradient(
		700px 500px at 10% 0%,
		rgba(34, 211, 238, 0.07),
		transparent 70%
	  ),
	  var(--bg);
  }
  body.human .btn {
	border-radius: 99px;
  }
  body.human .sec-path::before {
	content: "";
  }

  /* ---------- services (client view) ---------- */
  .svc-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
  }
  .svc {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	padding: 24px 22px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: border-color 0.18s, transform 0.18s;
  }
  .svc:hover {
	transform: translateY(-3px);
	border-color: var(--line-strong);
  }
  .svc-icon {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line-strong);
	background: rgba(34, 211, 238, 0.07);
  }
  .svc-icon svg {
	width: 22px;
	height: 22px;
	stroke: var(--cyan);
	fill: none;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
  }
  .svc h3 {
	font-size: 18px;
  }
  .svc > p {
	color: var(--text-dim);
	font-size: 14px;
	flex: 1;
  }
  .svc ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 7px;
  }
  .svc li {
	font-size: 13px;
	color: var(--text-dim);
	padding-left: 22px;
	position: relative;
  }
  .svc li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--green);
	font-family: var(--mono);
	font-size: 12px;
  }

  /* ---------- case studies (client view) ---------- */
  .case-list {
	display: grid;
	gap: 16px;
  }
  .case {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	padding: 26px;
	display: grid;
	grid-template-columns: 170px 1fr;
	gap: 30px;
	align-items: center;
  }
  .case-tag {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--case-c, var(--cyan));
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 8px;
  }
  .case h3 {
	font-size: 20px;
	margin-bottom: 10px;
  }
  .case-desc {
	color: var(--text-dim);
	font-size: 14.5px;
	max-width: 640px;
  }
  .case-results {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
  }
  .case-results .stat b {
	color: var(--case-c, var(--cyan));
  }

  /* pure-CSS phone mockup — abstract skeleton UI, no fake screenshots */
  .phone {
	width: 150px;
	aspect-ratio: 9 / 18;
	margin: 0 auto;
	border-radius: 22px;
	border: 2px solid var(--line-strong);
	background: var(--bg-2);
	padding: 14px 11px 11px;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 7px;
	overflow: hidden;
  }
  .phone::before {
	content: "";
	position: absolute;
	top: 6px;
	left: 50%;
	transform: translateX(-50%);
	width: 42px;
	height: 4px;
	border-radius: 99px;
	background: var(--line-strong);
  }
  .phone i {
	display: block;
	border-radius: 5px;
	background: rgba(148, 163, 184, 0.12);
  }
  .phone .ph-hero {
	height: 34%;
	background: linear-gradient(
	  135deg,
	  var(--case-c, var(--cyan)) -80%,
	  rgba(148, 163, 184, 0.1) 60%
	);
  }
  .phone .ph-title {
	height: 9px;
	width: 70%;
	background: var(--case-c, var(--cyan));
	opacity: 0.65;
  }
  .phone .ph-line {
	height: 7px;
  }
  .phone .ph-line.short {
	width: 55%;
  }
  .phone .ph-row {
	height: 13%;
	margin-top: auto;
  }
  .phone .ph-cta {
	height: 22px;
	border-radius: 99px;
	background: var(--case-c, var(--cyan));
	opacity: 0.8;
	margin-top: 6px;
  }

  /* ---------- process (client view) ---------- */
  .steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	counter-reset: step;
  }
  .step {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	padding: 22px 20px;
	position: relative;
  }
  .step::before {
	counter-increment: step;
	content: "0" counter(step);
	font-family: var(--mono);
	font-size: 13px;
	color: var(--cyan);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(34, 211, 238, 0.4);
	border-radius: 50%;
	margin-bottom: 14px;
  }
  .step h3 {
	font-size: 16px;
	margin-bottom: 8px;
  }
  .step p {
	font-size: 13.5px;
	color: var(--text-dim);
  }

  /* ---------- client CTA banner ---------- */
  .cta-banner {
	border: 1px solid rgba(34, 211, 238, 0.35);
	border-radius: var(--radius);
	background: linear-gradient(
	  135deg,
	  rgba(34, 211, 238, 0.09),
	  rgba(167, 139, 250, 0.07)
	);
	padding: 28px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin-bottom: 36px;
  }
  .cta-banner h3 {
	font-size: 20px;
  }
  .cta-banner p {
	color: var(--text-dim);
	font-size: 14px;
	margin-top: 4px;
  }
  .cta-banner .btn {
	margin-left: auto;
	font-size: 15px;
	padding: 13px 26px;
  }

  /* ============================================================
     Experience layer: hero network canvas, first-visit profile
     chooser, guided spotlight tour
     ============================================================ */

  /* ---------- hero network canvas ---------- */
  .hero {
	position: relative;
  }
  .hero-net {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: 0.8;
	mask-image: radial-gradient(85% 90% at 50% 45%, #000 55%, transparent 100%);
	-webkit-mask-image: radial-gradient(85% 90% at 50% 45%, #000 55%, transparent 100%);
  }

  /* ---------- profile chooser ---------- */
  .profile-overlay {
	position: fixed;
	inset: 0;
	z-index: 95;
	background: rgba(4, 7, 12, 0.7);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
  }
  .profile-overlay.open {
	display: flex;
  }
  .profile-card {
	width: min(480px, 100%);
	background: var(--panel);
	border: 1px solid var(--line-strong);
	border-radius: 14px;
	padding: 28px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), var(--glow-cyan);
	animation: fade-up 0.3s ease;
  }
  .profile-head {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--text-faint);
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
  }
  .profile-card h2 {
	font-size: 24px;
	letter-spacing: -0.02em;
  }
  .profile-sub {
	color: var(--text-dim);
	font-size: 13.5px;
	margin: 8px 0 20px;
  }
  .profile-opt {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	text-align: left;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg-2);
	padding: 14px 16px;
	margin-bottom: 10px;
	transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  }
  .profile-opt:hover,
  .profile-opt:focus-visible {
	border-color: rgba(34, 211, 238, 0.55);
	transform: translateX(4px);
	box-shadow: var(--glow-cyan);
  }
  .profile-opt.sel {
	border-color: rgba(34, 211, 238, 0.55);
	background: rgba(34, 211, 238, 0.06);
  }
  .profile-opt.sel kbd {
	color: var(--cyan);
	border-color: rgba(34, 211, 238, 0.45);
  }
  .profile-opt b {
	font-size: 14.5px;
  }
  .profile-opt .po-sub {
	font-size: 12px;
	color: var(--text-faint);
  }
  .profile-opt kbd {
	margin-left: auto;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--text-faint);
	border: 1px solid var(--line);
	border-radius: 5px;
	padding: 2px 8px;
	flex-shrink: 0;
  }
  .profile-skip {
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--text-faint);
	margin-top: 6px;
  }
  .profile-skip:hover {
	color: var(--cyan);
  }

  /* ---------- guided tour ---------- */
  .tour-overlay {
	position: fixed;
	inset: 0;
	z-index: 85;
	display: none;
  }
  .tour-overlay.on {
	display: block;
  }
  .tour-hl {
	position: absolute;
	border: 1px solid rgba(34, 211, 238, 0.75);
	border-radius: 12px;
	box-shadow: 0 0 0 9999px rgba(4, 7, 12, 0.74), 0 0 34px rgba(34, 211, 238, 0.3);
	transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
	pointer-events: none;
  }
  .tour-card {
	position: absolute;
	width: min(360px, calc(100vw - 32px));
	background: var(--panel);
	border: 1px solid var(--line-strong);
	border-radius: 12px;
	padding: 18px 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
	transition: top 0.35s ease, left 0.35s ease;
  }
  .tour-step-n {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--cyan);
	margin-bottom: 8px;
  }
  .tour-card h3 {
	font-size: 17px;
	margin-bottom: 6px;
  }
  .tour-card p {
	font-size: 13.5px;
	color: var(--text-dim);
  }
  .tour-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 14px;
  }
  .tour-actions .btn {
	padding: 7px 16px;
	font-size: 12.5px;
  }
  .tour-exit {
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--text-faint);
  }
  .tour-exit:hover {
	color: var(--text);
  }

  @media (max-width: 980px) {
	.svc-grid {
	  grid-template-columns: 1fr;
	}
	.steps {
	  grid-template-columns: repeat(2, 1fr);
	}
	.cta-banner .btn {
	  margin-left: 0;
	}
  }
  @media (max-width: 640px) {
	.steps {
	  grid-template-columns: 1fr;
	}
	.case {
	  grid-template-columns: 1fr;
	}
	.phone {
	  display: none;
	}
  }
  