/* Portfólio Guilherme Boeira — limpo por cima, 3D por baixo (docs/redesign.md).
   Texto calmo numa coluna sobre a cena; separação por espaço e linhas de 1px, nunca molduras ou sombras.
   Uma cor de destaque, azul, só em links, hover, marcadores e nas linhas da cena; tema escuro só.
   Os componentes só leem var(--*). */

:root {
  --font-heading: "Inter Tight", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-heading-tracking: -0.025em;
  --font-body: "Inter Tight", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --shadow-md: none;

  /* estrutura: linhas de 1px, nada de fundo nas células — a cena aparece por trás */
  --rule-w: 1px;
  --rule: linear-gradient(var(--color-divider), var(--color-divider));
  --grid-line: var(--color-divider);
  --grid-gap: 1px;
  --grid-frame: 1px solid var(--color-divider);
  --cell-bg: var(--color-surface);
  --cell-pad: var(--space-4);

  /* o destaque marca; o texto continua na cor do texto */
  --btn-bg: transparent;
  --btn-ink: var(--color-text);
  --btn-border: var(--color-accent);
  --btn-hover: var(--color-accent);
  --btn-hover-ink: var(--color-accent-ink);
  --chip-bg: transparent;
  --chip-border: var(--color-divider);
  --focus-ring: var(--color-accent);

  /* terminal: uma janela calma, com uma linha fina em volta e fundo translúcido */
  --term-bg: var(--color-glass);
  --term-frame: 1px solid var(--color-divider);
  --term-line: var(--color-divider);
  --term-ink: var(--color-text);
  --term-dim: var(--color-muted);
  --term-accent: var(--color-accent-text);
  --term-warn: var(--color-red-text);
  --term-mark: var(--color-accent-soft);
  --term-bar: var(--color-accent);
  --term-bar-dim: var(--color-divider);
}

/* Uma cor de destaque só: azul. (Na seção "você" ela vira vermelho.) */
:root {
  --accent: #3d8bff;
}

:root {
  color-scheme: dark;
  --color-bg: #0a0a0c;
  --color-surface: rgba(10, 10, 12, 0.72);
  --color-surface-2: rgba(255, 255, 255, 0.04);
  --color-glass: rgba(10, 10, 12, 0.78);
  --color-text: #ecebe8;
  --color-muted: #8b8b94;
  --color-accent: var(--accent);
  --color-accent-text: var(--accent);
  --color-accent-ink: #0a0a0c;
  --color-accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --color-accent-hover: var(--accent);
  --color-divider: rgba(255, 255, 255, 0.08);
  --color-divider-strong: rgba(255, 255, 255, 0.16);
  --color-cyan: var(--accent);
  --color-cyan-text: var(--accent);
  --color-cyan-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --color-red: #ff4d6a;
  --color-red-text: #ff4d6a;
  --color-red-soft: rgba(255, 77, 106, 0.1);
  --scrim-side: rgba(10, 10, 12, 0.92);
  --scrim-mid: rgba(10, 10, 12, 0.55);
  --scrim-clear: rgba(10, 10, 12, 0);
  --scrim-dim: rgba(10, 10, 12, 0.62);
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 16px;
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
}
p {
  margin: 0;
}
code,
.mono {
  font-family: var(--font-mono);
}
code {
  font-size: 0.9em;
  color: var(--color-text);
}
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
a {
  color: var(--color-cyan-text);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--color-accent-text);
}
.muted {
  color: var(--color-muted);
}
.strong {
  color: var(--color-text);
}
.accent {
  color: var(--color-accent-text);
}
.small {
  font-size: 13px;
}

/* The city: one fixed canvas behind everything, faded in once the model is on screen. */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
#scene.ready {
  opacity: 1;
}
/* What lenis.css asks for: the page keeps its own height and the browser's smooth scroll stays out. */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

/* Rules: a plain 2px line in Modernist, a 1px line that fades at the ends in Nocturne. */
.rule {
  height: var(--rule-w);
  background: var(--rule);
  margin-bottom: var(--space-6);
}

/* Grids: cells split by visible 2px lines in Modernist, loose surfaces in Nocturne. */
.grid-frame {
  display: grid;
  gap: var(--grid-gap);
  background: var(--grid-line);
  border: var(--grid-frame);
}
.cell {
  padding: var(--cell-pad);
  background: var(--cell-bg);
  border-radius: var(--radius-md);
  min-width: 0;
}

/* ---------- buttons ---------- */
.btn {
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  gap: 10px;
  padding: 0 18px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border: 1px solid var(--btn-border);
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
}
.btn-primary:hover {
  background: var(--btn-hover);
  color: var(--btn-hover-ink);
}
.btn-line {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-divider);
}
.btn-line:hover {
  border-color: var(--color-cyan);
  color: var(--color-accent-text);
}
.btn-line:active {
  background: var(--color-accent-soft);
}
.btn-mono {
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.lang-btn {
  width: auto;
  min-width: 44px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.icon-btn:hover {
  border-color: var(--color-cyan);
  color: var(--color-accent-text);
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-4);
  border-bottom: var(--rule-w) solid transparent;
  border-image: var(--rule) 1;
}
.brand {
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}
.brand span {
  color: var(--color-accent-text);
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-12);
  align-items: end;
  padding-block: clamp(48px, 9vw, 120px) var(--space-16);
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-width: 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-accent-text);
}
.hero h1 {
  letter-spacing: var(--font-heading-tracking);
  font-size: clamp(52px, 11vw, 140px);
  line-height: 0.92;
  text-wrap: balance;
}
.lede {
  max-width: 56ch;
  font-size: clamp(17px, 1.9vw, 20px);
  color: var(--color-muted);
  text-wrap: pretty;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.server {
  grid-template-columns: minmax(0, 1fr);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 13px;
  min-width: 0;
}
.server-head,
.server-foot,
.fact {
  background: var(--cell-bg);
}
.server-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}
.facts {
  display: grid;
  gap: var(--grid-gap);
}
.fact {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  padding: var(--space-2) var(--space-4);
}
.fact span:first-child {
  color: var(--color-muted);
}
.fact span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.server-foot {
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
}
.server-foot:hover {
  text-decoration: underline;
}

