:root {
  --bg: #0b0d10;
  --bg-alt: #101319;
  --surface: #151920;
  --text: #f3efe6;
  --muted: #9aa0aa;
  --line: rgba(243, 239, 230, 0.12);
  --accent: #35e0c8;
  --accent-ink: #04201c;
  --accent-soft: rgba(53, 224, 200, 0.12);
  --shadow: rgba(0, 0, 0, 0.5);
  --grid: rgba(243, 239, 230, 0.05);

  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

:root.light {
  --bg: #f4f1ea;
  --bg-alt: #ebe7dd;
  --surface: #fbf9f4;
  --text: #14161a;
  --muted: #5c626c;
  --line: rgba(20, 22, 26, 0.14);
  --accent: #0b8576;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 133, 118, 0.1);
  --shadow: rgba(20, 22, 26, 0.18);
  --grid: rgba(20, 22, 26, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 2000;
}
.skip:focus {
  left: 8px;
}

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}

.brand {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .i-sun,
:root.light .theme-toggle .i-moon {
  display: none;
}
:root.light .theme-toggle .i-sun {
  display: block;
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--accent);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--text);
  box-shadow: none;
}
.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  overflow: clip;
  padding: 130px 0 56px;
  background:
    radial-gradient(60% 50% at 78% 30%, var(--accent-soft), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 72px,
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 32px;
  min-height: min(620px, 70vh);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 10vw, 8.2rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin: 22px 0 28px;
}
.hero h1 em {
  display: block;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

.lead {
  max-width: 34rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-figure {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-figure video {
  position: relative;
  z-index: 1;
  width: 118%;
  max-width: none;
  animation: float 6s ease-in-out infinite;
}
.orbit {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed var(--line);
  animation: spin 60s linear infinite;
}
.orbit::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.shadow {
  position: absolute;
  bottom: 9%;
  width: 34%;
  height: 22px;
  border-radius: 50%;
  background: var(--shadow);
  filter: blur(14px);
  animation: shadow 6s ease-in-out infinite;
}

.chip {
  position: absolute;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  white-space: nowrap;
  animation: float 7s ease-in-out infinite;
}
.chip-a {
  top: 14%;
  left: 4%;
  color: var(--accent);
}
.chip-b {
  top: 30%;
  right: 0;
  animation-delay: -2s;
}
.chip-c {
  bottom: 20%;
  left: 8%;
  animation-delay: -4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}
@keyframes shadow {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.9;
  }
  50% {
    transform: scaleX(0.82);
    opacity: 0.55;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.stats > div {
  padding: 22px 20px 0 0;
}
.stats > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.stats dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats dd {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.03em;
  margin-top: 4px;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 16px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-track span {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  padding-right: 22px;
}
.marquee-track span::after {
  content: '✦';
  color: var(--accent);
  margin-left: 22px;
  font-size: 0.8rem;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Seções ---------- */
.section {
  padding: 110px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 56px;
  max-width: 46rem;
}
.section-head h2,
.footer-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-top: 16px;
}
.section-head h2 em,
.footer-title em {
  color: var(--accent);
}
.section-sub {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.05rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.tags span {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- Cases (sticky scroll) ---------- */
.cases {
  border-top: 1px solid var(--line);
}
.case {
  display: grid;
  gap: 18px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
.case-n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.4rem;
  line-height: 0.9;
  color: var(--accent);
}
.case h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.case p {
  color: var(--muted);
}
.case p strong {
  color: var(--text);
  font-weight: 600;
}
.case-facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.case-facts li {
  font-size: 0.84rem;
  color: var(--muted);
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.case-facts b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text);
}

/* Visual de cada caso (no mobile fica dentro do caso) */
.case-visual {
  margin: 8px 0 0;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 70% 20%, var(--accent-soft), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 32px,
    var(--surface);
  overflow: hidden;
}
.case-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Desktop: lista à esquerda, palco fixo à direita */
.case-stage {
  display: none;
}
@media (min-width: 901px) {
  .js .cases {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 64px;
    border-top: 0;
  }
  .js .case {
    min-height: 78vh;
    align-content: center;
    padding: 0;
    border-bottom: 0;
    opacity: 0.28;
    transition: opacity 0.5s ease;
  }
  .js .case.is-active {
    opacity: 1;
  }
  .js .case:first-child {
    min-height: 62vh;
    align-content: start;
    padding-top: 12px;
  }
  .js .case .case-visual {
    display: none;
  }
  .js .case-stage {
    display: block;
    position: sticky;
    top: max(96px, calc(50vh - 250px));
    align-self: start;
  }
}
.stage-card {
  position: relative;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 75% 15%, var(--accent-soft), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 32px,
    var(--surface);
  box-shadow: 0 40px 80px -40px var(--shadow);
  padding: 22px 22px 24px;
  overflow: hidden;
}
.stage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.stage-count b {
  color: var(--accent);
  font-weight: 500;
}
.stage-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stage-panels {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 10px -6px 16px;
}
.stage-panel {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition:
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.stage-panel.is-active {
  opacity: 1;
  transform: none;
}
.stage-panel svg {
  width: 100%;
  height: 100%;
}
.stage-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.stage-progress i {
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  transition: background-color 0.4s ease;
}


/* Peças dos diagramas */
.case-visual text,
.stage-panel text {
  font-family: var(--body);
}
.v-node {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.5;
}
.v-node-hi {
  stroke: var(--accent);
}
.v-box {
  fill: var(--bg);
  stroke: var(--accent);
  stroke-width: 1.5;
}
.v-item {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.2;
}
.v-chip {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.5;
}
.v-chip-on {
  fill: var(--accent);
  stroke: var(--accent);
}
.v-dot {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.5;
}
.v-dot-on {
  fill: var(--accent);
  stroke: var(--accent);
}
.v-line-fill {
  fill: var(--line);
}
.v-bars rect {
  fill: var(--accent);
  opacity: 0.85;
}
.v-accent-stroke {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.v-accent-fill {
  fill: var(--accent);
}
.v-on-stroke {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.v-cut {
  fill: none;
  stroke: #f2726b;
  stroke-width: 2;
  stroke-linecap: round;
}
.v-track,
.v-orbit {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}
.v-orbit {
  stroke-dasharray: 3 6;
}
.v-flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
  animation: v-dash 1.1s linear infinite;
}
.v-flow-orbit {
  stroke-width: 1.5;
  opacity: 0.7;
  animation-duration: 2.4s;
}
.v-loop {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.4;
  stroke-dasharray: 3 5;
  opacity: 0.7;
}
.v-label {
  fill: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.v-strong {
  fill: var(--text);
  font-family: var(--display) !important;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.v-big {
  fill: var(--accent);
  font-family: var(--display) !important;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.v-sub {
  fill: var(--muted);
  font-size: 11.5px;
}
.v-kicker {
  fill: var(--accent);
  font-family: var(--mono) !important;
  font-size: 10.5px;
  letter-spacing: 0.12em;
}
.v-mono,
.v-mono-s {
  fill: var(--text);
  font-family: var(--mono) !important;
  font-size: 12px;
}
.v-mono-s {
  font-size: 10.5px;
  fill: var(--muted);
}
.v-on {
  fill: var(--accent-ink);
  font-family: var(--mono) !important;
  font-size: 12px;
  font-weight: 500;
}

.v-strong-s {
  font-size: 16px;
}
.v-packet {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
}
.v-loop-head {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.7;
}
.v-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: v-ring 2.6s ease-out infinite;
}
.v-eq rect {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: v-eq 1.6s ease-in-out infinite alternate;
}
.v-eq rect:nth-child(3n) {
  animation-delay: -0.4s;
}
.v-eq rect:nth-child(3n + 1) {
  animation-delay: -0.9s;
}
.v-eq rect:nth-child(4n) {
  animation-duration: 1.1s;
}
.v-queue {
  animation: v-queue 2.4s ease-in-out var(--q) infinite;
}
.v-step {
  animation: v-step 4.5s ease-in-out var(--s) infinite;
}
.v-db-fill {
  stroke-dasharray: 46;
  animation: v-db 2.4s ease-in-out infinite;
}
@keyframes v-ring {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.25, 1.6);
  }
}
@keyframes v-eq {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(0.45);
  }
}
@keyframes v-queue {
  0%,
  100% {
    stroke: var(--line);
  }
  15%,
  30% {
    stroke: var(--accent);
  }
}
@keyframes v-step {
  0%,
  100% {
    stroke: var(--line);
    stroke-width: 1.5;
  }
  6%,
  18% {
    stroke: var(--accent);
    stroke-width: 2.5;
  }
}
@keyframes v-db {
  0% {
    stroke-dashoffset: 46;
  }
  60%,
  100% {
    stroke-dashoffset: 0;
  }
}

.v-hbars rect {
  fill: var(--accent);
  opacity: 0.85;
  transform-box: fill-box;
  transform-origin: left;
  animation: v-hbar 3s ease-in-out infinite alternate;
}
.v-hbars rect:nth-child(2) {
  animation-delay: -1s;
}
.v-hbars rect:nth-child(3) {
  animation-delay: -2s;
}
.job-intro a {
  color: var(--accent);
}
@keyframes v-hbar {
  from {
    transform: scaleX(0.55);
  }
  to {
    transform: scaleX(1);
  }
}

/* O que parece clicável agora responde */
.case-facts li {
  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}
.case-facts li:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.stage-progress button {
  height: 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.stage-progress button i {
  display: block;
  width: 100%;
}
.stage-progress button:hover i {
  background: var(--muted);
}
.stage-progress button.on i,
.stage-progress button.on:hover i {
  background: var(--accent);
}
.stage-panel .v-chip,
.stage-panel .v-box,
.stage-panel .v-item {
  transition:
    stroke 0.2s ease,
    filter 0.2s ease;
}
.stage-panel g:hover > .v-chip,
.stage-panel g:hover > .v-box,
.stage-panel g:hover > .v-item {
  stroke: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-soft));
}

/* Entrada das peças quando o caso fica ativo */
.js .v-pop {
  opacity: 0;
  transform: translateY(10px);
  transform-box: fill-box;
}
.js .stage-panel.is-active .v-pop,
.js .case-visual.is-seen .v-pop {
  animation: v-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) forwards;
}
@keyframes v-pop {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes v-dash {
  to {
    stroke-dashoffset: -24;
  }
}

/* ---------- Jornada ---------- */
.timeline {
  list-style: none;
}
.job {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.job-when {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  padding-top: 6px;
}
.job-when span {
  display: block;
  color: var(--muted);
}
.job-when span::before {
  content: '→ ';
}
.job h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.job-where {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 500;
  margin: 4px 0 16px;
}
.job-intro {
  color: var(--muted);
  max-width: 48rem;
  margin-bottom: 14px;
}
.job li strong {
  color: var(--text);
  font-weight: 600;
}
.job ul {
  list-style: none;
  max-width: 48rem;
}
.job li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
  color: var(--muted);
}
.job li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Projetos ---------- */
.projects {
  --cols: 3;
  --rows: 2;
  --gap: 24px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows), auto);
  grid-auto-columns: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  gap: var(--gap);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 10px 0;
  margin: -10px 0;
}
.projects::-webkit-scrollbar {
  display: none;
}
.projects:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 22px;
}
.projects-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.projects-nav[hidden] {
  display: none;
}
.projects-nav button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}
.projects-nav button:hover:not(:disabled) {
  border-color: var(--accent);
}
.projects-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
.project {
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  text-decoration: none;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}
.project:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}
.shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s ease;
}
.project:hover .shot img {
  transform: scale(1.04);
}
.project-info {
  padding: 22px 24px 26px;
}
@media (min-width: 641px) {
  .project:last-child:nth-child(odd) {
    grid-row: span 2;
  }
  .project:last-child:nth-child(odd) .shot {
    flex: 1;
    aspect-ratio: auto;
    min-height: 0;
    position: relative;
  }
  .project:last-child:nth-child(odd) .shot img {
    position: absolute;
    inset: 0;
    object-position: center top;
  }
}
.project-kind {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wip {
  color: var(--accent-ink);
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.project h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 8px 0 8px;
}
.project h3 span {
  color: var(--accent);
  display: inline-block;
  transition: transform 0.25s ease;
}
.project:hover h3 span {
  transform: translate(3px, -3px);
}
.project-info > p:not(.project-kind):not(.tags) {
  color: var(--muted);
  font-size: 0.95rem;
}

.inside {
  margin-top: 36px;
  padding: 32px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.inside h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 10px;
}
.inside-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 40px;
  align-items: center;
}
.inside header > p:not(.project-kind) {
  color: var(--muted);
  margin-top: 12px;
  max-width: 46ch;
}
.inside-go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 22px;
}
.inside-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 0;
}
.inside-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.inside-shot {
  display: block;
  border-radius: 16px;
  transition: transform 0.3s ease;
}
.inside-shot:hover {
  transform: translateY(-4px);
}
.inside-shot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.inside-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.inside-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 26px;
}
.inside h4 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.inside ul {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.inside li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}
.inside li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}
.inside .todo li::before {
  background: none;
  border: 2px solid var(--accent);
}
@media (max-width: 900px) {
  .inside {
    padding: 24px 20px;
  }
  .inside-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .inside-cols {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

.repos {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}
.repo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.repo h3 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.05rem;
}
.repo p {
  color: var(--muted);
  font-size: 0.93rem;
  max-width: 44rem;
  margin-top: 4px;
}
.repo-go {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}
.repo:hover h3 {
  color: var(--accent);
}

/* ---------- Formação ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.col-title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
}
.rows {
  list-style: none;
  border-top: 1px solid var(--line);
}
.rows li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.row-when {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 4px;
}
.rows b {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.rows div span {
  color: var(--muted);
  font-size: 0.9rem;
}
.rows .star b::after {
  content: '✦';
  color: var(--accent);
  margin-left: 8px;
  font-size: 0.8rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: 120px 0 40px;
  background: radial-gradient(60% 60% at 20% 0%, var(--accent-soft), transparent 70%), var(--bg);
}
.footer-title {
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.9;
  margin: 18px 0 48px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.footer-links a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 24px 16px 24px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s;
}
.footer-links a span {
  color: var(--accent);
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-note {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Entrada ---------- */
.intro {
  display: none;
}
.js:not(.intro-skip) .intro {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--bg);
  animation: intro-out 0.9s cubic-bezier(0.76, 0, 0.24, 1) 1.55s forwards;
}
.intro-inner {
  width: min(86vw, 720px);
}
.intro-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: intro-fade 0.5s ease 0.1s forwards;
}
.intro-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.2rem, 15vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 14px 0 26px;
}
.intro-name span {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.intro-name b,
.intro-name em {
  display: block;
  transform: translateY(110%);
  animation: intro-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}
.intro-name b {
  font-weight: 800;
}
.intro-name em {
  color: var(--accent);
  letter-spacing: -0.03em;
  animation-delay: 0.28s;
}
.intro-bar {
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.intro-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: intro-load 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.35s forwards;
}

/* O hero entra em cascata logo depois da cortina subir */
.js:not(.intro-skip) .hero-text > *,
.js:not(.intro-skip) .stats {
  opacity: 0;
  animation: hero-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.95s forwards;
}
.js:not(.intro-skip) .hero-text > :nth-child(2) {
  animation-delay: 2.03s;
}
.js:not(.intro-skip) .hero-text > :nth-child(3) {
  animation-delay: 2.11s;
}
.js:not(.intro-skip) .hero-text > :nth-child(4) {
  animation-delay: 2.19s;
}
.js:not(.intro-skip) .stats {
  animation-delay: 2.3s;
}
.js:not(.intro-skip) .hero-figure {
  opacity: 0;
  animation: figure-in 1s cubic-bezier(0.22, 1, 0.36, 1) 1.9s forwards;
}

@keyframes intro-fade {
  to {
    opacity: 1;
  }
}
@keyframes intro-rise {
  to {
    transform: none;
  }
}
@keyframes intro-load {
  to {
    transform: scaleX(1);
  }
}
@keyframes intro-out {
  to {
    transform: translateY(-100%);
    visibility: hidden;
  }
}
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes figure-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    border-color 0.3s ease;
}
.js .projects .project.reveal:not(.in) {
  transform: none;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .hero {
    padding-top: 100px;
  }
  .hero h1 {
    font-size: clamp(3.6rem, 19vw, 7rem);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-figure {
    order: -1;
    max-width: 420px;
    margin: 0 auto -10px;
  }
  .hero-figure video {
    width: 125%;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stats > div {
    padding: 18px 12px 18px 0;
    border-bottom: 1px solid var(--line);
  }
  .stats > div + div {
    padding-left: 0;
    border-left: 0;
  }
  .stats > div:nth-child(even) {
    padding-left: 16px;
    border-left: 1px solid var(--line);
  }
  .section {
    padding: 76px 0;
  }
  .section-head {
    margin-bottom: 36px;
  }
  .job {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 32px 0;
  }
  .case {
    padding: 32px 0;
  }
  .case-n {
    font-size: 2.8rem;
  }
  .job-when span {
    display: inline;
    margin-left: 6px;
  }
  .projects {
    --cols: 2;
    --gap: 16px;
  }
  .edu-grid {
    grid-template-columns: 1fr;
  }
  .edu-grid {
    gap: 44px;
  }
  .footer {
    padding-top: 80px;
  }
  .footer-links {
    grid-template-columns: 1fr 1fr;
  }
  .repo {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .projects {
    --rows: 1;
    --gap: 14px;
    --edge: 24px;
    grid-auto-columns: 82%;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--edge);
    margin: -10px calc(var(--edge) * -1);
    padding: 10px var(--edge);
  }
  .projects-nav {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .projects {
    --edge: 16px;
  }
  .wrap {
    padding: 0 16px;
  }
  .chip-b {
    right: 0;
  }
  .rows li {
    grid-template-columns: 84px 1fr;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .btn-small {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .js .v-pop,
  .js .stage-panel.is-active .v-pop,
  .js .case-visual.is-seen .v-pop {
    opacity: 1;
    transform: none;
  }
  .js .case {
    opacity: 1;
  }
  .v-packet,
  .v-ring {
    display: none;
  }
}

.mark {
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.rows a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
