/* ==========================================================
   Vitor Brenno — Portfólio
   Cores: #050504 / #FFFFFF / #0055FE · Fonte: DM Sans
   ========================================================== */
:root {
  --bg: #050504;
  --fg: #ffffff;
  --accent: #0055fe;
  --accent-hover: #2a72ff;
  --accent-soft: rgba(0, 85, 254, 0.16);
  --muted: rgba(255, 255, 255, 0.62);
  --subtle: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.09);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.07);
  --radius: 20px;
  --wide: 900px;
  --narrow: 720px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: calc(var(--wide) + 40px); margin: 0 auto; padding: 0 20px; }
.container-narrow { width: 100%; max-width: calc(var(--narrow) + 40px); margin: 0 auto; padding: 0 20px; }

/* ==========================================================
   Fundo azul feito em código (sem imagem → nítido em qualquer tela)
   ========================================================== */
.bg {
  position: absolute; inset: 0 0 auto 0; height: 980px; z-index: -1;
  overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
}
.bg-parallax { position: absolute; inset: 0; will-change: transform; }
.bg-ring {
  position: absolute; left: 62%; top: 120px;
  width: 1150px; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, 0) rotate(-14deg);
  border: 110px solid transparent;
  border-top-color: rgba(42, 114, 255, 0.95);
  border-right-color: rgba(0, 85, 254, 0.55);
  border-left-color: rgba(0, 60, 200, 0.45);
  filter: blur(64px);
  opacity: 0;
  animation: ring-in 2.4s var(--ease-soft) .1s forwards, ring-float 9s ease-in-out 2.5s infinite alternate;
}
.bg-orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0;
  animation: fade-in 2s ease .4s forwards, orb-drift 11s ease-in-out infinite alternate;
}
.bg-orb-1 { width: 520px; height: 420px; right: -120px; top: -140px; background: rgba(0, 85, 254, .55); }
.bg-orb-2 { width: 420px; height: 320px; left: -160px; top: 260px; background: rgba(0, 40, 160, .45); animation-delay: .6s, -8s; }
body.project .bg, body.about .bg { height: 760px; }
body.project .bg-ring, body.about .bg-ring { top: 40px; width: 1000px; }

@keyframes ring-in { from { opacity: 0; transform: translate(-50%, 60px) rotate(-30deg) scale(.92); } to { opacity: .95; transform: translate(-50%, 0) rotate(-14deg) scale(1); } }
/* Movimento contínuo bem leve do anel azul */
@keyframes ring-float { from { transform: translate(-50%, 0) rotate(-14deg) scale(1); } to { transform: translate(-48.5%, 14px) rotate(-10deg) scale(1.025); } }
@keyframes orb-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-28px, 20px) scale(1.06); } }
@keyframes fade-in { to { opacity: 1; } }

/* Textura leve de granulado pra o degradê não "bandear" */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================
   Navegação em pílula com indicador deslizante
   ========================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: center; padding: 20px 16px 0;
  pointer-events: none;
}
.pill-nav {
  pointer-events: auto; position: relative;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: rgba(16, 16, 20, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255,255,255,.06);
  transition: background .4s, box-shadow .4s, transform .5s var(--ease);
}
.js .pill-nav { animation: nav-in .9s var(--ease) both; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.topbar.is-scrolled .pill-nav { background: rgba(12, 12, 15, .78); }
.pill-nav a {
  position: relative; z-index: 1;
  padding: 7px 14px; border-radius: 999px; color: var(--muted);
  transition: color .35s var(--ease);
  white-space: nowrap;
}
.pill-nav a:hover { color: var(--fg); }
.pill-nav a.is-active { color: var(--bg); }
.no-js .pill-nav a.is-active { background: var(--fg); }
.pill-indicator {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 999px; background: var(--fg);
  transition: transform .55s var(--ease), width .55s var(--ease), opacity .3s, background .3s;
  opacity: 0;
}
.pill-indicator.is-hover { background: rgba(255, 255, 255, .1); }
.pill-back { color: var(--fg) !important; }
.pill-back .arrow { display: inline-block; transition: transform .35s var(--ease); }
.pill-back:hover .arrow { transform: translateX(-3px); }
.pill-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; position: relative; z-index: 1; }

