/* =============================================================================
   Portfólio — folha de estilo única
   Sumário:
     1. Tokens (cores, tipografia, espaçamento)
     2. Reset e base
     3. Layout e utilitários
     4. Cabeçalho e navegação
     5. Hero
     6. Seções: sobre, stack, processo
     7. Projetos (cards e filtros)
     8. Página de projeto
     9. Contato e rodapé
    10. Animações e responsivo
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. TOKENS
   O site tem um único tema, escuro. Para ajustar a identidade visual, mude
   as variáveis daqui — todo o resto da folha se refere a elas.
   ------------------------------------------------------------------------ */
:root {
  /* diz ao navegador para desenhar barras de rolagem e campos em modo escuro */
  color-scheme: dark;

  --bg: #0a0c11;
  --bg-elevated: #10131b;
  --surface: #141824;
  --surface-2: #1b2030;
  --border: #242a3a;
  --border-strong: #333b52;

  --text: #e8eaf0;
  --text-muted: #9aa3b8;
  --text-subtle: #6e7891;

  --accent: #7c8cff;
  --accent-strong: #6172ff;
  --accent-soft: rgba(124, 140, 255, 0.14);
  --accent-2: #2dd4bf;
  --accent-2-soft: rgba(45, 212, 191, 0.13);
  --warn: #f0b429;
  --warn-soft: rgba(240, 180, 41, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
    Menlo, Consolas, monospace;

  --maxw: 1120px;
  --nav-h: 68px;
}

/* ---------------------------------------------------------------------------
   2. RESET E BASE
   ------------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Malha de fundo sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(
      circle at 15% -10%,
      var(--accent-soft),
      transparent 45%
    ),
    radial-gradient(circle at 85% 5%, var(--accent-2-soft), transparent 40%);
  pointer-events: none;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------------------------------------------------------------------------
   3. LAYOUT E UTILITÁRIOS
   ------------------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 96px;
  position: relative;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 48px;
  max-width: 640px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin-bottom: 14px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.text-grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 200;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.94rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px -6px var(--accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 10px 28px -6px var(--accent);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

/* Chips / tags */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.chip-accent {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.chip-warn {
  background: var(--warn-soft);
  border-color: transparent;
  color: var(--warn);
}

/* ---------------------------------------------------------------------------
   4. CABEÇALHO
   ------------------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* Monograma solto, sem moldura: o gradiente vem do próprio traço. */
.logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
}

.logo-mark svg {
  width: 32px;
  height: 32px;
  overflow: visible;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.18s, background 0.18s;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  background: var(--surface-2);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: color 0.18s, border-color 0.18s, transform 0.18s;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Seletor de idioma */
.lang {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.18s, border-color 0.18s;
}

.lang-btn:hover,
.lang.is-open .lang-btn {
  color: var(--text);
  border-color: var(--border-strong);
}

.lang-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.lang-btn svg:last-child {
  width: 13px;
  height: 13px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.lang.is-open .lang-btn svg:last-child {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 182px;
  list-style: none;
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 110;
}

.lang.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.lang-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 0.89rem;
  color: var(--text-muted);
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.lang-menu button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.lang-menu button.is-active {
  color: var(--accent);
}

.lang-sigla {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-subtle);
}

.lang-menu button.is-active .lang-sigla {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-toggle {
  display: none;
}

/* ---------------------------------------------------------------------------
   5. HERO
   ------------------------------------------------------------------------ */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 88px;
  position: relative;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px 6px 11px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 var(--accent-2);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 60%, transparent);
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.1rem);
  letter-spacing: -0.035em;
  margin-bottom: 8px;
}

.hero-role {
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 26px;
  letter-spacing: -0.01em;
}

.hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.stat {
  flex: 1 1 160px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}

.stat:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.83rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* Marquee de ferramentas */
.marquee {
  margin-top: 60px;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}

