/* =========================================================
   Pablo Danilo — Portfólio
   Direção: pixel art · azul & branco · textura granulada
   ========================================================= */

/* ---------- Fontes (self-hosted, OFL) ---------- */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/geist-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/geist-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/geist-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/geist-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/geist-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/geist-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/geist-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/pixelify-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/pixelify-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/pixelify-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/silkscreen-latin-400-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --blue-50: #eef3ff;
  --blue-100: #dce6ff;
  --blue-200: #b9ccff;
  --blue-400: #5b82ff;
  --blue-500: #1f4fff;
  --blue-600: #1238d6;
  --blue-700: #0d29a3;
  --navy-800: #0a1a4a;
  --navy-900: #060f30;
  --navy-950: #030820;
  --sky: #7cc4ff;
  --live: #2ee6a6;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-pixel: "Pixelify Sans", "Silkscreen", var(--font-mono);
  --font-micro: "Silkscreen", var(--font-mono);

  --px: 3px;               /* tamanho do "pixel" das bordas */
  --container: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="light"] {
  --bg: #f5f8ff;
  --bg-dots: rgba(31, 79, 255, .10);
  --surface: #fff;
  --surface-2: var(--blue-50);
  --ink: var(--navy-800);
  --ink-soft: #33427a;
  --muted: #6676a6;
  --line: var(--navy-800);
  --line-soft: var(--blue-100);
  --accent: var(--blue-500);
  --accent-ink: #fff;
  --hl-bg: var(--blue-200);
  --shadow: var(--navy-800);
  --glass: rgba(255, 255, 255, .78);
  --grain-opacity: .07;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: var(--navy-950);
  --bg-dots: rgba(124, 196, 255, .08);
  --surface: #0a1540;
  --surface-2: #0e1c52;
  --ink: #eef3ff;
  --ink-soft: #c3d0ff;
  --muted: #8b9bd1;
  --line: #8fa8ff;
  --line-soft: #1a2b6e;
  --accent: var(--blue-400);
  --accent-ink: #fff;
  --hl-bg: rgba(91, 130, 255, .45);
  --shadow: #000;
  --glass: rgba(6, 15, 48, .78);
  --grain-opacity: .10;
  color-scheme: dark;
}

/* No escuro, fundos sólidos em azul usam o tom mais profundo para manter contraste com texto branco */
[data-theme="dark"] .btn--primary,
[data-theme="dark"] .window__bar,
[data-theme="dark"] .nav__link.is-active,
[data-theme="dark"] .tag--run,
[data-theme="dark"] .stage__status,
[data-theme="dark"] .sticker--b,
[data-theme="dark"] .icon-btn:hover,
[data-theme="dark"] .tool:hover { background: var(--blue-500); }
[data-theme="dark"] .stage--running .stage__status { background: var(--surface); }
[data-theme="dark"] .stage--pending .stage__status { background: var(--surface-2); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dots) 1.2px, transparent 1.3px);
  background-size: 18px 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.ic { width: 1em; height: 1em; flex: none; fill: currentColor; shape-rendering: crispEdges; }
.ic--xs { width: .75em; height: .75em; opacity: .7; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.muted { color: var(--muted); }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  padding: 10px 16px; background: var(--accent); color: #fff; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Textura granulada ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}
[data-theme="dark"] .grain { mix-blend-mode: screen; filter: invert(1); }
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Barra de progresso de scroll ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 90; pointer-events: none; }
.progress span {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 10px);
}

/* ---------- Botões (borda pixelada) ---------- */
.btn {
  --b: var(--line);
  --off: 4px;
  position: relative;
  display: inline-flex; align-items: center; gap: .6em;
  padding: 14px 22px;
  font-family: var(--font-micro);
  font-size: 13px; letter-spacing: .02em; text-transform: lowercase;
  border: 0; background: var(--surface); color: var(--ink);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--b), 0 var(--px) 0 0 var(--b),
    calc(var(--px) * -1) 0 0 0 var(--b), var(--px) 0 0 0 var(--b),
    var(--off) calc(var(--off) + var(--px)) 0 0 var(--shadow),
    calc(var(--off) + var(--px)) var(--off) 0 0 var(--shadow);
  transition: transform .15s steps(2), box-shadow .15s steps(2), background-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); --off: 6px; }
