/* alexsandro.dev — "terminal de garagem"
   Base preto-azulada, âmbar dominante, ciano de apoio, vermelho só para alerta.
   Efeitos (pontos, scanlines, glitch) só nas vitrines. Leitura sem efeito algum. */

@font-face { font-family: "Chakra Petch"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ChakraPetch-400.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ChakraPetch-600.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/ChakraPetch-700.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 700; font-style: normal; font-display: swap; src: url("../fonts/JetBrainsMono-400.woff2") format("woff2"); }
@font-face { font-family: "Shippori Mincho"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/ShipporiMincho-800.woff2") format("woff2"); }

:root {
  color-scheme: dark;

  --bg: #0a0f12;
  --surface: #121a1f;
  --surface-2: #0d1519;
  --line: #26343c;
  --text: #ece6d8;
  --muted: #8a979c;
  --amber: #ffb000;
  --amber-ink: #1a1000;
  --amber-soft: rgba(255, 176, 0, 0.12);
  --cyan: #46d9e8;
  --red: #ff5a4d;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --label: "Chakra Petch", "Rajdhani", system-ui, sans-serif;
  --title: "Shippori Mincho", "Iowan Old Style", Georgia, serif;

  --page: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 70ch;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #3a4a52 var(--bg); scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.0625rem;
  line-height: 1.7;
  caret-color: var(--amber);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--amber); color: var(--amber-ink); }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--amber); text-decoration: underline; text-decoration-color: rgba(255, 176, 0, 0.45); text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease); }
a:hover { color: var(--cyan); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 1px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: var(--amber-ink); padding: 0.5rem 1rem; font-family: var(--label); font-weight: 700; z-index: 10; }
.skip:focus { left: 0; }

/* ---------- estrutura ---------- */
.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.site-main { flex: 1; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 8vw, 5rem); }

/* ---------- cabeçalho ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; padding-block: 1.1rem; }
.brand { display: inline-flex; align-items: baseline; gap: 0.05em; font-family: var(--title); font-weight: 800; font-size: 1.75rem; line-height: 1; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand__dev { color: var(--amber); }
.cursor { display: inline-block; width: 0.5em; height: 0.85em; margin-left: 0.2em; background: var(--amber); transform: translateY(0.08em); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 0.35rem 0; font-family: var(--label); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--amber); }
.site-nav a[aria-current="page"] { color: var(--amber); border-bottom-color: var(--amber); }
.lang { display: flex; gap: 0.6rem; font-family: var(--label); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--amber); }
.lang [aria-current="true"] { color: var(--cyan); }

/* ---------- rodapé ---------- */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.5rem; }
.site-footer a { color: var(--muted); text-decoration-color: var(--line); }
.site-footer a:hover { color: var(--amber); }
.site-footer ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }

