:root {
  --bg: #04060d;
  --bg-2: #0a0f1f;
  --panel: rgba(11, 18, 38, 0.86);
  --line: rgba(120, 180, 255, 0.14);
  --text: #e6f0ff;
  --muted: #8a9bbd;
  --cyan: #22e4ff;
  --violet: #9d5cff;
  --pink: #ff3ea5;
  --green: #3dffa8;
  --amber: #ffb547;
  --red: #ff4d6d;
  --glow-c: 0 0 12px rgba(34, 228, 255, .6), 0 0 32px rgba(34, 228, 255, .25);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --display: "Orbitron", "Space Grotesk", sans-serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  line-height: 1.6;
}
body.loading { overflow: hidden; }
::selection { background: var(--cyan); color: var(--bg); }
a { color: inherit; text-decoration: none; }

/* scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan), var(--violet)); border-radius: 4px; }

/* ---------- Boot loader ---------- */
#boot {
  position: fixed; inset: 0; z-index: 1000;
  background: #010207;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s;
}
#boot.done { opacity: 0; visibility: hidden; }
#boot-log {
  font-family: var(--mono); font-size: 13px; color: var(--green);
  width: min(640px, 90vw); min-height: 260px; white-space: pre-wrap;
}
#boot-log .ok { color: var(--cyan); }
.boot-bar { margin-top: 14px; height: 3px; background: rgba(61,255,168,.1); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--green); box-shadow: 0 0 10px var(--green); transition: width .2s; }

/* ---------- Background layers ---------- */
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.grid-floor {
  position: fixed; left: -50%; right: -50%; bottom: -10%; height: 60vh; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(34,228,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,228,255,.18) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(70deg);
  mask-image: linear-gradient(to top, black 10%, transparent 80%);
  -webkit-mask-image: linear-gradient(to top, black 10%, transparent 80%);
  opacity: .5;
}
.scanlines {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
  opacity: .6;
}
.noise-glow {
  position: fixed; width: 60vw; height: 60vw; border-radius: 50%; z-index: 0; pointer-events: none;
  opacity: .3; will-change: transform;
}
.noise-glow.a { background: radial-gradient(circle, var(--violet), transparent 65%); top: -20vw; left: -15vw; animation: drift 18s ease-in-out infinite alternate; }
.noise-glow.b { background: radial-gradient(circle, var(--cyan), transparent 65%); bottom: -25vw; right: -20vw; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(10vw, 8vw) scale(1.15); } }