/* ---------- sections ---------- */
.block {
  padding-block: var(--space-12) var(--space-16);
}
.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3) var(--space-8);
  margin-bottom: var(--space-6);
}
.block-head p {
  max-width: 52ch;
  color: var(--color-muted);
}
.block-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}
.block-title span {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-accent-text);
}
.block-title h2 {
  letter-spacing: -0.02em;
  font-size: clamp(28px, 3.6vw, 40px);
}

/* ---------- terminal ---------- */
.term {
  background: var(--term-bg);
  color: var(--term-ink);
  border: var(--term-frame);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  min-width: 0;
}
.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--term-line);
  font-size: 12px;
  color: var(--term-dim);
}
.bucket {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bucket[hidden] {
  display: none;
}
.bucket-cells {
  display: flex;
  gap: 3px;
}
.bucket-cells span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--term-accent);
}
.bucket-cells .on {
  background: var(--term-accent);
}
.term-out {
  height: 380px;
  overflow-y: auto;
  padding: 16px;
  overscroll-behavior: contain;
}
.t-line {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1.6em;
}
.t-kube {
  overflow-x: auto;
}
.t-kube .t-line {
  white-space: pre;
  width: max-content;
}
.t-gap {
  margin-top: 6px;
}
.t-answer {
  margin-bottom: 6px;
}
.t-streaming::after {
  content: "▍";
  color: var(--term-accent);
  animation: t-blink 1s steps(1) infinite;
}
@keyframes t-blink {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .t-streaming::after {
    animation: none;
  }
}
.t-meta {
  margin-top: 4px;
}
.t-hit {
  margin-block: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--term-line);
}
.t-dim {
  color: var(--term-dim);
}
.t-token {
  padding-inline: 4px;
  border: 1px solid var(--term-line);
  color: var(--term-accent);
}
.t-cut {
  opacity: 0.7;
}
.t-prompt {
  margin-block: 4px 8px;
  padding-left: 12px;
  border-left: 2px solid var(--term-line);
}
.t-prompt summary {
  color: var(--term-accent);
  cursor: pointer;
}
.t-prompt pre {
  margin: 6px 0 0;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: var(--term-dim);
}
.t-acc {
  color: var(--term-accent);
}
.t-warn {
  color: var(--term-warn);
  font-weight: 700;
}
.t-bold {
  font-weight: 700;
}
.term mark {
  background: var(--term-mark);
  color: inherit;
}
.t-link {
  color: var(--term-accent);
}
.t-cite,
.t-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--term-accent);
  cursor: pointer;
}
.t-cite {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.t-cite:hover {
  text-decoration-style: solid;
}
.t-btn {
  white-space: pre;
}
.t-cmd {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline dotted var(--term-dim);
  text-underline-offset: 3px;
}
.t-cmd:hover,
.t-cmd:focus-visible {
  color: var(--term-accent);
  text-decoration-style: solid;
}
.t-btn:hover {
  text-decoration: underline;
}
.term-in {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--term-line);
}
.term-in label {
  color: var(--term-accent);
  font-weight: 700;
}
.term-in input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--term-ink);
  font: inherit;
  caret-color: var(--term-accent);
  padding: 4px 0;
}
.term-in input::placeholder {
  color: var(--term-dim);
}
.term-in span {
  color: var(--term-dim);
  font-size: 12px;
  white-space: nowrap;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-3);
}
.chip {
  min-height: 36px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}
.chip span {
  color: var(--color-accent-text);
}
.chip:hover {
  border-color: var(--color-cyan);
  color: var(--color-accent-text);
}
.chip:active {
  background: var(--color-accent-soft);
}

/* ---------- projects ---------- */
.projects {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 280px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}
.card h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.card p {
  flex: 1;
  color: var(--color-muted);
  text-wrap: pretty;
}
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.stack li {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding-top: var(--space-2);
}
.repo {
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- live panel ---------- */
.stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.stat-label {
  font-size: 13px;
  color: var(--color-muted);
}
.stat-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-value,
.stat-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}
.stat-viz {
  margin-top: auto;
  padding-top: var(--space-3);
}
.spark {
  display: block;
  width: 100%;
  height: 32px;
  overflow: visible;
}
.spark polygon {
  fill: var(--color-accent-soft);
}
.spark polyline {
  fill: none;
  stroke: var(--color-cyan);
  stroke-width: 1.5;
}
.spark-empty {
  height: 32px;
  display: flex;
  align-items: end;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-muted);
  border-bottom: 1px dashed var(--color-divider);
}
.strip {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  height: 32px;
}
.strip span {
  border: 1px solid var(--color-accent-soft);
}
.strip .on {
  background: var(--color-accent-soft);
}
.strip .now {
  background: var(--color-cyan);
  border-color: var(--color-cyan);
}
.pod-viz {
  display: flex;
  height: 32px;
}
.pod-viz span {
  width: 25%;
  background: var(--color-cyan-soft);
  border: 1px solid var(--color-cyan);
}
.stat-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-muted);
}