.btn:active { transform: translate(3px, 3px); --off: 0px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--blue-600); }
.btn--ghost { background: var(--surface); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--light { --b: #fff; --shadow: var(--blue-500); background: #fff; color: var(--navy-900); }
.btn--sm { padding: 10px 14px; font-size: 11px; --off: 3px; }
.btn .ic { width: 14px; height: 14px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border: 0;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: var(--accent); color: #fff; }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn--sm { width: 30px; height: 30px; margin-left: auto; box-shadow: none; background: transparent; }
.icon-btn--sm .ic { width: 14px; height: 14px; }
.icon-btn--light { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.icon-btn--light:hover { background: #fff; color: var(--navy-900); }

.ic--moon { display: none; }
[data-theme="dark"] .ic--sun { display: none; }
[data-theme="dark"] .ic--moon { display: block; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 max(24px, calc((100vw - var(--container)) / 2));
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.header.is-scrolled {
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line-soft);
}

.logo { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.logo img { image-rendering: pixelated; transition: transform .25s steps(3); }
.logo:hover img { transform: rotate(-8deg) scale(1.05); }
.logo__text { font-family: var(--font-pixel); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.logo__dot { color: var(--accent); }

.nav__list {
  display: flex; align-items: center; gap: 2px;
  padding: 5px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 -2px 0 0 var(--line-soft), 0 2px 0 0 var(--line-soft),
    -2px 0 0 0 var(--line-soft), 2px 0 0 0 var(--line-soft);
}
.nav__link {
  position: relative;
  display: flex; align-items: center; gap: 0;
  height: 38px; padding: 0 11px;
  color: var(--ink-soft);
  font-size: 14px; font-weight: 500;
  transition: background-color .2s, color .2s, gap .3s var(--ease), padding .3s var(--ease);
}
.nav__link .ic { width: 16px; height: 16px; }
.nav__link span {
  max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  transition: max-width .35s var(--ease), opacity .25s;
}
.nav__link:hover { color: var(--accent); background: var(--surface-2); }
.nav__link.is-active { background: var(--accent); color: #fff; gap: 8px; padding: 0 14px; }
.nav__link.is-active span { max-width: 120px; opacity: 1; }

/* tooltip nos ícones inativos */
.nav__link:not(.is-active)::after {
  content: attr(data-label);
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translate(-50%, -4px);
  padding: 4px 8px; font-family: var(--font-micro); font-size: 10px;
  background: var(--navy-900); color: #fff;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
  white-space: nowrap;
}
.nav__link:not(.is-active):hover::after { opacity: 1; transform: translate(-50%, 0); }

.header__actions { display: flex; align-items: center; gap: 14px; justify-self: end; }

/* ---------- Boot screen ---------- */
.boot {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: var(--navy-950);
  color: #cfe0ff;
  font-family: var(--font-mono); font-size: 14px;
  transition: opacity .5s var(--ease), visibility .5s;
}
.boot::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__inner { width: min(560px, 100% - 48px); }
.boot__log { margin: 0 0 20px; min-height: 9.5em; white-space: pre-wrap; line-height: 1.6; }
.boot__log .ok { color: var(--live); }
.boot__log .dim { color: #6f82bf; }
.boot__bar { height: 14px; box-shadow: 0 -2px #4d6bd6, 0 2px #4d6bd6, -2px 0 #4d6bd6, 2px 0 #4d6bd6; padding: 2px; }
.boot__bar span {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--blue-400) 0 10px, transparent 10px 12px);
  transition: width .15s steps(3);
}
html.no-boot .boot { display: none; }

/* ---------- Seções ---------- */
.section { position: relative; padding: 120px 0; }
.section__head { max-width: 680px; margin-bottom: 56px; }
.eyebrow {
  font-family: var(--font-micro); font-size: 12px; letter-spacing: .06em;
  color: var(--accent); margin-bottom: 14px;
}
.eyebrow--light { color: var(--sky); }
.section__title {
  font-family: var(--font-pixel); font-weight: 600;
  font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.01em;
  text-wrap: balance;
}
.section__lead { margin-top: 16px; color: var(--muted); font-size: 18px; }
.hl { color: var(--accent); }
.hl--light { color: var(--sky); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 96px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }

.prompt {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 14px; color: var(--muted);
  padding: 6px 12px; margin-bottom: 28px;
  background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
}
.prompt__user { color: var(--accent); font-weight: 600; }
.prompt__path { color: var(--ink-soft); }
.typed { color: var(--ink); margin-left: .4em; }
.caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__title { display: flex; flex-direction: column; gap: 6px; margin-bottom: 26px; }
.hero__hello { font-family: var(--font-sans); font-size: clamp(20px, 2.4vw, 26px); font-weight: 500; color: var(--ink-soft); }
.hero__hello #greeting { color: var(--accent); font-weight: 700; }
.hero__name {
  font-family: var(--font-pixel); font-weight: 700;
  font-size: clamp(52px, 8.6vw, 104px); line-height: .95; letter-spacing: -.02em;
}
.hero__name mark {
  color: inherit;
  background: linear-gradient(transparent 58%, var(--hl-bg) 58%, var(--hl-bg) 92%, transparent 92%);
  padding: 0 .06em;
}
.hero__lead { font-size: 19px; color: var(--ink-soft); max-width: 560px; margin-bottom: 14px; }
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__sub { color: var(--muted); max-width: 540px; margin-bottom: 36px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 40px; }

.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 24px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.hero__meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta .ic { color: var(--accent); }

.dot { display: inline-block; width: 8px; height: 8px; background: var(--muted); }
.dot--live { background: var(--live); box-shadow: 0 0 0 3px rgba(46, 230, 166, .25); animation: pulse 2s steps(2) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(46, 230, 166, .08); } }

.hero__visual { position: relative; justify-self: center; width: min(100%, 440px); }

/* janelas estilo OS / terminal */
.window, .term, .modal {
  background: var(--surface);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--line), 0 var(--px) 0 0 var(--line),
    calc(var(--px) * -1) 0 0 0 var(--line), var(--px) 0 0 0 var(--line),
    10px 13px 0 0 var(--accent), 13px 10px 0 0 var(--accent);
}
.window__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--accent); color: #fff;
  font-family: var(--font-micro); font-size: 11px; letter-spacing: .04em;
}
.window__dots { display: inline-flex; gap: 6px; }
.window__dots i { width: 9px; height: 9px; background: rgba(255, 255, 255, .9); }
.window__dots i:nth-child(2) { opacity: .6; }
.window__dots i:nth-child(3) { opacity: .35; }
.window__body { background: #f3f4f6; }
.window__body img { width: 100%; height: auto; image-rendering: pixelated; }
.window__status {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  border-top: 2px solid var(--line-soft);
}
.window__status > span { display: inline-flex; align-items: center; gap: 7px; }
.window__status b { color: var(--ink); font-weight: 600; }
.window__status .ic { color: var(--live); }

.sticker {
  position: absolute; z-index: 2;
  font-family: var(--font-pixel); font-weight: 700; font-size: 20px;
  padding: 8px 12px; background: var(--surface); color: var(--accent);
  box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line), 4px 5px 0 var(--shadow);
  animation: float 4s steps(8) infinite;
}
.sticker--a { top: 18%; left: -38px; transform: rotate(-8deg); }
.sticker--b { bottom: 22%; right: -34px; transform: rotate(6deg); animation-delay: -2s; background: var(--accent); color: #fff; }
@keyframes float { 50% { translate: 0 -10px; } }

/* ---------- Stack / marquee ---------- */
.stack { padding-top: 80px; }
.marquee {
  position: relative; overflow: hidden; padding: 12px 0 8px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; gap: 22px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tool {
  display: grid; place-items: center; gap: 10px;
  width: 112px; height: 112px; padding: 14px 8px 10px;
  background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  transition: background-color .2s, color .2s, transform .2s steps(2);
}
.tool .ti { font-size: 40px; color: var(--accent); transition: color .2s; }
.tool span { font-family: var(--font-micro); font-size: 10px; color: var(--muted); text-align: center; line-height: 1.2; }
.tool:hover { background: var(--accent); transform: translateY(-4px); }
.tool:hover .ti, .tool:hover span { color: #fff; }

.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.skill-card {
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  transition: box-shadow .2s, transform .2s steps(2);
}
.skill-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line), 6px 8px 0 var(--accent), 8px 6px 0 var(--accent);
}
.skill-card h3 { display: flex; align-items: center; gap: 10px; font-family: var(--font-pixel); font-weight: 600; font-size: 20px; margin-bottom: 18px; }
.skill-card h3 .ic { color: var(--accent); width: 20px; height: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--font-mono); font-size: 12.5px;
  padding: 4px 10px; background: var(--surface-2); color: var(--ink-soft);
}
.stack__next { margin-top: 36px; font-family: var(--font-mono); font-size: 14px; color: var(--ink-soft); }
.stack__next b { color: var(--accent); font-weight: 600; }

/* ---------- Projetos ---------- */
.projects__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.project {
  display: flex; flex-direction: column;
  background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  transition: transform .2s steps(2), box-shadow .2s;
}
.project:hover {
  transform: translate(-4px, -4px);
  box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line), 9px 12px 0 var(--accent), 12px 9px 0 var(--accent);
}
.project__cover {
  position: relative; overflow: hidden;
  min-height: 230px; padding: 28px 20px;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background:
    radial-gradient(rgba(124, 196, 255, .18) 1px, transparent 1.2px) 0 0 / 14px 14px,
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
  border-bottom: 4px solid var(--accent);
}
.project--self .project__cover {
  background:
    radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.2px) 0 0 / 14px 14px,
    linear-gradient(160deg, var(--blue-500), var(--blue-700));
  border-bottom-color: var(--navy-900);
}
.project__mark {
  position: absolute; inset: auto -2% -14% auto;
  font-family: var(--font-pixel); font-weight: 700;
  font-size: clamp(90px, 13vw, 160px); line-height: 1;
  color: rgba(124, 196, 255, .09);
  transition: transform .5s var(--ease), color .3s;
  pointer-events: none;
}
.project:hover .project__mark { transform: translate(-10px, -8px); color: rgba(124, 196, 255, .16); }
.diagram { position: relative; display: flex; align-items: center; font-family: var(--font-mono); font-size: 12px; color: #cfe0ff; }
.node {
  padding: 6px 10px; background: rgba(255, 255, 255, .06);
  box-shadow: 0 -2px #3c5bc9, 0 2px #3c5bc9, -2px 0 #3c5bc9, 2px 0 #3c5bc9;
}
.node--hl { background: var(--blue-500); color: #fff; box-shadow: 0 -2px #fff, 0 2px #fff, -2px 0 #fff, 2px 0 #fff; }
.project--self .node { box-shadow: 0 -2px #b9ccff, 0 2px #b9ccff, -2px 0 #b9ccff, 2px 0 #b9ccff; background: rgba(6, 15, 48, .25); }
.project--self .node--hl { background: #fff; color: var(--blue-600); }
.wire {
  position: relative; width: 34px; height: 2px;
  background: repeating-linear-gradient(90deg, #7cc4ff 0 4px, transparent 4px 8px);
  background-size: 8px 2px;
  animation: flow .6s linear infinite;
}
@keyframes flow { to { background-position: 8px 0; } }
.project__icons { position: relative; display: flex; gap: 10px; }
.project__icons li {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 22px;
  box-shadow: 0 -2px rgba(255,255,255,.18), 0 2px rgba(255,255,255,.18), -2px 0 rgba(255,255,255,.18), 2px 0 rgba(255,255,255,.18);
}

/* ---------- Trajetória (pipeline) ---------- */
.pipeline { position: relative; display: grid; gap: 22px; padding-left: 64px; }
.pipeline::before {
  content: ""; position: absolute; left: 21px; top: 20px; bottom: 30px; width: 4px;
  background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 12px);
}
.stage { position: relative; }
.stage__status {
  position: absolute; left: -64px; top: 18px;
  display: grid; place-items: center; width: 46px; height: 46px;
  background: var(--accent); color: #fff;
  box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line);
}
.stage__status .ic { width: 20px; height: 20px; }
.stage--running .stage__status { background: var(--surface); }
.stage--pending .stage__status { background: var(--surface-2); }
.spinner {
  width: 16px; height: 16px; background: var(--accent);
  animation: spin 1s steps(4) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pending { width: 14px; height: 14px; box-shadow: 0 -2px var(--muted), 0 2px var(--muted), -2px 0 var(--muted), 2px 0 var(--muted); }

.stage__card {
  padding: 22px 26px; background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
}
.stage__job { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stage__job b { color: var(--accent); font-weight: 600; }
.stage__card h3 { font-family: var(--font-pixel); font-weight: 600; font-size: 24px; line-height: 1.2; }
.stage__role { color: var(--ink-soft); margin-top: 2px; }
.stage__time { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-top: 4px; }
.stage__list { margin-top: 14px; display: grid; gap: 8px; }
.stage__list li { position: relative; padding-left: 20px; color: var(--ink-soft); font-size: 15.5px; }
.stage__list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--accent); }
.stage__card--cta {
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--surface-2) 10px 12px), var(--surface);
  box-shadow: 0 -2px var(--accent), 0 2px var(--accent), -2px 0 var(--accent), 2px 0 var(--accent);
}
.stage__card--cta .btn { margin-top: 18px; }
.tag {
  font-family: var(--font-micro); font-size: 10px; letter-spacing: .03em;
  padding: 2px 8px; background: var(--surface-2); color: var(--muted);
}
.tag--run { background: var(--accent); color: #fff; }

.certs { margin-top: 80px; }
.certs__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-pixel); font-weight: 600; font-size: 24px; margin-bottom: 24px; }
.certs__title .ic { color: var(--accent); }
.certs__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.cert {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 20px; background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  border-top: 4px solid var(--accent);
}
.cert__org { font-family: var(--font-micro); font-size: 11px; color: var(--accent); }
.cert__name { font-weight: 600; line-height: 1.35; }

/* ---------- Sobre ---------- */
.about__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px 64px; align-items: start; }
.about__grid .section__head { grid-column: 1 / -1; margin-bottom: 24px; }
.about__text { display: grid; gap: 18px; font-size: 18px; color: var(--ink-soft); }
.about__text b { color: var(--ink); font-weight: 600; }
.term { background: var(--navy-900); }
.term__body { margin: 0; padding: 22px; overflow-x: auto; font-family: var(--font-mono); font-size: 14px; line-height: 1.75; color: #cfe0ff; }
.term .k { color: var(--sky); }
.term .s { color: #fff; }
.term .b { color: var(--live); }

/* ---------- Contato ---------- */
.contact__panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  padding: clamp(32px, 6vw, 72px);
  color: #fff;
  background:
    radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px) 0 0 / 16px 16px,
    linear-gradient(150deg, var(--blue-500), var(--blue-700) 60%, var(--navy-900));
  box-shadow: 0 -4px var(--line), 0 4px var(--line), -4px 0 var(--line), 4px 0 var(--line), 12px 16px 0 var(--navy-900), 16px 12px 0 var(--navy-900);
}
[data-theme="dark"] .contact__panel { box-shadow: 0 -4px var(--line), 0 4px var(--line), -4px 0 var(--line), 4px 0 var(--line), 12px 16px 0 #000, 16px 12px 0 #000; }
.contact__panel::after {
  content: "PD"; position: absolute; right: -2%; bottom: -18%;
  font-family: var(--font-pixel); font-weight: 700; font-size: 300px; line-height: 1;
  color: rgba(255, 255, 255, .06); pointer-events: none;
}
.contact__copy, .form { position: relative; z-index: 1; }
.contact__lead { margin: 18px 0 30px; font-size: 18px; color: #dce6ff; max-width: 420px; }
.contact__email { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.contact__mail { font-family: var(--font-mono); font-size: clamp(16px, 2vw, 21px); font-weight: 600; border-bottom: 2px dashed rgba(255,255,255,.5); }
.contact__mail:hover { border-bottom-color: #fff; }
.copied { font-family: var(--font-micro); font-size: 11px; color: var(--live); }
.socials { display: flex; flex-wrap: wrap; gap: 14px; }
.socials a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; font-weight: 500;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 -2px rgba(255,255,255,.3), 0 2px rgba(255,255,255,.3), -2px 0 rgba(255,255,255,.3), 2px 0 rgba(255,255,255,.3);
  transition: background-color .2s, color .2s;
}
.socials a:hover { background: #fff; color: var(--navy-900); }

.form { display: grid; gap: 16px; align-content: start; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-micro); font-size: 11px; letter-spacing: .04em; color: #dce6ff; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 0;
  font: inherit; font-size: 15.5px; color: var(--navy-900);
  background: #fff; resize: vertical;
  box-shadow: 0 -2px #fff, 0 2px #fff, -2px 0 #fff, 2px 0 #fff;
}
.field input::placeholder, .field textarea::placeholder { color: #8b97bf; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: 0 -3px var(--sky), 0 3px var(--sky), -3px 0 var(--sky), 3px 0 var(--sky); }
.form .btn { justify-self: start; margin-top: 6px; }
.form__error { min-height: 1.2em; font-size: 14px; color: #ffd2d2; }
.form__error:empty { display: none; }
.form__note { font-size: 13px; color: #b9ccff; }

/* ---------- Footer ---------- */
.footer { padding: 48px 0 56px; }
.footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-top: 28px; border-top: 2px dashed var(--line-soft);
}
.footer__meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.footer__top { font-family: var(--font-micro); font-size: 11px; color: var(--accent); }
.footer__top:hover { text-decoration: underline; }

/* ---------- Modal ---------- */
.modal {
  width: min(640px, 100% - 32px); max-height: min(86vh, 720px);
  padding: 0; border: 0; color: var(--ink);
  overflow: auto;
}
.modal::backdrop { background: rgba(3, 8, 32, .7); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .25s steps(4); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal__body { padding: 28px; }
.modal__body h3 { font-family: var(--font-pixel); font-weight: 600; font-size: 30px; line-height: 1.1; margin-bottom: 8px; }
.modal__body .modal__tag { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-bottom: 20px; }
.modal__body h4 { font-family: var(--font-micro); font-size: 12px; font-weight: 400; color: var(--muted); margin: 22px 0 10px; letter-spacing: .04em; }
.modal__body ul { display: grid; gap: 8px; }
.modal__body li { position: relative; padding-left: 20px; color: var(--ink-soft); }
.modal__body li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--accent); }
.modal__body p { color: var(--ink-soft); }
.modal__body .chips { display: flex; margin-top: 6px; }
.modal__body .chips li { padding-left: 10px; }
.modal__body .chips li::before { display: none; }
.modal__body pre {
  margin: 12px 0 0; padding: 14px 16px; overflow-x: auto;
  background: var(--navy-900); color: #cfe0ff; font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
}

/* ---------- Animações de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Projetos v2 ---------- */
.projects__filters { display: flex; flex-wrap: wrap; gap: 10px; margin: -24px 0 32px; }
.filter {
  border: 0; padding: 8px 14px; font-family: var(--font-micro); font-size: 11px;
  background: var(--surface); color: var(--ink-soft);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
}
.filter:hover { color: var(--accent); }
.filter.is-active { background: var(--navy-800); color: #fff; box-shadow: 0 -2px var(--navy-800), 0 2px var(--navy-800), -2px 0 var(--navy-800), 2px 0 var(--navy-800); }
[data-theme="dark"] .filter.is-active { background: var(--blue-500); box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line); }
.project[hidden] { display: none; }
.flow { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 0; max-width: 520px; margin: 0; padding: 0; list-style: none; }
.flow__node {
  position: relative; padding: 6px 10px; margin-right: 26px;
  font-family: var(--font-mono); font-size: 12px; color: #cfe0ff; white-space: nowrap;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 -2px #3c5bc9, 0 2px #3c5bc9, -2px 0 #3c5bc9, 2px 0 #3c5bc9;
}
.flow__node:not(:last-child)::after {
  content: ""; position: absolute; left: calc(100% + 4px); top: 50%; width: 18px; height: 2px;
  background: repeating-linear-gradient(90deg, #7cc4ff 0 4px, transparent 4px 7px);
  background-size: 7px 2px; animation: flow .6s linear infinite;
}
.flow__node:last-child { margin-right: 0; }
.flow__node--hl { background: var(--blue-500); color: #fff; box-shadow: 0 -2px #fff, 0 2px #fff, -2px 0 #fff, 2px 0 #fff; }
.project--self .flow__node { box-shadow: 0 -2px #b9ccff, 0 2px #b9ccff, -2px 0 #b9ccff, 2px 0 #b9ccff; background: rgba(6, 15, 48, .3); }
.project--self .flow__node--hl { background: #fff; color: var(--blue-600); }
.project__body { display: grid; gap: 10px; align-content: start; padding: 22px 24px 24px; flex: 1; }
.project__cat { font-family: var(--font-micro); font-size: 11px; color: var(--accent); }
.project__body h3 { font-size: 20px; }
.project__problem { color: var(--muted); font-size: 15px; }
.project__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.project__icons .ti { font-size: 22px; }

/* ---------- Publicações ---------- */
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; flex-wrap: wrap; }
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post {
  background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  transition: transform .2s steps(2), box-shadow .2s;
}
.post:hover { transform: translate(-3px, -3px); box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line), 6px 8px 0 var(--accent), 8px 6px 0 var(--accent); }
.post__link { display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 20px; }
.post__head { display: flex; align-items: center; gap: 12px; }
.post__avatar { width: 40px; height: 40px; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--line-soft); }
.post__who { display: grid; line-height: 1.3; min-width: 0; }
.post__who b { font-size: 15px; }
.post__who span, .post__who time { font-size: 12.5px; color: var(--muted); }
.post__brand { margin-left: auto; width: 18px; height: 18px; color: var(--accent); }
.post__text {
  color: var(--ink-soft); font-size: 15px; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.post__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post__more { margin-top: auto; font-family: var(--font-micro); font-size: 11px; color: var(--accent); }
.post--skeleton { min-height: 260px; background: linear-gradient(90deg, var(--surface) 0 40%, var(--surface-2) 50%, var(--surface) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s steps(10) infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.post--empty {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 26px 28px;
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--surface-2) 10px 12px), var(--surface);
}
.post--empty > .ic { width: 32px; height: 32px; color: var(--accent); }
.post--empty p { flex: 1; min-width: 220px; color: var(--ink-soft); }
.post--empty b { color: var(--ink); }

.flow--modal { justify-content: flex-start; padding: 16px; background: var(--navy-900); max-width: none; }
.modal__links { margin-top: 22px; }

/* ---------- Projetos: cards linkados ---------- */
.project__link { display: flex; flex-direction: column; height: 100%; }
.project__cta { justify-self: start; margin-top: 8px; }
.project:hover .project__cta { background: var(--blue-500); color: #fff; }
.projects__more { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 40px; }
.projects__more [hidden] { display: none; }

/* ---------- Páginas de case ---------- */
.case { padding: 32px 0 96px; }
.case__back { display: block; width: fit-content; font-family: var(--font-mono); font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.case__back:hover { color: var(--accent); }
.case__badge {
  display: inline-block; margin-bottom: 14px; padding: 4px 10px;
  font-family: var(--font-micro); font-size: 11px; background: var(--surface); color: var(--accent);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
}
.case__title { font-family: var(--font-pixel); font-weight: 700; font-size: clamp(40px, 6.5vw, 76px); line-height: 1; letter-spacing: -.01em; text-wrap: balance; }
.case__title mark { color: inherit; background: linear-gradient(transparent 58%, var(--hl-bg) 58%, var(--hl-bg) 92%, transparent 92%); padding: 0 .05em; }
.case__subtitle { margin-top: 14px; font-size: 19px; color: var(--ink-soft); max-width: 640px; }
.case__icons { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 34px; }
.case__icons li {
  display: grid; place-items: center; width: 44px; height: 44px; font-size: 24px;
  background: var(--surface); color: var(--accent);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
}
.case__cover {
  position: relative; overflow: hidden; display: grid; place-items: center;
  min-height: clamp(220px, 32vw, 380px); padding: 32px 20px; margin-bottom: 64px;
  background:
    radial-gradient(rgba(124, 196, 255, .18) 1px, transparent 1.2px) 0 0 / 14px 14px,
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
  border-bottom: 6px solid var(--accent);
  box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line), 12px 15px 0 var(--accent), 15px 12px 0 var(--accent);
}
.case__cover--blue {
  background:
    radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.2px) 0 0 / 14px 14px,
    linear-gradient(160deg, var(--blue-500), var(--blue-700));
  border-bottom-color: var(--navy-900);
}
.case__cover .project__mark { font-size: clamp(120px, 20vw, 260px); }
.case__cover .flow { max-width: 760px; }
.case__cover .flow__node { font-size: 14px; padding: 8px 12px; }

.case__layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.case__toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 12px; }
.case__toc p { font-family: var(--font-micro); font-size: 11px; color: var(--muted); }
.case__toc ol { display: grid; gap: 4px; border-left: 2px dashed var(--line-soft); }
.case__toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); font-size: 15px; }
.case__toc a:hover { color: var(--accent); }
.case__toc a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
.case__links { display: grid; gap: 14px; margin-top: 14px; justify-items: start; }

.case__body { display: grid; gap: 56px; max-width: 760px; }
.case__section { display: grid; gap: 16px; scroll-margin-top: calc(var(--header-h) + 24px); }
.case__section h2 { font-family: var(--font-pixel); font-weight: 600; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.1; }
.case__section h3 { font-family: var(--font-micro); font-weight: 400; font-size: 12px; color: var(--accent); letter-spacing: .04em; margin-top: 10px; }
.case__section p { font-size: 18px; color: var(--ink-soft); }
.case__section b { color: var(--ink); font-weight: 600; }
.case__list { display: grid; gap: 10px; }
.case__list li { position: relative; padding-left: 22px; font-size: 17px; color: var(--ink-soft); }
.case__list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; background: var(--accent); }
.case__tree { margin: 0; padding: 20px 22px; overflow-x: auto; background: var(--navy-900); color: #cfe0ff; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.7; }
.case__flow { padding: 26px 18px; background: radial-gradient(rgba(124, 196, 255, .16) 1px, transparent 1.2px) 0 0 / 14px 14px, var(--navy-900); }
.case__flow .flow { margin-inline: auto; }
.proofs { display: grid; gap: 12px; }
.proofs li {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
}
.proofs .ic { flex: none; width: 20px; height: 20px; padding: 3px; background: var(--live); color: var(--navy-900); }
.proofs div { display: grid; }
.proofs span { color: var(--muted); font-size: 15px; }

.case__pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 88px; }
.case__pager a {
  display: grid; gap: 4px; padding: 20px 22px; background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  transition: transform .2s steps(2), box-shadow .2s;
}
.case__pager a:last-child { text-align: right; }
.case__pager a:hover { transform: translate(-3px, -3px); box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line), 6px 8px 0 var(--accent), 8px 6px 0 var(--accent); }
.case__pager span { font-family: var(--font-micro); font-size: 11px; color: var(--accent); }
.case__pager b { font-family: var(--font-pixel); font-weight: 600; font-size: 22px; }

/* ---------- Stack: etapas ---------- */
.phases {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0;
  margin-bottom: 64px; background: var(--surface);
  box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line), 10px 13px 0 var(--accent), 13px 10px 0 var(--accent);
}
.phases__nav {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 14px;
  background: radial-gradient(rgba(124, 196, 255, .14) 1px, transparent 1.2px) 0 0 / 14px 14px, var(--navy-900);
}
.phases__group { font-family: var(--font-micro); font-size: 10px; letter-spacing: .08em; color: var(--sky); padding: 12px 10px 4px; }
.phases__group:first-child { padding-top: 2px; }
.phase {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 12px; border: 0; text-align: left;
  font-family: var(--font-pixel); font-weight: 600; font-size: 18px;
  background: transparent; color: #cfe0ff;
  transition: background-color .15s, color .15s;
}
.phase__n { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: #6f82bf; }
.phase:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.phase.is-active { background: var(--blue-500); color: #fff; }
.phase.is-active .phase__n { color: #dce6ff; }
.phases__panel { padding: 32px 36px; min-height: 360px; }
.phases__step { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.phases__panel h3 { font-family: var(--font-pixel); font-weight: 700; font-size: clamp(36px, 4.5vw, 52px); line-height: 1; margin: 6px 0 8px; color: var(--accent); }
.phases__desc { font-size: 18px; color: var(--ink-soft); }
.phases__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; margin-top: 26px; padding-top: 22px; border-top: 2px dashed var(--line-soft); }
.phases__panel h4 { font-family: var(--font-micro); font-weight: 400; font-size: 11px; color: var(--muted); margin-bottom: 12px; letter-spacing: .04em; }
.phases__tools { display: flex; flex-wrap: wrap; gap: 10px; }
.phases__tools li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-2); font-size: 14px; font-weight: 500; }
.phases__tools .ti { font-size: 20px; color: var(--accent); }
.phases__used { display: grid; gap: 10px; }
.phases__used li { position: relative; padding-left: 20px; color: var(--ink-soft); font-size: 15.5px; }
.phases__used li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--accent); }

