/* ============ Tokens ============ */
:root {
  --bg: #07070a;
  --bg-2: #0e0e14;
  --surface: rgba(255, 255, 255, .03);
  --surface-2: rgba(255, 255, 255, .065);
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .16);
  --text: #ededf2;
  --muted: #9a9aab;
  --dim: #62627a;
  --c1: #a78bfa;
  --c2: #22d3ee;
  --c3: #f472b6;
  --grad: linear-gradient(110deg, var(--c1), var(--c2) 55%, var(--c3));
  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --font: "Inter", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-2: #c8c8d4;
  --grid-line: rgba(255, 255, 255, .045);
  --header-bg: rgba(7, 7, 10, .72);
  --dock-bg: rgba(16, 16, 23, .82);
  --popover-bg: rgba(15, 15, 21, .94);
  --backdrop: rgba(3, 3, 6, .6);
  --pill-bg: rgba(255, 255, 255, .1);
  --name-grad: linear-gradient(180deg, #fff 30%, #9d9db4);
  --card-bg: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  --card-glow: rgba(255, 255, 255, .055);
  --shadow: rgba(0, 0, 0, .85);
  --blob-o: .16;
  --mono-l: 74%;
  --scrollbar: #2a2a36;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f7f9;
  --bg-2: #ececf1;
  --surface: rgba(20, 20, 40, .025);
  --surface-2: rgba(20, 20, 40, .06);
  --border: rgba(20, 20, 40, .09);
  --border-2: rgba(20, 20, 40, .18);
  --text: #12121a;
  --muted: #555568;
  --dim: #868699;
  --c1: #7c3aed;
  --c2: #0891b2;
  --c3: #db2777;

  --text-2: #33333f;
  --grid-line: rgba(20, 20, 40, .06);
  --header-bg: rgba(247, 247, 249, .75);
  --dock-bg: rgba(255, 255, 255, .85);
  --popover-bg: rgba(255, 255, 255, .97);
  --backdrop: rgba(230, 230, 238, .55);
  --pill-bg: #fff;
  --name-grad: linear-gradient(180deg, #0b0b14 30%, #5b5b74);
  --card-bg: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.65));
  --card-glow: rgba(124, 58, 237, .05);
  --shadow: rgba(30, 30, 60, .18);
  --blob-o: .2;
  --mono-l: 38%;
  --scrollbar: #c8c8d4;
  color-scheme: light;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--scrollbar) transparent; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(167, 139, 250, .35); color: var(--text); }
:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; border-radius: 8px; }
.dim { color: var(--dim); }
main { flex: 1; width: 100%; }

kbd {
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1;
  padding: .25rem .4rem;
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

.skip { position: absolute; left: -999px; top: 10px; z-index: 100; padding: .5rem 1rem; background: var(--text); color: var(--bg); border-radius: 8px; }
.skip:focus { left: 16px; }

/* ============ Fundo ============ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); view-transition-name: bg; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
}
.blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; opacity: var(--blob-o); will-change: transform; }
.b1 { background: radial-gradient(circle, var(--c1), transparent 62%); top: -32vmax; left: -22vmax; animation: drift 24s ease-in-out infinite alternate; }
.b2 { background: radial-gradient(circle, var(--c2), transparent 62%); bottom: -36vmax; right: -24vmax; animation: drift 30s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(10vmax, 8vmax) scale(1.12); } }
.spot {
  position: absolute; inset: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, -30%), rgba(167, 139, 250, .09), transparent 45%);
}

/* ============ Header / Nav ============ */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0 var(--gutter);
  view-transition-name: header;
}
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--header-bg);
  transition: background-color .3s;
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.header::after { /* barra de progresso de leitura */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--grad); transform: scaleX(0); transform-origin: 0 50%;
}