/* ---------- cluster ---------- */
.cluster-note {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}
.nodes {
  margin-top: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.nodes:empty {
  display: none;
}
.node {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.node-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: baseline;
}
.node-ok {
  color: var(--color-text);
}
.node-bad {
  color: var(--color-accent-text);
  font-weight: 600;
}
.gauge {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 2px var(--space-3);
  align-items: center;
  font-size: 12px;
}
.gauge-bar {
  display: block;
  height: 8px;
  border: 1px solid var(--color-accent-soft);
}
.gauge-bar span {
  display: block;
  height: 100%;
  background: var(--color-cyan);
}
.gauge .mono {
  grid-column: 2;
  color: var(--color-muted);
}

.table-title {
  margin-top: var(--space-8);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-muted);
}
.table-wrap {
  margin-top: var(--space-2);
  overflow-x: auto;
}
.data {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.data thead tr {
  border-bottom: var(--rule-w) solid var(--color-divider);
}
.data th {
  font-weight: 400;
  color: var(--color-muted);
}
.data th,
.data td {
  text-align: right;
  padding: 10px 8px;
}
.data th:first-child,
.data td:first-child {
  text-align: left;
  padding-left: 0;
  white-space: nowrap;
}
.data th:last-child,
.data td:last-child {
  padding-right: 0;
}
.data tbody tr {
  border-bottom: 1px solid var(--color-divider);
}
.data tbody tr:hover {
  background: var(--color-surface);
}
.data .err {
  color: var(--color-accent-text);
}

/* ---------- evals ---------- */
.evals-table td:first-child {
  white-space: normal;
}
.evals-table .link-btn {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.evals-table .link-btn:hover,
.evals-table .link-btn:focus-visible {
  color: var(--color-accent-text);
  text-decoration: underline;
}
.eval-miss {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-muted);
  overflow-wrap: anywhere;
}

/* ---------- architecture ---------- */
.arch {
  grid-template-columns: minmax(0, 1fr);
}
.diagram {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-mono);
}
.diagram.narrow {
  max-width: 420px;
}
.wires path {
  fill: none;
  stroke: var(--color-divider);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition:
    stroke 0.2s,
    stroke-width 0.2s;
}
.wires path.lit {
  stroke: var(--color-cyan);
  stroke-width: 3;
}
.wires path.off {
  stroke-dasharray: 4 4;
}
.node rect {
  fill: var(--color-bg);
  stroke: var(--color-divider);
  stroke-width: 1.5;
  rx: var(--radius-sm);
  transition:
    fill 0.2s,
    stroke 0.2s;
}
.node.lit rect {
  fill: var(--color-cyan-soft);
  stroke: var(--color-cyan);
}
.node.off rect {
  stroke-dasharray: 4 4;
}
.node .label {
  font-weight: 700;
  fill: var(--color-text);
}
.node .sub {
  fill: var(--color-muted);
}
.log {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.log ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.log li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-divider);
}
.log li span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log li.bad {
  color: var(--color-accent-text);
}

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3) var(--space-8);
  padding-block: var(--space-6) 88px; /* room for the floating button */
  border-top: var(--rule-w) solid transparent;
  border-image: var(--rule) 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}

/* ---------- page navigation (v2) ---------- */
.topbar {
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
}
.pages-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
}
.pages-nav a {
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 15px;
  text-decoration: none;
  color: var(--color-muted);
  border-bottom: 2px solid transparent;
}
.pages-nav a span:not([data-i18n]) {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-muted);
}
.pages-nav a:hover {
  color: var(--color-accent-text);
}
.pages-nav a[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* ---------- shared page pieces ---------- */
.page-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-block: clamp(40px, 7vw, 96px) var(--space-12);
}
.page-hero h1 {
  letter-spacing: var(--font-heading-tracking);
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.92;
}
.page-hero .lede {
  max-width: 60ch;
}
.two-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-12);
}
.two-cols-frame {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: var(--space-16);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toggle-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
}
.toggle-chip:hover {
  border-color: var(--color-cyan);
}
.toggle-chip[aria-pressed="true"],
.toggle-chip[aria-checked="true"] {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  border-color: var(--color-accent);
}
.chip-count {
  font-size: 11px;
  opacity: 0.75;
}
.rule-inline {
  height: var(--rule-w);
  background: var(--rule);
}

/* Prose rendered from the content's Markdown. */
.prose,
.bio {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.bio {
  font-size: 18px;
  line-height: 1.6;
  max-width: 62ch;
}
.narrow-prose {
  max-width: 72ch;
}
.md-p {
  line-height: 1.65;
  text-wrap: pretty;
}
.md-li {
  display: grid;
  grid-template-columns: 16px 1fr;
  line-height: 1.65;
}
.md-li > span:first-child {
  color: var(--color-accent-text);
}
.md-h {
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.md-h:first-child {
  margin-top: 0;
}
.md-todo {
  padding: 8px 12px;
  border: 1px dashed var(--color-divider);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-muted);
}

/* ---------- /sobre ---------- */
.fact-list {
  margin: 0;
  align-self: start;
  grid-template-columns: minmax(0, 1fr);
}
.fact-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: var(--space-3) var(--space-4);
  background: var(--cell-bg);
  border-radius: var(--radius-md);
}
.fact-row dt {
  font-size: 13px;
  color: var(--color-muted);
}
.fact-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.skill-groups {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.skill-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.skill-group h3 {
  font-size: 22px;
}
.evidence-box {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.evidence-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.evidence-head h3 {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}
.evidence-head h3 .muted {
  font-weight: 400;
}
.evidence-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.evidence {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2) var(--space-6);
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-divider);
}
.evidence > span:nth-child(2) {
  text-wrap: pretty;
}
.evidence > .btn {
  justify-self: start;
}
.evidence-where {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-accent-text);
}
.edu {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-self: start;
}
.edu h3 {
  font-size: 22px;
}