/* ---------- Projetos: cards (3 por linha) ---------- */
.pcard {
  background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  transition: transform .2s steps(2), box-shadow .2s;
  animation: cardIn .4s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }
.pcard:hover { transform: translate(-4px, -4px); box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line), 9px 12px 0 var(--accent), 12px 9px 0 var(--accent); }
.pcard__link { display: flex; flex-direction: column; height: 100%; }
.pcard__cover {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3;
  display: grid; place-items: center; align-content: center; gap: 16px; padding: 20px;
  background: radial-gradient(rgba(124, 196, 255, .16) 1px, transparent 1.2px) 0 0 / 14px 14px, linear-gradient(160deg, var(--navy-900), var(--navy-950));
  border-bottom: 4px solid var(--accent);
}
.pcard--featured .pcard__cover {
  background: radial-gradient(rgba(255, 255, 255, .2) 1px, transparent 1.2px) 0 0 / 14px 14px, linear-gradient(160deg, var(--blue-500), var(--blue-700));
  border-bottom-color: var(--navy-900);
}
.pcard__mark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-pixel); font-weight: 700; font-size: clamp(90px, 10vw, 140px); line-height: 1; white-space: nowrap;
  color: rgba(124, 196, 255, .1); transition: transform .5s var(--ease), color .3s; pointer-events: none;
}
.pcard--featured .pcard__mark { color: rgba(255, 255, 255, .12); }
.pcard:hover .pcard__mark { transform: translate(-50%, -50%) scale(1.08); }
.pcard__name { position: relative; font-family: var(--font-pixel); font-weight: 700; font-size: clamp(22px, 2.2vw, 28px); color: #fff; text-align: center; line-height: 1.1; }
.pcard__icons { position: relative; display: flex; gap: 8px; }
.pcard__icons li {
  display: grid; place-items: center; width: 36px; height: 36px; font-size: 19px; color: #fff;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 -2px rgba(255,255,255,.2), 0 2px rgba(255,255,255,.2), -2px 0 rgba(255,255,255,.2), 2px 0 rgba(255,255,255,.2);
}
.pcard__body { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; flex: 1; padding: 20px 22px 22px; }
.pcard__cat { font-family: var(--font-micro); font-size: 10.5px; color: var(--accent); margin-bottom: 6px; }
.pcard__body h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.pcard__sum { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.pcard__cta {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-family: var(--font-micro); font-size: 11px; color: var(--ink);
  box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line);
  transition: background-color .15s, color .15s;
}
.pcard__cta .ic { width: 12px; height: 12px; }
.pcard:hover .pcard__cta { background: var(--blue-500); color: #fff; }

/* ---------- Experiência: linha do tempo ---------- */
.timeline { position: relative; display: grid; gap: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 141px; top: 18px; bottom: 18px; width: 4px;
  background: repeating-linear-gradient(180deg, var(--line-soft) 0 8px, transparent 8px 12px);
}
.tl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 40px; align-items: start; }
.tl__when { position: relative; display: flex; justify-content: flex-end; padding-top: 24px; }
.tl__date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-align: right; }
.tl__dot { position: absolute; right: -31px; top: 25px; width: 16px; height: 16px; background: var(--surface); box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line); }
.tl--current .tl__date { color: var(--accent); font-weight: 600; }
.tl--current .tl__dot { background: var(--live); width: 20px; height: 20px; right: -33px; top: 23px; animation: pulse 2s steps(2) infinite; }
.tl__card {
  padding: 24px 28px; background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
}
.tl__head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 16px; }
.tl__kind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.tl__head h3 { font-family: var(--font-pixel); font-weight: 600; font-size: 26px; line-height: 1.1; }
.tl__org { color: var(--ink-soft); margin-top: 2px; }
.tl__logo { flex: none; display: grid; place-items: center; width: 48px; height: 48px; background: var(--surface-2); color: var(--accent); }
.tl__logo .ic { width: 22px; height: 22px; }
.tl__list { display: grid; gap: 9px; }
.tl__list li { position: relative; padding-left: 20px; color: var(--ink-soft); font-size: 15.5px; }
.tl__list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--accent); }
.tl__list b { color: var(--ink); font-weight: 600; }
.tl__link { display: inline-block; margin-top: 16px; font-family: var(--font-micro); font-size: 11px; color: var(--accent); }
.tl__link:hover { text-decoration: underline; }
.tl__tech { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tl__tech li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 14px; font-weight: 500; }
.tl__tech .ti { font-size: 18px; }