.logo { justify-self: start; font-family: var(--mono); font-weight: 600; font-size: .95rem; text-decoration: none; letter-spacing: -.02em; }
.logo .cursor { color: var(--c1); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav {
  display: flex; gap: 2px; padding: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  isolation: isolate;
  view-transition-name: nav;
}
.nav a {
  position: relative;
  display: flex; align-items: center; gap: .4rem;
  padding: .42rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: .88rem; font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.nav a svg { width: 18px; height: 18px; display: none; }
.nav a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--surface-2); opacity: 0; transform: scale(.85);
  transition: opacity .2s, transform .25s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::before { opacity: 1; transform: none; }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::before {
  opacity: 1; transform: none;
  background: var(--pill-bg);
  box-shadow: inset 0 0 0 1px var(--border-2), 0 0 24px -6px rgba(167, 139, 250, .55);
  view-transition-name: navpill; /* a "pílula" desliza entre páginas */
}

.actions { justify-self: end; display: flex; align-items: center; gap: .5rem; }
.cmdk-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .38rem .45rem .38rem .7rem;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--muted);
  font: inherit; font-size: .84rem; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.cmdk-btn svg { width: 16px; height: 16px; }

/* Botão de tema: sol e lua trocam com rotação */
.theme-btn {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 34px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.theme-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }
.theme-btn svg { position: absolute; width: 17px; height: 17px; transition: transform .5s var(--spring), opacity .3s; }
.theme-btn svg:last-child { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="light"] .theme-btn svg:first-child { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-theme="light"] .theme-btn svg:last-child { opacity: 1; transform: none; }
.theme-btn:active svg { scale: .85; }
.cmdk-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }

/* ============ Animações de entrada ============ */
.r { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 100ms); }
@keyframes rise { from { opacity: 0; translate: 0 14px; filter: blur(6px); } }

/* ============ Home / Hero ============ */
.hero {
  min-height: calc(100dvh - var(--header-h) - 76px);
  display: grid; place-content: center; justify-items: center;
  text-align: center;
  padding: 2.5rem var(--gutter);
}
.avatar-wrap {
  position: relative;
  width: 176px; aspect-ratio: 1;
  margin-bottom: 1.75rem;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .4s var(--ease);
  animation: pop .9s var(--spring) both;
}
@keyframes pop { from { opacity: 0; scale: .6; filter: blur(10px); } }
.avatar-ring {
  position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(var(--c1), var(--c2), var(--c3), var(--c1));
  animation: spin 7s linear infinite;
}
.avatar-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: inherit; filter: blur(26px); opacity: .5;
}
@keyframes spin { to { rotate: 1turn; } }
.avatar {
  position: relative; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
  border: 5px solid var(--bg); background: var(--bg-2);
}
.status {
  position: absolute; right: 14px; bottom: 12px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #22c55e; border: 4px solid var(--bg);
}
.status::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #22c55e; animation: ping 2s var(--ease) infinite;
}
@keyframes ping { to { scale: 1.9; opacity: 0; } }

.eyebrow { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.hero-name {
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  font-weight: 700; letter-spacing: -.045em;
  margin: .15em 0 .2em;
  background: var(--name-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role { font-family: var(--mono); font-size: clamp(1rem, 2.4vw, 1.2rem); font-weight: 500; min-height: 1.6em; }
.typed { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: -.18em; background: var(--c2); animation: blink 1s steps(1) infinite; }
.hero-tag { max-width: 46ch; margin-top: .9rem; color: var(--muted); font-size: 1.02rem; }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; list-style: none; padding: 0; margin: 2rem 0 0; }
.socials li { animation: rise .6s var(--spring) both; animation-delay: calc(var(--i) * 60ms + 420ms); }
.social {
  position: relative;
  display: grid; place-items: center;
  width: 50px; height: 50px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  transition: color .2s, border-color .2s, background .2s, box-shadow .3s, transform .3s var(--ease);
}
.social svg { width: 20px; height: 20px; transition: transform .3s var(--spring); }
.social:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); box-shadow: 0 10px 30px -10px rgba(167, 139, 250, .6); }
.social:hover svg { transform: scale(1.15); }
.social::after {
  content: attr(data-label);
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  translate: -50% 6px;
  padding: .25rem .55rem; border-radius: 7px;
  background: var(--text); color: var(--bg);
  font-size: .74rem; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, translate .25s var(--ease);
}
.social:hover::after, .social:focus-visible::after { opacity: 1; translate: -50% 0; }

.hint { margin-top: 2.5rem; color: var(--dim); font-size: .8rem; }
@media (pointer: coarse) { .hint { display: none; } }

