:root {
  --font: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --radius: 20px;
  --header: 76px;
  --gutter: 48px;

  --bg: #0b0e13;
  --bg-2: #0f131a;
  --surface: #12171f;
  --surface-2: #171d27;
  --line: #222a36;
  --line-strong: #2f3949;
  --ink: #eef1f5;
  --muted: #97a1ae;
  --faint: #626c7a;
  --accent: #ff8f6b;
  --accent-2: #7ee0c3;
  --on-accent: #1a0d08;
  --glow: rgb(255 143 107 / 0.16);
  --grad: linear-gradient(100deg, #ff8f6b, #ffb38a 45%, #b9a2ff);
  --shadow: 0 30px 80px -30px rgb(0 0 0 / 0.7);
  --term-bg: #0a0d12;
  --dot: 255, 160, 130;
  --dot-2: 126, 224, 195;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.1 7.2 8 3' fill='none' stroke='%230b0e13' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f3ee;
  --bg-2: #efece5;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --line: #e3dfd6;
  --line-strong: #d2ccc1;
  --ink: #15191e;
  --muted: #5a626c;
  --faint: #8c939b;
  --accent: #c2492f;
  --accent-2: #0f7a66;
  --on-accent: #ffffff;
  --glow: rgb(194 73 47 / 0.1);
  --grad: linear-gradient(100deg, #c2492f, #d9733f 45%, #6d4fd8);
  --shadow: 0 30px 70px -35px rgb(40 30 20 / 0.35);
  --term-bg: #12161d;
  --dot: 194, 73, 47;
  --dot-2: 15, 122, 102;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.1 7.2 8 3' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.4s, color 0.4s;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}
main {
  overflow-x: clip;
}
.wrap {
  width: min(1200px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.mono {
  font-family: var(--mono);
  font-weight: 400;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Ambient ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 2px;
  background: var(--grad);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}
.cursor-glow {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s;
  translate: var(--cx, -999px) var(--cy, -999px);
}
.has-pointer .cursor-glow {
  opacity: 1;
}

/* ---------- Buttons & links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background-color 0.3s, color 0.3s, border-color 0.3s;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -12px var(--accent);
}
.button span {
  transition: transform 0.3s var(--ease);
}
.button:hover span {
  transform: translateX(3px);
}
.button-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.button-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}
.button-small {
  padding: 10px 18px;
  font-size: 14px;
}
.link {
  font-size: 15px;
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s var(--ease), color 0.2s;
}
.link:hover {
  color: var(--accent);
  background-size: 100% 1px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: none;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.08em;
  line-height: 1;
}
.logo span {
  color: var(--accent);
}
.nav {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.nav a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover,
.nav a.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.nav-mobile-only {
  display: none;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-toggle {
  display: none;
}
.menu-toggle span {
  grid-area: 1 / 1;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}
.menu-toggle span:first-child {
  transform: translateY(-3px);
}
.menu-toggle span:last-child {
  transform: translateY(3px);
}
.menu-open .menu-toggle span:first-child {
  transform: rotate(45deg);
}
.menu-open .menu-toggle span:last-child {
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header) + 28px) 0 72px;
  overflow: hidden;
}
.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 40px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--muted);
  font-size: 13px;
}
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  flex-shrink: 0;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping {
  to {
    transform: scale(3);
    opacity: 0;
  }
}
h1 {
  font-size: clamp(44px, 5.2vw, 76px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.05em;
  margin-bottom: 24px;
  text-wrap: balance;
}
.lead {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}
.lead strong {
  color: var(--ink);
  font-weight: 500;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 44px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-meta li {
  display: grid;
  gap: 2px;
}
.hero-meta strong {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.hero-meta span {
  font-size: 13px;
  color: var(--muted);
}

/* Hero 3D stage */
.hero-stage {
  position: relative;
  height: 580px;
  perspective: 1400px;
}
.hero-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(300px, 62%);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 0 0 8px color-mix(in srgb, var(--surface) 50%, transparent);
  transform: translate(-50%, -50%) translateZ(0);
  background: var(--surface);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.portrait figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 18px 16px;
  background: linear-gradient(transparent, rgb(8 10 14 / 0.85));
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 480px;
  height: 480px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(74deg) rotateZ(0deg);
  animation: orbit 28s linear infinite;
}
.orbit-2 {
  width: 380px;
  height: 380px;
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translate(-50%, -50%) rotateY(62deg) rotateX(12deg) rotateZ(0deg);
  animation-name: orbit-2;
  animation-duration: 22s;
  animation-direction: reverse;
}
.orbit i {
  position: absolute;
  top: -5px;
  left: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}
.orbit i:nth-child(2) {
  top: auto;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: var(--accent-2);
  box-shadow: 0 0 16px var(--accent-2);
}
.orbit i:nth-child(3) {
  top: calc(50% - 3px);
  left: -3px;
  width: 6px;
  height: 6px;
  background: var(--ink);
  box-shadow: none;
}
@keyframes orbit {
  to {
    transform: translate(-50%, -50%) rotateX(74deg) rotateZ(360deg);
  }
}
@keyframes orbit-2 {
  to {
    transform: translate(-50%, -50%) rotateY(62deg) rotateX(12deg) rotateZ(360deg);
  }
}
.chip {
  position: absolute;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  50% {
    translate: 0 -12px;
  }
}
.chip-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}
.chip-bar i,
.device-bar i,
.terminal-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.chip-bar .mono {
  margin-left: 6px;
  font-size: 11px;
  color: var(--faint);
}
.chip-code {
  top: 9%;
  left: -2%;
  transform: translateZ(90px);
}
.chip-code pre {
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
}
.tk {
  color: #c4a1ff;
}
[data-theme="light"] .tk {
  color: #6d4fd8;
}
.ts {
  color: var(--accent-2);
}
.tn {
  color: var(--accent);
}
.chip-done {
  top: 6%;
  right: 0;
  transform: translateZ(60px);
  animation-delay: -2s;
}
.chip-title {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.chip-done ul {
  display: grid;
  gap: 8px;
}
.chip-done li {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.chip-done li::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: no-repeat center / 10px 10px;
  animation: check 9s var(--ease) infinite;
}
.chip-done li:nth-child(2)::before {
  animation-delay: 0.6s;
}
.chip-done li:nth-child(3)::before {
  animation-delay: 1.2s;
}
/* Marca os três itens em sequência e recomeça; o estado final (movimento reduzido) é marcado */
@keyframes check {
  0%,
  6% {
    border-color: var(--line-strong);
    background-color: transparent;
    background-image: none;
  }
  12%,
  100% {
    border-color: var(--accent-2);
    background-color: var(--accent-2);
    background-image: var(--check);
  }
}
.chip-deploy {
  bottom: 9%;
  left: 4%;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateZ(130px);
  animation-delay: -4s;
}
.chip-deploy strong {
  display: block;
  font-weight: 500;
}
.chip-deploy .mono {
  font-size: 11px;
  color: var(--faint);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 20%, transparent);
}
.chip-tag {
  right: 6%;
  bottom: 20%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  background: var(--grad);
  color: var(--on-accent);
  font-size: 18px;
  font-weight: 500;
  transform: translateZ(40px) rotate(8deg);
  animation-delay: -1s;
}
[data-theme="dark"] .chip-tag {
  color: #1a0d08;
}
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 24px;
  height: 38px;
  margin-left: -12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  60%,
  100% {
    transform: translateY(12px);
    opacity: 0;
  }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee ul {
  display: flex;
}
.marquee li {
  display: flex;
  align-items: center;
  padding: 22px 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.marquee li::after {
  content: "✳";
  margin-inline: 28px;
  color: var(--accent);
  font-size: 14px;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: clamp(88px, 12vw, 150px);
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label .mono {
  color: var(--accent);
}
.section-label::after {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--line-strong);
}
h2 {
  font-size: clamp(36px, 4.8vw, 64px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.section-head {
  max-width: 820px;
  margin-bottom: 64px;
}
.section-head-split {
  max-width: none;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: end;
  gap: 32px 64px;
}
.section-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 460px;
}

/* ---------- Cards (3D tilt + spotlight) ---------- */
.card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.4s var(--ease), border-color 0.3s, background-color 0.4s, opacity 0.8s var(--ease), translate 0.8s var(--ease);
}
.card.is-tilting {
  transition: transform 0.08s linear, border-color 0.3s, background-color 0.4s, opacity 0.8s var(--ease), translate 0.8s var(--ease);
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card::before {
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--glow), transparent 60%);
}
.card::after {
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx) var(--my), var(--accent), transparent 70%);
  -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);
}
.card:hover::before,
.card:hover::after {
  opacity: 1;
}
.card-label {
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

/* About bento */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.card-about {
  grid-column: span 7;
  display: grid;
  gap: 20px;
  align-content: center;
  padding: 44px;
}
.card-about p {
  font-size: 19px;
  line-height: 1.65;
  color: var(--muted);
}
.card-about strong {
  color: var(--ink);
  font-weight: 500;
}
.card-now {
  grid-column: span 5;
  min-height: 260px;
}
.now-place {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.now-time {
  margin-top: 6px;
  font-size: 44px;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.now-time .faint {
  font-size: 14px;
  letter-spacing: 0.1em;
}
.now-globe {
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 35% 30%, var(--glow), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 22px, var(--line) 22px 23px),
    repeating-linear-gradient(0deg, transparent 0 22px, var(--line) 22px 23px);
  background-size: 100% 100%, 230px 100%, 100% 100%;
  animation: globe 18s linear infinite;
  z-index: -1;
}
.now-globe span {
  position: absolute;
  top: 34%;
  left: 30%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--glow), 0 0 24px var(--accent);
}
@keyframes globe {
  to {
    background-position: 0 0, 230px 0, 0 0;
  }
}
.card-quote {
  grid-column: span 5;
  display: grid;
  align-content: space-between;
  gap: 32px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}
.card-quote svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.card-quote p {
  font-size: 23px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.card-life {
  grid-column: span 7;
}
.card-life > p:not(.card-label) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.tags li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 13px;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.tags li:hover {
  border-color: var(--accent);
  color: var(--ink);
}

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.service-index {
  position: absolute;
  top: 28px;
  right: 30px;
  font-size: 12px;
  color: var(--faint);
}
.service-icon {
  width: 52px;
  height: 52px;
  padding: 13px;
  margin-bottom: auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-2);
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease);
}
.service:hover .service-icon {
  transform: translateZ(0) rotate(-8deg) scale(1.06);
}
.service h3 {
  margin: 40px 0 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.service p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* ---------- Projects ---------- */
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  margin-bottom: clamp(88px, 10vw, 130px);
}
.project-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "top facts"
    "title facts"
    "desc facts"
    "links facts";
  align-content: start;
  gap: 0 72px;
}
.project-top {
  grid-area: top;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
  font-size: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.badge .status-dot {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 20%, transparent);
}
.project h3 {
  grid-area: title;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.project-info > p {
  grid-area: desc;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.facts {
  grid-area: facts;
  display: grid;
  align-content: start;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
  padding-top: 2px;
}
.facts dd {
  font-size: 15px;
  line-height: 1.55;
}
.project-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 26px;
}
.device {
  --tilt: 0deg;
  --scale: 1;
  width: 100%;
  min-width: 0;
  max-width: 980px;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow), 0 40px 120px -60px var(--accent);
  transform: perspective(1800px) rotateX(var(--tilt)) scale(var(--scale));
  transform-origin: 50% 0;
  will-change: transform;
}
.device-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.device-bar .mono {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 auto;
  padding: 4px 14px;
  border-radius: 8px;
  background: var(--bg-2);
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
memory-garden-demo,
xeque-na-esteira-demo {
  display: block;
}
reencontro-demo {
  display: block;
}
reencontro-demo:not(:defined) {
  aspect-ratio: 2048 / 1908;
  background: #fbf3ea;
}
/* Selo "IA embarcada" do Reencontro */
.ia-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 6px; border-radius: 999px;
  background: #2A1E16; color: #FBF3EA; font: 600 .84rem/1.1 "Nunito Sans", system-ui, sans-serif; white-space: nowrap;
  box-shadow: 0 0 0 1.5px rgba(194,65,12,.55), 0 8px 18px -12px rgba(194,65,12,.9); cursor: help; }