/* ---------- /projetos and the MCP tool list: master-detail ---------- */
.filters {
  margin-bottom: var(--space-6);
}
.master-detail {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: var(--space-16);
}
.master {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
  min-width: 0;
}
.master-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: var(--space-6);
  background: var(--cell-bg);
  color: var(--color-text);
  border: 0;
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.master-item:hover,
.master-item[aria-selected="true"] {
  background: var(--color-surface);
}
.master-item[aria-selected="true"] {
  border-left-color: var(--color-accent);
}
.master-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}
.master-name {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}
.master-sub {
  font-size: 14px;
  color: var(--color-muted);
}
.detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  min-height: 520px;
}
.detail-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.detail-head h2 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.02em;
}
.detail-summary {
  font-size: 18px;
  color: var(--color-muted);
  max-width: 56ch;
}
.detail-actions,
.send-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.detail-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 68ch;
}
.detail-section h3 {
  font-size: 20px;
}

/* ---------- /mcp ---------- */
.seg-tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.seg-tabs[hidden] {
  display: none;
}
.seg-tabs button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.seg-tabs button + button {
  border-left: 1px solid var(--color-divider);
}
/* Many tabs on a narrow screen: scroll sideways instead of hiding the last ones. */
.seg-tabs.scrolls {
  overflow-x: auto;
}
.seg-tabs button[aria-selected="true"] {
  background: var(--color-text);
  color: var(--color-bg);
}
.code-box {
  position: relative;
}
.term-pre {
  margin: 0;
  background: var(--term-bg);
  color: var(--term-ink);
  border: var(--term-frame);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  max-height: 220px;
}
.term-pre.tall {
  max-height: 320px;
  min-height: 120px;
}
.code-box .term-pre {
  padding-right: 120px;
  max-height: none;
}
.copy-btn {
  min-height: 36px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
}
.copy-btn:hover {
  border-color: var(--color-cyan);
}
.copy-btn.on-term {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--term-ink);
  border-color: var(--term-line);
}
.copy-btn.on-term:hover {
  color: var(--term-accent);
  border-color: var(--term-accent);
}
.playground {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.call-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
}
.call-form .grow {
  flex: 1;
  min-width: 200px;
}
#mcp-no-arg {
  padding-bottom: 12px;
}
.io {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.servers {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  margin-bottom: var(--space-16);
}
.server-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.server-card h3 {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
}
.cmd {
  font-size: 13px;
  padding: 8px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  white-space: nowrap;
}

/* ---------- forms (/mcp and /contato) ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  display: flex;
  justify-content: space-between;
}
.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  caret-color: var(--color-accent);
}
.input.mono {
  font-family: var(--font-mono);
  font-size: 14px;
}
textarea.input {
  resize: vertical;
  line-height: 1.55;
}
.input[aria-invalid="true"] {
  border-color: var(--color-cyan);
}
.field-error {
  font-size: 13px;
  color: var(--color-accent-text);
}
.field-error[hidden] {
  display: none;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.contact-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-form legend {
  padding: 0;
  margin-bottom: 8px;
}
.field-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-4);
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  color: var(--color-accent-text);
}
.form-status:empty {
  display: none;
}
.sent {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.sent[hidden],
.off-note[hidden],
.contact-form[hidden] {
  display: none;
}
.thanks {
  font-size: 18px;
}
.off-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-6);
  border: 1px dashed var(--color-divider);
  border-radius: var(--radius-md);
}
.channels {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.channels h2 {
  font-size: 22px;
}
.channel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.channel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.channel-row a {
  font-family: var(--font-mono);
  font-size: 14px;
  word-break: break-all;
}

/* ---------- v2 breakpoints ---------- */
/* ---------- /voce: the visitor scan ---------- */
.scan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
}
.check-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--color-muted);
}
.check-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}
.scan-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.scan-claim {
  font-family: var(--font-mono);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.scan-headline {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  letter-spacing: var(--font-heading-tracking);
  font-size: clamp(20px, 3.2vw, 28px);
  line-height: 1.2;
  text-wrap: balance;
}
.scan-counts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.verdict-count {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
}
.verdict-count strong {
  font-size: 16px;
}
.finding-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
  background: var(--grid-line);
  border: var(--grid-frame);
}
.finding {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--cell-pad);
  background: var(--cell-bg);
  border-radius: var(--radius-md);
  border-left: 4px solid transparent;
  min-width: 0;
}
.finding[data-verdict="contradicao"] {
  border-left-color: var(--color-red);
  background: var(--color-red-soft);
}
.finding[data-verdict="exposto"] {
  border-left-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.finding h3 {
  font-size: 19px;
  text-wrap: pretty;
}
.finding p {
  margin: 0;
  text-wrap: pretty;
}
.finding-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.verdict {
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
}
[data-verdict="contradicao"] .verdict,
.verdict-count[data-verdict="contradicao"] {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
}
[data-verdict="exposto"] .verdict,
.verdict-count[data-verdict="exposto"] {
  border-color: var(--color-accent);
  color: var(--color-accent-text);
}
.finding-evidence {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: var(--radius-sm);
}
.finding-fix {
  color: var(--color-muted);
}
.finding-fix strong {
  color: var(--color-text);
}
.layer-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.layer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.layer h3 {
  font-size: 22px;
}
.signal-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.signal-list .fact-row {
  grid-template-columns: 120px minmax(0, 1fr);
  padding-inline: 0;
  background: transparent;
}
.signal-list .fact-row dd {
  font-size: 13px;
}
.dns-result {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
/* Already inside a cell: only the verdict stripe on the left stays. */
.dns-result .finding {
  padding: 0 0 0 var(--space-4);
  border-radius: 0;
}
#dns-name {
  overflow-wrap: anywhere;
}

/* ---------- /voce: the handshake, byte by byte ---------- */
.hex-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.ja4-code {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(16px, 3.4vw, 26px);
  overflow-wrap: anywhere;
}
.ja4-code span:nth-child(odd) {
  color: var(--color-accent-text);
}
.ja4-legend {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: 13px;
}
.ja4-legend div {
  display: flex;
  gap: 6px;
}
.ja4-legend dt {
  font-weight: 700;
}
.ja4-legend dd {
  margin: 0;
  color: var(--color-muted);
}
.hex-dump {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  padding: var(--space-3);
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: var(--radius-sm);
  max-height: 420px;
  overflow: auto;
}
.hex-row {
  display: flex;
  gap: 2px;
  white-space: nowrap;
}
.hex-off {
  color: var(--term-dim);
  margin-right: var(--space-3);
  user-select: none;
}
.hb {
  padding: 0 2px;
  border-radius: 2px;
  cursor: default;
}
/* Field kinds: quiet framing, warmer for what fingerprints the client. */
.k-record,
.k-handshake {
  background: color-mix(in srgb, var(--term-ink) 8%, transparent);
}
.k-version,
.k-random,
.k-session,
.k-compression {
  background: color-mix(in srgb, var(--term-ink) 16%, transparent);
}
.k-ciphers {
  background: color-mix(in srgb, var(--term-accent) 30%, transparent);
}
.k-extension {
  background: color-mix(in srgb, var(--term-accent) 14%, transparent);
}
.k-extension.alt {
  background: color-mix(in srgb, var(--term-accent) 24%, transparent);
}
.k-grease {
  background: repeating-linear-gradient(
    135deg,
    color-mix(in srgb, var(--term-warn) 30%, transparent) 0 3px,
    transparent 3px 6px
  );
}
.hb.on {
  background: var(--term-accent);
  color: var(--term-bg);
}
.hex-caption {
  margin: 0;
  min-height: 1.5em;
  overflow-wrap: anywhere;
}
.hex-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.hex-field {
  min-height: 32px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--term-ink);
  background: var(--term-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.hex-field.k-ciphers,
.hex-field.k-extension,
.hex-field.k-grease {
  border-color: var(--term-accent);
}
.hex-field[aria-pressed="true"] {
  background: var(--term-accent);
  color: var(--term-bg);
}
.hex-field:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 759px) {
  .pages-nav {
    order: 3;
    width: 100%;
  }
}
@media (min-width: 760px) {
  .evidence {
    grid-template-columns: 140px minmax(0, 1fr) auto;
  }
  .evidence > .btn {
    justify-self: end;
  }
}
@media (min-width: 900px) {
  .master-detail {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 2fr);
  }
}
@media (min-width: 960px) {
  .two-cols,
  .two-cols-frame {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}

/* ---------- my requests: floating button and the panel it opens ---------- */
.req-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 11;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: var(--color-text);
  color: var(--color-bg);
  border: 1px solid var(--color-text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.req-fab:hover,
.req-fab[aria-expanded="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}
.req-fab:hover .req-badge,
.req-fab[aria-expanded="true"] .req-badge {
  background: var(--color-bg);
  color: var(--color-accent-text);
}
.req-fab-short {
  display: none;
}
.req-badge {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.req-panel {
  position: fixed;
  /* left + right + max-width instead of a vw width: 100vw counts the scrollbar and pushed the panel off the edge. */
  left: 16px;
  right: 16px;
  bottom: 76px; /* sits above the 48px button */
  z-index: 10;
  max-width: 420px;
  margin-left: auto;
  max-height: min(60vh, 520px);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg);
  color: var(--color-text);
  border: var(--term-frame);
  border-color: var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.req-panel[hidden] {
  display: none;
}
.req-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.req-head h2 {
  font-size: 16px;
  letter-spacing: -0.01em;
}
.req-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.req-close:hover {
  border-color: var(--color-cyan);
  color: var(--color-accent-text);
}
.req-tabs {
  display: flex;
  width: max-content;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.req-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}
.req-tabs button + button {
  border-left: 1px solid var(--color-divider);
}
.req-tabs button[aria-selected="true"] {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
.req-view {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 0;
}
.req-view[hidden] {
  display: none;
}
/* The narrow layout, capped by height so it fits the panel on short screens. */
.req-diagram.diagram {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(52vh, 420px);
  margin-inline: auto;
}
.req-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
  cursor: pointer;
}
.req-toggle input {
  accent-color: var(--color-accent);
}
.req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.req-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 6ch 7ch;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-divider);
}
.req-list li > span:nth-last-child(-n + 2) {
  text-align: right;
}
.req-list li.auto {
  color: var(--color-muted);
}
.req-list li.bad {
  color: var(--color-accent-text);
}
.req-list li.req-empty {
  display: block;
  color: var(--color-muted);
  border-bottom: 0;
}
.req-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.req-path b {
  font-weight: 600;
}
.req-note {
  font-size: 12px;
  color: var(--color-muted);
}
@media (max-width: 559px) {
  .req-fab-label,
  .req-list li > span:first-child {
    display: none;
  }
  .req-fab-short {
    display: inline;
  }
  .req-list li {
    grid-template-columns: minmax(0, 1fr) 6ch 7ch;
  }
}

/* ---------- breakpoints, the same as the design: 560, 760 and 960px ---------- */
.diagram.narrow {
  display: none;
}
@media (max-width: 759px) {
  .wide,
  .diagram.wide {
    display: none;
  }
  .diagram.narrow {
    display: block;
  }
}
@media (max-width: 559px) {
  .term-out {
    height: 320px;
  }
  .chip {
    min-height: 44px;
  }
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  }
  .arch {
    grid-template-columns: minmax(0, 2.4fr) minmax(240px, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .wires path,
  .node rect {
    transition: none;
  }
}
.t-play {
  margin-block: 6px 10px;
}
.t-sliders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-bottom: 6px;
}
.t-slider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.t-slider input {
  width: 120px;
  accent-color: var(--term-accent);
}
.t-slider output {
  min-width: 4ch;
}
.t-rank {
  margin: 0;
  padding: 0;
  list-style: none;
}
.t-moved {
  animation: t-moved 0.9s ease-out;
}
@keyframes t-moved {
  from {
    border-left-color: var(--term-accent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .t-moved {
    animation: none;
  }
}
.t-frozen {
  opacity: 0.6;
}

/* ---------- the clean layer: type, scene scrim, accent picker and the one glitch ---------- */
body {
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1,
h2 {
  letter-spacing: var(--font-heading-tracking);
}
::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
a {
  color: inherit;
  text-decoration-color: var(--color-accent);
}
a:hover {
  color: var(--color-accent-text);
}

/* The text column reads first: the scene fades out behind it, and data-heavy views dim it further. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--scrim-side) 0%, var(--scrim-mid) 38%, var(--scrim-clear) 65%);
}
.scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-dim);
  opacity: 0;
  transition: opacity 0.7s ease;
}
body.dim .scrim::after {
  opacity: 1;
}
/* On a phone the 3D takes the top of the screen and the text the bottom, over a dark band. */
@media (max-width: 768px) {
  .scrim {
    background: linear-gradient(180deg, var(--scrim-clear) 0%, var(--scrim-clear) 34%, var(--scrim-side) 58%);
  }
}

/* One glitch on the page, once, on the name, when it loads: two copies flash in the accent and cyan. */
.name-line {
  display: block;
}
.glitch {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.glitch-a {
  color: var(--color-accent);
  animation: glitch-a 0.45s steps(3) 0.6s 1;
}
.glitch-b {
  color: #00f0ff;
  animation: glitch-b 0.45s steps(3) 0.6s 1;
}
@keyframes glitch-a {
  0% {
    opacity: 1;
    clip-path: inset(10% 0 70% 0);
    transform: translate(-4px, 0);
  }
  50% {
    opacity: 1;
    clip-path: inset(55% 0 20% 0);
    transform: translate(5px, 0);
  }
  100% {
    opacity: 0;
  }
}
@keyframes glitch-b {
  0% {
    opacity: 1;
    clip-path: inset(60% 0 15% 0);
    transform: translate(4px, 0);
  }
  50% {
    opacity: 1;
    clip-path: inset(15% 0 65% 0);
    transform: translate(-5px, 0);
  }
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .glitch {
    animation: none;
  }
}

/* ---------- the bar: fixed over the scene, sections on the left, tools on the right ---------- */
.page {
  max-width: 1280px;
}
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  flex-wrap: nowrap;
  gap: var(--space-6);
  padding: 18px clamp(16px, 3vw, 40px);
  border: 0;
  background: linear-gradient(var(--scrim-mid), var(--scrim-clear));
}
.brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.pages-nav {
  gap: 22px;
  margin-left: auto;
  overflow: visible;
}
.pages-nav a {
  min-height: 32px;
  padding: 0;
  font-size: 14px;
  border: 0;
}
.bar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bar-tools .icon-btn {
  width: 36px;
  height: 36px;
  border-color: var(--color-divider);
}
.bar-tools .lang-btn {
  min-width: 36px;
  font-size: 12px;
}
.reqs {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
  background: none;
  border: 1px solid var(--color-divider);
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.reqs:hover,
.reqs[aria-expanded="true"] {
  color: var(--color-text);
  border-color: var(--color-accent);
}
.reqs i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.reqs i.ping {
  animation: ping 0.5s ease-out;
}
.reqs i.bad {
  background: var(--color-red);
}
.reqs span {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
@keyframes ping {
  from {
    box-shadow: 0 0 0 0 var(--color-accent);
  }
  to {
    box-shadow: 0 0 0 8px transparent;
  }
}
@media (max-width: 1100px) {
  .pages-nav {
    display: none;
  }
  .bar-tools {
    margin-left: auto;
  }
}

/* The ruler at the side: one tick per section, the current one longer and in the accent. */
.progress {
  position: fixed;
  right: clamp(12px, 2.5vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.progress i {
  display: block;
  width: 18px;
  height: 2px;
  margin-left: auto;
  background: var(--color-divider-strong);
  transition:
    background 0.3s,
    width 0.3s;
}
.progress i.on {
  background: var(--color-accent);
  width: 28px;
}
body:not([data-page="inicio"]) .progress {
  display: none;
}

/* ---------- the story: one section per screen, calm text on the left ---------- */
.story .chapter {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0;
}
.story .chapter.long {
  min-height: 140vh;
}
.story .col {
  max-width: 34rem;
}
.story .col-wide {
  width: 100%;
  max-width: 46rem;
}
.label {
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.label b {
  color: var(--color-accent-text);
  font-weight: 500;
}
.story h1 {
  position: relative;
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.story h2 {
  margin-bottom: 24px;
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.05;
}
.story p {
  color: var(--color-muted);
}
.story .md-p + .md-p,
.story p + p {
  margin-top: 16px;
}
.story .lead {
  max-width: 26rem;
  margin-top: 28px;
  font-size: 20px;
}
.story code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--color-text);
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.hero-links a,
.socials a,
.more a,
.scan-foot a {
  color: var(--color-muted);
  text-decoration: none;
}
.hero-links a:hover,
.socials a:hover,
.more a:hover,
.scan-foot a:hover {
  color: var(--color-text);
}
.more {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.hint {
  position: absolute;
  bottom: 36px;
  left: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
  text-decoration: none;
}
.hint::before {
  content: "";
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--color-accent), transparent);
  transform-origin: top;
  animation: drip 2s ease-in-out infinite;
}
@keyframes drip {
  0%,
  100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}
.motion .story .reveal {
  opacity: 0;
  transform: translateY(24px);
}

/* Facts: label in small mono caps, value on the right, a hairline between rows. */
.story .facts {
  display: grid;
  margin: 28px 0 0;
  border-top: 1px solid var(--color-divider);
}
.story .facts > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--color-divider);
}
.story .facts dt {
  flex: none;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.story .facts dd {
  margin: 0;
  text-align: right;
}

/* Sobre: three tabs, a hairline under them, the open one underlined in the accent. */
.tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--color-divider);
}
.tabs button {
  margin-bottom: -1px;
  padding: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}
.tabs button:hover {
  color: var(--color-text);
}
.tabs button[aria-selected="true"] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}
.tab-panel {
  animation: fadein 0.45s ease;
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-divider);
}
.timeline li:first-child {
  padding-top: 0;
}
.timeline span {
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}
.timeline b {
  font-weight: 500;
}
.timeline p {
  margin-top: 2px;
  font-size: 15px;
}

/* Stack: every group on one ruled line, its names in a run; the hovered group lights up in the accent. */
.stack-list {
  margin: 28px 0 0;
  border-top: 1px solid var(--color-divider);
}
.stack-list > div {
  display: grid;
  grid-template-columns: 11em 1fr;
  gap: 16px;
  padding: 12px 0 12px 0;
  border-bottom: 1px solid var(--color-divider);
  outline: none;
  transition:
    padding 0.3s,
    box-shadow 0.3s;
}
.stack-list dt {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.stack-list dd {
  margin: 0;
  font-size: 15px;
  color: var(--color-muted);
  transition: color 0.3s;
}
.stack-list > div.on,
.stack-list > div:focus-visible {
  padding-left: 12px;
  box-shadow: inset 2px 0 0 var(--color-accent);
}
.stack-list > div.on dt {
  color: var(--color-accent-text);
}
.stack-list > div.on dd {
  color: var(--color-text);
}
body.over-chip {
  cursor: pointer;
}

/* Terminal and scan share the same quiet window: a hairline frame, a translucent fill, no chrome. */
.story .term {
  margin-top: 32px;
  background: var(--color-glass);
  backdrop-filter: blur(6px);
  border: 1px solid var(--color-divider);
}
.story .term .term-out {
  height: 300px;
  scrollbar-width: thin;
}
.story .term.quiet {
  margin-top: 24px;
}
.story .term.quiet .term-pre {
  margin: 0;
  padding: 14px 16px;
  white-space: pre-wrap;
  word-break: break-all;
  background: none;
  border: 0;
}
.story .chips {
  margin-top: 14px;
}
.copy-btn {
  font: inherit;
  color: var(--color-accent-text);
  background: none;
  border: 0;
  cursor: pointer;
}

/* Projects: number, name and summary, stack in mono; the row's hairline fills with the accent on hover. */
.projects {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-divider);
}
.projects .row {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  padding: 20px 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
}
.projects .row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.projects a.row:hover::after,
.projects a.row:focus-visible::after,
.projects li.on .row::after {
  width: 100%;
}
.projects .n {
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}
.projects h3 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
.projects a.row:hover h3,
.projects li.on h3 {
  color: var(--color-accent-text);
}
.projects p {
  margin-top: 4px;
  font-size: 15px;
}
.projects .stack {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.projects .arrow {
  padding-top: 4px;
  color: var(--color-muted);
  transition:
    transform 0.3s,
    color 0.3s;
}
.projects a.row:hover .arrow {
  transform: translate(4px, -4px);
  color: var(--color-accent-text);
}
.projects .priv {
  height: fit-content;
  margin-top: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  border: 1px solid var(--color-divider);
}

/* Ao vivo: the cards become a ruled row of four, without frames. */
.story .stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 32px;
  background: none;
  border: 0;
  border-block: 1px solid var(--color-divider);
}
.story .stat {
  padding: 18px 16px 16px 0;
  background: none;
}
.story .stat + .stat {
  padding-left: 16px;
  border-left: 1px solid var(--color-divider);
}
.story .nodes {
  background: none;
  border: 0;
}
.story .node {
  padding-inline: 0;
  background: none;
}

/* Você: the scan types itself out, key on the left, value on the right, a cursor at the end. */
.story .term .scan-typed {
  height: auto;
  min-height: 330px;
}
.scan-typed .row {
  display: flex;
  gap: 12px;
}
.scan-typed .k {
  min-width: 9.5em;
  color: var(--color-muted);
}
.scan-typed .v {
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.scan-typed .hl {
  margin-top: 8px;
  color: var(--color-accent-text);
}
.scan-typed .err {
  color: var(--color-red-text);
}
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  vertical-align: text-bottom;
  background: var(--color-accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.scan-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-muted);
}
.link-btn {
  padding: 0 0 2px;
  font: inherit;
  color: var(--color-text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--color-accent);
  cursor: pointer;
}

/* Contato: the address big and underlined in the accent. */
.mail {
  display: inline-block;
  margin-top: 8px;
  padding-bottom: 4px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
  overflow-wrap: anywhere;
}
.socials {
  display: flex;
  gap: 24px;
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* The requests panel hangs under the pill. */
.req-panel {
  top: 72px;
  right: clamp(16px, 3vw, 40px);
  z-index: 40;
  background: var(--color-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-divider);
}

.foot {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .topbar {
    gap: 12px;
    padding: 14px 16px;
  }
  .bar-tools {
    gap: 6px;
  }
  .story .chapter {
    padding: 96px 0;
  }
  .story .facts > div {
    flex-direction: column;
    gap: 2px;
  }
  .story .facts dd {
    text-align: left;
  }
  .story .stats {
    grid-template-columns: 1fr 1fr;
  }
  .story .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .story .stat:nth-child(n + 3) {
    border-top: 1px solid var(--color-divider);
  }
  .story .term .term-out {
    height: 260px;
  }
  .scan-typed .row {
    flex-direction: column;
    gap: 0;
    margin-bottom: 6px;
  }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .projects .row {
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
  }
  .progress {
    display: none;
  }
}
@media (max-width: 420px) {
  .brand {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hint::before,
  .cursor,
  .tab-panel,
  .unit-detail .sk {
    animation: none;
  }
}

/* Arquitetura: the graph is in the scene; the page keeps this visitor's last requests. */
.arch-log {
  margin-top: 20px;
}
.arch-log .label {
  margin-bottom: 8px;
}
.arch-log ol {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
}
.arch-log li {
  display: grid;
  grid-template-columns: 6em 1fr auto;
  gap: 12px;
  padding: 6px 0;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-divider);
}
.arch-log li span:nth-child(2) {
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arch-log li.bad span:nth-child(2) {
  color: var(--color-red-text);
}

/* Ao vivo, the short version: three numbers from /api/status under the visitor's requests. */
.live-glance {
  margin-top: 28px;
}
.live-glance .label {
  margin-bottom: 8px;
}
.glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.glance > div {
  padding: 12px 0;
}
.glance > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--color-divider);
}
.glance dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.glance dd {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

/* Hacked: while "você" is on screen the accent turns red, and its terminal looks the part. */
/* (The colour tokens are resolved on :root, so the ones built from --accent are set again here.) */
body.hacked {
  --accent: #ff2a3a;
  --color-accent: #ff2a3a;
  --color-accent-text: #ff4d5a;
  --color-accent-soft: rgba(255, 42, 58, 0.14);
  --color-cyan: #ff2a3a;
  --color-cyan-text: #ff4d5a;
}

.term.hack .term-bar {
  color: var(--color-red-text);
}
.scan-typed .cmd {
  color: var(--color-text);
}
.scan-typed .cmd::before {
  content: "# ";
  color: var(--color-accent-text);
}
.scan-typed .warn {
  margin-top: 8px;
  color: var(--color-red-text);
}
.scan-typed .out {
  color: var(--color-muted);
}
@media (max-width: 768px) {
  .stack-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .arch-log li {
    grid-template-columns: 5em 1fr auto;
    gap: 8px;
  }
}

/* A line under a title that says what the scene is drawing, small and quiet. */
.story .scene-note {
  margin: -8px 0 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

/* The way on: a quiet button in the corner that goes to the next section, named. */
.next-section {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-text);
  text-decoration: none;
  background: var(--color-glass);
  backdrop-filter: blur(6px);
  border: 1px solid var(--color-divider);
  transition:
    border-color 0.2s,
    color 0.2s;
}
.next-section:hover,
.next-section:focus-visible {
  color: var(--color-accent-text);
  border-color: var(--color-accent);
}
.next-section span:first-child {
  color: var(--color-accent-text);
  animation: nudge 2s ease-in-out infinite;
}
@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}
body:not([data-page="inicio"]) .next-section {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .next-section span:first-child {
    animation: none;
  }
}

@media (max-width: 768px) {
  .story .chapter {
    align-items: flex-end;
    padding-top: 42svh;
  }
  /* Just the arrow on a phone, so the button never sits on a line of text. */
  .next-section {
    right: 12px;
    bottom: 12px;
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .next-section #next-label {
    display: none;
  }
}