.tl--current .tl__card {
  padding: 32px 36px; color: #fff;
  background: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px) 0 0 / 16px 16px, linear-gradient(150deg, var(--blue-500), var(--blue-700) 65%, var(--navy-900));
  box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line), 10px 13px 0 var(--navy-900), 13px 10px 0 var(--navy-900);
}
[data-theme="dark"] .tl--current .tl__card { box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line), 10px 13px 0 #000, 13px 10px 0 #000; }
.tl--current .tl__head h3 { font-size: clamp(30px, 3.6vw, 40px); }
.tl--current .tl__kind, .tl--current .tl__org { color: #dce6ff; }
.tl--current .tl__org { font-size: 18px; font-weight: 600; }
.tl--current .tl__logo { background: rgba(255, 255, 255, .14); color: #fff; width: 56px; height: 56px; }
.tl--current .tl__list li { color: #eef3ff; font-size: 16.5px; }
.tl--current .tl__list li::before { background: var(--sky); }
.tl--current .tl__list b { color: #fff; }
.tl--current .tl__tech li { background: rgba(255, 255, 255, .12); color: #fff; }
.tag--live { background: var(--live); color: var(--navy-900); }

/* ---------- Formação ---------- */
.edu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; margin-top: 88px; }
.edu__col { display: grid; gap: 18px; align-content: start; }
.edu__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-pixel); font-weight: 600; font-size: 26px; margin-bottom: 4px; }
.edu__title .ic { color: var(--accent); }
.degree {
  padding: 22px 24px; background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
}
.degree--current { box-shadow: 0 -3px var(--line), 0 3px var(--line), -3px 0 var(--line), 3px 0 var(--line), 8px 10px 0 var(--accent), 10px 8px 0 var(--accent); }
.degree__kind { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.degree h4 { font-family: var(--font-pixel); font-weight: 600; font-size: 24px; line-height: 1.15; margin-top: 4px; }
.degree__org { color: var(--ink-soft); }
.degree__bar { margin-top: 18px; height: 16px; padding: 3px; box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line); }
.degree__fill { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 10px); transition: width 1s steps(10); }
.degree__dates { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.degree__pct { color: var(--accent); font-weight: 600; }
.courses { display: grid; gap: 12px; }
.course {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--surface);
  box-shadow: 0 -2px var(--line-soft), 0 2px var(--line-soft), -2px 0 var(--line-soft), 2px 0 var(--line-soft);
  transition: transform .2s steps(2), box-shadow .2s;
}
.course:hover { transform: translateX(4px); box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line); }
.course .course__badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; font-family: var(--font-micro); font-size: 13px; background: var(--blue-500); color: #fff; }
.course div { display: grid; line-height: 1.35; }
.course b { font-weight: 600; }
.course span { font-size: 14px; color: var(--muted); }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .header__cta { display: none; }
}

