/* ============ Tokens ============ */
:root {
  --accent: #7c5cff;
  --accent2: #22d3ee;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));

  --bg: #f6f6fb;
  --surface: rgba(255, 255, 255, .7);
  --surface-solid: #ffffff;
  --text: #14141c;
  --muted: #62627a;
  --border: rgba(20, 20, 40, .1);
  --shadow: 0 10px 40px rgba(20, 20, 60, .08);
}
:root[data-mode="dark"] {
  --bg: #07070c;
  --surface: rgba(255, 255, 255, .04);
  --surface-solid: #12121a;
  --text: #f3f3f8;
  --muted: #9c9cb2;
  --border: rgba(255, 255, 255, .09);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.65; overflow-x: hidden;
  transition: background .4s, color .4s;
}
body.locked { overflow: hidden; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; position: relative; z-index: 1; }
main, footer { position: relative; z-index: 1; }
section { padding-block: 6.5rem; position: relative; }

/* ============ Fundo ============ */
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .75; }
:root:not([data-mode="dark"]) #bg { opacity: .45; }
.blob {
  position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(90px); opacity: .35; will-change: transform;
  transition: translate .6s var(--ease);
}
:root:not([data-mode="dark"]) .blob { opacity: .22; }
.b1 { width: 46vmax; height: 46vmax; left: -14vmax; top: -12vmax; background: var(--accent); animation: drift 22s ease-in-out infinite alternate; }
.b2 { width: 38vmax; height: 38vmax; right: -12vmax; top: 30vh; background: var(--accent2); animation: drift 26s ease-in-out infinite alternate-reverse; }
.b3 { width: 30vmax; height: 30vmax; left: 25vw; bottom: -16vmax; background: color-mix(in srgb, var(--accent) 60%, var(--accent2)); animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(6vmax, 5vmax) scale(1.15); } }
.noise {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============ Preloader ============ */
#preloader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--bg); transition: clip-path .9s var(--ease) .1s, opacity .3s 1s;
  clip-path: inset(0 0 0 0);
}
#preloader.done { clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none; }
.pl-inner { text-align: center; }
.pl-name { display: block; font-size: clamp(2rem, 8vw, 4rem); font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: plIn .8s var(--ease) both; }
.pl-bar { width: 180px; height: 3px; margin: 1.25rem auto 0; background: var(--border); border-radius: 3px; overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; animation: plBar 1s var(--ease) forwards; }
@keyframes plIn { from { opacity: 0; translate: 0 20px; } }
@keyframes plBar { from { transform: scaleX(0); } }

/* ============ Progresso, cursor ============ */
#progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
#cursorGlow, #cursorRing { position: fixed; top: 0; left: 0; pointer-events: none; opacity: 0; transition: opacity .3s; }
#cursorGlow { z-index: 1; width: 520px; height: 520px; margin: -260px 0 0 -260px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); }
#cursorRing { z-index: 90; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid var(--accent2); border-radius: 50%; transition: opacity .3s, width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s; }
#cursorRing.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: color-mix(in srgb, var(--accent) 16%, transparent); }
body.has-cursor #cursorGlow, body.has-cursor #cursorRing { opacity: 1; }

/* ============ Barra superior ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem max(1.25rem, calc((100% - 1120px) / 2));
  transition: transform .4s var(--ease);
}
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.topbar.hide { transform: translateY(-100%); }
.brand { font-weight: 800; font-size: 1.1rem; text-decoration: none; margin-right: auto; letter-spacing: -.02em; }
.brand::after { content: "."; color: var(--accent); }
#nav { display: flex; gap: .3rem; }
#nav a { text-decoration: none; color: var(--muted); font-size: .92rem; padding: .4rem .8rem; border-radius: 999px; transition: color .2s, background .2s; }
#nav a:hover { color: var(--text); }
#nav a.active { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.icon-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: grid; place-items: center; transition: transform .3s var(--ease), border-color .2s; }
.icon-btn:hover { border-color: var(--accent); transform: rotate(180deg); }
.menu-btn { display: none; flex-direction: column; gap: 5px; }
.menu-btn:hover { transform: none; }
.menu-btn span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ============ Botões ============ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.5rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px);
  translate: var(--tx, 0) var(--ty, 0); transition: translate .25s var(--ease), border-color .2s, box-shadow .3s, background .2s;
}
.btn:hover { border-color: var(--accent); box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.btn.primary:hover { box-shadow: 0 10px 36px color-mix(in srgb, var(--accent) 55%, transparent); }

/* ============ Títulos de seção ============ */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; color: var(--accent2); font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--grad); }
.section-title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 3rem; max-width: 18ch; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ Reveal ============ */
.reveal { opacity: 0; translate: 0 32px; transition: opacity .9s var(--ease) var(--d, 0s), translate .9s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; translate: 0 0; }