/* ---------- Custom cursor: targeting reticle ---------- */
@media (hover: hover) and (pointer: fine) {
  html.has-cur, html.has-cur * { cursor: none !important; }
}
#cur { position: fixed; inset: 0; pointer-events: none; z-index: 1002; opacity: 0; transition: opacity .25s; contain: strict; }
#cur.on { opacity: 1; }
#cur > * { position: absolute; top: 0; left: 0; will-change: transform; }
.cur-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px var(--cyan), 0 0 2px #fff; transition: background .2s, scale .15s; }
#cur.lock .cur-dot { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
#cur.down .cur-dot { scale: .5; }
.cur-c { width: 12px; height: 12px; border: 2px solid var(--cyan); filter: drop-shadow(0 0 3px rgba(34,228,255,.8)); transition: border-color .2s; }
.cur-c.tl { border-right: 0; border-bottom: 0; }
.cur-c.tr { border-left: 0; border-bottom: 0; }
.cur-c.bl { border-right: 0; border-top: 0; }
.cur-c.br { border-left: 0; border-top: 0; }
#cur.lock .cur-c { border-color: var(--pink); filter: drop-shadow(0 0 4px rgba(255,62,165,.9)); }
.cur-cross { width: 40px; height: 40px; margin: -20px 0 0 -20px; opacity: .55; transition: opacity .2s; }
.cur-cross::before, .cur-cross::after { content: ""; position: absolute; background: var(--cyan); }
.cur-cross::before { left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(var(--cyan) 0 30%, transparent 30% 70%, var(--cyan) 70%); }
.cur-cross::after { top: 50%; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--cyan) 0 30%, transparent 30% 70%, var(--cyan) 70%); }
.cur-cross i { position: absolute; inset: 6px; border: 1px dashed rgba(34,228,255,.6); border-radius: 50%; animation: spin 6s linear infinite; }
#cur.lock .cur-cross, #cur.text .cur-cross { opacity: 0; }
.cur-label {
  font: 600 10px/1 var(--mono); letter-spacing: 1px; color: var(--cyan); white-space: nowrap;
  padding: 3px 6px; background: rgba(4,6,13,.85); border: 1px solid rgba(34,228,255,.35); border-radius: 3px;
  transition: color .2s, border-color .2s;
}
#cur.lock .cur-label { color: var(--pink); border-color: rgba(255,62,165,.5); }
#cur.text .cur-c { border-color: var(--green); }
.cur-ripple { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--cyan); animation: ripple .55s ease-out forwards; }
@keyframes ripple { to { scale: 6; opacity: 0; border-width: 1px; } }
@media (hover: none), (pointer: coarse) { #cur { display: none; } }

/* ---------- Nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 5vw;
  transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
nav.scrolled { background: rgba(4,6,13,.94); padding: 12px 5vw; border-color: var(--line); }
.logo { font-family: var(--display); font-weight: 800; letter-spacing: 2px; font-size: 18px; }
.logo span { color: var(--cyan); text-shadow: var(--glow-c); }
.nav-links { display: flex; gap: 28px; list-style: none; font-family: var(--mono); font-size: 13px; }
.nav-links a { color: var(--muted); position: relative; transition: color .2s; }
.nav-links a::before { content: "./"; color: var(--cyan); opacity: 0; margin-right: 2px; transition: opacity .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::before, .nav-links a.active::before { opacity: 1; }
.burger { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; }
#progress { position: fixed; top: 0; left: 0; height: 2px; z-index: 60; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink)); width: 100%; transform: scaleX(0); transform-origin: left; will-change: transform; box-shadow: 0 0 10px var(--cyan); }

/* ---------- Layout ---------- */
main { position: relative; z-index: 2; }
section { padding: 44px 5vw; position: relative; overflow-x: clip; }
.container { max-width: 1240px; margin: 0 auto; }
.sec-tag { font-family: var(--mono); color: var(--cyan); font-size: 13px; letter-spacing: 2px; margin-bottom: 10px; }
.sec-tag::before { content: "// "; color: var(--muted); }
h2.sec-title {
  font-family: var(--display); font-size: clamp(30px, 5vw, 56px); line-height: 1.1; margin-bottom: 18px;
  background: linear-gradient(90deg, #fff, var(--cyan) 50%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec-sub { color: var(--muted); max-width: 720px; font-size: 17px; margin-bottom: 30px; }

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  position: relative;
}
.glass.neon::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, var(--cyan), var(--violet), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.glass.neon:hover::before { animation: spin-ang 4s linear infinite; }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin-ang { to { --ang: 360deg; } }

/* reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.in.tilt, .tilt.no-reveal { transition: opacity .9s, transform .2s ease-out, border-color .4s; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; } .reveal.d4 { transition-delay: .4s; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 14px; letter-spacing: 1px;
  padding: 14px 26px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--cyan); color: var(--cyan); background: rgba(34,228,255,.06);
  position: relative; overflow: hidden; isolation: isolate; transition: color .3s, box-shadow .3s, transform .2s;
}
.btn::after { content: ""; position: absolute; inset: 0; background: var(--cyan); transform: translateX(-101%); transition: transform .35s ease; z-index: -1; }
.btn:hover { color: var(--bg); box-shadow: var(--glow-c); }
.btn:hover::after { transform: none; }
.btn.alt { border-color: var(--pink); color: var(--pink); background: rgba(255,62,165,.06); }
.btn.alt::after { background: var(--pink); }
.btn.alt:hover { color: var(--bg); box-shadow: 0 0 20px rgba(255,62,165,.5); }
.btn.sm { padding: 9px 16px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */
#hero { min-height: 100vh; display: flex; align-items: center; padding-top: 100px; padding-bottom: 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
.hero-hello { font-family: var(--mono); color: var(--green); font-size: 15px; margin-bottom: 18px; }
.hero-hello .blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-h1 { margin: 0; font-weight: inherit; }
.h1-sub { display: block; margin-top: 16px; font-family: var(--mono); font-weight: 500; font-size: clamp(13px, 1.5vw, 17px); letter-spacing: 4px; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 12px rgba(34,228,255,.4); }
.glitch {
  display: block; font-family: var(--display); font-weight: 900; font-size: clamp(48px, 9vw, 118px); line-height: .95;
  position: relative; letter-spacing: 2px; color: #fff;
  text-shadow: 0 0 30px rgba(34,228,255,.35);
}
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; }
.glitch::before { color: var(--pink); animation: glitch-a 3.2s infinite linear alternate-reverse; clip-path: inset(0 0 60% 0); transform: translate(-3px, 0); opacity: .8; }
.glitch::after { color: var(--cyan); animation: glitch-b 2.6s infinite linear alternate-reverse; clip-path: inset(60% 0 0 0); transform: translate(3px, 0); opacity: .8; }
@keyframes glitch-a {
  0%, 88% { clip-path: inset(0 0 100% 0); }
  90% { clip-path: inset(10% 0 60% 0); transform: translate(-6px, 2px); }
  93% { clip-path: inset(40% 0 30% 0); transform: translate(5px, -2px); }
  96% { clip-path: inset(70% 0 5% 0); transform: translate(-4px, 1px); }
  100% { clip-path: inset(0 0 100% 0); }
}
@keyframes glitch-b {
  0%, 85% { clip-path: inset(100% 0 0 0); }
  88% { clip-path: inset(55% 0 20% 0); transform: translate(6px, -1px); }
  92% { clip-path: inset(15% 0 70% 0); transform: translate(-5px, 2px); }
  100% { clip-path: inset(100% 0 0 0); }
}
.hero-role { font-family: var(--mono); font-size: clamp(16px, 2.2vw, 22px); margin: 22px 0 18px; color: var(--muted); min-height: 1.6em; }
.hero-role .typed { color: var(--cyan); text-shadow: var(--glow-c); }
.hero-role .caret { display: inline-block; width: 10px; height: 1.1em; background: var(--cyan); vertical-align: -3px; animation: blink .8s steps(1) infinite; margin-left: 3px; }
.hero-desc { color: var(--muted); font-size: 17px; max-width: 580px; margin-bottom: 34px; }
.hero-desc b { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 36px; flex-wrap: wrap; }
.stat .num { font-family: var(--display); font-size: 34px; font-weight: 800; color: #fff; }
.stat .num::after { content: attr(data-suffix); color: var(--cyan); }
.stat .lbl { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; }

/* Hero orb */
.orb-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; margin: 0 auto; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(34,228,255,.35); animation: spin 30s linear infinite; }
.orb-ring.r2 { inset: 12%; border: 1px solid rgba(157,92,255,.35); animation-duration: 20s; animation-direction: reverse; }
.orb-ring.r3 { inset: 25%; border: 2px dotted rgba(255,62,165,.4); animation-duration: 14s; }
@keyframes spin { to { transform: rotate(360deg); } }
.orb-core {
  position: absolute; inset: 35%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--cyan) 25%, var(--violet) 60%, transparent 72%);
  box-shadow: 0 0 80px rgba(34,228,255,.6), inset 0 0 40px rgba(255,255,255,.3);
  animation: pulse 3s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
}
.orb-core svg { width: 46%; filter: drop-shadow(0 0 8px #fff); }
@keyframes pulse { 50% { transform: scale(1.07); } }
.orb-item {
  will-change: transform;
  position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; font-weight: 700; text-align: center; line-height: 1.1;
  background: rgba(10,15,31,.85); border: 1px solid var(--line); color: var(--text);
  box-shadow: 0 0 18px rgba(34,228,255,.15);
}
.orb-item i { font-style: normal; font-size: 20px; display: block; margin-bottom: 2px; }

/* ---------- Transition / About ---------- */
.shift-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 30px; align-items: stretch; }
.shift-card { padding: 34px; }
.shift-card h3 { font-family: var(--display); font-size: 22px; margin-bottom: 6px; }
.shift-card .when { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.shift-card ul { list-style: none; }
.shift-card li { padding: 8px 0 8px 26px; position: relative; color: #c7d3ea; border-bottom: 1px dashed var(--line); }
.shift-card li::before { content: "▹"; position: absolute; left: 4px; color: var(--cyan); }
.shift-card.to li::before { color: var(--pink); }
.shift-card.to h3 { color: var(--pink); }
.shift-card.from h3 { color: var(--cyan); }
.shift-arrow { display: flex; align-items: center; justify-content: center; position: relative; width: 120px; }
.shift-arrow svg { width: 100%; overflow: visible; }
.shift-arrow .flow { stroke-dasharray: 8 8; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -16; } }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: 20px; border: 1px solid rgba(157,92,255,.4); color: #cdb6ff; background: rgba(157,92,255,.08); }

/* ---------- Journey (compact) ---------- */
.journey { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.j-line { position: absolute; top: 32px; left: 8%; right: 8%; height: 2px; background: var(--line); }
.j-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink)); box-shadow: 0 0 12px var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform 2.4s cubic-bezier(.3,.7,.2,1) .2s; }
.journey.in .j-line i { transform: scaleX(1); }
.j-step { text-align: center; position: relative; z-index: 1; opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; transition-delay: calc(var(--i) * .35s + .2s); }
.journey.in .j-step { opacity: 1; transform: none; }
.j-node {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: var(--bg-2); border: 2px solid var(--line); transition: border-color .5s, box-shadow .5s, transform .3s; transition-delay: calc(var(--i) * .35s + .4s), calc(var(--i) * .35s + .4s), 0s;
}
.journey.in .j-node { border-color: var(--cyan); box-shadow: 0 0 0 6px rgba(34,228,255,.08), 0 0 18px rgba(34,228,255,.45); }
.j-step:hover .j-node { transform: scale(1.12) rotate(-6deg); }
.j-num { font-family: var(--mono); font-size: 11px; color: var(--cyan); letter-spacing: 1.5px; }
.j-step h4, .j-step h3 { font-family: var(--display); font-size: 15px; margin: 4px 0 6px; }
.j-step p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.j-tech { font-family: var(--mono); font-size: 10.5px; color: #cdb6ff; margin-top: 8px; opacity: .85; }

/* ---------- Architecture ---------- */
.arch-shell { display: grid; grid-template-columns: 1fr 340px; gap: 22px; }
.arch-stage { padding: 18px; overflow: hidden; }
.arch-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.arch-toolbar .live { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--green); display: flex; align-items: center; gap: 8px; }
.arch-toolbar .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.2s infinite; }
#arch-svg { width: 100%; height: auto; display: block; }
#arch-svg .node { cursor: pointer; }
#arch-svg .node rect.box { fill: rgba(10,16,34,.92); stroke: rgba(120,180,255,.35); stroke-width: 1.2; transition: stroke .3s; }
#arch-svg .node:hover rect.box, #arch-svg .node.sel rect.box { stroke: var(--cyan); stroke-width: 2; }
#arch-svg .node.down rect.box { stroke: var(--red); fill: rgba(60,8,20,.9); }
#arch-svg .node.down text { fill: var(--red); }
#arch-svg .node text { fill: var(--text); font-family: var(--mono); font-size: 11px; text-anchor: middle; pointer-events: none; }
#arch-svg .node text.ic { font-size: 18px; }
#arch-svg .node text.sub { fill: var(--muted); font-size: 9px; }
#arch-svg .link { stroke: rgba(120,180,255,.22); stroke-width: 1.4; fill: none; }
#arch-svg .link.flow { stroke: rgba(34,228,255,.35); stroke-dasharray: 4 6; animation: dash 1.2s linear infinite; }
#arch-svg .zone { fill: rgba(157,92,255,.04); stroke: rgba(157,92,255,.3); stroke-dasharray: 6 5; }
#arch-svg .zone-lbl { fill: #b590ff; font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; }
.arch-side { display: flex; flex-direction: column; gap: 18px; }
.inspector { padding: 22px; min-height: 260px; }
.inspector .ins-ic { font-size: 32px; }
.inspector h4 { font-family: var(--display); font-size: 18px; margin: 8px 0 4px; color: var(--cyan); }
.inspector .ins-role { font-family: var(--mono); font-size: 11px; color: var(--pink); margin-bottom: 12px; letter-spacing: 1px; }
.inspector p { font-size: 14px; color: #c3cfe6; }
.inspector ul { margin-top: 10px; list-style: none; font-size: 13px; color: var(--muted); }
.inspector li::before { content: "› "; color: var(--cyan); }
.metrics { padding: 18px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric .m-lbl { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.metric .m-val { font-family: var(--display); font-size: 22px; font-weight: 700; }
.metric .m-val.ok { color: var(--green); } .metric .m-val.warn { color: var(--amber); } .metric .m-val.bad { color: var(--red); }
.spark { grid-column: 1 / -1; height: 50px; width: 100%; }
.arch-log { font-family: var(--mono); font-size: 11px; height: 120px; overflow: hidden; padding: 12px 16px; color: var(--muted); }
.arch-log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: fadein .3s; }
.arch-log .w { color: var(--amber); } .arch-log .e { color: var(--red); } .arch-log .g { color: var(--green); }
@keyframes fadein { from { opacity: 0; transform: translateX(-8px); } }

/* Hosting layers */
.layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 40px; }
.layer { padding: 26px; transition: transform .4s, border-color .4s; transform-style: preserve-3d; }
.layer:hover { border-color: rgba(34,228,255,.5); }
.layer .l-num { font-family: var(--display); font-size: 42px; font-weight: 900; color: transparent; -webkit-text-stroke: 1px rgba(34,228,255,.5); line-height: 1; }
.layer h4, .layer h3 { font-family: var(--display); font-size: 17px; margin: 10px 0; }
.layer p { color: var(--muted); font-size: 14px; }

/* ---------- Pipeline ---------- */
.pipe { padding: 34px; }
.pipe-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.pipe-head .commit { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pipe-head .commit b { color: var(--amber); font-weight: 500; }
.stages { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 10px 4px 20px; }
.stage { flex: 1; min-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
.stage .s-ic {
  width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 26px;
  border: 2px solid var(--line); background: var(--bg-2); transition: all .4s; position: relative;
}
.stage .s-name { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; }
.stage .s-time { font-family: var(--mono); font-size: 10px; color: var(--muted); opacity: .6; height: 14px; }
.stage.run .s-ic { border-color: var(--amber); box-shadow: 0 0 22px rgba(255,181,71,.5); animation: wobble .6s ease-in-out infinite; }
.stage.run .s-ic::after { content: ""; position: absolute; inset: -8px; border-radius: 22px; border: 2px solid transparent; border-top-color: var(--amber); animation: spin 1s linear infinite; }
.stage.ok .s-ic { border-color: var(--green); box-shadow: 0 0 22px rgba(61,255,168,.4); }
.stage.ok .s-name { color: var(--green); }
@keyframes wobble { 50% { transform: translateY(-4px); } }
.connector { flex: 0 0 40px; height: 2px; background: var(--line); position: relative; margin-bottom: 44px; overflow: hidden; }
.connector i { position: absolute; inset: 0; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .4s; box-shadow: 0 0 8px var(--green); }
.connector.ok i { transform: scaleX(1); }
.pipe-term { margin-top: 10px; background: #02040a; border: 1px solid var(--line); border-radius: 12px; font-family: var(--mono); font-size: 12.5px; height: 230px; overflow-y: auto; padding: 16px 18px; color: #a9b8d6; }
.pipe-term .g { color: var(--green); } .pipe-term .c { color: var(--cyan); } .pipe-term .a { color: var(--amber); } .pipe-term .p { color: var(--pink); }
.term-bar { display: flex; gap: 7px; margin-bottom: 10px; }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--red); }
.term-bar span:nth-child(2) { background: var(--amber); } .term-bar span:nth-child(3) { background: var(--green); }

/* ---------- Cost ---------- */
.cost-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.cost-chart { padding: 30px; }
.bars { display: flex; align-items: flex-end; gap: 22px; height: 300px; padding-top: 20px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; }
.bar { width: 100%; max-width: 70px; border-radius: 8px 8px 2px 2px; height: 0; transition: height 1.6s cubic-bezier(.2,.8,.2,1); position: relative; }
.bar.before { background: linear-gradient(to top, rgba(255,77,109,.3), var(--red)); box-shadow: 0 0 20px rgba(255,77,109,.3); }
.bar.after { background: linear-gradient(to top, rgba(61,255,168,.25), var(--green)); box-shadow: 0 0 20px rgba(61,255,168,.35); }
.bar-pair { display: flex; gap: 6px; align-items: flex-end; width: 100%; justify-content: center; height: 100%; }
.bar-lbl { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; }
.legend { display: flex; gap: 20px; margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend .lb::before { background: var(--red); } .legend .la::before { background: var(--green); }
.cost-side { display: flex; flex-direction: column; gap: 22px; }
.saving { padding: 30px; text-align: center; }
.saving .big { font-family: var(--display); font-size: clamp(54px, 7vw, 86px); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--green), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.saving .cap { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-top: 8px; }
.tactics { padding: 24px 26px; list-style: none; }
.tactics li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: #c7d3ea; }
.tactics li:last-child { border: 0; }
.tactics li b { color: var(--green); font-family: var(--mono); font-weight: 500; min-width: 22px; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.galaxy { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; margin: 0 auto; }
.galaxy .center {
  position: absolute; inset: 40%; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 900; font-size: 14px; letter-spacing: 1px; text-align: center;
  background: radial-gradient(circle, rgba(157,92,255,.6), rgba(34,228,255,.15) 70%); box-shadow: 0 0 60px rgba(157,92,255,.5);
  animation: pulse 4s ease-in-out infinite;
}
.galaxy .orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(120,180,255,.12); }
.galaxy .orbit.o1 { inset: 24%; } .galaxy .orbit.o2 { inset: 10%; } .galaxy .orbit.o3 { inset: -2%; }
.planet {
  will-change: transform;
  position: absolute; top: 50%; left: 50%; padding: 6px 11px; border-radius: 20px; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  background: rgba(10,15,31,.9); border: 1px solid var(--c, var(--cyan)); color: var(--c, var(--cyan));
  box-shadow: 0 0 12px color-mix(in srgb, var(--c, var(--cyan)) 40%, transparent);
  transform: translate(-50%, -50%); transition: scale .2s;
}
.planet:hover { scale: 1.2; z-index: 3; }
.skill-cats { display: grid; gap: 16px; }
.skill-cat { padding: 20px 22px; }
.skill-cat h4, .skill-cat h3 { font-family: var(--mono); font-size: 13px; color: var(--cyan); letter-spacing: 1.5px; margin-bottom: 12px; display: flex; justify-content: space-between; }
.meter { height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 12px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width 1.6s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 10px var(--cyan); }

/* ---------- Terminal ---------- */
.term-wrap { padding: 0; overflow: hidden; max-width: 920px; margin: 0 auto; }
.term-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.3); }
.term-top .title { flex: 1; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.term-top span.d { width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.term-top span.d:nth-child(2) { background: var(--amber); } .term-top span.d:nth-child(3) { background: var(--green); }
#shell { font-family: var(--mono); font-size: 14px; padding: 20px; height: 380px; overflow-y: auto; cursor: text; }
#shell .line { white-space: pre-wrap; word-break: break-word; }
#shell .pr { color: var(--green); } #shell .pa { color: var(--cyan); } #shell .er { color: var(--red); } #shell .hl { color: var(--pink); } #shell .mu { color: var(--muted); }
#shell .in-row { display: flex; gap: 8px; }
#shell input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; caret-color: var(--cyan); }
.term-hints { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }

/* ---------- Contact ---------- */
#contact { text-align: center; padding-bottom: 48px; }
.contact-box { padding: 56px 30px; max-width: 900px; margin: 0 auto; overflow: hidden; }
.contact-box h2 { font-family: var(--display); font-size: clamp(32px, 6vw, 68px); line-height: 1.05; margin-bottom: 18px; }
.contact-box h2 span { color: var(--cyan); text-shadow: var(--glow-c); }
.contact-box p { color: var(--muted); max-width: 560px; margin: 0 auto 36px; }
.socials { display: flex; justify-content: center; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
footer { text-align: center; padding: 30px 5vw 40px; font-family: var(--mono); font-size: 12px; color: var(--muted); position: relative; z-index: 2; }
footer .hb { color: var(--pink); animation: pulse-txt 1.2s infinite; display: inline-block; }
@keyframes pulse-txt { 50% { transform: scale(1.3); } }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; position: relative; z-index: 2; background: rgba(4,6,13,.6); }
.marquee .track { will-change: transform; display: flex; gap: 50px; width: max-content; animation: marq 40s linear infinite; font-family: var(--display); font-size: 22px; font-weight: 700; color: transparent; -webkit-text-stroke: 1px rgba(34,228,255,.5); }
.marquee .track span:nth-child(3n) { color: var(--cyan); -webkit-text-stroke: 0; text-shadow: var(--glow-c); }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .skills-grid, .cost-grid, .arch-shell { grid-template-columns: 1fr; }
  .orb-wrap { max-width: 340px; }
  .shift-grid { grid-template-columns: 1fr; }
  .shift-arrow { width: 100%; height: 60px; transform: rotate(90deg); }
  .shift-arrow svg { width: 60px; }
}
@media (max-width: 760px) {
  section { padding: 40px 16px; }
  nav { padding: 14px 16px; }
  nav.scrolled { padding: 10px 16px; }
  .nav-links { position: fixed; top: 58px; right: 16px; flex-direction: column; gap: 14px; padding: 20px 24px; background: rgba(4,6,13,.95); border: 1px solid var(--line); border-radius: 12px; display: none; }
  .nav-links.open { display: flex; }
  .burger { display: block; }
  .metrics { grid-template-columns: 1fr 1fr; }
  #shell { height: 320px; font-size: 13px; }
  .hero-stats { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
}

/* grid floor scroll on its own composited layer */
.grid-floor { background-image: none; overflow: hidden; }
.grid-floor::before {
  content: ""; position: absolute; left: 0; right: 0; top: -60px; bottom: 0;
  background-image:
    linear-gradient(rgba(34,228,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,228,255,.18) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: floor 3s linear infinite; will-change: transform;
}
@keyframes floor { to { transform: translateY(60px); } }
/* pause decorative animations while a section is off screen */
.paused, .paused * { animation-play-state: paused !important; }

/* ---------- Hosting: large stage ---------- */
.arch-shell { grid-template-columns: 1fr; }
.arch-stage { padding: 20px 22px 14px; }
.arch-canvas { position: relative; }
#arch-svg { max-height: 82vh; margin: 0 auto; }
.arch-side { display: grid; grid-template-columns: 1.15fr 1fr 1.25fr; gap: 18px; flex-direction: initial; }
.arch-side .inspector { min-height: 0; }
.arch-log { height: auto; min-height: 220px; max-height: 260px; font-size: 11.5px; line-height: 1.75; }
.arch-toolbar { gap: 14px 22px; margin-bottom: 8px; align-items: flex-start; }
.ev-group { display: flex; flex-direction: column; gap: 7px; }
.ev-group .ev-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.ev-group .ev-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.ev { padding: 8px 13px; font-size: 11.5px; letter-spacing: .5px; }
.btn.ev.warn { border-color: var(--amber); color: var(--amber); background: rgba(255,181,71,.06); }
.btn.ev.warn::after { background: var(--amber); }
.btn.ev.warn:hover { color: var(--bg); box-shadow: 0 0 18px rgba(255,181,71,.45); }
.btn.ev.running { animation: evpulse 1s ease-in-out infinite; opacity: 1; }
@keyframes evpulse { 50% { box-shadow: 0 0 22px rgba(34,228,255,.6); } }
.arch-toolbar .live { margin-left: auto; align-self: center; }
.arch-banner {
  position: absolute; top: 6px; left: 50%; z-index: 2; pointer-events: none;
  transform: translate(-50%, -12px); opacity: 0; transition: opacity .3s, transform .3s;
  font: 600 12px/1 var(--mono); letter-spacing: 1.5px; white-space: nowrap;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--cyan); color: var(--cyan); background: rgba(4,6,13,.92);
}
.arch-banner.show { opacity: 1; transform: translate(-50%, 0); }
.arch-banner.e { border-color: var(--red); color: var(--red); }
.arch-banner.w { border-color: var(--amber); color: var(--amber); }
.arch-banner.g { border-color: var(--green); color: var(--green); }
.arch-banner::before { content: "● "; animation: blink .8s steps(1) infinite; }
#arch-svg .node.alert rect.box { stroke: var(--amber); stroke-width: 2; }
#arch-svg .node.shield rect.box { stroke: var(--green); stroke-width: 2.5; fill: rgba(8,40,30,.92); }
#arch-svg .node.alert text:not(.sub), #arch-svg .node.shield text:not(.sub) { fill: #fff; }
#arch-svg .shockwave { fill: none; stroke: var(--green); stroke-width: 2; animation: shock 1s ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes shock { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(2.2); } }

/* ---------- Skill detail modal ---------- */
button.chip { cursor: pointer; font: inherit; font-family: var(--mono); font-size: 11px; transition: background .2s, border-color .2s, color .2s, transform .2s; }
button.chip:hover { background: rgba(34,228,255,.12); border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.planet { cursor: pointer; appearance: none; line-height: 1.2; }
.sk-modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2,3,8,.7); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.sk-modal.open { opacity: 1; visibility: visible; }
.sk-card { width: min(560px, 100%); padding: 30px 30px 26px; overflow: hidden; transform: translateY(24px) scale(.96); transition: transform .35s cubic-bezier(.2,.8,.2,1); background: rgba(9,14,30,.97); }
.sk-modal.open .sk-card { transform: none; }
.sk-card::after { content: ""; position: absolute; left: 0; right: 0; top: -40%; height: 40%; background: linear-gradient(transparent, rgba(34,228,255,.12), transparent); pointer-events: none; }
.sk-modal.open .sk-card::after { animation: skscan 1.1s ease-out .1s; }
@keyframes skscan { to { top: 110%; } }
.sk-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.sk-close:hover { color: var(--pink); border-color: var(--pink); }
.sk-cat { font-family: var(--mono); font-size: 11px; color: var(--pink); letter-spacing: 2px; }
.sk-card h3 { font-family: var(--display); font-size: clamp(24px, 4vw, 32px); margin: 6px 0 18px; background: linear-gradient(90deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sk-sec { margin-bottom: 16px; }
.sk-sec h5 { font-family: var(--mono); font-size: 11px; color: var(--cyan); letter-spacing: 1.5px; margin-bottom: 6px; font-weight: 500; }
.sk-sec h5::before { content: "> "; color: var(--muted); }
.sk-sec p { color: #c7d3ea; font-size: 15px; }
.sk-rel { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 6px; }
.sk-rel h5 { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1.5px; font-weight: 500; margin-bottom: 8px; }

@media (max-width: 1000px) {
  .arch-side { grid-template-columns: 1fr 1fr; }
  .arch-side .arch-log { grid-column: 1 / -1; }
  .journey { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
  .j-line { display: none; }
}
@media (max-width: 760px) {
  .arch-side { grid-template-columns: 1fr; }
  .arch-stage { padding: 14px 10px 10px; }
  .journey { grid-template-columns: repeat(2, 1fr); }
  .arch-banner { font-size: 10px; padding: 7px 10px; }
}

/* ---------- Hosting: one-screen dashboard ---------- */
#hosting { padding: 60px 2vw 12px; min-height: 100vh; }
.dash-wrap { max-width: 1760px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 12px; }
.dash-head .sec-tag { margin-bottom: 4px; }
.dash-head .sec-title { font-size: clamp(24px, 2.6vw, 34px); margin: 0; }
.dash-how { font-family: var(--mono); font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dash-how b { font-weight: 600; }
.c-pink { color: var(--pink); } .c-cyan { color: var(--cyan); } .c-green { color: var(--green); }

.dash {
  display: grid; grid-template-columns: 188px minmax(0, 1fr) 310px; gap: 12px;
  height: max(520px, calc(100vh - 148px));
}
.dash-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.dash .glass { border-radius: 14px; }
.panel-head { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; margin-bottom: 8px; flex: none; }
.panel-head .ph-t { margin-right: auto; font-weight: 700; }
.ph-t { color: var(--cyan); } .ph-t.act { color: var(--pink); } .ph-t.res { color: var(--green); }
.ph-hint { color: var(--muted); font-size: 10px; letter-spacing: .5px; }
.panel-head .live { font-size: 10px; color: var(--green); display: flex; align-items: center; gap: 6px; letter-spacing: 1px; }
.panel-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.2s infinite; }

/* ① actions */
.dash-actions { padding: 12px 10px; }
#arch-events { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.ev-group .ev-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.5px; color: var(--muted); margin: 0 0 4px 2px; }
#arch-events .ev-btns { display: flex; flex-direction: column; gap: 4px; }
.ev-item {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 9px; cursor: pointer; text-align: left;
  border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--text); font: inherit;
  position: relative; overflow: hidden; transition: border-color .2s, background .2s, transform .2s, opacity .2s;
}
.ev-t { flex: 1; font-family: var(--mono); font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-go { color: var(--cyan); opacity: .35; font-size: 10px; transition: opacity .2s, transform .2s; }
.ev-item:hover:not(:disabled) { border-color: var(--cyan); background: rgba(34,228,255,.07); transform: translateX(3px); }
.ev-item.alt:hover:not(:disabled) { border-color: var(--pink); background: rgba(255,62,165,.07); }
.ev-item.warn:hover:not(:disabled) { border-color: var(--amber); background: rgba(255,181,71,.07); }
.ev-item:hover .ev-go { opacity: 1; transform: translateX(2px); }
.ev-item:disabled { opacity: .35; cursor: not-allowed; }
.ev-item.running { border-color: var(--amber); background: rgba(255,181,71,.1); opacity: 1; }
.ev-item.running::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 40%; background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: evscan 1.1s linear infinite; }
@keyframes evscan { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.ev-item.running .ev-go { opacity: 1; color: var(--amber); animation: blink .6s steps(1) infinite; }
.ev-item.done { border-color: var(--green); }
.ev-item.done .ev-go { color: var(--green); opacity: 1; }
.ctrl-status { flex: none; margin-top: 10px; padding: 7px 9px; border-radius: 8px; border: 1px dashed var(--line); font-family: var(--mono); font-size: 10px; line-height: 1.4; color: var(--muted); display: flex; align-items: center; gap: 7px; transition: color .3s, border-color .3s; }
.ctrl-status span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ctrl-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.ctrl-status.run { color: var(--amber); border-color: rgba(255,181,71,.5); }
.ctrl-status.run i { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: blink .8s steps(1) infinite; }
.ctrl-status.ok { color: var(--green); border-color: rgba(61,255,168,.4); }
.ctrl-status.ok i { background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ② map */
.dash-map { padding: 10px 8px 6px; }
.dash-map .arch-canvas { flex: 1; min-height: 0; position: relative; }
.dash-map #arch-svg { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; margin: 0; }
.map-legend { flex: none; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 10px; color: var(--muted); padding: 6px 0; }
.map-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.node-strip { flex: none; display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(34,228,255,.05); border: 1px solid rgba(34,228,255,.2); min-height: 58px; }
.ns-ic { font-size: 22px; flex: none; }
.ns-body { min-width: 0; }
.ns-body b { font-family: var(--display); font-size: 13px; color: var(--cyan); margin-right: 8px; }
.ns-body em { font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: 1px; color: var(--pink); }
.ns-body p { font-size: 12px; color: #c7d3ea; line-height: 1.45; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ③ response */
.dash-resp { gap: 12px; }
.dash-resp .metrics { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 12px 8px; }
.dash-resp .metric .m-lbl { font-size: 8.5px; letter-spacing: .5px; }
.dash-resp .metric .m-val { font-size: 17px; }
.dash-resp .spark { grid-column: 1 / -1; height: 30px; }
.resp-term { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.resp-term .term-top { flex: none; padding: 7px 12px; gap: 6px; }
.resp-term .term-top span.d { width: 9px; height: 9px; }
.resp-term .term-top .title { font-size: 11px; color: var(--green); }
.resp-term .arch-log { flex: 1; min-height: 0; height: auto; max-height: none; overflow-y: auto; padding: 8px 12px; background: rgba(1,3,8,.6); font-family: var(--mono); font-size: 11px; line-height: 1.65; color: var(--muted); scrollbar-width: thin; }
.arch-log div { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word; }
.arch-log .ts { color: rgba(138,155,189,.5); }
.arch-log .cmd { color: var(--pink); margin-top: 6px; }
.arch-log .cmd::before { content: "$ "; color: var(--green); }
.svc-panel { flex: none; padding: 10px 12px 6px; }
.svc-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 11px; }
.svc-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 9px; letter-spacing: 1px; padding: 0 4px 6px; border-bottom: 1px solid var(--line); }
.svc-table td { padding: 6px 4px; border-bottom: 1px dashed rgba(120,180,255,.08); white-space: nowrap; color: #c7d3ea; }
.svc-table tbody tr:last-child td { border-bottom: 0; }
.svc-table tr { cursor: pointer; transition: background .2s; }
.svc-table tbody tr:hover { background: rgba(34,228,255,.05); }
.svc-table tr.flag { background: rgba(255,181,71,.06); }
.svc-table .sv-n { color: var(--text); font-weight: 600; }
.svc-table .sv-p b { font-weight: 600; margin-right: 2px; }
.svc-table .pd { display: inline-block; width: 5px; height: 5px; border-radius: 1px; margin-left: 2px; background: var(--green); vertical-align: 1px; }
.svc-table .pd.dead { background: var(--red); } .svc-table .pd.new { background: var(--amber); }
.svc-table .pd.deploy { background: var(--violet); } .svc-table .pd.canary { background: var(--pink); }
.svc-table .bar { display: inline-block; width: 26px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); margin-right: 5px; vertical-align: 2px; overflow: hidden; }
.svc-table .bar i { display: block; height: 100%; background: var(--green); transition: width .4s; }
.svc-table .bar i.warm { background: var(--amber); } .svc-table .bar i.hot { background: var(--red); }
.sv-s { font-size: 9px; letter-spacing: .5px; padding: 1px 6px; border-radius: 10px; border: 1px solid currentColor; }
.sv-s.ok { color: var(--green); } .sv-s.warn { color: var(--amber); } .sv-s.bad { color: var(--red); }
.sv-s.pink { color: var(--pink); } .sv-s.vio { color: var(--violet); }

/* larger screens get a bit more room for the side panels */
@media (min-width: 1500px) { .dash { grid-template-columns: 220px minmax(0, 1fr) 370px; } }

/* below laptop width: stack, page scrolls normally */
@media (max-width: 1100px) {
  #hosting { min-height: 0; padding: 48px 16px 24px; }
  .dash { height: auto; grid-template-columns: 1fr; }
  #arch-events { flex-direction: row; flex-wrap: wrap; overflow: visible; gap: 10px 16px; }
  #arch-events .ev-btns { flex-direction: row; flex-wrap: wrap; }
  .ev-item { width: auto; }
  .dash-map .arch-canvas { flex: none; aspect-ratio: 900 / 560; }
  .dash-resp { display: grid; grid-template-columns: 1fr 1fr; }
  .dash-resp .metrics { grid-column: 1 / -1; }
  .resp-term { min-height: 260px; }
}
@media (max-width: 760px) {
  .dash-resp { display: flex; }
  .dash-resp .metrics { grid-template-columns: 1fr 1fr; }
  .resp-term { min-height: 240px; }
  .dash-how { font-size: 11px; }
  .panel-head .ph-hint { display: none; }
}

/* footer links */
.foot-links { display: flex; justify-content: center; gap: 18px; margin-bottom: 10px; }
.foot-links a { color: var(--muted); transition: color .2s; }
.foot-links a:hover { color: var(--cyan); }

/* ---------- Case study / article pages ---------- */
.cs { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; padding: 110px 16px 40px; font-size: 17px; }
.cs nav.crumbs { position: static; display: block; padding: 0; border: 0; z-index: auto; }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--cyan); }
.crumbs span { margin: 0 4px; }
.cs-h1 {
  font-family: var(--display); font-size: clamp(28px, 5vw, 48px); line-height: 1.15; margin-bottom: 18px;
  background: linear-gradient(90deg, #fff, var(--cyan) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cs-lede { font-size: 19px; color: var(--text); margin-bottom: 14px; }
.cs-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 30px; }
.cs-meta a, .cs-back a, .cs p a { color: var(--cyan); }
.cs h2 { font-family: var(--display); font-size: clamp(22px, 3vw, 30px); line-height: 1.2; margin: 46px 0 14px; color: #fff; }
.cs h2::before { content: "## "; color: var(--cyan); font-family: var(--mono); font-size: .7em; }
.cs h3 { font-size: 20px; margin: 28px 0 8px; color: var(--cyan); }
.cs p { color: #c9d6ee; margin-bottom: 14px; }
.cs ul, .cs ol { color: #c9d6ee; margin: 0 0 16px 22px; }
.cs li { margin-bottom: 8px; }
.cs li::marker { color: var(--cyan); }
.cs b { color: var(--text); }
.cs mark.tbd { background: rgba(255,181,71,.12); color: var(--amber); border: 1px dashed rgba(255,181,71,.5); border-radius: 4px; padding: 0 5px; font-family: var(--mono); font-size: .82em; }
.cs-tldr { padding: 20px 24px 8px; }
.cs-tldr h2 { margin: 0 0 10px; font-size: 18px; }
.cs-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 20px 14px; margin: 18px 0 8px; font-family: var(--mono); font-size: 13px; text-align: center; }
.cs-flow span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; line-height: 1.3; }
.cs-flow span.c { border-color: rgba(34,228,255,.5); color: var(--cyan); }
.cs-flow span.v { border-color: rgba(157,92,255,.6); color: #c3a2ff; }
.cs-flow span.g { border-color: rgba(61,255,168,.5); color: var(--green); }
.cs-flow small { color: var(--muted); font-size: 10.5px; }
.cs-flow i { color: var(--muted); font-style: normal; }
.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.cs-stats .glass { padding: 16px; border-radius: 14px; }
.cs-stats b { display: block; font-family: var(--display); font-size: 26px; color: var(--cyan); text-shadow: var(--glow-c); }
.cs-stats span { font-size: 13px; color: var(--muted); }
.cs-cta { padding: 26px; margin-top: 46px; text-align: center; }
.cs-cta h2 { margin-top: 0; }
.cs-cta h2::before { content: none; }
.cs-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.cs-back { margin-top: 26px; font-family: var(--mono); font-size: 13px; }
.cs-link { margin-top: 18px; font-family: var(--mono); font-size: 13px; }
.cs-link a { color: var(--cyan); border-bottom: 1px dashed rgba(34,228,255,.5); }
.cs-link a:hover { color: #fff; }