/* ==========================================================
   Hero
   ========================================================== */
.hero { padding-top: 72px; padding-bottom: 64px; }
.hero-avatar { position: relative; width: 64px; height: 64px; margin-bottom: 22px; }
.hero-avatar img { width: 100%; height: 100%; border-radius: 18px; object-fit: cover; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 12px 30px -10px rgba(0, 85, 254, .6); }
.status-dot {
  position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%;
  background: #22c55e; border: 3px solid var(--bg);
}
.status-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #22c55e;
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.8); opacity: .9; } 80%, 100% { transform: scale(2.1); opacity: 0; } }

h1 { font-size: clamp(36px, 5.4vw, 48px); line-height: 1.1; font-weight: 500; letter-spacing: -0.03em; margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 17.5px; max-width: 470px; margin: 0; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

/* Botões */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 13px;
  font: 500 14.5px/1 "DM Sans", sans-serif;
  border: 1px solid transparent; cursor: pointer;
  transition: background .3s, border-color .3s, box-shadow .45s var(--ease);
}
.btn::before { /* brilho que atravessa no hover */
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -60%; width: 50%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-20deg); transition: left .8s var(--ease);
}
.btn:hover::before { left: 120%; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(0, 85, 254, .9), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 16px 40px -10px rgba(0, 85, 254, 1), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--fg); border-color: rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.2); }

/* ==========================================================
   Grade de projetos
   ========================================================== */
#projetos { scroll-margin-top: 100px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
.card { display: block; }
.card-media {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  transform: translateZ(0);
  transition: transform .7s var(--ease), box-shadow .7s var(--ease), border-color .5s;
}
.card-media img, .card-media video, .media-placeholder {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), filter .7s;
}
.media-placeholder { background: radial-gradient(120% 90% at 80% 0%, rgba(0,85,254,.5), transparent 60%), #0d0d10; }
.card-media::after { /* reflexo suave */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.12), transparent 40%);
  opacity: 0; transition: opacity .5s;
}
.card-cta {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  background: rgba(5,5,4,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14); font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(10px) scale(.95);
  transition: opacity .45s var(--ease), transform .55s var(--ease);
}
.card:hover .card-media { transform: translateY(-4px); border-color: rgba(255,255,255,.18); box-shadow: 0 30px 60px -30px rgba(0, 85, 254, .55); }
.card:hover .card-media img, .card:hover .card-media video { transform: scale(1.045); }
.card:hover .card-media::after { opacity: 1; }
.card:hover .card-cta { opacity: 1; transform: none; }
.card-meta { display: flex; justify-content: space-between; gap: 12px; padding: 14px 2px 0; font-size: 14.5px; }
.card-title { font-weight: 500; transition: color .3s; }
.card:hover .card-title { color: var(--accent-hover); }
.card-info { color: var(--subtle); white-space: nowrap; }
.empty { color: var(--muted); padding: 40px 0; }

/* ==========================================================
   Página de projeto
   ========================================================== */