/* ============ Hero ============ */
.hero { min-height: 100svh; display: flex; align-items: center; padding-block: 8rem 5rem; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; opacity: var(--ho, 1); translate: 0 var(--hy, 0); }
.status { display: inline-flex; align-items: center; gap: .6rem; padding: .4rem .9rem; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; font-size: .85rem; color: var(--muted); margin-bottom: 1.4rem; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 #22c55e88; animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px #22c55e00; } 100% { box-shadow: 0 0 0 0 #22c55e00; } }
.hi { color: var(--muted); font-size: 1.15rem; margin-bottom: .3rem; }
.hero h1 { font-size: clamp(3.4rem, 11vw, 7.5rem); font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.ch { display: inline-block; translate: 0 115%; }
body.ready .ch { animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + .15s); }
@keyframes rise { to { translate: 0 0; } }
.role { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 600; margin: 1.2rem 0; min-height: 1.4em; }
.role #typed { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.caret { display: inline-block; width: 3px; height: 1em; margin-left: 4px; vertical-align: -.12em; background: var(--accent2); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { max-width: 52ch; color: var(--muted); font-size: 1.1rem; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2.2rem; }

.hero-visual { position: relative; width: min(380px, 80%); aspect-ratio: 1; margin-inline: auto; }
.hero-visual .halo { position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent2), var(--accent)); animation: spin 8s linear infinite; filter: blur(14px); opacity: .7; }
.hero-visual .halo::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg); filter: blur(8px); }
.avatar { position: absolute; inset: 10px; border-radius: 50%; overflow: hidden; background: var(--surface-solid); border: 1px solid var(--border); display: grid; place-items: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.avatar span { font-size: 9rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge { position: absolute; padding: .45rem .95rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.badge:nth-of-type(1) { top: 6%; left: -8%; }
.badge:nth-of-type(2) { top: 20%; right: -10%; animation-delay: -1.5s; }
.badge:nth-of-type(3) { bottom: 14%; left: -12%; animation-delay: -3s; }
.badge:nth-of-type(4) { bottom: 2%; right: 2%; animation-delay: -4.5s; }
@keyframes float { 50% { translate: 0 -14px; } }

.scroll-hint { position: absolute; bottom: 1.8rem; left: 50%; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--muted); text-decoration: none; font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; }
.scroll-hint i { width: 22px; height: 36px; border: 2px solid var(--muted); border-radius: 12px; position: relative; }
.scroll-hint i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 3px; background: var(--accent2); animation: wheel 1.8s infinite; }
@keyframes wheel { to { translate: 0 12px; opacity: 0; } }

/* ============ Marquee ============ */
.marquee-wrap { padding-block: 1.6rem; border-block: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(6px); position: relative; z-index: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-wrap:hover .track { animation-play-state: paused; }
.track span { padding-right: 3rem; font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px var(--muted); white-space: nowrap; transition: color .3s; }
.track span:hover { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.track span::after { content: "✦"; margin-left: 3rem; color: var(--accent); -webkit-text-stroke: 0; font-size: .6em; vertical-align: .2em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Cards genéricos ============ */
.card, .panel {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(10px); overflow: hidden;
}
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 45%);
}
.spot:hover::before { opacity: 1; }
.spot:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }

/* ============ Cartão de perfil (estilo LinkedIn) ============ */
.profile-card { padding: 0; margin-bottom: 2.2rem; }
.profile-card .banner { height: 92px; background: var(--grad); }
.profile-main { display: flex; align-items: flex-end; gap: 1.2rem; padding: 0 1.6rem 1.4rem; margin-top: -38px; position: relative; z-index: 1; }
.profile-avatar { width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: #fff; background: var(--grad); border: 4px solid var(--surface-solid); overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.profile-info { padding-top: .6rem; min-width: 0; }
.profile-info h3 { margin: 0 0 .2rem; font-size: 1.3rem; }
.profile-info .headline { margin: 0 0 .3rem; color: var(--text); font-weight: 600; }
.profile-info .loc { margin: 0; color: var(--muted); font-size: .88rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.profile-info .sep { opacity: .5; }
.profile-info .avail { color: var(--accent2); font-weight: 600; }
@media (max-width: 480px) { .profile-main { flex-direction: column; align-items: flex-start; gap: .7rem; } }

/* ============ Sobre ============ */
.about { display: grid; gap: 3rem; grid-template-columns: 1.3fr 1fr; align-items: start; }
.about-text { display: grid; gap: 1.1rem; color: var(--muted); font-size: 1.1rem; }
.about-text .actions { margin-top: .8rem; }
.stats { display: grid; gap: 1rem; }
.stat { padding: 1.4rem 1.6rem; display: grid; grid-template-columns: 10rem 1fr; align-items: baseline; gap: 1rem; }
.stat b { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); }

/* ============ Serviços ============ */
.services { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.service { padding: 2rem 1.6rem; transition: transform .3s var(--ease), border-color .3s; }
.svg-ico { display: grid; place-items: center; }
.svg-ico svg { width: 1em; height: 1em; }
.service .ico { color: var(--accent2); display: grid; place-items: center; width: 54px; height: 54px; font-size: 1.6rem; border-radius: 16px; background: color-mix(in srgb, var(--accent) 16%, transparent); margin-bottom: 1.2rem; transition: transform .4s var(--ease); }
.service:hover .ico { transform: rotate(-8deg) scale(1.12); }
.service h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.service p { color: var(--muted); font-size: .96rem; }

/* ============ Projetos ============ */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: -1.5rem 0 2rem; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .45rem 1.1rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem; transition: background .25s, border-color .25s, color .25s; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; }
.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.project { cursor: pointer; display: flex; flex-direction: column; transition: opacity .9s var(--ease) var(--d, 0s), translate .9s var(--ease) var(--d, 0s), transform .2s ease-out, border-color .3s; }
.project.featured { grid-column: span 2; }
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--g, var(--grad)); }
.proj-status {
  position: absolute; top: .8rem; left: .8rem; z-index: 3; font-size: .74rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 999px; color: #fff; background: color-mix(in srgb, var(--accent2) 55%, #000c);
  backdrop-filter: blur(4px);
}
.proj-status.static { position: static; display: inline-block; margin: -.2rem 0 .4rem; color: var(--accent2); background: color-mix(in srgb, var(--accent2) 16%, transparent); }
.project.featured .cover { aspect-ratio: 21 / 9; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.project:hover .cover img, .project:hover .cover .num { transform: scale(1.08); }
.cover .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; color: #ffffff30; -webkit-text-stroke: 2px #ffffff66; transition: transform .8s var(--ease); }
.cover::after { content: "Ver detalhes →"; position: absolute; right: 1rem; bottom: 1rem; padding: .4rem .9rem; border-radius: 999px; background: #000a; color: #fff; font-size: .8rem; font-weight: 600; opacity: 0; translate: 0 8px; transition: .3s var(--ease); z-index: 2; backdrop-filter: blur(6px); }
.project:hover .cover::after { opacity: 1; translate: 0 0; }
.project .body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; position: relative; z-index: 2; }
.project h3 { font-size: 1.35rem; }
.project p { color: var(--muted); font-size: .96rem; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.tag { font-size: .78rem; font-weight: 600; padding: .22rem .7rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
:root[data-mode="dark"] .tag { color: color-mix(in srgb, var(--accent) 55%, #fff); }

/* ============ Feed ============ */
.feed-grid, .study-grid { display: grid; gap: 1.3rem; }
.feed-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.post { display: flex; flex-direction: column; }
.post-media { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--g, var(--grad)); font-size: 2rem; }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-media.carousel img { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); }
.post-media.carousel img.active { opacity: 1; }
.post-dots { position: absolute; z-index: 1; bottom: .7rem; left: 50%; translate: -50% 0; display: flex; gap: .4rem; }
.post-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .5); cursor: pointer; transition: background .25s, scale .25s; }
.post-dots button.active { background: #fff; scale: 1.35; }
.post-body { padding: 1.3rem 1.4rem 1.5rem; display: grid; gap: .7rem; align-content: start; }
.post-meta { display: flex; align-items: center; gap: .7rem; font-size: .8rem; color: var(--muted); }
.post-body p { margin: 0; color: var(--text); line-height: 1.55; }
.empty-state { grid-column: 1 / -1; color: var(--muted); font-style: italic; }

/* ============ Estudando agora ============ */
.study-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.study { padding: 1.5rem; display: flex; gap: 1rem; align-items: flex-start; }
.study .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: color-mix(in srgb, var(--accent) 16%, transparent); flex: none; }
.study-body h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.study-body p { margin: 0 0 .6rem; color: var(--muted); font-size: .88rem; }
.study-body .status { display: inline-block; font-size: .74rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; }
.status.on { color: var(--accent2); background: color-mix(in srgb, var(--accent2) 16%, transparent); }
.status.done { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.status.planned { color: var(--muted); background: color-mix(in srgb, var(--muted) 16%, transparent); }
.study-link { display: block; margin-top: .5rem; font-size: .85rem; color: var(--accent2); text-decoration: none; }
.study-link:hover { text-decoration: underline; }

/* ============ Habilidades ============ */
.skills { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.skill-group { padding: 1.8rem; }
.skill-group h3 { margin-bottom: .4rem; font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; }
.skill-group h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot, var(--accent)) 22%, transparent); }
.level-0 { --dot: var(--ok, #22c55e); }
.level-1 { --dot: var(--accent2); }
.level-2 { --dot: var(--muted); }
.lvl-desc { color: var(--muted); font-size: .9rem; margin-bottom: 1.2rem; }
.skill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.skill-list li { display: grid; gap: .3rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border); }
.skill-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.skill-list b { font-weight: 600; }
.uses { color: var(--muted); font-size: .8rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.use-chip { font: inherit; font-size: .78rem; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 0; border-radius: 999px; padding: .1rem .6rem; cursor: pointer; transition: background .2s; }
.use-chip:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
:root[data-mode="dark"] .use-chip { color: color-mix(in srgb, var(--accent) 55%, #fff); }

/* ============ Experiência ============ */
.timeline { position: relative; margin-left: .6rem; padding-left: 2.4rem; display: grid; gap: 2.4rem; }
.timeline::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline::after { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--grad); transform-origin: top; transform: scaleY(var(--tl, 0)); }
.job { position: relative; padding: 1.5rem 1.7rem; overflow: visible; }
.job::before { content: ""; position: absolute; left: calc(-2.4rem - 6px); top: 1.9rem; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); transition: .5s var(--ease); z-index: 3; }
.job.on::before { border-color: var(--accent2); background: var(--accent2); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent2) 25%, transparent); }
.job .when { color: var(--accent2); font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.job h3 { font-size: 1.3rem; margin: .3rem 0 .1rem; }
.job .where { color: var(--muted); font-size: .95rem; }
.job p.desc { margin-top: .7rem; color: var(--muted); }

/* ============ Depoimentos ============ */
.quotes { display: grid; max-width: 760px; position: relative; }
.quote { grid-area: 1 / 1; padding: 2.4rem; opacity: 0; translate: 30px 0; pointer-events: none; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.quote.active { opacity: 1; translate: 0 0; pointer-events: auto; }
.quote::before { content: "“"; position: absolute; top: -.1em; right: 1.5rem; font-size: 8rem; font-weight: 800; line-height: 1; color: color-mix(in srgb, var(--accent) 30%, transparent); }
.quote blockquote { margin: 0 0 1.6rem; font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.5; position: relative; z-index: 2; }
.quote .who { display: flex; align-items: center; gap: .9rem; position: relative; z-index: 2; }
.quote .pic { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; color: #fff; overflow: hidden; }
.quote .pic img { width: 100%; height: 100%; object-fit: cover; }
.quote .who small { display: block; color: var(--muted); }
.dots { display: flex; gap: .5rem; margin-top: 1.4rem; }
.dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 10px; background: var(--border); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.dots button.active { width: 32px; background: var(--grad); }

/* ============ Contato ============ */
.contact-grid { display: grid; gap: 3rem; grid-template-columns: 1fr 1.1fr; align-items: start; }
.contact-info .big-mail { display: inline-block; margin: 1.4rem 0; font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 700; word-break: break-all; text-decoration: none; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; border: 0; padding: 0; cursor: pointer; font-family: inherit; text-align: left; }
.contact-info p { color: var(--muted); font-size: 1.1rem; }
.socials { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.form { padding: 1.8rem; display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.field input, .field textarea { font: inherit; color: var(--text); background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid var(--border); border-radius: 12px; padding: .85rem 1rem; width: 100%; resize: vertical; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.form .btn { justify-content: center; }
.form .btn[disabled] { opacity: .6; cursor: progress; }

footer { padding: 2.5rem 1.25rem; text-align: center; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); display: grid; gap: 1rem; justify-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.to-top { text-decoration: none; padding: .5rem 1.1rem; border: 1px solid var(--border); border-radius: 999px; transition: .3s var(--ease); }
.to-top:hover { border-color: var(--accent); translate: 0 -3px; }

/* ============ Toast ============ */
#toast { position: fixed; left: 50%; bottom: 2rem; z-index: 95; translate: -50% 30px; opacity: 0; padding: .8rem 1.4rem; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 600; pointer-events: none; transition: .4s var(--ease); }
#toast.show { opacity: 1; translate: -50% 0; }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; background: #000b; backdrop-filter: blur(8px); opacity: 0; transition: opacity .35s; }
.modal-card { position: relative; width: min(860px, 100%); max-height: 90vh; overflow-y: auto; background: var(--surface-solid); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); box-shadow: 0 30px 90px #0009; opacity: 0; translate: 0 40px; scale: .96; transition: .45s var(--ease); overscroll-behavior: contain; }
.modal.open .modal-bg { opacity: 1; }
.modal.open .modal-card { opacity: 1; translate: 0 0; scale: 1; }
.modal-x { position: absolute; top: 1rem; right: 1rem; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #000a; color: #fff; cursor: pointer; font-size: 1rem; transition: transform .3s var(--ease); }
.modal-x:hover { transform: rotate(90deg); }
.m-cover { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: var(--g, var(--grad)); display: grid; place-items: center; }
.m-cover > img { width: 100%; height: 100%; object-fit: cover; }
.m-cover .num { font-size: 6rem; font-weight: 800; color: #ffffff30; -webkit-text-stroke: 2px #ffffff66; }
.m-body { padding: 2rem 2.2rem 2.4rem; display: grid; gap: 1.2rem; }
.m-body h3 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.m-meta { display: flex; gap: 2rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.m-meta b { display: block; color: var(--text); font-size: 1rem; }
.m-body .text { display: grid; gap: .8rem; color: var(--muted); }
.g-frame { position: absolute; inset: 0; }
.g-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--surface-solid); opacity: 0; transition: opacity .5s var(--ease); }
.g-frame img.active { opacity: 1; }
.g-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: #0007; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(4px); transition: background .2s, transform .2s var(--ease);
}
.g-nav:hover { background: #000a; transform: translateY(-50%) scale(1.08); }
.g-prev { left: .6rem; }
.g-next { right: .6rem; }
.g-dots { position: absolute; z-index: 2; bottom: .7rem; left: 50%; translate: -50% 0; display: flex; gap: .45rem; }
.g-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .5); cursor: pointer; transition: background .25s, scale .25s; }
.g-dots button.active { background: #fff; scale: 1.35; }
@media (max-width: 480px) {
  .g-nav { width: 32px; height: 32px; font-size: 1.2rem; }
}

/* ============ Pipeline ============ */
:root { --ok: #16a34a; --bad: #ef4444; --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; }
:root[data-mode="dark"] { --ok: #4ade80; }
.section-lead { max-width: 60ch; color: var(--muted); font-size: 1.1rem; margin: -1.8rem 0 2.4rem; }

.pipe-head { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.3rem; border-bottom: 1px solid var(--border); }
.pipe-head .dots { display: flex; gap: .4rem; }
.pipe-head .dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.pipe-head .dots i:nth-child(2) { background: #febc2e; }
.pipe-head .dots i:nth-child(3) { background: #28c840; }
.pipe-head code { font-family: var(--mono); font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipe-head .run { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; font-size: .78rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; color: var(--accent2); background: color-mix(in srgb, var(--accent2) 14%, transparent); }
.pipe-head .run::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
.pipe-head .run.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pipe-head .run.ok::before { animation: none; }
.pipe-head .run.fail { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.pipe-head .run.fail::before { animation: none; }
.pipe-head code a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.pipe-head code a:hover { color: var(--accent2); }
.pipe-file { display: grid; gap: .1rem; min-width: 0; }
.pipe-proj { font-size: .72rem; color: var(--muted); opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pulse { 50% { opacity: .25; } }

.pipe-body { padding: 2.4rem 1.4rem 2.2rem; }
.pipe-flow { position: relative; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: .6rem; text-align: center; }
.stage { position: relative; z-index: 1; display: grid; justify-items: center; gap: .2rem; }
.stage .node {
  color: var(--accent2); position: relative; width: 58px; height: 58px; margin-bottom: .6rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem;
  background: var(--surface-solid); border: 2px solid var(--border); filter: grayscale(.7); opacity: .75;
  transition: border-color .4s, box-shadow .4s, background .4s, filter .4s, opacity .4s, transform .4s var(--ease);
}
.stage b { font-size: .95rem; }
.stage small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.stage .st { font-style: normal; font-size: .74rem; font-weight: 700; color: var(--muted); margin-top: .2rem; transition: color .3s; }
.stage.run .node { filter: none; opacity: 1; transform: scale(1.1); border-color: var(--accent2); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent2) 16%, transparent), 0 0 34px color-mix(in srgb, var(--accent2) 45%, transparent); }
.stage.run .node::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent2); border-right-color: var(--accent2); animation: spin .9s linear infinite; }
.stage.run .st { color: var(--accent2); }
.stage.done .node { filter: none; opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-solid)); }
.stage.done .node::before { content: "✓"; position: absolute; right: -5px; bottom: -3px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: #fff; background: var(--ok); box-shadow: 0 0 0 3px var(--surface-solid); animation: pop .4s var(--ease); }
.stage.done .st { color: var(--ok); }
.stage.fail .node { filter: none; opacity: 1; border-color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, var(--surface-solid)); box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 16%, transparent); }
.stage.fail .node::before { content: "✗"; position: absolute; right: -5px; bottom: -3px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: #fff; background: var(--bad); box-shadow: 0 0 0 3px var(--surface-solid); animation: pop .4s var(--ease); }
.stage.fail .st { color: var(--bad); }
.stage.skip .node { opacity: .35; }
.stage.skip .st { color: var(--muted); font-style: italic; }
.failed .rail i { background: linear-gradient(90deg, var(--accent), var(--bad)); }
.failed .rail i::after { background: var(--bad); box-shadow: 0 0 14px 4px color-mix(in srgb, var(--bad) 70%, transparent); }
@keyframes pop { from { transform: scale(0); } }

/* esteira entre as etapas + "pacote" que percorre */
.rail { position: absolute; top: 28px; left: calc(100% / var(--n) / 2); right: calc(100% / var(--n) / 2); height: 3px; border-radius: 3px; background: var(--border); }
.rail i { position: absolute; left: 0; top: 0; height: 100%; width: calc(var(--pp) * 100%); border-radius: inherit; background: var(--grad); transition: width 1.1s var(--ease), height 1.1s var(--ease); }
.rail i::after { content: ""; position: absolute; right: -6px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 14px 4px color-mix(in srgb, var(--accent2) 70%, transparent); }
.snap .rail i { transition: none; }

/* seta de feedback voltando para o início */
.loop-wrap { position: relative; height: 46px; margin: 1rem calc(100% / var(--n) / 2) 0; border: 2px dashed var(--border); border-top: 0; border-radius: 0 0 20px 20px; transition: border-color .5s; }
.loop-wrap::before { content: ""; position: absolute; left: -8px; top: -10px; border: 6px solid transparent; border-bottom: 9px solid var(--border); border-top: 0; transition: border-color .5s; }
.loop-wrap::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -2px; height: 2px; opacity: 0; background: linear-gradient(90deg, transparent, var(--accent2), transparent) no-repeat; background-size: 30% 100%; transition: opacity .4s; }
.loop-label { position: absolute; left: 50%; bottom: 0; translate: -50% 50%; white-space: nowrap; font-size: .78rem; font-weight: 600; color: var(--muted); padding: .3rem .9rem; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); transition: color .4s, border-color .4s, box-shadow .4s; }
.looping .loop-wrap { border-color: color-mix(in srgb, var(--accent2) 60%, transparent); }
.looping .loop-wrap::before { border-bottom-color: var(--accent2); }
.looping .loop-wrap::after { opacity: 1; animation: sweep 1.4s linear infinite; }
.looping .loop-label { color: var(--accent2); border-color: var(--accent2); box-shadow: 0 0 24px color-mix(in srgb, var(--accent2) 35%, transparent); }
@keyframes sweep { from { background-position: 140% 0; } to { background-position: -40% 0; } }

/* terminal com o log */
.pipe-log {
  margin: 0; padding: 1rem 1.3rem; height: calc(7 * 1.65em + 2rem); overflow: hidden; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: flex-end;
  -webkit-mask-image: linear-gradient(transparent, #000 2.6em); mask-image: linear-gradient(transparent, #000 2.6em);
  font-family: var(--mono); font-size: .8rem; line-height: 1.65; background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.pipe-log span { display: block; white-space: pre-wrap; word-break: break-word; animation: logIn .35s var(--ease); }
.pipe-log .cmd { color: var(--text); }
.pipe-log .info { color: var(--accent2); }
.pipe-log .ok { color: var(--ok); }
.pipe-log .err { color: var(--bad); }
.pipe-log .warn { color: #f5a524; }
@keyframes logIn { from { opacity: 0; translate: -8px 0; } }

@media (max-width: 760px) {
  .pipe-body { padding: 1.2rem 1rem 1.4rem; }
  .pipe-head { flex-wrap: wrap; row-gap: .5rem; }
  .pipe-file { order: 3; flex: 1 0 100%; }
  .stages { grid-template-columns: 1fr 1fr; gap: 1rem .7rem; text-align: left; }
  .stage { grid-template-columns: 40px 1fr; column-gap: .6rem; row-gap: 0; align-items: center; justify-items: start; }
  .stage .node { grid-row: span 3; width: 40px; height: 40px; margin: 0; font-size: 1.05rem; }
  .stage b { font-size: .84rem; align-self: end; }
  .stage small { font-size: .68rem; align-self: center; line-height: 1.25; }
  .stage .st { grid-row: auto; grid-column: 2; margin: 0; font-size: .68rem; align-self: start; }
  .stage.run .node::after { inset: -6px; }
  .rail { display: none; }
  .loop-wrap { height: auto; margin: 1.1rem 0 0; border: 0; text-align: center; }
  .loop-wrap::before, .loop-wrap::after { display: none; }
  .loop-label { position: static; translate: none; display: inline-block; white-space: normal; }
  .pipe-log { font-size: .72rem; height: calc(5 * 1.65em + 2rem); }
}
/* ============ Responsivo ============ */
@media (max-width: 860px) {
  section { padding-block: 4.5rem; }
  .hero-grid, .about, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 6.5rem; }
  .hero-visual { width: min(260px, 70%); order: -1; }
  .avatar span { font-size: 6rem; }
  .project.featured { grid-column: auto; }
  .project.featured .cover { aspect-ratio: 16 / 9; }
  .grid { grid-template-columns: 1fr; }

  .menu-btn { display: flex; }
  #nav { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: .6rem; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(18px); opacity: 0; pointer-events: none; transition: opacity .35s; }
  #nav.open { opacity: 1; pointer-events: auto; }
  #nav a { font-size: 1.6rem; color: var(--text); }
  .scroll-hint { display: none; }
}
@media (hover: none), (pointer: coarse) {
  #cursorGlow, #cursorRing { display: none; }
}

/* ============ Movimento reduzido ============ */
@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; translate: 0 0; }
  .ch { translate: 0 0; }
  .track { animation: none; }
}