/* ---------- moldura "canto cortado" ---------- */
.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem 1.375rem 1.375rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.panel::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 15px; height: 15px;
  background: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px), var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  pointer-events: none;
}
.panel--hot { border-color: var(--amber); }
.panel--hot::after { background: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--amber) calc(50% - 0.5px), var(--amber) calc(50% + 0.5px), transparent calc(50% + 0.5px)); }
.panel__title { margin: 0 0 1rem; font-family: var(--label); font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.panel__title a { color: inherit; text-decoration: none; }
.panel__title a:hover { color: var(--cyan); }
.panel p { margin: 0 0 0.75rem; }
.panel p:last-child { margin-bottom: 0; }

/* ---------- botões ---------- */
.btn { display: inline-block; padding: 0.7rem 1.25rem; background: var(--amber); color: var(--amber-ink); font-family: var(--label); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--amber); transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.btn:hover { background: var(--text); border-color: var(--text); color: var(--amber-ink); }
.btn--ghost { background: transparent; color: var(--amber); }
.btn--ghost:hover { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- títulos de página ---------- */
.page-head { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); max-width: var(--measure); }
.page-head h1, .read h1 { margin: 0; font-family: var(--title); font-weight: 800; font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.page-head p { margin: 1rem 0 0; color: var(--muted); }
.page-head .lead { color: var(--text); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 1rem; color: var(--muted); font-size: 0.875rem; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.tags li { padding: 0.05rem 0.55rem; border: 1px solid var(--line); font-family: var(--label); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--cyan); }

/* ---------- listas em linhas ---------- */
.rows { list-style: none; margin: 0; padding: 0; max-width: 56rem; }
.row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.25rem 1.5rem; padding: 1.1rem 0.75rem; border-top: 1px solid var(--line); transition: background 0.2s var(--ease); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row:hover { background: var(--surface); }
.row time { color: var(--muted); font-size: 0.875rem; padding-top: 0.2rem; }
.row__title { margin: 0; font-family: var(--label); font-weight: 700; font-size: 1.3125rem; line-height: 1.3; }
.row__title a { color: var(--text); text-decoration: none; }
.row__title a:hover { color: var(--amber); }
.row__desc { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.row .tags { margin-top: 0.6rem; }
.tags a { color: inherit; text-decoration: none; }
.tags li:has(a) { transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.tags li:has(a):hover { border-color: var(--amber); }
.tags li:has(a):hover a { color: var(--amber); }
.tags--chips li { color: var(--amber); border-color: rgba(255, 176, 0, 0.45); }
.row--talk .row__desc { color: var(--text); }
.empty__links { margin-top: 1rem; max-width: 22rem; }
.empty__links a { color: var(--amber); }
.empty__links a:hover { color: var(--cyan); }
.row--compact { padding-block: 0.65rem; }
.row--compact .row__title { font-size: 1.0625rem; }
.empty { max-width: var(--measure); padding: 1.25rem 0; color: var(--muted); }
.empty strong { color: var(--text); }

/* lista compacta de painéis */
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { padding: 0.55rem 0; border-top: 1px solid var(--line); }
.mini li:first-child { border-top: 0; padding-top: 0; }
.mini time { display: block; color: var(--muted); font-size: 0.8125rem; }
.mini a { font-family: var(--label); font-weight: 600; font-size: 1.0625rem; line-height: 1.35; color: var(--text); text-decoration: none; }
.mini a:hover { color: var(--amber); }

/* ---------- leitura ---------- */
.read { max-width: var(--measure); }
.read__head { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.prose > * { max-width: var(--measure); }
.prose h2 { margin: 2.75rem 0 0.75rem; font-family: var(--label); font-weight: 700; font-size: 1.75rem; line-height: 1.2; color: var(--amber); text-wrap: balance; }
.prose h3 { margin: 2.25rem 0 0.6rem; font-family: var(--label); font-weight: 700; font-size: 1.3125rem; line-height: 1.3; color: var(--text); }
.prose h4 { margin: 1.75rem 0 0.5rem; font-family: var(--label); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 1.15rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: 0.35rem; }
.prose li::marker { color: var(--amber); }
.prose strong { color: #fff6e0; }
.prose blockquote { margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 1px solid var(--amber); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose img { display: block; border: 1px solid var(--line); margin: 1.5rem 0; }
.prose figure { margin: 1.5rem 0; }
.prose figcaption { color: var(--muted); font-size: 0.875rem; margin-top: 0.5rem; }
.prose table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--label); font-weight: 700; letter-spacing: 0.06em; color: var(--amber); white-space: nowrap; }
.prose code { font-family: var(--mono); font-size: 0.9em; padding: 0.1em 0.4em; background: var(--surface-2); border: 1px solid var(--line); color: var(--cyan); overflow-wrap: anywhere; }
.prose pre { max-width: 100%; }
.prose .highlight, .prose pre { margin: 1.5rem 0; background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; }
.prose pre { padding: 1rem 1.1rem; font-size: 0.875rem; line-height: 1.6; }
.prose pre code { padding: 0; background: none; border: 0; color: var(--text); font-size: inherit; overflow-wrap: normal; word-break: normal; white-space: pre; }
.prose .highlight pre { margin: 0; border: 0; }
.prose .highlight { max-width: 100%; }
.chroma { color: var(--text); background: var(--surface-2); }
.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; display: table; }
.chroma .lntd { vertical-align: top; padding: 0; }
.chroma .lntd:first-child { padding-right: 0.9rem; user-select: none; }
.chroma .lnt, .chroma .ln { color: #5d6c73; }
.chroma .c, .chroma .c1, .chroma .cm, .chroma .cs, .chroma .ch, .chroma .cp, .chroma .cpf { color: #7d8b91; font-style: italic; }
.chroma .k, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr, .chroma .kc, .chroma .kt, .chroma .ow { color: var(--amber); }
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sd, .chroma .se, .chroma .sh, .chroma .si, .chroma .sx, .chroma .sr, .chroma .ss { color: #7be0ec; }
.chroma .m, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il, .chroma .mo, .chroma .mb { color: #ffd27a; }
.chroma .nf, .chroma .fm, .chroma .nc, .chroma .nd, .chroma .nn { color: #fff6e0; font-weight: 700; }
.chroma .nb, .chroma .bp, .chroma .no { color: var(--cyan); }
.chroma .o, .chroma .p { color: #b9c3c6; }
.chroma .err { color: var(--red); background: none; }
.chroma .hl { background: var(--amber-soft); display: block; }

.read__foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.back { font-family: var(--label); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }

/* painel de metadados (palestra, projeto) */
.facts { margin: 0 0 2rem; max-width: 46rem; }
.facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 0; }
.facts dt { font-family: var(--label); font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 0.15rem; }
.facts dd { margin: 0; }
.facts .btns { margin-top: 1.25rem; }

/* embed GBA */
.gba-embed { width: 100%; height: clamp(30rem, 72vh, 42rem); margin: 1.5rem 0; border: 1px solid var(--line); background: #000; max-width: none; }
.gba-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 17rem); gap: 1.5rem; align-items: start; }
.home__col { display: grid; gap: 1.5rem; min-width: 0; }

.hero { container-type: inline-size; position: relative; overflow: hidden; padding: clamp(1.5rem, 4vw, 2.5rem); min-height: clamp(18rem, 36vw, 26rem); display: flex; flex-direction: column; justify-content: flex-end; border-color: var(--amber); }
.hero::after { background: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--amber) calc(50% - 0.5px), var(--amber) calc(50% + 0.5px), transparent calc(50% + 0.5px)); }
.hero__dots { position: absolute; inset: 0; background: radial-gradient(circle at 3px 3px, var(--amber) 0 1.5px, transparent 2.1px) 0 0 / 12px 12px; opacity: 0.4; -webkit-mask-image: linear-gradient(100deg, transparent 0, #000 30%, transparent 62%, #000 82%, transparent 100%); mask-image: linear-gradient(100deg, transparent 0, #000 30%, transparent 62%, #000 82%, transparent 100%); -webkit-mask-size: 1100px 100%; mask-size: 1100px 100%; -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; animation: sweep 26s linear infinite; }
.hero__veil { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 90% at 22% 85%, rgba(10, 15, 18, 0.96) 25%, rgba(10, 15, 18, 0.6) 55%, rgba(10, 15, 18, 0) 85%); }
.hero__body { position: relative; }
.hero__name { margin: 0; font-family: var(--title); font-weight: 800; font-size: clamp(2.5rem, 16cqw, 6rem); line-height: 0.95; letter-spacing: -0.03em; white-space: nowrap; text-shadow: 0 2px 22px rgba(255, 176, 0, 0.22); }
.hero__lead { margin: 1.25rem 0 1.5rem; max-width: 34ch; font-size: 1.1875rem; line-height: 1.55; }
@keyframes sweep { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: -1100px 0; mask-position: -1100px 0; } }

/* título com glitch curto, só ao carregar */
.glitch { position: relative; display: inline-block; }
.page-head h1.glitch, .read h1.glitch { display: block; }
.glitch::before, .glitch::after { content: attr(data-text) / ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.glitch::before { color: var(--cyan); animation: glitch-a 0.7s steps(1, end) 0.15s 1 forwards; }
.glitch::after { color: var(--red); animation: glitch-b 0.7s steps(1, end) 0.15s 1 forwards; }
@keyframes glitch-a { 0% { opacity: 0.9; clip-path: inset(18% 0 62% 0); transform: translateX(4px); } 25% { clip-path: inset(55% 0 20% 0); transform: translateX(-3px); } 50% { clip-path: inset(8% 0 78% 0); transform: translateX(5px); } 75% { clip-path: inset(70% 0 8% 0); transform: translateX(-2px); } 100% { opacity: 0; clip-path: inset(50% 0 50% 0); transform: none; } }
@keyframes glitch-b { 0% { opacity: 0.8; clip-path: inset(62% 0 18% 0); transform: translateX(-4px); } 30% { clip-path: inset(25% 0 55% 0); transform: translateX(3px); } 60% { clip-path: inset(80% 0 4% 0); transform: translateX(-5px); } 100% { opacity: 0; clip-path: inset(50% 0 50% 0); transform: none; } }

/* o glitch dos títulos reaparece ao passar o mouse */
.glitch:hover::before { animation: glitch-a2 0.7s steps(1, end) 1 forwards; }
.glitch:hover::after { animation: glitch-b2 0.7s steps(1, end) 1 forwards; }
@keyframes glitch-a2 { 0% { opacity: 0.9; clip-path: inset(18% 0 62% 0); transform: translateX(4px); } 25% { clip-path: inset(55% 0 20% 0); transform: translateX(-3px); } 50% { clip-path: inset(8% 0 78% 0); transform: translateX(5px); } 75% { clip-path: inset(70% 0 8% 0); transform: translateX(-2px); } 100% { opacity: 0; clip-path: inset(50% 0 50% 0); transform: none; } }
@keyframes glitch-b2 { 0% { opacity: 0.8; clip-path: inset(62% 0 18% 0); transform: translateX(-4px); } 30% { clip-path: inset(25% 0 55% 0); transform: translateX(3px); } 60% { clip-path: inset(80% 0 4% 0); transform: translateX(-5px); } 100% { opacity: 0; clip-path: inset(50% 0 50% 0); transform: none; } }

/* HUD do hero: limpo, só o essencial */
.hero__hud { position: absolute; inset: 0; pointer-events: none; }
.hud-corner { position: absolute; width: 20px; height: 20px; border: 0 solid var(--cyan); opacity: 0.85; }
.hud-corner--tl { top: 12px; left: 12px; border-top-width: 1.5px; border-left-width: 1.5px; }
.hud-corner--bl { bottom: 12px; left: 12px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.hud-corner--br { bottom: 12px; right: 12px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.hud-ruler { position: absolute; left: 44px; right: 44px; top: 14px; height: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(138, 151, 156, 0.7) 0 1px, transparent 1px 12px) top / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, rgba(70, 217, 232, 0.8) 0 1px, transparent 1px 60px) top / 100% 10px no-repeat; }
.hud-marker { position: absolute; top: 9px; left: 0; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--amber); margin-left: -4px; animation: marker 14s ease-in-out infinite alternate; }
.hud-ring { position: absolute; right: -5.5rem; top: 50%; width: 17rem; aspect-ratio: 1; margin-top: -9rem; border-radius: 50%; border: 1px dashed rgba(70, 217, 232, 0.4); animation: spin 48s linear infinite;
  background:
    linear-gradient(rgba(70, 217, 232, 0.28), rgba(70, 217, 232, 0.28)) center / 1px 100% no-repeat,
    linear-gradient(rgba(70, 217, 232, 0.28), rgba(70, 217, 232, 0.28)) center / 100% 1px no-repeat; }
.hud-ring i { position: absolute; inset: 2.25rem; border-radius: 50%; border: 1px solid rgba(255, 176, 0, 0.35); border-top-color: var(--amber); }
.hud-readout { position: absolute; top: 34px; right: 44px; display: flex; align-items: center; gap: 0.6rem; font-family: var(--label); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.16em; color: var(--muted); }
.hud-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.hud-bars b { width: 3px; background: var(--cyan); height: 40%; animation: bars 2.4s ease-in-out infinite; }
.hud-bars b:nth-child(2) { animation-delay: -0.6s; } .hud-bars b:nth-child(3) { animation-delay: -1.2s; } .hud-bars b:nth-child(4) { animation-delay: -1.8s; }
.hud-scan { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--amber) 30%, var(--amber) 70%, transparent); box-shadow: 0 0 14px 2px rgba(255, 176, 0, 0.3); opacity: 0.55; animation: scan 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marker { from { left: 0; } to { left: 100%; } }
@keyframes bars { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@keyframes scan { from { transform: translateY(-4px); } to { transform: translateY(26rem); } }

/* o HUD só se mexe sozinho na varredura; o resto acorda com hover ou foco */
.hero__dots, .hud-marker, .hud-ring, .hud-bars b { animation-play-state: paused; }
.hero:hover .hero__dots, .hero:hover .hud-marker, .hero:hover .hud-ring, .hero:hover .hud-bars b,
.hero:focus-within .hero__dots, .hero:focus-within .hud-marker, .hero:focus-within .hud-ring, .hero:focus-within .hud-bars b { animation-play-state: running; }

/* foto do Sobre: só cantos arredondados */
.photo { margin: 0 0 2.5rem; width: min(21rem, 100%); }
.photo img, .prose .photo img { display: block; width: 100%; height: auto; margin: 0; border: 1px solid var(--line); border-radius: clamp(14px, 9%, 28px); }

/* Sobre: foto ao lado do texto */
.read--about { max-width: 64rem; }
.prose--about { display: grid; grid-template-columns: minmax(0, 1fr) clamp(9.5rem, 30vw, 21rem); gap: 0 clamp(1.25rem, 4vw, 3.5rem); align-items: start; }
.prose--about > * { grid-column: 1; max-width: var(--measure); }
.prose--about > .photo { grid-column: 2; grid-row: 1 / span 30; position: sticky; top: 1.5rem; width: 100%; margin: 0.4rem 0 0; }
.prose--about > h2:first-of-type { margin-top: 0; }
@media (max-width: 34rem) { .prose--about { display: block; } .prose--about > .photo { position: static; max-width: 17rem; margin-bottom: 2rem; } }

/* monitor CRT: texto real, scanlines, vinheta, faixa que sobe */
.crt { position: relative; overflow: hidden; background: #070b0d; padding: 1.25rem 1.375rem 1.5rem; color: var(--amber); text-shadow: 0 0 6px rgba(255, 176, 0, 0.4); isolation: isolate; }
.crt a { color: var(--amber); }
.crt a:hover { color: #fff6e0; }
.crt__line { margin: 0 0 0.15rem; }
.crt__prompt { color: var(--cyan); text-shadow: 0 0 6px rgba(70, 217, 232, 0.4); }
.crt__out { margin: 0 0 1rem; padding: 0; list-style: none; }
.crt__out li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 1rem; padding: 0.1rem 0; }
.crt__out time { color: #b27a00; text-shadow: none; }
.crt__caret { display: inline-block; width: 0.6em; height: 1.05em; background: var(--amber); vertical-align: text-bottom; animation: blink 1.1s steps(1, end) infinite; }
.crt::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.26) 0 1px, transparent 1px 3px); }
.crt::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }
.crt__band { position: absolute; left: 0; right: 0; top: 0; height: 2.5rem; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, transparent, rgba(255, 176, 0, 0.1), transparent); animation: rise 9s linear infinite; }
@keyframes rise { from { transform: translateY(380%); } to { transform: translateY(-120%); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- portfólio ---------- */
.cv-layout { display: grid; grid-template-columns: minmax(0, 52rem) minmax(0, 17rem); gap: 2rem 3rem; align-items: start; }
.cv-aside { position: sticky; top: 1.5rem; display: grid; gap: 1.5rem; }
.cv { display: grid; gap: clamp(2rem, 5vw, 3rem); }
.cv__section h2 { margin: 0 0 1.25rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); font-family: var(--label); font-weight: 700; font-size: 1.5rem; color: var(--amber); }
.cv__entry { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0.25rem 1.5rem; padding: 0.9rem 0; }
.cv__period { color: var(--muted); font-size: 0.875rem; padding-top: 0.25rem; }
.cv__entry h3 { margin: 0; font-family: var(--label); font-weight: 700; font-size: 1.1875rem; line-height: 1.35; }
.cv__org { color: var(--muted); }
.cv__entry ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.cv__entry li { margin-bottom: 0.25rem; }
.cv__entry li::marker { color: var(--amber); }
.cv__entry p { margin: 0.4rem 0 0; }
.cv .tags li { font-size: 0.8125rem; padding: 0.15rem 0.7rem; color: var(--text); }
.cv-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 clamp(2rem, 5vw, 3rem); padding: 0; list-style: none; border-block: 1px solid var(--line); }
.cv-highlights li { padding: 1rem 1.25rem; font-family: var(--label); font-weight: 600; font-size: 1.0625rem; line-height: 1.4; color: var(--text); text-wrap: balance; }
.cv-highlights li + li { border-left: 1px solid var(--line); }
.cv .note { margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.cv .note strong { color: var(--text); }

/* ---------- 404 ---------- */
.lost { max-width: 40rem; }
.lost h1 { margin: 0 0 1rem; font-family: var(--title); font-weight: 800; font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.08; }
.lost h2 { margin: 0 0 0.75rem; font-family: var(--label); font-weight: 700; font-size: 1.75rem; line-height: 1.2; color: var(--amber); }

/* ---------- responsivo ---------- */
@media (max-width: 68rem) {
  .cv-layout { grid-template-columns: minmax(0, 1fr); }
  .cv-aside { position: static; }
  .home { grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); }
  .home__col--left { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 30rem) {
  .hud-readout, .hud-ring { display: none; }
}
@media (max-width: 52rem) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home__col--left { grid-row: auto; order: 3; }
  .brand { order: 1; margin-right: auto; }
  .lang { order: 2; }
  .site-nav { order: 3; margin-left: 0; width: 100%; }
  .row, .cv__entry { grid-template-columns: minmax(0, 1fr); }
  .cv-highlights { grid-template-columns: minmax(0, 1fr); }
  .cv-highlights li { padding-inline: 0; }
  .cv-highlights li + li { border-left: 0; border-top: 1px solid var(--line); }
  .row time { padding-top: 0; }
  .facts dl { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .facts dd { margin-bottom: 0.75rem; }
  .crt__out li { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .glitch::before, .glitch::after, .crt__band, .hud-scan { display: none; }
}