.ia-badge__icon { position: relative; width: 26px; height: 26px; border-radius: 50%; background: #C2410C; display: grid; place-items: center; flex: none; }
.ia-badge__icon svg { width: 16px; height: 16px; display: block; }
.ia-badge__icon::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #C2410C; animation: ia-badge-pulse 1.8s ease-out infinite; }
.ia-badge b { font-weight: 800; }
.ia-badge__sub { color: #E9C9AE; }
@keyframes ia-badge-pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .ia-badge__icon::after { animation: none; opacity: 0; } }
memory-garden-demo:not(:defined) {
  min-height: 585px;
  background: #e9e6de;
}
xeque-na-esteira-demo:not(:defined) {
  min-height: 740px;
  background: #0f121b;
}
.next-card {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 36px 40px;
}
.next-cube {
  position: relative;
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  margin: 10px;
  transform-style: preserve-3d;
  animation: cube 14s linear infinite;
}
.next-cube i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.next-cube i:nth-child(1) { transform: translateZ(35px); }
.next-cube i:nth-child(2) { transform: rotateY(180deg) translateZ(35px); }
.next-cube i:nth-child(3) { transform: rotateY(90deg) translateZ(35px); }
.next-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(35px); }
.next-cube i:nth-child(5) { transform: rotateX(90deg) translateZ(35px); }
.next-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(35px); }
@keyframes cube {
  from {
    transform: rotateX(-24deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-24deg) rotateY(360deg);
  }
}
.next-card .next-cube {
  overflow: visible;
}
.next-copy {
  display: grid;
  gap: 6px;
  flex: 1;
}
.next-copy .mono {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.next-copy strong {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.next-copy span:last-child {
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
}
.next-arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 20px;
  transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease), border-color 0.3s;
}
.next-card:hover .next-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  transform: rotate(45deg);
}
.video-dialog {
  width: min(980px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-dialog::backdrop {
  background: rgb(5 7 10 / 0.8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.video-dialog video {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  background: #000;
}
.video-dialog form {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 10px 10px 18px;
  font-size: 14px;
  color: var(--muted);
}
.video-dialog button {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}
.video-dialog button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Trajetória ---------- */
.timeline {
  --fill: 0;
  --when: 140px;
  --col-gap: 80px;
  position: relative;
  display: grid;
  gap: 20px;
}
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: calc(var(--when) + var(--col-gap) / 2 - 1px);
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.timeline::after {
  background: var(--grad);
  transform: scaleY(var(--fill));
  transform-origin: top;
}
.role {
  position: relative;
  display: grid;
  grid-template-columns: var(--when) 1fr;
  gap: var(--col-gap);
}
.role::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 32px;
  left: calc(var(--when) + var(--col-gap) / 2 - 7px);
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color 0.4s, box-shadow 0.4s, background-color 0.4s;
}
.role.is-reached::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--glow), 0 0 18px var(--accent);
}
.role-when {
  padding-top: 26px;
  text-align: right;
  font-size: 14px;
  color: var(--faint);
  transition: color 0.4s;
}
.role.is-reached .role-when {
  color: var(--accent);
}
.role-card {
  padding: 28px 32px;
}
.role-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 24px;
  margin-bottom: 14px;
}
.role-org {
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.role-head h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.badge-accent {
  flex-shrink: 0;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  white-space: nowrap;
}
.role-summary {
  max-width: 70ch;
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.6;
}
.role-points {
  display: grid;
  gap: 8px;
}
.role-points li,
.courses li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.role-points li::before,
.courses li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: 0;
  width: 10px;
  height: 1.5px;
  background: var(--accent);
}
.role-card .tags {
  margin-top: 20px;
}
.role-edu .role-card {
  padding-block: 22px;
  border-style: dashed;
  background: transparent;
}
.role-edu .role-head {
  margin-bottom: 0;
}
.role-edu .role-head h3 {
  font-size: 19px;
}

