/* ============================================================================
   ESTILO DO PORTFÓLIO
   Todas as cores ficam nas variáveis abaixo: mude aqui e o site todo acompanha.
   ============================================================================ */

:root {
  --bg: #0f1216;
  --bg-2: #13171c;
  --surface: #181c22;
  --surface-2: #1f242b;
  --border: #2a3038;
  --text: #e7eaee;
  --muted: #9aa4af;
  --primary: #00bcd4;      /* ciano — cor da marca */
  --primary-2: #4dd9ea;
  --accent: #f9b234;       /* amarelo — destaques */
  --ok: #3ecd5e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

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

a { color: var(--primary); }

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

.container {
  width: min(var(--max), 100% - 2rem);
  margin-inline: auto;
}

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ------------------------------- Navbar -------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 18, 22, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.logo-link img { width: 30px; height: 30px; }

.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.menu a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
}
.menu a:hover { color: var(--text); background: var(--surface-2); }
.menu a.active { color: var(--primary); }
.menu .menu-aulas a {
  margin-left: 0.4rem;
  color: #04262b;
  background: var(--primary);
}
.menu .menu-aulas a:hover { background: var(--primary-2); color: #04262b; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  width: 42px;
  height: 38px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ------------------------------- Botões -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #04262b; }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.9rem; }

/* ------------------------------- Seções -------------------------------- */

.section { padding: 5rem 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--primary);
  letter-spacing: 0.05em;
}
h1, h2, h3 { line-height: 1.2; }
.section-head h2, .page-title { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 800; }
.section-head p { color: var(--muted); max-width: 60ch; }

.page-hero { padding: 4rem 0 2rem; }
.page-hero p { color: var(--muted); max-width: 65ch; margin-top: 0.6rem; }

/* -------------------------------- Hero --------------------------------- */

.hero {
  position: relative;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.18), transparent 65%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 3rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.6rem 0 1rem;
}
.hero h1 .destaque { color: var(--primary); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.hero .lead strong { color: var(--text); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface);
}
.status .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(62, 205, 94, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(62, 205, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 205, 94, 0); }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

.social-row { display: flex; gap: 0.6rem; margin-top: 1.6rem; }
.social-row a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.social-row a:hover { color: var(--primary); border-color: var(--primary); }
.social-row svg { width: 20px; height: 20px; }

.hero-photo {
  position: relative;
  justify-self: center;
  width: min(320px, 80vw);
  aspect-ratio: 1;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 2px solid var(--primary);
  border-radius: 28px;
  z-index: -1;
  opacity: 0.6;
}

/* Terminal decorativo */
.terminal {
  margin-top: 2.2rem;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow: hidden;
}
.terminal-bar { display: flex; gap: 6px; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4048; }
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal pre { padding: 0.9rem 1rem; color: var(--muted); white-space: pre-wrap; }
.terminal .k { color: var(--primary); }
.terminal .s { color: var(--accent); }

/* ---------------------------- Estatísticas ----------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.stat .valor { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .rotulo { color: var(--muted); font-size: 0.9rem; }

/* -------------------------------- Cards -------------------------------- */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: #3a424c; transform: translateY(-3px); }
.card h3 { font-size: 1.15rem; margin: 0.9rem 0 0.4rem; }
.card p { color: var(--muted); }
.card .icone {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  font-size: 1.4rem;
  background: rgba(0, 188, 212, 0.12);
}
.card .icone.amarelo { background: rgba(249, 178, 52, 0.13); }
.card .icone.verde { background: rgba(62, 205, 94, 0.13); }
.card .card-link { display: inline-block; margin-top: 1rem; font-weight: 700; text-decoration: none; }
.card .card-link:hover { text-decoration: underline; }

