/* =====================================================================
   Murilo Neves Teixeira · portfólio
   Portfólio dev clássico com acabamento de produto: preto profundo,
   grafite, um acento índigo e prints reais.
   ===================================================================== */

:root {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #17171b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #8b8b95;
  --accent: #7c8cff;
  --accent-soft: rgba(124, 140, 255, 0.16);
  --green: #4ade80;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 20px;
  --max: 1160px;
  --pad: clamp(16px, 4vw, 40px);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -24px rgba(0, 0, 0, 0.7);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; scrollbar-color: #3f3f46 var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--accent); color: #0b0b12; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 99px; border: 2px solid var(--bg); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
strong, b { font-weight: 600; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.mono { font-family: var(--mono); }
.i { width: 1em; height: 1em; flex: none; }
.sprite { position: absolute; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; transition: top 0.2s var(--ease); }
.skip:focus { top: 12px; }

/* ---------- fundo: grade, aurora e luz do mouse ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg__aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; will-change: transform; }
.bg__aurora--a { width: 640px; height: 520px; top: -220px; left: 8%; background: #4f46e5; animation: drift-a 18s ease-in-out infinite alternate; }
.bg__aurora--b { width: 560px; height: 460px; top: -160px; right: 2%; background: #0e7490; opacity: 0.38; animation: drift-b 22s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(140px, 80px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-160px, 120px) scale(0.9); } }
.bg__spot {
  position: absolute; width: 640px; height: 640px; left: 0; top: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 140, 255, 0.09), transparent 62%);
  transform: translate(calc(var(--mx, -999px) - 50%), calc(var(--my, -999px) - 50%));
  transition: opacity 0.4s;
}

/* ---------- botões e links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 46px; padding: 0 1.25rem; border-radius: 999px;
  font-weight: 550; font-size: 0.97rem; letter-spacing: -0.005em; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.35s var(--ease), color 0.25s;
}
.btn .i { transition: transform 0.35s var(--ease); }
.btn:hover .i { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }
.btn--light { background: var(--text); color: #09090b; box-shadow: 0 0 0 0 rgba(124, 140, 255, 0); }
.btn--light:hover { background: #fff; box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 30px -10px rgba(124, 140, 255, 0.6); }
.btn--ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.28); }
.btn--sm { min-height: 38px; padding: 0 1rem; font-size: 0.9rem; }

.link {
  display: inline-flex; align-items: center; gap: 0.4em; font-weight: 550; font-size: 0.95rem; color: var(--text);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease), color 0.25s;
  padding-bottom: 2px;
}
.link:hover { background-size: 100% 1px; }
.link--muted { color: var(--muted); }
.link--muted:hover { color: var(--text); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 16px 0 auto; z-index: 50; padding: 0 var(--pad); pointer-events: none; }
.nav__inner {
  pointer-events: auto;
  max-width: var(--max); margin: 0 auto; height: 60px;
  display: flex; align-items: center; gap: 24px; padding: 0 10px 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s, box-shadow 0.35s;
}
.nav.is-scrolled .nav__inner {
  background: rgba(17, 17, 20, 0.72); border-color: var(--border);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.8);
}
.nav__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.01em; }
.nav__logo {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--accent);
}
.nav__logo .i { width: 18px; height: 18px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { padding: 8px 14px; border-radius: 999px; font-size: 0.92rem; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__links a[aria-current="true"] { color: var(--text); background: rgba(255, 255, 255, 0.07); }
@media (max-width: 760px) {
  .nav { inset: 10px 0 auto; }
  .nav__inner { gap: 10px; height: 54px; padding-left: 10px; }
  .nav__brand span:last-child { display: none; }
  .nav__links { gap: 0; }
  .nav__links a { padding: 8px 9px; font-size: 0.85rem; }
  .nav__links a[href="#stack"] { display: none; }
}
@media (max-width: 400px) { .nav__links a[href="#trajetoria"] { display: none; } }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 72px);
  padding: 120px var(--pad) 72px;
}
.hero__title {
  margin: 0; font-weight: 700; letter-spacing: -0.04em; line-height: 0.98;
  font-size: clamp(2.9rem, 6vw, 4.6rem);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line:nth-child(2) > span { color: var(--muted); }
.hero__role { margin: 22px 0 0; font-weight: 550; font-size: 1.1rem; color: var(--accent); letter-spacing: -0.01em; }
.hero__lede { margin: 14px 0 0; max-width: 34rem; font-size: clamp(1.08rem, 1.5vw, 1.22rem); color: var(--muted); line-height: 1.6; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; margin: 28px 0 0;
  padding: 8px 14px 8px 12px; border-radius: 999px;
  background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.25);
  color: #bbf7d0; font-size: 0.88rem; font-weight: 500; line-height: 1.35;
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: ping 2s var(--ease) infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.hero__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; color: var(--faint); font-size: 0.9rem; }
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }

/* editor de código */
.editor {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(23, 23, 27, 0.92), rgba(15, 15, 18, 0.95));
  border: 1px solid var(--border-strong); box-shadow: var(--shadow), 0 0 80px -30px rgba(124, 140, 255, 0.45);
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease);
}
.editor::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 0%), rgba(124, 140, 255, 0.12), transparent 45%);
}
.editor__bar { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); }
.editor__dots { display: inline-flex; gap: 7px; }
.editor__dots i { width: 11px; height: 11px; border-radius: 50%; background: #3f3f46; }
.editor__dots i:nth-child(1) { background: #ff5f57; }
.editor__dots i:nth-child(2) { background: #febc2e; }
.editor__dots i:nth-child(3) { background: #28c840; }
.editor__tab { font-size: 0.8rem; color: var(--text); padding: 5px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.editor__lang { margin-left: auto; font-size: 0.75rem; color: var(--faint); }
.editor__code {
  margin: 0; padding: 22px 22px 22px 0; min-height: 352px;
  font-size: 0.86rem; line-height: 1.75; color: #d4d4d8; white-space: pre; overflow-x: auto;
  counter-reset: ln;
}
.editor__code code { display: block; }
.editor__code .ln { display: block; min-height: 1.75em; padding-left: 52px; position: relative; }
.editor__code .ln::before {
  counter-increment: ln; content: counter(ln);
  position: absolute; left: 0; width: 36px; text-align: right; color: #52525b;
}
.tk-k { color: #c792ea; }
.tk-v { color: #82aaff; }
.tk-p { color: #f4f4f5; }
.tk-s { color: #c3e88d; }
.tk-n { color: #f78c6c; }
.tk-c { color: #6b6b76; font-style: italic; }
.tk-f { color: #ffcb6b; }
.editor__caret { display: inline-block; width: 8px; height: 1.15em; background: var(--accent); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; margin-left: 52px; }
.editor__code code:not(:empty) + .editor__caret { display: none; }
.editor__code .caret { display: inline-block; width: 8px; height: 1.15em; background: var(--accent); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.editor__status {
  display: flex; justify-content: space-between; gap: 16px; padding: 8px 16px; font-size: 0.72rem; color: var(--faint);
  border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
}
.editor__status span:first-child { color: var(--accent); }
.editor__status span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 112px; }
  .editor__code { min-height: 0; font-size: 0.78rem; }
}
@media (max-width: 760px) {
  .hero { padding-top: 100px; gap: 40px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .editor__code { padding-right: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .editor__code .ln { text-indent: 0; }
  .editor__code .ln { padding-left: 38px; }
  .editor__code .ln::before { width: 24px; }
}

/* entrada do hero */
.js .hero__title .line > span { transform: translateY(105%); }
.js .hero__role, .js .hero__lede, .js .hero__actions, .js .badge, .js .hero__facts, .js .editor { opacity: 0; translate: 0 16px; filter: blur(6px); }
.is-ready .hero__title .line > span { transform: none; transition: transform 1s var(--ease); }
.is-ready .hero__title .line:nth-child(2) > span { transition-delay: 0.08s; }
.is-ready .hero__role, .is-ready .hero__lede, .is-ready .hero__actions, .is-ready .badge, .is-ready .hero__facts, .is-ready .editor {
  opacity: 1; translate: 0 0; filter: blur(0);
  transition: opacity 0.9s var(--ease), translate 0.9s var(--ease), filter 0.9s var(--ease), transform 0.6s var(--ease);
}
.is-ready .hero__role { transition-delay: 0.25s; }
.is-ready .hero__lede { transition-delay: 0.33s; }
.is-ready .hero__actions { transition-delay: 0.41s; }
.is-ready .badge { transition-delay: 0.49s; }
.is-ready .hero__facts { transition-delay: 0.55s; }
.is-ready .editor { transition-delay: 0.35s; }

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--border); overflow: hidden; padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; width: max-content; gap: 48px; animation: marquee 38s linear infinite; font-size: 0.95rem; color: var(--faint); }
.marquee__track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee__track span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #3f3f46; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 24px)); } }

/* ---------- seções ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(88px, 12vw, 140px) var(--pad) 0; }
.section__head { margin-bottom: 48px; max-width: 40rem; }
.section__title { margin: 0; font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.section__lede { margin: 14px 0 0; color: var(--muted); font-size: 1.1rem; }

/* revelar ao rolar */
.js .reveal { opacity: 0; translate: 0 24px; filter: blur(4px); transition: opacity 0.9s var(--ease), translate 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; translate: 0 0; filter: blur(0); }

/* ---------- bento de projetos ---------- */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  --accent: #7c8cff;
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; transition: border-color 0.3s, translate 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  padding: 1px; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), var(--accent), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
}
.card:hover { translate: 0 -4px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card__shot {
  position: relative; display: block; margin: 12px 12px 0; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16 / 10; background: var(--surface-2); border: 1px solid var(--border);
}
.card__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.9s var(--ease); }
.card:hover .card__shot img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 0.74rem; }
.card__tags span { padding: 3px 9px; border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.card__title { margin: 14px 0 0; font-size: 1.45rem; font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
.card__desc { margin: 10px 0 0; color: var(--muted); font-size: 0.98rem; line-height: 1.6; text-wrap: pretty; }
.card__stack { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 16px 0 0; padding: 0; font-size: 0.76rem; color: var(--faint); }
.card__links { display: flex; gap: 22px; margin-top: auto; padding-top: 20px; }

.card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.card--wide .card__shot { margin: 12px 0 12px 12px; aspect-ratio: auto; min-height: 340px; }
.card--wide .card__body { justify-content: center; padding: 36px 40px; }
.card--wide .card__title { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.card--wide .card__desc { font-size: 1.05rem; }
.card--wide .card__links { margin-top: 0; padding-top: 26px; }
.card--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.card--flip .card__shot { order: 2; margin: 12px 12px 12px 0; }

/* Frangão: ilustração animada */
.card__shot--art { display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, rgba(255, 200, 61, 0.14), transparent 60%), var(--surface-2); }
.frango { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px; width: 100%; padding: 0 clamp(20px, 6%, 48px); }
.frango__mascot { width: clamp(96px, 30%, 150px); border-radius: 26%; animation: hop 1.4s var(--ease) infinite; transform-origin: 50% 100%; }
@keyframes hop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  14% { transform: translateY(0) scale(1.05, 0.93); }
  36% { transform: translateY(-9%) scale(0.98, 1.03); }
  60% { transform: translateY(0) scale(1.03, 0.96); }
  75% { transform: none; }
}
.frango__panel { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.frango__level { font-size: 0.78rem; color: var(--faint); }
.frango__level b { color: #ffc83d; }
.frango__stage { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.03em; color: #ffc83d; line-height: 1.1; }
.frango__xp { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.frango__xp span { display: block; height: 100%; width: 100%; border-radius: inherit; background: #ffc83d; transform-origin: left; transform: scaleX(0.12); transition: transform 1.1s var(--ease); }

/* outros projetos */
.more__title { margin: 72px 0 18px; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
.more { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.more a {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; height: 100%;
  padding: 18px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border);
  transition: background 0.25s, border-color 0.25s, translate 0.4s var(--ease);
}
.more a:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--border-strong); translate: 0 -2px; }
.more__name { font-weight: 600; letter-spacing: -0.01em; }
.more__desc { grid-column: 1; color: var(--muted); font-size: 0.93rem; line-height: 1.5; }
.more__tech { grid-column: 1; font-size: 0.74rem; color: var(--faint); margin-top: 6px; }
.more a > .i { grid-column: 2; grid-row: 1; color: var(--faint); transition: transform 0.35s var(--ease), color 0.25s; }
.more a:hover > .i { transform: translate(2px, -2px); color: var(--text); }

@media (max-width: 860px) {
  .bento, .more { grid-template-columns: 1fr; }
  .card--wide, .card--flip { grid-template-columns: 1fr; }
  .card--flip .card__shot { order: 0; }
  .card--wide .card__shot { margin: 12px 12px 0; min-height: 0; aspect-ratio: 16 / 10; }
  .card--wide .card__body { padding: 22px 24px 24px; }
}

/* ---------- sobre ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
.about__text p { margin: 20px 0 0; color: var(--muted); max-width: 36rem; text-wrap: pretty; }
.about__text .section__title + p { margin-top: 28px; }
.about__cards { list-style: none; display: grid; gap: 12px; margin: 32px 0 0; padding: 0; }
.about__cards li { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.about__cards .i { width: 22px; height: 22px; color: var(--accent); }
.about__cards b { display: block; font-size: 1rem; }
.about__cards span { display: block; color: var(--muted); font-size: 0.9rem; }

.term { position: sticky; top: 100px; border-radius: var(--radius); overflow: hidden; background: #0c0c0f; border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.term__bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border); font-size: 0.78rem; color: var(--faint); }
.term__out { height: 300px; overflow-y: auto; padding: 16px 18px 4px; font-size: 0.82rem; line-height: 1.7; scrollbar-width: thin; }
.term__out p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.term__out .cmd { margin-top: 10px; color: var(--text); }
.term__out .cmd::before { content: "~/murilo $ "; color: var(--accent); }
.term__out .dim { color: var(--faint); }
.term__out .err { color: #fca5a5; }
.term__out a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.term__out b { color: var(--text); }
.term__form { display: flex; align-items: center; gap: 10px; padding: 8px 18px 14px; font-size: 0.82rem; }
.term__ps { color: var(--accent); white-space: nowrap; }
.term__form input { flex: 1; min-width: 0; padding: 6px 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; caret-color: var(--accent); }
.term__form input::placeholder { color: var(--faint); }
.term__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--border); }
.term__chips button {
  font-family: var(--mono); font-size: 0.76rem; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-strong); color: var(--muted);
  transition: all 0.2s;
}
.term__chips button:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } .term { position: relative; top: 0; } }

/* ---------- trajetória ---------- */
#trajetoria { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
#trajetoria .section__head { position: sticky; top: 120px; }
@media (max-width: 900px) { #trajetoria { grid-template-columns: 1fr; gap: 0; } #trajetoria .section__head { position: static; } }
.timeline { --progress: 0; list-style: none; position: relative; margin: 0; padding: 0 0 0 36px; max-width: 46rem; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; }
.timeline::before { background: var(--border-strong); }
.timeline::after { background: linear-gradient(var(--accent), #22d3ee); transform-origin: top; transform: scaleY(var(--progress)); }
.timeline li { position: relative; padding: 0 0 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -36px; top: 5px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-strong); z-index: 1;
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
.timeline li.in::before { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li.is-star::before { background: #ffc83d; border-color: #ffc83d; box-shadow: 0 0 0 5px rgba(255, 200, 61, 0.18); }
.timeline time { font-size: 0.78rem; color: var(--faint); }
.timeline h3 { margin: 4px 0 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; }
.timeline p { margin: 6px 0 0; color: var(--muted); font-size: 0.98rem; }
.timeline .is-star h3 { color: #ffd76a; }

/* ---------- stack ---------- */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.skills__group { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.skills__group h3 { margin: 0 0 16px; font-size: 1rem; font-weight: 600; color: var(--text); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chips li {
  padding: 6px 12px; border-radius: 999px; font-size: 0.88rem; color: var(--muted);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s, translate 0.3s var(--ease);
}
.chips li:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); translate: 0 -2px; }
@media (max-width: 860px) { .skills { grid-template-columns: 1fr; } }

/* ---------- contato ---------- */
.cta {
  position: relative; isolation: isolate; overflow: hidden; text-align: center;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 64px); border-radius: 28px;
  background: radial-gradient(ellipse 70% 90% at 50% 0%, rgba(79, 70, 229, 0.28), transparent 70%), var(--surface);
  border: 1px solid var(--border-strong);
}
.cta::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 0%), rgba(124, 140, 255, 0.16), transparent 50%);
}
.cta__title { margin: 0 auto; max-width: 18ch; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; text-wrap: balance; }
.cta__lede { margin: 18px auto 0; max-width: 34rem; color: var(--muted); font-size: 1.1rem; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.cta__social { display: flex; justify-content: center; gap: 28px; margin-top: 28px; }
.cta__social a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; transition: color 0.2s; }
.cta__social a:hover { color: var(--text); }
.cta__social .i { width: 18px; height: 18px; }
@media (max-width: 520px) { .cta__actions .btn { width: 100%; } }

/* ---------- rodapé ---------- */
.foot {
  max-width: var(--max); margin: clamp(80px, 10vw, 120px) auto 0; padding: 28px var(--pad) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  border-top: 1px solid var(--border); color: var(--faint); font-size: 0.88rem;
}
.foot p { margin: 0; }

/* =====================================================================
   EFEITOS
   ===================================================================== */

/* campo de código (WebGL) */
.field { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s var(--ease); }
.field.is-on { opacity: 1; }

/* intro de boot */
.booting body { overflow: hidden; }
.boot {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.boot[hidden] { display: none; }
.boot.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.boot__log {
  position: relative; margin: 0; min-width: min(420px, 86vw); min-height: 10em;
  font-size: 0.95rem; line-height: 1.7; color: var(--muted); white-space: pre-wrap;
  transition: opacity 0.4s, filter 0.4s;
}
.boot__log span:first-child { color: var(--text); }
.boot__log::after { content: ""; display: inline-block; width: 9px; height: 1.1em; background: var(--accent); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
.boot.is-particles .boot__log { opacity: 0; filter: blur(8px); }
.boot__skip {
  position: absolute; right: 24px; bottom: 24px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-strong); color: var(--muted); font-size: 0.8rem;
}
.boot__skip:hover { color: var(--text); border-color: var(--accent); }

/* cursor */
.cursor { display: none; }
.has-cursor .cursor { display: block; }
.cursor span { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; border-radius: 50%; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--text); }
.cursor__ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid rgba(124, 140, 255, 0.7);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.3s, border-color 0.3s, opacity 0.3s;
}
.cursor.is-link .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(124, 140, 255, 0.12); border-color: var(--accent); }
.cursor.is-down .cursor__ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.cursor.is-gone span { opacity: 0; }
.btn, .nav__brand, .cta__social a { transition: translate 0.4s var(--ease), transform 0.35s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.35s var(--ease), color 0.25s; }

/* glitch no nome */
.hero__title:hover .line > span { animation: glitch 0.5s steps(2) 2; }
@keyframes glitch {
  0% { text-shadow: 2px 0 #ff2bd6, -2px 0 #22d3ee; translate: 0 0; }
  25% { text-shadow: -3px 1px #ff2bd6, 3px -1px #22d3ee; translate: -2px 1px; }
  50% { text-shadow: 3px -1px #ff2bd6, -3px 1px #22d3ee; translate: 2px -1px; }
  75% { text-shadow: -1px 0 #ff2bd6, 1px 0 #22d3ee; translate: 1px 0; }
  100% { text-shadow: none; translate: 0 0; }
}

/* distorção líquida */
.card__shot img.is-liquid { filter: url(#liquid); }
.fx-defs { position: absolute; width: 0; height: 0; }

/* carrossel 3D */
.rail__meta { display: none; }
.rail.is-rail { position: relative; }
.rail.is-rail .rail__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  margin: 0 calc(50% - 50vw);
}
.rail.is-rail .bento {
  --cw: min(470px, 40vw);
  display: flex; gap: 40px; width: max-content; align-items: stretch;
  padding: 60px calc(50vw - var(--cw) / 2) 0; will-change: transform; transform-style: preserve-3d;
}
.rail.is-rail .card { width: var(--cw); flex: none; will-change: transform, opacity; transform-origin: 50% 50%; }
.rail.is-rail .card--wide, .rail.is-rail .card--flip { display: flex; flex-direction: column; grid-column: auto; }
.rail.is-rail .card--wide .card__shot, .rail.is-rail .card--flip .card__shot { order: 0; margin: 12px 12px 0; min-height: 0; aspect-ratio: 16 / 10; }
.rail.is-rail .card--wide .card__body { padding: 22px 24px 24px; justify-content: flex-start; }
.rail.is-rail .card--wide .card__title { font-size: 1.45rem; }
.rail.is-rail .card--wide .card__desc { font-size: 0.98rem; }
.rail.is-rail .card--wide .card__links { margin-top: auto; padding-top: 20px; }
.rail.is-rail .card.reveal { opacity: 1; translate: 0 0; filter: none; }
.rail.is-rail .rail__meta {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-size: 0.78rem; color: var(--faint);
}
.rail__bar { position: relative; width: 180px; height: 2px; border-radius: 2px; background: var(--border-strong); overflow: hidden; }
.rail__bar span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), #22d3ee); transform-origin: left; transform: scaleX(0); }
.rail.is-rail .frango { gap: 16px; padding: 0 24px; }
.rail.is-rail .frango__mascot { width: 38%; }
.rail.is-rail .frango__stage { font-size: 1.35rem; }
@media (max-height: 760px) {
  .rail.is-rail .bento { --cw: min(400px, 36vw); }
  .rail.is-rail .card__desc { font-size: 0.92rem; }
}

/* Matrix */
.matrix { position: fixed; inset: 0; z-index: 250; width: 100%; height: 100%; cursor: pointer; transition: opacity 0.8s; }
.matrix__msg {
  position: fixed; left: 50%; top: 50%; z-index: 251; margin: 0; transform: translate(-50%, -50%);
  padding: 22px 30px; border-radius: 16px; text-align: center; pointer-events: none;
  background: rgba(9, 9, 11, 0.85); border: 1px solid var(--accent); color: var(--text);
  font-size: clamp(1.1rem, 3vw, 1.8rem); font-weight: 600; letter-spacing: 0.04em;
  box-shadow: 0 0 60px -10px rgba(124, 140, 255, 0.7); transition: opacity 0.8s;
}
.matrix__msg span { display: block; margin-top: 8px; font-size: 0.85rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.matrix.is-out, .matrix__msg.is-out { opacity: 0; }

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .hero__role, .js .hero__lede, .js .hero__actions, .js .badge, .js .hero__facts, .js .editor { opacity: 1; translate: 0 0; filter: none; }
  .js .hero__title .line > span { transform: none; }
  .timeline::after { transform: scaleY(1); }
}
