/* KLD Studio — portfólio */

@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --grafite: #111418;
  --papel: #f3f1ec;
  --branco: #fbfaf7;
  --sinal: #ff5a1f;
  --aco: #5b6470;
  --texto-2: #3a4048;
  --nevoa: #dcd8d0;
  --areia: #ece9e2;
  --claro-escuro: #a9b0b9;

  --f-titulo: 'Space Grotesk', system-ui, sans-serif;
  --f-texto: 'IBM Plex Sans', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --raio: 28px;
  --largura: 1200px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--grafite);
  font-family: var(--f-texto);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-titulo); margin: 0; letter-spacing: -0.03em; line-height: 1.02; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sinal); outline-offset: 3px; border-radius: 6px; }

.container { max-width: var(--largura); margin: 0 auto; padding-inline: 24px; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--aco); }
.pular { position: absolute; left: -999px; top: 8px; background: var(--grafite); color: var(--papel); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.pular:focus { left: 8px; }

/* Cursor que pisca */
@keyframes piscar { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cursor { display: inline-block; background: var(--sinal); animation: piscar 1.1s steps(1) infinite; }

/* ---------- Topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--papel) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.topo.rolou { border-bottom-color: var(--nevoa); }
.topo .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }

.logo { display: inline-flex; align-items: flex-end; gap: 3px; text-decoration: none; color: var(--grafite); }
.logo b { font-family: var(--f-titulo); font-weight: 700; font-size: 32px; letter-spacing: -0.05em; line-height: .85; }
.logo .cursor { width: 11px; height: 5px; }
.logo small { font-family: var(--f-mono); font-size: 12px; letter-spacing: .3em; margin-left: 10px; line-height: 1; padding-bottom: 1px; }

.menu { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.menu a { text-decoration: none; font-weight: 500; }
.menu a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }
.idioma { display: inline-flex; border: 1.5px solid var(--grafite); border-radius: 999px; overflow: hidden; }
.idioma button { border: 0; background: none; font: 500 13px var(--f-mono); padding: 8px 12px; min-height: 36px; cursor: pointer; color: var(--grafite); }
.idioma button[aria-pressed='true'] { background: var(--grafite); color: var(--papel); }

.abrir-menu { display: none; width: 44px; height: 44px; border: 1.5px solid var(--grafite); border-radius: 12px; background: none; cursor: pointer; }
.abrir-menu span { display: block; width: 18px; height: 2px; background: var(--grafite); margin: 4px auto; transition: transform .3s var(--ease), opacity .2s; }
.topo.aberto .abrir-menu span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.topo.aberto .abrir-menu span:nth-child(2) { opacity: 0; }
.topo.aberto .abrir-menu span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--grafite);
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-escuro { background: var(--grafite); color: var(--papel); }
.btn-sinal { background: var(--sinal); border-color: var(--sinal); color: var(--grafite); }
.btn-contorno { background: transparent; color: var(--grafite); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; }
.hero .container { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-texto { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero-nome { font-family: var(--f-mono); font-size: 15px; color: var(--aco); }
.hero-nome strong { color: var(--grafite); font-weight: 500; }
.hero h1 { font-size: clamp(46px, 7.2vw, 98px); line-height: .95; letter-spacing: -0.045em; }
.hero-sub { max-width: 600px; font-size: 19px; color: var(--texto-2); }
.selos { display: flex; flex-wrap: wrap; gap: 8px; }
.selo { border: 1.5px solid var(--grafite); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500; }
.acoes { display: flex; flex-wrap: wrap; gap: 12px; }

.terminal {
  flex: 1 1 360px; min-width: 0;
  background: var(--grafite); color: var(--nevoa);
  border-radius: 24px; padding: 22px 26px 28px;
  font: 15px/1.9 var(--f-mono);
  box-shadow: 0 30px 60px -30px rgba(17, 20, 24, .55);
}
.terminal .bolinhas { display: flex; gap: 7px; margin-bottom: 14px; }
.terminal .bolinhas i { width: 11px; height: 11px; border-radius: 50%; background: #3a4048; }
.terminal .linha { opacity: 0; transform: translateY(6px); animation: surgir .5s var(--ease) forwards; overflow-wrap: anywhere; }
.terminal .linha:nth-of-type(2) { animation-delay: .3s; }
.terminal .linha:nth-of-type(3) { animation-delay: 1s; }
.terminal .linha:nth-of-type(4) { animation-delay: 1.7s; }
.terminal .linha:nth-of-type(5) { animation-delay: 2.4s; }
.terminal .ok { color: #7cd992; }
.terminal .dim { color: var(--claro-escuro); }
.terminal .cursor { width: 10px; height: 18px; vertical-align: -3px; }
@keyframes surgir { to { opacity: 1; transform: none; } }

/* ---------- Faixa de tecnologias ---------- */
.faixa { background: var(--grafite); color: var(--papel); overflow: hidden; padding: 20px 0; }
.faixa-trilho { display: flex; gap: 52px; width: max-content; animation: deslizar 34s linear infinite; font: 500 26px var(--f-titulo); white-space: nowrap; }
.faixa-trilho span:nth-child(even) { color: var(--sinal); }
@keyframes deslizar { to { transform: translateX(-50%); } }

/* ---------- Seções ---------- */
.secao { padding: 104px 0 24px; }
.secao-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.rotulo { display: block; font: 400 16px var(--f-mono); color: var(--aco); letter-spacing: 0; margin-bottom: 14px; }
.secao h2 { font-size: clamp(36px, 4.6vw, 58px); letter-spacing: -0.035em; }
.secao-cab p { max-width: 380px; color: var(--aco); font-size: 15px; }

/* Sobre */
.sobre { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.sobre-foto { flex: 1 1 320px; max-width: 440px; min-width: 0; border-radius: var(--raio); overflow: hidden; background: var(--nevoa); aspect-ratio: 4 / 5; }
.sobre-foto img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.sobre-texto { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; font-size: 18px; color: var(--texto-2); }
.sobre-texto strong { color: var(--grafite); font-weight: 600; }
.fatos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin-top: 10px; border-top: 1px solid var(--nevoa); }
.fato { padding: 14px 0; border-bottom: 1px solid var(--nevoa); display: flex; flex-direction: column; gap: 2px; padding-right: 16px; }
.fato dt { font: 400 13px var(--f-mono); color: var(--aco); }
.fato dd { margin: 0; font-size: 16px; font-weight: 500; color: var(--grafite); }

/* Projetos */
.destaque { background: var(--branco); border-radius: var(--raio); padding: 20px; display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 20px; transition: transform .35s var(--ease); }
.destaque:hover, .projeto:hover { transform: translateY(-4px); }
.mock {
  flex: 1 1 460px; min-width: 0; min-height: 340px;
  background: #2c4156; border-radius: 20px; padding: 22px;
  display: flex; flex-direction: column; gap: 18px; overflow: hidden;
}
.mock-topo { display: flex; justify-content: space-between; align-items: center; color: #f7f7f7; font-weight: 700; font-size: 15px; }
.mock-topo span { background: #7f99b2; border-radius: 999px; padding: 6px 14px; font-size: 12px; }
.mock-titulo { font: 700 clamp(30px, 3.4vw, 42px)/0.95 var(--f-titulo); color: #f7f7f7; letter-spacing: -0.03em; max-width: 340px; }
.mock-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.mock-cards div { border-radius: 14px; height: 88px; padding: 10px; font-size: 12px; font-weight: 600; }
.destaque-texto { flex: 1 1 340px; min-width: 0; padding: 12px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.destaque-texto h3 { font-size: 36px; }
.destaque-texto p { color: var(--texto-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--areia); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
.link-mono { font: 500 15px var(--f-mono); text-decoration: none; }
.link-mono:hover { text-decoration: underline; text-underline-offset: 4px; }

.grade-projetos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.projeto {
  background: var(--branco); border-radius: var(--raio); padding: 16px;
  display: flex; flex-direction: column; gap: 16px; text-decoration: none;
  transition: transform .35s var(--ease);
}
.projeto-img { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--nevoa); }
.projeto-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s var(--ease); }
.projeto:hover .projeto-img img { transform: scale(1.04); }
.projeto-info { padding: 0 6px 6px; display: flex; flex-direction: column; gap: 6px; }
.projeto-info .mono { font-size: 13px; color: var(--aco); }
.projeto-info h3 { font-size: 24px; letter-spacing: -0.02em; }
.projeto-info p { font-size: 15px; color: var(--texto-2); }
.projeto-info .ver { margin-top: 4px; font: 500 14px var(--f-mono); }
.projeto-info .ver::after { content: ' →'; display: inline-block; transition: transform .3s var(--ease); }
.projeto:hover .ver::after { transform: translateX(4px); }

/* Experiência */
.trajetoria { display: flex; flex-wrap: wrap; gap: 48px; }
.linha-tempo { flex: 999 1 560px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.cargo { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--nevoa); }
.cargo:first-child { border-top: 2px solid var(--grafite); }
.cargo-data { font: 400 14px/1.6 var(--f-mono); color: var(--aco); }
.cargo-data .agora { display: inline-flex; align-items: center; gap: 6px; color: var(--grafite); }
.cargo-data .agora::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sinal); }
.cargo h3 { font-size: 22px; letter-spacing: -0.02em; }
.cargo .empresa { font-weight: 600; margin: 2px 0 10px; }
.cargo p { color: var(--texto-2); font-size: 16px; }
.cargo .tags { margin-top: 14px; }
.formacao { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.formacao h3.titulo-col { font-size: 22px; padding-bottom: 14px; border-bottom: 2px solid var(--grafite); }
.curso { background: var(--branco); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.curso .mono { font-size: 13px; color: var(--aco); }
.curso b { font-family: var(--f-titulo); font-size: 19px; letter-spacing: -0.01em; line-height: 1.2; }
.curso span:last-child { font-size: 15px; color: var(--texto-2); }

/* Serviços */
.servicos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.servico { border-top: 2px solid var(--grafite); padding: 24px 4px 8px; display: flex; flex-direction: column; gap: 12px; }
.servico:last-child { border-top-color: var(--sinal); }
.servico h3 { font-size: 24px; letter-spacing: -0.02em; }
.servico p { color: var(--texto-2); font-size: 16px; }
.processo { margin-top: 40px; background: var(--branco); border-radius: var(--raio); padding: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px; }
.passo { display: flex; flex-direction: column; gap: 6px; }
.passo .mono { font-size: 14px; color: var(--aco); }
.passo:last-child .mono { color: #c2410c; }
.passo b { font: 700 21px var(--f-titulo); }
.passo span:last-child { font-size: 15px; color: var(--texto-2); }

/* Stack */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.grupo { background: var(--branco); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.grupo h3 { font-size: 18px; letter-spacing: -0.01em; }
.grupo ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.grupo li { border: 1.5px solid var(--nevoa); border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 500; }

/* Contato */
.contato { background: var(--grafite); color: var(--papel); margin-top: 104px; }
.contato .container { padding-top: 104px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; align-items: flex-end; }
.contato-texto { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.contato .rotulo { color: var(--claro-escuro); }
.contato h2 { font-size: clamp(42px, 6vw, 82px); letter-spacing: -0.045em; line-height: .95; }
.contato h2 .cursor { width: .42em; height: .15em; margin-left: .08em; }
.contato-texto p { color: var(--nevoa); max-width: 520px; }
.email { font: 400 clamp(18px, 2.4vw, 28px) var(--f-mono); color: var(--papel); text-underline-offset: 6px; overflow-wrap: anywhere; }
.email:hover { color: var(--sinal); }
.canais { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; }
.canais a { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid #2a2f36; text-decoration: none; font-weight: 500; min-height: 44px; }
.canais a span { color: var(--claro-escuro); font-family: var(--f-mono); font-size: 14px; }
.canais a:hover span { color: var(--sinal); }
.rodape { border-top: 1px solid #2a2f36; }
.rodape .container { padding-top: 24px; padding-bottom: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--claro-escuro); align-items: center; }

/* Revelar ao rolar */
.revelar { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.revelar.visivel { opacity: 1; transform: none; }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  .abrir-menu { display: block; }
  .menu {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--papel); border-bottom: 1px solid var(--nevoa);
    padding: 8px 24px 24px;
    display: none;
  }
  .topo.aberto .menu { display: flex; }
  .menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--nevoa); font-size: 17px; }
  .menu .btn { margin-top: 16px; }
  .idioma { align-self: flex-start; margin-top: 16px; }
  .cargo { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero { padding-top: 40px; }
  .secao { padding-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .revelar { opacity: 1; transform: none; }
  .terminal .linha { opacity: 1; transform: none; }
}