/* ============ Páginas internas ============ */
.page { width: min(1080px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) 0 4rem; }
.page-head { margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.kicker { font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.page-head h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); letter-spacing: -.04em; margin-top: .5rem; }
.lead { margin-top: 1rem; color: var(--muted); max-width: 60ch; font-size: 1.05rem; }

.section-title {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em;
  margin: 3.5rem 0 1.25rem;
}
.section-title svg { width: 18px; height: 18px; color: var(--c1); }

/* Revelação ao rolar: 100% CSS (scroll-driven animations) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .header::after { animation: progress linear both; animation-timeline: scroll(root); }
  }
}
@keyframes reveal { from { opacity: 0; translate: 0 28px; scale: .97; } }
@keyframes progress { to { transform: scaleX(1); } }

/* ============ Cards com spotlight ============ */
.grid { display: grid; gap: 1rem; }
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  padding: 1.4rem;
  transition: border-color .25s, transform .35s var(--ease), background .25s;
}
.card::before { /* borda iluminada que segue o cursor */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: radial-gradient(360px circle at var(--x, -999px) var(--y, -999px), rgba(167,139,250,.85), rgba(34,211,238,.35) 35%, transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.card::after { /* brilho interno */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(480px circle at var(--x, -999px) var(--y, -999px), var(--card-glow), transparent 40%);
  opacity: 0; transition: opacity .3s;
}
[data-spotlight]:hover .card::before { opacity: 1; }
.card:hover::after { opacity: 1; }
.card:hover { transform: translateY(-3px); }

.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card a { text-decoration: none; }

/* ============ Sobre ============ */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.about-text { display: grid; gap: 1.1rem; color: var(--text-2); font-size: 1.06rem; }
.about-text p:first-child::first-letter { font-size: 1.1em; }
.about-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-2); margin-bottom: 1.1rem; }
.facts { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .6rem; font-size: .92rem; color: var(--muted); }
.facts li { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.facts a { overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.facts a:hover { color: var(--text); }
.facts svg { width: 16px; height: 16px; flex: none; color: var(--dim); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: .75rem; margin: 0; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dt { font-size: .75rem; color: var(--dim); }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chip {
  padding: .35rem .85rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  font: inherit; font-size: .86rem;
  transition: color .2s, border-color .2s, background .2s, transform .25s var(--spring);
}
.chip:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-2px); }
button.chip { cursor: pointer; }
button.chip.active { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--c1), var(--c2), transparent); }
.tl-item { position: relative; padding: 0 0 2.25rem 2.4rem; }
.tl-dot { position: absolute; left: 0; top: .35rem; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--c1); box-shadow: 0 0 0 5px rgba(167,139,250,.12); }
.tl-period { font-family: var(--mono); font-size: .76rem; color: var(--dim); margin-bottom: .3rem; }
.tl-item h3 { font-size: 1.08rem; font-weight: 600; }
.tl-item .at { color: var(--muted); font-weight: 500; }
.tl-item p:last-child { color: var(--muted); margin-top: .4rem; max-width: 65ch; }

.certs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cert { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; }
.cert-icon {
  flex: none; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 12px;
  color: var(--c1);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 16%, transparent), color-mix(in srgb, var(--c2) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent);
  transition: transform .35s var(--spring);
}
.cert-icon svg { width: 22px; height: 22px; }
.cert:hover .cert-icon { transform: rotate(-8deg) scale(1.08); }
.cert-body { flex: 1; min-width: 0; }
.cert h3 { font-size: 1rem; font-weight: 600; }
.cert p { font-size: .84rem; color: var(--muted); margin-top: .1rem; }
.cert-arrow { color: var(--dim); transition: color .2s, transform .3s var(--spring); }
.cert-arrow svg { width: 18px; height: 18px; }
.cert:hover .cert-arrow { color: var(--text); transform: translate(2px, -2px); }

::view-transition-group(*) { animation-duration: .38s; animation-timing-function: var(--ease); }