/* ---------- Stack ---------- */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.feature {
  display: flex;
  flex-direction: column;
  padding: 36px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}
.feature .card-label,
.feature h3,
.feature-text {
  max-width: calc(100% - 120px);
}
.feature h3 {
  margin-bottom: 10px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.feature-text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
}
.feature .tags {
  margin-top: 24px;
}
/* Celular em 3D no canto do case */
.phone {
  position: absolute;
  top: 30px;
  right: 34px;
  animation: float 6s ease-in-out infinite;
}
.phone-body {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  width: 74px;
  height: 138px;
  padding: 22px 9px 9px;
  border: 2px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-2);
  box-shadow: -14px 20px 40px -18px rgb(0 0 0 / 0.5), 0 0 40px -12px var(--glow);
  transform: perspective(600px) rotateY(-26deg) rotateX(12deg) rotateZ(4deg);
}
.phone-body span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 22px;
  height: 4px;
  margin-left: -11px;
  border-radius: 4px;
  background: var(--line-strong);
}
.phone-body i {
  height: 14px;
  border-radius: 5px;
  background: var(--line-strong);
}
.phone-body i:nth-child(3) {
  width: 70%;
}
.phone-body i:nth-child(4) {
  background: color-mix(in srgb, var(--accent-2) 55%, var(--line-strong));
}
.phone-body b {
  position: absolute;
  inset: auto 9px 10px;
  height: 18px;
  border-radius: 6px;
  background: var(--grad);
}
.pipeline {
  position: relative;
  display: grid;
  margin-top: 26px;
}
.pipeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 16px;
  width: 2px;
  background: var(--grad);
  opacity: 0.45;
}
.pipeline li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  column-gap: 16px;
  padding: 7px 0;
}
.pipeline .mono {
  position: relative;
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 11px;
  color: var(--accent);
  animation: step-glow 6s var(--ease) infinite;
}
.pipeline li:nth-child(2) .mono { animation-delay: 0.9s; }
.pipeline li:nth-child(3) .mono { animation-delay: 1.8s; }
.pipeline li:nth-child(4) .mono { animation-delay: 2.7s; }
.pipeline li:nth-child(5) .mono { animation-delay: 3.6s; }
/* Acende uma etapa de cada vez, como um pipeline de entrega */
@keyframes step-glow {
  0%,
  20%,
  100% {
    border-color: var(--line-strong);
    background-color: var(--surface);
    color: var(--accent);
    box-shadow: none;
  }
  6%,
  14% {
    border-color: var(--accent);
    background-color: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 0 0 5px var(--glow), 0 0 18px var(--accent);
  }
}
.pipeline strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.pipeline li > span:last-child {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}
/* Giroscópio de anéis em 3D no canto do card de IA */
.orb {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 92px;
  height: 92px;
  perspective: 500px;
}
.orb i {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0.8;
  animation: ring-a 7s linear infinite;
}
.orb i:nth-child(2) {
  border-color: var(--accent-2);
  animation-name: ring-b;
  animation-duration: 9s;
}
.orb i:nth-child(3) {
  inset: 10px;
  border-color: #b9a2ff;
  animation-name: ring-c;
  animation-duration: 11s;
}
[data-theme="light"] .orb i:nth-child(3) {
  border-color: #6d4fd8;
}
.orb b {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 26px var(--accent), 0 0 60px -10px #b9a2ff;
  animation: core 3s ease-in-out infinite;
}
@keyframes ring-a {
  from { transform: rotateX(70deg) rotateY(0deg); }
  to { transform: rotateX(70deg) rotateY(360deg); }
}
@keyframes ring-b {
  from { transform: rotateY(70deg) rotateX(0deg); }
  to { transform: rotateY(70deg) rotateX(360deg); }
}
@keyframes ring-c {
  from { transform: rotateZ(45deg) rotateX(0deg) rotateY(0deg); }
  to { transform: rotateZ(45deg) rotateX(360deg) rotateY(360deg); }
}
@keyframes core {
  50% {
    transform: scale(0.82);
    opacity: 0.85;
  }
}
.ai-uses {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}
.ai-uses li {
  display: grid;
  gap: 2px;
  padding-left: 16px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 50%, var(--line));
}
.ai-uses strong {
  font-size: 15px;
  font-weight: 600;
}
.ai-uses span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.skill {
  display: flex;
  flex-direction: column;
}
.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}
.skill .service-index {
  position: static;
}
.skill:hover .service-icon {
  transform: rotate(-8deg) scale(1.06);
}
.skill h3 {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.skill > p:not(.skill-tools) {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.skill .tags {
  margin-bottom: 22px;
}
.skill-tools {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--accent);
}
.stack-bottom {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cred {
  padding: 26px 28px;
}
.cred h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.cred-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}
.cred-cspo {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.cred-cspo h3 {
  font-size: 22px;
}
.cred-courses,
.cred-langs {
  grid-column: 1 / -1;
}
.cred-link {
  display: inline-block;
  margin-top: 12px;
}
.coin-wrap {
  flex-shrink: 0;
  perspective: 600px;
}
.coin {
  position: relative;
  width: 92px;
  height: 92px;
  transform-style: preserve-3d;
  animation: coin 8s var(--ease) infinite;
}
.coin span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-align: center;
  line-height: 1.25;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.coin span:first-child {
  background: var(--grad);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 500;
  box-shadow: inset 0 0 0 4px rgb(255 255 255 / 0.22), inset 0 0 0 5px rgb(0 0 0 / 0.12), 0 14px 30px -12px var(--accent);
}
[data-theme="dark"] .coin span:first-child {
  color: #1a0d08;
}
.coin span:last-child {
  transform: rotateY(180deg);
  border: 1px solid var(--accent);
  background: var(--surface-2);
  color: var(--accent);
  font-size: 11px;
}
/* Mostra a frente, gira para o verso e volta; o estado final (movimento reduzido) é a frente */
@keyframes coin {
  0%,
  35% {
    transform: rotateY(0deg);
  }
  50%,
  85% {
    transform: rotateY(180deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}
.langs {
  display: grid;
  gap: 14px;
}
.langs li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 6px 12px;
}
.langs li > span:first-child {
  font-weight: 500;
}
.langs .mono {
  font-size: 12px;
  color: var(--muted);
}
/* Escala de 6 níveis (A1–C2), com o nativo completo */
.level {
  grid-column: 1 / -1;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) calc(var(--level) / 6 * 100%), var(--line) 0);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(100% / 6 - 3px), transparent 0 calc(100% / 6));
  mask: repeating-linear-gradient(90deg, #000 0 calc(100% / 6 - 3px), transparent 0 calc(100% / 6));
}
.courses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}
.courses li {
  font-size: 14px;
  color: var(--ink);
}