@media (max-width: 900px) {
  .phases { grid-template-columns: 1fr; }
  .phases__nav { flex-direction: row; overflow-x: auto; padding: 12px; }
  .phases__group { display: none; }
  .phase { width: auto; flex: none; font-size: 16px; }
  .phases__panel { padding: 24px 22px; }
  .phases__cols { grid-template-columns: 1fr; }
  .edu { grid-template-columns: 1fr; }
  .timeline::before { left: 9px; }
  .tl { grid-template-columns: 1fr; gap: 10px; padding-left: 36px; }
  .tl__when { justify-content: flex-start; padding-top: 0; }
  .tl__dot { right: auto; left: -34px; top: 1px; }
  .tl--current .tl__dot { left: -36px; right: auto; top: -1px; }
  .tl--current .tl__card { padding: 24px 22px; }
  .case__layout { grid-template-columns: 1fr; gap: 32px; }
  .case__toc { position: static; }
  .case__pager { grid-template-columns: 1fr; }
  .case-page .footer { padding-bottom: 56px; }
  .feed { grid-template-columns: 1fr; }
  :root { --header-h: 64px; }
  body { font-size: 16px; }
  .section { padding: 88px 0; }
  .hero { padding: 32px 0 72px; }
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero__visual { width: min(100%, 360px); }
  .about__grid { grid-template-columns: 1fr; }
  .contact__panel { grid-template-columns: 1fr; gap: 40px; }

  /* nav vira barra inferior fixa */
  .header { grid-template-columns: 1fr auto; }
  .nav {
    position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
    z-index: 60;
  }
  .nav__list { background: var(--glass); box-shadow: 0 -2px var(--line), 0 2px var(--line), -2px 0 var(--line), 2px 0 var(--line), 4px 6px 0 var(--accent); }
  .nav__link:not(.is-active)::after { display: none; }
  .footer { padding-bottom: 110px; }
}

@media (max-width: 560px) {
  .projects__grid { grid-template-columns: 1fr; }
  .tl__logo { display: none; }
  .container { width: min(100% - 32px, var(--container)); }
  .header { padding: 0 16px; }
  .logo__text { display: none; }
  .skills { grid-template-columns: 1fr; }
  .sticker { display: none; }
  .nav__link { padding: 0 9px; }
  .nav__link.is-active { padding: 0 11px; gap: 0; }
  .nav__link.is-active span { max-width: 0; opacity: 0; }
  .pipeline { padding-left: 52px; }
  .stage__status { left: -52px; width: 38px; height: 38px; }
  .pipeline::before { left: 17px; }
  .diagram { font-size: 11px; }
  .wire { width: 18px; }
  .contact__panel::after { font-size: 180px; }
  .window__status { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ---------- Ícones de tecnologia (SVG via mask, herdam a cor) ---------- */
.ti {
  display: inline-block; width: 1em; height: 1em; background-color: currentColor;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