/* ============ Ferramentas ============ */
.tool-group:first-of-type .section-title { margin-top: 0; }
.tools { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tool { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; }
.tool-mono {
  flex: none; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 11px;
  font-family: var(--mono); font-weight: 700; font-size: .85rem;
  color: hsl(var(--h) 85% var(--mono-l));
  background: hsl(var(--h) 70% 60% / .12);
  border: 1px solid hsl(var(--h) 70% 60% / .25);
  transition: transform .35s var(--spring);
}
.tool:hover .tool-mono { transform: rotate(-8deg) scale(1.08); }
.tool h3 { font-size: .97rem; font-weight: 600; }
.tool p { font-size: .84rem; color: var(--muted); line-height: 1.45; margin-top: .1rem; }

/* ============ 404 ============ */
.big-404 {
  position: relative;
  font-size: clamp(6rem, 22vw, 11rem); font-weight: 800; letter-spacing: -.06em; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.big-404::before, .big-404::after {
  content: attr(data-text); position: absolute; inset: 0;
  background: inherit; -webkit-background-clip: text; background-clip: text;
  animation: glitch 2.6s steps(2) infinite;
}
.big-404::after { animation-delay: -1.3s; opacity: .6; }
@keyframes glitch {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); translate: 0; }
  88% { clip-path: inset(20% 0 55% 0); translate: -6px 0; }
  92% { clip-path: inset(60% 0 12% 0); translate: 6px 0; }
  96% { clip-path: inset(40% 0 35% 0); translate: -3px 0; }
}
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 2rem; padding: .7rem 1.2rem;
  border-radius: 12px; background: var(--text); color: var(--bg);
  font-weight: 600; text-decoration: none;
  transition: transform .25s var(--spring), box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(167,139,250,.7); }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--border); view-transition-name: footer; }
.footer-inner {
  width: min(1080px, 100% - 2 * var(--gutter)); margin: 0 auto; min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: .82rem; color: var(--dim);
}
.go { color: #00add8; font-weight: 700; }
[data-load] { font-family: var(--mono); color: var(--muted); }
.to-top {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: color .2s, transform .3s var(--spring), border-color .2s;
}
.to-top svg { width: 16px; height: 16px; }
.to-top:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-3px); }

/* ============ Paleta de comandos (⌘K) ============ */
.cmdk { padding: 0; border: 0; background: transparent; color: var(--text); width: min(580px, 100% - 32px); max-width: none; margin: 12vh auto auto; overflow: visible; }
.cmdk::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cmdk[open] .cmdk-box { animation: cmdk-in .22s var(--ease); }
@keyframes cmdk-in { from { opacity: 0; scale: .96; translate: 0 -8px; } }
.cmdk-box { border: 1px solid var(--border-2); border-radius: 16px; background: var(--popover-bg); box-shadow: 0 40px 100px -20px var(--shadow), 0 0 0 1px rgba(167,139,250,.08); overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--dim); }
.cmdk-input svg { width: 18px; height: 18px; flex: none; }
.cmdk-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 1rem; }
.cmdk-list { max-height: min(380px, 55vh); overflow-y: auto; padding: .4rem; overscroll-behavior: contain; }
.cmdk-title { padding: .65rem .75rem .3rem; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.cmdk-item {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  padding: .62rem .75rem; border: 0; border-radius: 10px;
  background: none; color: var(--muted); font: inherit; font-size: .93rem; text-align: left;
  text-decoration: none; cursor: pointer;
}
.cmdk-item svg { width: 18px; height: 18px; flex: none; }
.cmdk-item small { margin-left: auto; padding-left: 1rem; font-size: .74rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.cmdk-item[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--c1); }
.cmdk-empty { padding: 2rem; text-align: center; color: var(--dim); font-size: .9rem; }
.cmdk-foot { display: flex; gap: 1.25rem; padding: .6rem 1rem; border-top: 1px solid var(--border); font-size: .74rem; color: var(--dim); }
.cmdk-foot kbd { margin-right: .2rem; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  translate: -50% 0;
  padding: .6rem 1rem; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: .88rem;
  animation: toast 2.2s var(--ease) both;
}
@keyframes toast { 0% { opacity: 0; translate: -50% 12px; } 12%, 85% { opacity: 1; translate: -50% 0; } 100% { opacity: 0; } }

/* ============ Transições entre páginas (View Transitions API) ============ */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease) both; }
::view-transition-group(navpill) { animation-duration: .4s; animation-timing-function: var(--spring); }
@keyframes vt-out { to { opacity: 0; translate: 0 -6px; filter: blur(3px); } }
@keyframes vt-in { from { opacity: 0; translate: 0 10px; filter: blur(3px); } }