.case { padding-top: 72px; }
.case-eyebrow { font-size: 14px; color: var(--muted); margin: 0 0 12px; font-weight: 500; }
.case-head .lead { max-width: none; }
.case-cover { margin: 44px -60px 0; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.case-cover img, .case-cover video { width: 100%; height: auto; }
.case-cover .media-placeholder { aspect-ratio: 16/9; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin: 40px 0 0; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts dt { font-size: 13px; color: var(--subtle); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 500; font-size: 15px; }

/* Conteúdo estilo blog (vem do editor do painel) */
.prose { padding-top: 52px; font-size: 17px; color: rgba(255,255,255,.78); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { color: var(--fg); font-size: clamp(25px, 3.4vw, 31px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; margin: 72px 0 16px; }
.prose h3 { color: var(--fg); font-size: 20px; font-weight: 500; margin: 40px 0 10px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 18px; }
.prose a { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(42,114,255,.4); transition: text-decoration-color .3s; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); }
.prose img, .prose video { width: calc(100% + 120px); max-width: calc(100% + 120px); margin: 36px -60px; border-radius: var(--radius); border: 1px solid var(--line); }
.prose p > img:only-child { margin-top: 16px; margin-bottom: 16px; }
.prose blockquote {
  margin: 36px 0; padding: 26px 30px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,85,254,.12), rgba(255,255,255,.03));
  border: 1px solid rgba(0,85,254,.25);
  color: var(--fg); font-size: 19px; line-height: 1.5; position: relative;
}
.prose blockquote::before { content: "“"; position: absolute; top: -8px; left: 18px; font-size: 60px; color: var(--accent); line-height: 1; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 52px 0; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: #0e0e11; border: 1px solid var(--line); padding: 16px; border-radius: 12px; overflow-x: auto; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .embed { position: relative; aspect-ratio: 16/9; margin: 36px -60px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.prose .embed iframe, .prose iframe.ql-video { width: 100%; height: 100%; border: 0; }
.prose iframe.ql-video { aspect-ratio: 16/9; height: auto; border-radius: var(--radius); margin: 36px 0; }
.prose .embed-vertical { width: min(380px, 100%); margin: 36px auto; }
.prose .embed:not([style]) { aspect-ratio: 16/9; }
.case-link { margin-top: 44px; }

.next { padding-top: 110px; }
.next-title { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 26px; }
.notfound { padding: 120px 20px; }

/* ==========================================================
   Sobre
   ========================================================== */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 52px; padding-top: 72px; align-items: start; }
.about-photo { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); transform-style: preserve-3d; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.about-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about-photo:hover { box-shadow: 0 30px 70px -30px rgba(0,85,254,.7); }
.about-text p { color: rgba(255,255,255,.76); font-size: 17px; }

/* ==========================================================
   Experiência (estrutura da referência)
   ========================================================== */
.resume-block { padding-top: 64px; }
.resume-block + .resume-block { margin-top: 64px; position: relative; }
.resume-block + .resume-block::before { content: ""; position: absolute; top: 0; left: 20px; right: 20px; height: 1px; background: var(--line); }
.block-title { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; margin: 0 0 28px; }
.block-title span { color: var(--subtle); }
.block-note { margin: -16px 0 22px; color: var(--muted); font-size: 15px; }

.xp { list-style: none; margin: 0; padding: 0; }
.xp-item {
  position: relative;
  display: grid; grid-template-columns: 44px 1fr; gap: 18px;
  padding: 24px 0; border-bottom: 1px dashed var(--line);
}
.xp-item:first-child { padding-top: 0; }
.xp-item:last-child { border-bottom: 0; }
.xp-logo {
  width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #0a2f8a, var(--accent));
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .5s var(--spring);
}
.xp-item:hover .xp-logo { transform: scale(1.08) rotate(-4deg); }
.xp-logo img { width: 100%; height: 100%; object-fit: cover; }
.xp-logo span { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.xp-body h3 { font-size: 17px; font-weight: 500; margin: 0 0 2px; line-height: 1.4; }
.xp-at { color: var(--subtle); margin: 0 2px; }
.xp-meta { display: flex; align-items: center; gap: 10px; color: var(--subtle); font-size: 14px; margin: 0 0 12px; }
.xp-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.xp-desc { color: rgba(255,255,255,.7); font-size: 15.5px; }
.xp-desc p { margin: 0 0 8px; }
.xp-desc ul { margin: 8px 0 0; padding-left: 18px; }
.xp-desc li { margin-bottom: 5px; }
.xp-desc li::marker { color: var(--accent); }

.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .4s, background .4s;
}
.tool::before { /* luz que segue o mouse */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(0,85,254,.28), transparent 60%);
}
.tool:hover { transform: translateY(-3px); border-color: rgba(0,85,254,.45); background: rgba(255,255,255,.05); }
.tool:hover::before { opacity: 1; }
.tool-icon { position: relative; width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); transition: transform .5s var(--spring); }
.tool:hover .tool-icon { transform: scale(1.08) rotate(-6deg); }
.tool-icon img { width: 100%; height: 100%; }
.tool-icon span { font-weight: 600; font-size: 14px; }
.tool strong { position: relative; display: block; font-weight: 500; font-size: 15px; line-height: 1.3; }
.tool small { position: relative; display: block; color: var(--subtle); font-size: 13px; line-height: 1.35; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 8px 14px; border-radius: 11px; font-size: 14px;
  background: var(--surface-2); border: 1px solid var(--line); color: rgba(255,255,255,.85);
  transition: background .3s, border-color .3s, transform .4s var(--spring), color .3s;
}
.chips li:hover { background: var(--accent-soft); border-color: rgba(0,85,254,.5); color: #fff; transform: translateY(-2px); }
.chip-level { color: var(--subtle); font-size: 12.5px; margin-left: 4px; }
.chips li:hover .chip-level { color: rgba(255,255,255,.7); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; flex-direction: column; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.rows li:first-child { padding-top: 0; }
.rows li:last-child { border-bottom: 0; }
.rows strong { font-weight: 500; }
.rows span { color: var(--subtle); font-size: 14px; }
.rows-inline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rows-inline li, .rows-inline li:first-child { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.rows-inline li:last-child { border-bottom: 1px solid var(--line); }

/* ==========================================================
   Rodapé
   ========================================================== */
.site-footer { margin-top: 140px; padding-bottom: 48px; }
.footer-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 40px; margin-bottom: 56px; border-radius: 28px; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, rgba(0,85,254,.45), transparent 55%), var(--surface);
  border: 1px solid rgba(255,255,255,.1);
}
.footer-cta h2 { margin: 0; font-size: clamp(24px, 3.4vw, 32px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; max-width: 440px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-top: 40px; border-top: 1px solid var(--line); font-size: 14px; }
.footer-name { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 16px; }
.footer-name img { border-radius: 8px; }
.footer-name strong { font-weight: 500; }
.footer-id p { color: var(--muted); max-width: 320px; margin: 0 0 10px; }
.footer-id small { color: var(--subtle); }
.site-footer h4 { margin: 0 0 12px; font-weight: 500; color: var(--subtle); font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a, .copy-mail { color: var(--muted); transition: color .3s, transform .3s var(--ease); display: inline-block; }
.site-footer ul a:hover, .copy-mail:hover { color: var(--fg); transform: translateX(3px); }
.copy-mail { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; position: relative; text-align: left; }
.copy-mail .copied { position: absolute; left: 0; bottom: 100%; margin-bottom: 4px; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; white-space: nowrap; pointer-events: none; }
.copy-mail.is-copied .copied { opacity: 1; transform: none; }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a { color: var(--muted); transition: color .3s, transform .4s var(--spring); }
.socials a:hover { color: var(--fg); transform: translateY(-3px) scale(1.1); }

/* ==========================================================
   Sistema de animações de entrada (só com JS ativo)
   ========================================================== */
.js [data-anim] { --d: 0s; }
.js [data-anim="fade"] {
  opacity: 0; transform: translateY(22px); filter: blur(8px);
  transition: opacity 1s var(--ease-soft) var(--d), transform 1.1s var(--ease-soft) var(--d), filter 1s var(--ease-soft) var(--d);
}
.js [data-anim="pop"] {
  opacity: 0; transform: translateY(14px) scale(.92);
  transition: opacity .8s var(--ease-soft) var(--d), transform .9s var(--spring) var(--d);
}
.js [data-anim="card"] {
  opacity: 0; transform: translateY(48px) scale(.97);
  transition: opacity 1.1s var(--ease-soft) var(--d), transform 1.3s var(--ease-soft) var(--d);
}
.js [data-anim="card"] .card-media { clip-path: inset(8% 4% 0 4% round var(--radius)); transition: clip-path 1.3s var(--ease-soft) var(--d), transform .7s var(--ease), box-shadow .7s var(--ease), border-color .5s; }
.js [data-anim="cover"] {
  opacity: 0; clip-path: inset(12% 6% 12% 6% round 24px); transform: scale(.98);
  transition: opacity 1s var(--ease-soft) var(--d), clip-path 1.5s var(--ease-soft) var(--d), transform 1.5s var(--ease-soft) var(--d);
}
.js [data-anim="media"] {
  opacity: 0; transform: translateY(30px) scale(.985);
  transition: opacity 1.1s var(--ease-soft) var(--d), transform 1.3s var(--ease-soft) var(--d);
}
.js .prose [data-anim="media"].is-in { clip-path: none; }
.js [data-anim].is-in { opacity: 1; transform: none; filter: none; }
.js [data-anim="card"].is-in .card-media { clip-path: inset(0 0 0 0 round var(--radius)); }
.js [data-anim="cover"].is-in { clip-path: inset(0 0 0 0 round 24px); }

/* Título palavra por palavra */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; }
.js [data-anim="words"] { opacity: 1; }
.js [data-anim="words"] .w > span {
  transform: translateY(105%) rotate(4deg); opacity: 0;
  transition: transform 1.1s var(--ease-soft) var(--wd, 0s), opacity .8s ease var(--wd, 0s);
}
.js [data-anim="words"].is-in .w > span { transform: none; opacity: 1; }

/* Avatar da home */
.js [data-anim="pop"].hero-avatar { transform: scale(.6) rotate(-10deg); }
.js [data-anim="pop"].hero-avatar.is-in { transform: none; }

/* Transição entre páginas */
.page-curtain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: var(--bg); opacity: 0; transition: opacity .45s var(--ease);
}
.is-leaving .page-curtain { opacity: 1; pointer-events: auto; }
.js body { animation: page-in .7s var(--ease) both; }
@keyframes page-in { from { opacity: 0; } }

/* Barra de progresso de leitura (página de projeto) */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), #7aa7ff); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-anim], .js [data-anim] .w > span, .js [data-anim] .card-media { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
  .bg-ring { opacity: .95; }
  .bg-orb { opacity: 1; }
}

/* ==========================================================
   Responsivo
   ========================================================== */
@media (max-width: 860px) {
  .case-cover, .prose img, .prose video, .prose .embed { margin-left: 0; margin-right: 0; width: 100%; max-width: 100%; }
  .prose .embed-vertical { width: min(320px, 100%); margin-left: auto; margin-right: auto; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding-top: 52px; }
  .bg-ring { width: 600px; border-width: 56px; left: 88%; top: 20px; filter: blur(46px); }
  .bg { height: 760px; opacity: .75; }
  .bg-orb-2 { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 52px; }
  .about-photo { max-width: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-id { grid-column: 1 / -1; }
  .footer-cta { padding: 28px; }
  .pill-nav a { padding: 7px 10px; }
  .pill-nav { font-size: 13.5px; }
  .rows-inline { grid-template-columns: 1fr; }
  .card-cta { opacity: 1; transform: none; }
}
@media (max-width: 460px) {
  .tools { grid-template-columns: 1fr; }
  .xp-item { grid-template-columns: 38px 1fr; gap: 14px; }
  .xp-logo { width: 38px; height: 38px; }
}