.marquee-track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: scroll-x 34s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  font-size: 0.92rem;
  font-weight: 550;
  color: var(--text-subtle);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

@keyframes scroll-x {
  to {
    transform: translateX(-50%);
  }
}

/* ---------------------------------------------------------------------------
   6. SOBRE, STACK, PROCESSO
   ------------------------------------------------------------------------ */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.about-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.about-card h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

.about-list {
  list-style: none;
  display: grid;
  gap: 13px;
}

.about-list li {
  display: flex;
  gap: 11px;
  font-size: 0.94rem;
  color: var(--text-muted);
  align-items: flex-start;
}

.about-list svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--accent-2);
  margin-top: 3px;
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.stack-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
}

.stack-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stack-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.stack-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.stack-icon svg {
  width: 19px;
  height: 19px;
}

.stack-card h3 {
  font-size: 1rem;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Processo */
.process-grid {
  display: grid;
  /* 320px deixa as seis etapas em 3 + 3 no desktop, em vez de 4 + 2 */
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  counter-reset: step;
}

.process-item {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--border);
  transition: border-color 0.25s;
}

.process-item:hover {
  border-top-color: var(--accent);
}

.process-item::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}

.process-item h3 {
  font-size: 1.05rem;
  margin-bottom: 9px;
}

.process-item p {
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ---------------------------------------------------------------------------
   7. PROJETOS
   ------------------------------------------------------------------------ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 9px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 550;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card.is-featured {
  grid-column: span 2;
  flex-direction: row;
  gap: 36px;
  align-items: center;
}

.project-card.is-featured .project-body {
  flex: 1;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.project-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-kind.is-dev {
  color: var(--accent-2);
}

.project-year {
  font-size: 0.78rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.project-card h3 {
  font-size: 1.32rem;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
}

.project-card.is-featured h3 {
  font-size: 1.6rem;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}

.project-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  align-self: flex-start;
}

.project-link svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s;
}

.project-card:hover .project-link svg {
  transform: translateX(4px);
}

/* Visual do pipeline dentro do card destacado */
.project-visual {
  flex: 0 0 300px;
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.visual-node {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 9px 13px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.visual-node span:first-child {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  font-family: var(--font-mono);
  flex: none;
}

.visual-arrow {
  height: 10px;
  width: 1px;
  margin-left: 25px;
  background: var(--border-strong);
}

/* ---------------------------------------------------------------------------
   8. PÁGINA DE PROJETO
   ------------------------------------------------------------------------ */
.project-hero {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 48px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  transition: color 0.18s, gap 0.18s;
}

.back-link:hover {
  color: var(--accent);
  gap: 12px;
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.project-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 18px;
  max-width: 20ch;
}

.project-hero .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 28px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.meta-item .meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 5px;
}

.meta-item .meta-value {
  font-size: 0.95rem;
  font-weight: 550;
}

.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  margin-bottom: 40px;
}

.notice svg {
  width: 20px;
  height: 20px;
  color: var(--warn);
  flex: none;
  margin-top: 2px;
}

.notice p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.notice strong {
  color: var(--text);
}

.prose-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.prose-card {
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.prose-card h2 {
  font-size: 1.15rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prose-card h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--accent);
}

.prose-card.is-solution h2::before {
  background: var(--accent-2);
}

.prose-card p {
  color: var(--text-muted);
  font-size: 0.97rem;
}

.prose-card strong {
  color: var(--text);
  font-weight: 600;
}

/* Pipeline horizontal */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 56px;
}

.pipeline-step {
  flex: 1 0 165px;
  padding: 20px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}

.pipeline-step:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.pipeline-step:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pipeline-step + .pipeline-step {
  border-left: none;
}

.pipeline-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.5;
}

.pipeline-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.pipeline-step h4 {
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.pipeline-step p {
  font-size: 0.8rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

/* Entregas + stack */
.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
  align-items: start;
}

.delivery-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.delivery-list li {
  display: flex;
  gap: 13px;
  color: var(--text-muted);
  font-size: 0.97rem;
  align-items: flex-start;
}

.delivery-list code,
.prose-card code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
}