/* Cartão de repositório */
.repo-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  transition: border-color 0.2s, transform 0.2s;
}
.repo-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.repo-top { display: flex; align-items: center; gap: 0.55rem; }
.repo-top .ico { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.repo-top h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.repo-top h3 a { color: var(--text); text-decoration: none; }
.repo-top h3 a:hover { color: var(--primary); }
.repo-desc {
  color: var(--muted); font-size: 0.95rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.repo-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.85rem; color: var(--muted); }
.repo-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.repo-links { display: flex; gap: 1rem; font-size: 0.9rem; font-weight: 600; }
.repo-links a { text-decoration: none; }
.repo-links a:hover { text-decoration: underline; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  color: var(--primary-2);
  background: rgba(0, 188, 212, 0.1);
}
.tag-muted { color: var(--muted); background: var(--surface-2); }

/* Chips de tecnologia */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 600;
}
.chip.estudando { border-style: dashed; color: var(--muted); }

/* ------------------------- Banner da plataforma ------------------------ */

.banner-aulas {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.6rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 188, 212, 0.35);
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 188, 212, 0.18), transparent 55%),
    var(--surface);
}
.banner-aulas h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0.4rem 0 0.8rem; }
.banner-aulas p { color: var(--muted); }
.banner-aulas ul { list-style: none; display: grid; gap: 0.7rem; }
.banner-aulas li {
  display: flex; gap: 0.7rem; align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.banner-aulas .btn { margin-top: 1.5rem; }

/* ------------------------------ Timeline ------------------------------- */

.timeline { list-style: none; position: relative; padding-left: 1.6rem; display: grid; gap: 1.6rem; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline li { position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -1.6rem; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--primary);
}
.timeline h3 { font-size: 1.05rem; }
.timeline .quando { font-family: var(--mono); font-size: 0.8rem; color: var(--primary); }
.timeline p { color: var(--muted); margin-top: 0.3rem; }

/* -------------------------------- Sobre -------------------------------- */

.sobre-grid { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; align-items: start; }
.sobre-grid .foto { border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.texto p + p { margin-top: 1rem; }
.texto p { color: var(--muted); font-size: 1.05rem; }
.texto strong { color: var(--text); }

/* ------------------------------- Contato ------------------------------- */

.contato-card {
  display: flex; flex-direction: column; gap: 0.6rem;
  text-decoration: none; color: inherit;
}
.contato-card .valor { font-family: var(--mono); font-size: 0.9rem; color: var(--primary); overflow-wrap: anywhere; }
.contato-card svg { width: 22px; height: 22px; color: var(--primary); }

.cta {
  text-align: center;
  padding: 3.5rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta p { color: var(--muted); margin: 0.7rem auto 1.6rem; max-width: 55ch; }
.cta .hero-actions { justify-content: center; margin-top: 0; }

/* ----------------------------- Filtros --------------------------------- */

.filtros {
  display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center;
  margin-bottom: 1.6rem;
}
.campo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  padding: 0.6rem 0.9rem;
}
.campo:focus { outline: none; border-color: var(--primary); }
.campo-busca { flex: 1 1 260px; }
.filtro-lang {
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 0.35rem 0.85rem; font: inherit; font-size: 0.88rem;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
}
.filtro-lang:hover { color: var(--text); }
.filtro-lang[aria-pressed="true"] { color: var(--text); border-color: var(--primary); background: rgba(0, 188, 212, 0.1); }

/* ------------------------- Estados de carga ---------------------------- */

.carregando, .erro, .vazio { color: var(--muted); padding: 1rem 0; }
.erro { color: #ff8a65; }
.skeleton {
  height: 180px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------- Rodapé -------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ------------------------------ Animação ------------------------------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visivel { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------- Responsividade ---------------------------- */

@media (max-width: 900px) {
  .hero-grid, .banner-aulas, .sobre-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; width: min(220px, 60vw); }
  .sobre-grid .foto { max-width: 240px; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .banner-aulas { padding: 1.8rem; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .menu {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 1rem 1.2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .menu.aberto { display: flex; }
  .menu a { padding: 0.75rem 1rem; }
  .menu .menu-aulas a { margin: 0.4rem 0 0; text-align: center; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 3rem 0; }
}