/* ---------- Terminal ---------- */
.terminal {
  display: flex;
  flex-direction: column;
  border: 1px solid #262e3a;
  border-radius: 16px;
  background: var(--term-bg);
  color: #d7dde6;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgb(255 255 255 / 0.02) inset;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid #1f2630;
  background: #0f131a;
}
.terminal-bar i {
  background: #2c3440;
}
.terminal-bar i:nth-child(1) { background: #ff6b5f; }
.terminal-bar i:nth-child(2) { background: #f5c04f; }
.terminal-bar i:nth-child(3) { background: #3fcf6e; }
.terminal-bar .mono {
  margin: 0 auto;
  padding-right: 40px;
  font-size: 12px;
  color: #6a7483;
}
.terminal-body {
  flex: 1 1 0;
  min-height: 340px;
  padding: 18px 20px 6px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: #2c3440 transparent;
}
.terminal-body p {
  white-space: pre-wrap;
  word-break: break-word;
}
.t-cmd {
  color: #eef1f5;
}
.t-cmd::before {
  content: "➜  ~ ";
  color: #7ee0c3;
}
.t-out {
  color: #97a1ae;
}
.t-hi {
  color: #ff8f6b;
}
.t-ok {
  color: #7ee0c3;
}
.t-dim {
  color: #5c6573;
}
.terminal-body a {
  color: #ff8f6b;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.terminal-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px 16px;
  font-size: 13.5px;
}
.terminal-input label {
  color: #7ee0c3;
  white-space: nowrap;
}
.terminal-input .path {
  color: #6a7483;
}
.terminal-input input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #eef1f5;
  caret-color: #ff8f6b;
  font-family: var(--mono);
  outline: none;
}
.terminal-input input::placeholder {
  color: #4a525e;
}
.terminal:focus-within {
  border-color: #3a4554;
}
.terminal-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  border-top: 1px solid #1f2630;
}
.terminal-hints button {
  padding: 5px 10px;
  border: 1px solid #262e3a;
  border-radius: 8px;
  background: #11161d;
  color: #97a1ae;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.terminal-hints button:hover {
  border-color: #ff8f6b;
  color: #ff8f6b;
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding-block: clamp(100px, 14vw, 180px);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.contact-field {
  position: absolute;
  top: 50%;
  right: -8%;
  width: min(760px, 70vw);
  height: min(760px, 70vw);
  transform: translateY(-50%);
}
.contact-inner {
  position: relative;
}
.contact .eyebrow {
  display: flex;
  width: max-content;
}
.contact h2 {
  max-width: 900px;
  font-size: clamp(46px, 7.4vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin-bottom: 48px;
}
.email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(22px, 3.2vw, 40px);
  font-weight: 500;
  letter-spacing: -0.03em;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) 0 100% / 100% 1px no-repeat;
  padding-bottom: 10px;
  transition: background-size 0.5s var(--ease), color 0.3s;
}
.email:hover {
  color: var(--accent);
  background-size: 100% 2px, 100% 1px;
}
.email span {
  transition: transform 0.4s var(--ease);
}
.email:hover span {
  transform: translate(4px, -4px);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 44px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px;
}
.footer p {
  font-size: 13px;
  color: var(--faint);
}
.footer .link {
  font-size: 13px;
}

/* ---------- Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.9s var(--ease) var(--d, 0s), translate 0.9s var(--ease) var(--d, 0s);
}
.js .card[data-reveal] {
  transition: transform 0.4s var(--ease), border-color 0.3s, background-color 0.4s, opacity 0.9s var(--ease) var(--d, 0s), translate 0.9s var(--ease) var(--d, 0s);
}
.js [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-stage {
    height: 520px;
    max-width: 560px;
    width: 100%;
    margin-inline: auto;
  }
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-about,
  .card-now,
  .card-quote,
  .card-life {
    grid-column: span 6;
  }
  .card-about {
    grid-column: span 12;
  }
  .card-life {
    grid-column: span 12;
  }
  .project-info {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "title" "desc" "links" "facts";
  }
  .facts {
    margin-top: 32px;
  }
  .skills {
    grid-template-columns: repeat(2, 1fr);
  }
  .features {
    grid-template-columns: 1fr;
  }
  .stack-bottom {
    grid-template-columns: 1fr;
  }
  .timeline {
    --when: 100px;
    --col-gap: 48px;
  }
}
@media (max-width: 900px) {
  :root {
    --gutter: 28px;
    --header: 68px;
  }
  .header-actions .button-small {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
  .nav {
    position: fixed;
    inset: var(--header) 0 auto;
    flex-direction: column;
    gap: 0;
    padding: 12px var(--gutter) 28px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
  }
  .menu-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .menu-open.header {
    background: var(--bg);
    border-color: var(--line);
  }
  .nav a {
    padding: 14px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: 20px;
    color: var(--ink);
  }
  .nav a:hover,
  .nav a.is-active {
    background: none;
    color: var(--accent);
  }
  .nav-mobile-only {
    display: block;
  }
  .section-head-split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
  .hero {
    padding-top: calc(var(--header) + 24px);
  }
  h1 {
    font-size: clamp(40px, 12vw, 56px);
  }
  .lead {
    font-size: 16px;
  }
  .eyebrow {
    font-size: 12px;
    border-radius: 14px;
  }
  .hero-meta {
    margin-top: 36px;
    gap: 14px 24px;
  }
  .hero-meta strong {
    font-size: 24px;
  }
  .hero-meta span {
    font-size: 12px;
  }
  .hero-stage {
    height: 440px;
  }
  .portrait {
    width: 58%;
  }
  .portrait figcaption {
    padding: 40px 12px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .orbit {
    width: 340px;
    height: 340px;
  }
  .orbit-2 {
    width: 280px;
    height: 280px;
  }
  .chip {
    padding: 10px 12px;
    font-size: 12px;
  }
  .chip-code {
    top: 3%;
    left: 0;
  }
  .chip-code pre {
    font-size: 10.5px;
  }
  .chip-done {
    top: 30%;
  }
  .chip-done li::before {
    width: 14px;
    height: 14px;
  }
  .chip-deploy {
    bottom: 4%;
    left: 0;
  }
  .chip-tag {
    width: 50px;
    height: 50px;
    right: 2%;
    bottom: 22%;
  }
  .scroll-cue {
    display: none;
  }
  .marquee li {
    padding: 16px 0;
    font-size: 15px;
  }
  .marquee li::after {
    margin-inline: 18px;
  }
  .card {
    padding: 26px;
  }
  .card-about {
    padding: 28px;
  }
  .card-about p {
    font-size: 17px;
  }
  .card-about,
  .card-now,
  .card-quote,
  .card-life {
    grid-column: span 12;
  }
  .card-now {
    min-height: 220px;
  }
  .card-quote p {
    font-size: 20px;
  }
  .services {
    grid-template-columns: 1fr;
  }
  .service {
    min-height: 0;
  }
  .service h3 {
    margin-top: 28px;
  }
  .facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .device {
    border-radius: 14px;
  }
  .device-bar .mono {
    font-size: 11px;
  }
  reencontro-demo:not(:defined) {
    aspect-ratio: auto;
    min-height: 1810px;
  }
  memory-garden-demo:not(:defined) {
    min-height: 1040px;
  }
  xeque-na-esteira-demo:not(:defined) {
    min-height: 1077px;
  }
  .next-card {
    flex-wrap: wrap;
    gap: 24px;
    padding: 28px;
  }
  .next-cube {
    width: 50px;
    height: 50px;
  }
  .next-cube i:nth-child(1) { transform: translateZ(25px); }
  .next-cube i:nth-child(2) { transform: rotateY(180deg) translateZ(25px); }
  .next-cube i:nth-child(3) { transform: rotateY(90deg) translateZ(25px); }
  .next-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(25px); }
  .next-cube i:nth-child(5) { transform: rotateX(90deg) translateZ(25px); }
  .next-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(25px); }
  .next-arrow {
    display: none;
  }
  .timeline::before,
  .timeline::after {
    left: 6px;
  }
  .role {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-left: 32px;
  }
  .role::before {
    top: 4px;
    left: 0;
  }
  .role-when {
    padding-top: 0;
    text-align: left;
  }
  .role-card {
    padding: 22px;
  }
  .role-head {
    flex-direction: column;
  }
  .role-head h3 {
    font-size: 20px;
  }
  .role-summary {
    font-size: 15px;
  }
  .role-points li {
    font-size: 14px;
  }
  .skills,
  .credentials,
  .courses {
    grid-template-columns: 1fr;
  }
  .feature {
    padding: 26px;
  }
  .feature .card-label,
  .feature h3,
  .feature-text {
    max-width: calc(100% - 84px);
  }
  .feature h3 {
    font-size: 22px;
  }
  .phone {
    top: 22px;
    right: 18px;
    scale: 0.75;
    transform-origin: top right;
  }
  .orb {
    top: 22px;
    right: 20px;
    width: 64px;
    height: 64px;
  }
  .role-head .badge-accent {
    white-space: normal;
  }
  .cred-cspo {
    gap: 20px;
  }
  .coin {
    width: 72px;
    height: 72px;
  }
  .coin span:first-child {
    font-size: 14px;
  }
  .coin span:last-child {
    font-size: 9px;
  }
  .cred-cspo h3 {
    font-size: 18px;
  }
  .terminal-body {
    min-height: 300px;
    padding: 14px 14px 4px;
    font-size: 12.5px;
  }
  .terminal-input {
    padding: 6px 14px 14px;
    font-size: 12.5px;
  }
  .contact-field {
    top: 10%;
    right: -40%;
    width: 120vw;
    height: 120vw;
    transform: none;
    opacity: 0.55;
  }
  .contact .eyebrow {
    width: auto;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] {
    opacity: 1;
    translate: none;
  }
}