/* Troca de tema: círculo que se expande a partir do botão */
html.theme-vt *, html.theme-vt *::before { view-transition-name: none !important; }
html.theme-vt::view-transition-old(root) { animation: none; }
html.theme-vt::view-transition-new(root) { animation: theme-reveal .6s var(--ease) both; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--cx, 100%) var(--cy, 0)); }
  to { clip-path: circle(150vmax at var(--cx, 100%) var(--cy, 0)); }
}

/* Ajustes finos do tema claro */
[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 8px 24px -16px rgba(20, 20, 40, .12); }
[data-theme="light"] .avatar-ring::after { opacity: .35; }
[data-theme="light"] .spot { background: radial-gradient(520px circle at var(--mx, 50%) var(--my, -30%), rgba(124, 58, 237, .07), transparent 45%); }

/* ============ Responsivo ============ */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .header { grid-template-columns: 1fr auto; }
  .cmdk-btn-label, .cmdk-btn kbd { display: none; }
  .cmdk-btn { padding: .5rem; }
  .theme-btn { width: 34px; height: 34px; }
  /* Nav vira um "dock" flutuante embaixo */
  .nav {
    position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
    translate: -50% 0;
    background: var(--dock-bg);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border-color: var(--border-2);
    box-shadow: 0 18px 50px -12px var(--shadow);
  }
  .nav a { flex-direction: column; gap: .1rem; padding: .45rem .8rem; font-size: .66rem; }
  .nav a svg { display: block; }
  .footer { padding-bottom: 88px; }
  .footer-inner { flex-wrap: wrap; justify-content: center; text-align: center; padding: 1.25rem 0; }
  .to-top { display: none; }
  .hero { min-height: calc(100dvh - var(--header-h) - 170px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ============ Artigos ============ */
.articles { display: grid; gap: 1rem; }
.article { display: flex; align-items: center; gap: 1.4rem; padding: 1.1rem; }
.article-thumb { flex: none; width: 220px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.article:hover .article-thumb img { transform: scale(1.05); }
.article-body { flex: 1; min-width: 0; display: grid; gap: .45rem; }
.article-meta { font-family: var(--mono); font-size: .74rem; color: var(--dim); }
.article h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.015em; }
.article h2 a { transition: color .2s; }
.article:hover h2 a { color: var(--c1); }
.article-excerpt { color: var(--muted); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article .tags { margin-top: .2rem; }
.article-arrow { align-self: flex-start; color: var(--dim); transition: color .2s, transform .3s var(--spring); }
.article-arrow svg { width: 18px; height: 18px; }
.article:hover .article-arrow { color: var(--text); transform: translate(2px, -2px); }

.more { margin-top: 1.75rem; text-align: center; }
.more a { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .9rem; text-decoration: none; transition: color .2s; }
.more a:hover { color: var(--text); }
.more svg { width: 16px; height: 16px; }

.empty { display: grid; justify-items: center; gap: .75rem; text-align: center; padding: clamp(2.5rem, 7vw, 4rem) 1.5rem; }
.empty-icon {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; margin-bottom: .5rem;
  color: var(--c1);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 16%, transparent), color-mix(in srgb, var(--c2) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent);
  animation: float 3.2s ease-in-out infinite;
}
.empty-icon svg { width: 26px; height: 26px; }
@keyframes float { 50% { translate: 0 -6px; } }
.empty h2 { font-size: 1.35rem; letter-spacing: -.02em; }
.empty p { color: var(--muted); max-width: 46ch; }
.empty .btn { margin-top: 1rem; }

@media (max-width: 640px) {
  .article { flex-direction: column; align-items: stretch; }
  .article-thumb { width: 100%; }
  .article-arrow { display: none; }
}
@media (max-width: 720px) {
  .nav a { padding: .45rem .55rem; font-size: .62rem; }
}
