/* ============ cadu.io ============
   Paleta: cobalto de pôster, papel quente, sol.
   Tipos: Cabinet Grotesk (display), Satoshi (texto), JetBrains Mono (utilitária).
*/

@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('../fonts/CabinetGrotesk-Extrabold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --azul: #2231C7;
  --azul-escuro: #19259E;
  --papel: #F4EFE2;
  --papel-dim: rgba(244, 239, 226, 0.55);
  --papel-linha: rgba(244, 239, 226, 0.22);
  --sol: #FFC53D;
  --tinta: #101433;

  --fonte-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;
  --fonte-texto: 'Satoshi', -apple-system, 'Segoe UI', sans-serif;
  --fonte-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --margem: clamp(1.25rem, 4vw, 4rem);
  --mola: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--azul) linear-gradient(172deg, #2433CE 0%, var(--azul) 45%, #1A25A6 100%) fixed;
  color: var(--papel);
  font-family: var(--fonte-texto);
  font-weight: 500;
  line-height: 1.6;
  min-height: 100svh;
  overflow-x: hidden;
}

/* grão sutil para dar matéria ao cobalto chapado */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--sol); color: var(--tinta); }

.mono {
  font-family: var(--fonte-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

/* ---------- topo ---------- */

.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 1.4rem var(--margem);
  color: var(--papel-dim);
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--margem);
  position: relative;
  overflow: hidden;
}

/* o grafo de skills vive atrás do hero, como atmosfera */
.grafo-fundo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  touch-action: pan-y;
}

.hero-grid, .hero-hint { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 7rem);
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

.hero .eyebrow { margin-bottom: 1.4rem; }

/* manifesto yaml — cartão de identidade devops */
.manifest {
  border: 1px solid var(--papel-linha);
  border-radius: 12px;
  padding: 1.6rem 1.9rem;
  background: rgba(13, 17, 46, 0.25);
  opacity: 0;
  animation: aparece 0.8s ease 0.9s forwards;
}

.manifest-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.2rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--papel-linha);
}

.manifest-foto {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--papel-linha);
}

.manifest-nome {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.manifest-handle {
  font-family: var(--fonte-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--papel-dim);
  margin-top: 0.15rem;
}

.manifest pre {
  font-family: var(--fonte-mono);
  font-weight: 500;
  font-size: 0.82rem;
  line-height: 1.95;
  letter-spacing: 0.02em;
}

.manifest .k { color: var(--papel-dim); }
.manifest .v { color: var(--papel); }
.manifest .s { color: var(--sol); }
.manifest .c { color: rgba(244, 239, 226, 0.35); }

.cursor {
  color: var(--sol);
  animation: pisca 1.1s steps(2, start) infinite;
}

@keyframes pisca {
  50% { opacity: 0; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .manifest { justify-self: start; }
}

.wordmark {
  font-family: var(--fonte-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 9.5vw, 9rem);
  line-height: 1;
  letter-spacing: -0.035em;
  display: flex;
  align-items: baseline;
  user-select: none;
}

.wm-piece {
  display: inline-block;
  overflow: hidden;
}

.wm-text {
  display: inline-block;
  transform: translateY(110%);
  animation: sobe 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wm-piece:nth-child(3) .wm-text { animation-delay: 0.12s; }

@keyframes sobe {
  to { transform: translateY(0); }
}

.wm-ponto { color: var(--sol); }

.hero-sub {
  margin-top: clamp(1.4rem, 3vh, 2.2rem);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--papel-dim);
  opacity: 0;
  animation: aparece 0.8s ease 0.7s forwards;
}

.hero-sub strong { color: var(--papel); font-weight: 700; }

@keyframes aparece {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-hint {
  position: absolute;
  bottom: 1.6rem;
  color: var(--papel-dim);
  opacity: 0;
  animation: aparece 0.8s ease 1.1s forwards;
}

.hint-arrow {
  display: inline-block;
  animation: desce 1.6s ease-in-out 1.9s infinite;
}

@keyframes desce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* ---------- painel de links ---------- */

.links {
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--margem);
}

.eyebrow {
  color: var(--sol);
  margin-bottom: 2rem;
}

.board { border-top: 1px solid var(--papel-linha); }

.row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.4rem, 3.5vh, 2.2rem) 0.75rem;
  border-bottom: 1px solid var(--papel-linha);
  text-decoration: none;
  color: var(--papel);
  position: relative;
  transition: color 0.25s ease;
  opacity: 0;
  transform: translateY(24px);
}

.row.visivel {
  opacity: 1;
  transform: translateY(0);
  transition: color 0.25s ease, opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--papel);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}

.row:hover, .row.apertada { color: var(--tinta); }
.row:hover::before, .row.apertada::before { transform: scaleY(1); transform-origin: top; }

.row-name {
  font-family: var(--fonte-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.row-dest { color: inherit; opacity: 0.55; text-transform: none; letter-spacing: 0.02em; }

.row-arrow {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  transition: transform 0.3s var(--mola);
}

.row:hover .row-arrow, .row.apertada .row-arrow {
  transform: translate(6px, -6px);
}

/* teclas físicas */
.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4em;
  height: 2.4em;
  border: 1.5px solid currentColor;
  border-radius: 8px;
  box-shadow: 0 3px 0 0 currentColor;
  font-size: 0.85rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.row:active .keycap,
.row.apertada .keycap,
.copy-btn:active .keycap,
.copy-btn.apertada .keycap {
  transform: translateY(3px);
  box-shadow: 0 0 0 0 currentColor;
}

.keycap-sm { min-width: 2em; height: 2em; font-size: 0.7rem; }

/* copiar e-mail */
.copy-line {
  margin-top: 2.5rem;
  color: var(--papel-dim);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  background: none;
  border: none;
  color: var(--papel);
  cursor: pointer;
  padding: 0.4em 0.2em;
}

.copy-btn:hover span { text-decoration: underline; text-underline-offset: 4px; }

.copy-btn.copiado { color: var(--sol); }

/* ---------- rodapé ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem var(--margem) 1.6rem;
  border-top: 1px solid var(--papel-linha);
  color: var(--papel-dim);
}

.footer-dim { opacity: 0.7; }

/* ---------- responsivo ---------- */

@media (max-width: 640px) {
  .row { grid-template-columns: auto 1fr auto; }
  .row-dest { display: none; }
}

/* ---------- movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wm-text, .hero-sub, .hero-hint, .manifest, .cursor {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .row { opacity: 1; transform: none; transition: none; }
  .hint-arrow { animation: none; }
  .wm-dot { transition: none; }
  .wm-dot:hover { transform: none; }
}

/* ---------- sobre ---------- */

.sobre {
  padding: 7rem var(--margem) 1rem;
}

.sobre-texto {
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.5;
  max-width: 32em;
}

.sobre-stack {
  margin-top: 2.2rem;
  color: var(--papel-dim);
  letter-spacing: 0.12em;
}

.sobre-certs {
  margin-top: 0.7rem;
  color: var(--papel-dim);
  letter-spacing: 0.12em;
}

.sobre-certs a {
  color: inherit;
  text-underline-offset: 4px;
}

.sobre-certs a:hover { color: var(--papel); }