.delivery-list svg {
  width: 19px;
  height: 19px;
  color: var(--accent-2);
  flex: none;
  margin-top: 3px;
}

.side-box {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.side-box h3 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 15px;
}

.side-box + .side-box {
  margin-top: 18px;
}

.results-grid {
  display: grid;
  gap: 16px;
}

.result-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.result-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1.2;
}

.result-label {
  font-size: 0.84rem;
  color: var(--text-subtle);
}

/* Número ainda não preenchido no data.js */
.result-value.is-empty {
  color: var(--text-subtle);
  opacity: 0.5;
}

/* Galeria */
.gallery {
  display: grid;
  /* Duas colunas no desktop: prints de dashboard precisam de tamanho para
     serem legíveis antes de o visitante clicar para ampliar. */
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
  /* Os prints têm proporções bem diferentes (workflow vertical, curva S
     panorâmica). Sem isto, o card estica até a altura da linha e sobra um
     vão embaixo da imagem. */
  align-items: start;
}

.shot {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.shot:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.shot img {
  width: 100%;
  cursor: zoom-in;
  background: var(--surface-2);
  /* Impede que um print em retrato estique a linha inteira da grade.
     O lightbox mostra a imagem completa ao clicar. */
  max-height: 440px;
  object-fit: contain;
}

/* Imagem que ocupa a linha toda — para prints que só ficam legíveis grandes
   (uma conversa, um workflow muito panorâmico). */
.shot--wide {
  grid-column: 1 / -1;
}

.shot--wide img {
  max-height: 560px;
}

.shot figcaption {
  padding: 13px 16px;
  font-size: 0.85rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
}

/* Placeholder de imagem ausente */
.shot-empty {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 26px;
  background: var(--surface-2);
  border-bottom: 1px dashed var(--border-strong);
}

.shot-empty svg {
  width: 30px;
  height: 30px;
  color: var(--text-subtle);
  margin: 0 auto 10px;
}

.shot-empty p {
  font-size: 0.84rem;
  color: var(--text-subtle);
}

.shot-empty code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
  word-break: break-all;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.9);
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

/* Navegação entre projetos */
.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.project-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 240px;
  transition: border-color 0.2s, transform 0.2s;
}

.project-nav a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-nav .nav-dir {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-subtle);
}

.project-nav .nav-name {
  font-weight: 600;
  font-size: 0.98rem;
}

.project-nav a:last-child {
  text-align: right;
  margin-left: auto;
}

/* ---------------------------------------------------------------------------
   9. CONTATO E RODAPÉ
   ------------------------------------------------------------------------ */
.contact {
  text-align: center;
}

.contact-inner {
  max-width: 620px;
  margin-inline: auto;
}

.contact h2 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  margin-bottom: 16px;
}

.contact p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.footer {
  border-top: 1px solid var(--border);
  padding-block: 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------------------------------------------------------------------------
   10. ANIMAÇÕES E RESPONSIVO
   ------------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .about-grid,
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .projects-grid,
  .prose-grid {
    grid-template-columns: 1fr;
  }

  .project-card.is-featured {
    grid-column: span 1;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .project-visual {
    flex: none;
    order: -1;
  }
}

@media (max-width: 760px) {
  .section {
    padding-block: 68px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 20px 22px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    visibility: hidden;
  }

  .nav-links.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .nav-toggle {
    display: grid;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 52px);
  }

  .hero-stats {
    gap: 10px;
  }

  .stat {
    flex-basis: 130px;
    padding: 16px;
  }

  .meta-row {
    gap: 22px;
  }

  .project-nav a,
  .project-nav a:last-child {
    min-width: 100%;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .nav,
  .lightbox,
  .filters,
  .marquee {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
