/* ==========================================================
   1. VARIÁVEIS & DESIGN TOKENS
   ========================================================== */
:root {
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta Light (Corporativo & Tech Sofisticado) */
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.88);
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --navy: #0f2c4c;
  --navy-hover: #1e3a5f;
  --navy-soft: #f1f5f9;
  --link-blue: #2563eb;
  --link-blue-hover: #1d4ed8;
  --footer-bg: #090d16;
  --footer-text: #94a3b8;

  /* Dimensões & Elevação */
  --radius: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --header-h: 72px;
  --container: 1120px;
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Paleta Dark (Visual Técnico souzaa.dev) */
  --bg: #0b101b;
  --bg-alt: #0f172a;
  --bg-card: #131c31;
  --header-bg: rgba(11, 16, 27, 0.88);
  --border: #1e293b;
  --border-hover: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --navy: #38bdf8;
  --navy-hover: #7dd3fc;
  --navy-soft: rgba(56, 189, 248, 0.1);
  --link-blue: #38bdf8;
  --link-blue-hover: #7dd3fc;
  --footer-bg: #05080f;
  --footer-text: #64748b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* ==========================================================
   2. RESET & BASE
   ========================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

body.no-scroll { overflow: hidden; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================
   3. TIPOGRAFIA NATIVA
   ========================================================== */
h1, h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

p {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
}

h3 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

/* ==========================================================
   4. BOTÕES, PILLS & CONTROLES
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-2px); }

.btn--download {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}
.btn--download:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--navy-soft);
}

/* Botão de Alternar Idioma */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.lang-btn:hover {
  border-color: var(--border-hover);
  color: var(--navy);
  transform: translateY(-1px);
}

/* Alternador de Tema */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}
.theme-toggle:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.theme-icon { display: none; }
:root:not([data-theme="dark"]) .theme-icon--sun { display: block; }
[data-theme="dark"] .theme-icon--moon { display: block; }

/* Menu Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================
   5. HEADER & NAVEGAÇÃO
   ========================================================== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header__right { display: flex; align-items: center; gap: 1.25rem; }

.logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.logo span { color: var(--navy); }

.nav__list { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--navy);
  transition: width var(--transition);
}
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

/* ==========================================================
   6. HERO SECTION
   ========================================================== */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 64px) 0 80px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.75rem;
}
.hero__eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.hero__title {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero__subtitle {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.hero__text {
  margin: 1.5rem auto 0;
  max-width: 620px;
  font-size: 1.05rem;
}

.hero__contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--link-blue);
  transition: color var(--transition);
}
.hero__link span {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}
.hero__link .link-arrow {
  flex-shrink: 0;
  transition: transform var(--transition);
}
.hero__link:hover { color: var(--link-blue-hover); }
.hero__link:hover .link-arrow { transform: translate(2px, -2px); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* ==========================================================
   7. SEÇÕES & ESTRUTURA GERAL
   ========================================================== */
.section { padding: 104px 0; }
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 3.5rem;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--navy);
}

.section__title {
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  line-height: 1.2;
}

/* ==========================================================
   8. SOBRE
   ========================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about__text { font-size: 1.1rem; }

.about__facts {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.about__facts li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 1.4rem;
}
.about__facts li + li { border-top: 1px solid var(--border); }

.about__fact-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

.about__fact-value {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

/* ==========================================================
   9. STACK
   ========================================================== */
.stack__subtitle {
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stack-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  max-width: 850px;
  margin: 0 auto;
}

.stack-cloud .badge {
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}
.badge:hover { color: var(--text); border-color: var(--border-hover); }

/* Categorias da Stack */
.badge--lang { border-color: #3b82f6; color: #1d4ed8; }
.badge--data { border-color: #10b981; color: #047857; }
.badge--tool { border-color: #8b5cf6; color: #6d28d9; }
.badge--ai { border-color: #64748b; color: #334155; }
[data-theme="dark"] .badge--lang { color: #60a5fa; }
[data-theme="dark"] .badge--data { color: #34d399; }
[data-theme="dark"] .badge--tool { color: #a78bfa; }
[data-theme="dark"] .badge--ai { color: #94a3b8; }

/* ==========================================================
   10. PROJETOS
   ========================================================== */
.portfolio-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.portfolio-row {
  display: grid;
  grid-template-columns: minmax(260px, 34%) minmax(280px, 1fr) 140px;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  width: 100%;
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.portfolio-row:has(.portfolio-img) {
  grid-template-columns: fit-content(50%) minmax(280px, 1fr) 140px;
  align-items: center;
}

.portfolio-row:first-child { border-top: 1px solid var(--border); }

.portfolio-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

.portfolio-row:has(.portfolio-img) .portfolio-left {
  width: fit-content;
  max-width: 100%;
}

.portfolio-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.portfolio-img {
  width: auto;
  max-width: 100%;
  max-height: 310px;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  object-fit: contain;
}

.portfolio-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.portfolio-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  width: 100%;
}

.portfolio-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.portfolio-tags span { border: 1px solid var(--border); padding: 0.3rem 0.6rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; }

.portfolio-right { display: flex; flex-direction: column; gap: 0.8rem; width: 100%; }
.portfolio-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 4px; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--text); text-transform: uppercase; transition: background 0.2s; white-space: nowrap; }
.portfolio-btn:hover { background: var(--bg-alt); }
.portfolio-btn--primary { background: var(--link-blue); border-color: var(--link-blue); color: #fff; }
.portfolio-btn--primary:hover { background: var(--link-blue-hover); border-color: var(--link-blue-hover); color: #fff; }

@media (max-width: 1024px) {
  .portfolio-row {
    grid-template-columns: minmax(220px, 32%) 1fr 130px;
    gap: 1.5rem;
  }
  .portfolio-row:has(.portfolio-img) {
    grid-template-columns: fit-content(45%) 1fr 130px;
    gap: 1.5rem;
  }
  .portfolio-img {
    max-height: 250px;
  }
}

@media (max-width: 768px) {
  .portfolio-row,
  .portfolio-row:has(.portfolio-img) {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .portfolio-row:has(.portfolio-img) .portfolio-left {
    width: 100%;
  }
  .portfolio-img {
    max-height: 280px;
  }
  .portfolio-right { flex-direction: row; }
  .portfolio-btn { width: auto; flex: 1; }
}

/* ==========================================================
   10. CONTATO
   ========================================================== */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact__title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-top: 0.35rem;
  margin-bottom: 1rem;
}

.contact__text {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 440px;
}

.contact__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.contact__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0.5rem;
  border-bottom: 1px solid var(--border);
  transition: padding-left var(--transition), background-color var(--transition), border-color var(--transition);
}

.contact__item:hover {
  padding-left: 1rem;
  background: var(--tag-bg);
}

.contact__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

.contact__value {
  font-weight: 500;
  color: var(--navy);
  font-size: 0.95rem;
  word-break: break-word;
  text-align: right;
  transition: color var(--transition);
}

.contact__item:hover .contact__value {
  color: var(--accent);
}

/* ==========================================================
   11. FOOTER
   ========================================================== */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 0.9rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.footer__copy {
  color: var(--footer-text);
  font-size: 0.85rem;
  justify-self: start;
}

.footer__top {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--footer-text);
  justify-self: center;
  white-space: nowrap;
  transition: color var(--transition), transform var(--transition);
}
.footer__top:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.footer__socials {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.65rem;
}

.footer__social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background-color var(--transition), transform var(--transition);
}
.footer__social-btn:hover {
  color: var(--navy);
  border-color: var(--navy);
  transform: translateY(-2px);
}

/* ==========================================================
   12. ANIMAÇÕES (REVEAL)
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   13. RESPONSIVIDADE
   ========================================================== */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 24px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .nav__link { font-size: 1.05rem; }
  .hero { min-height: auto; padding: calc(var(--header-h) + 40px) 0 60px; }
  .section { padding: 80px 0; }

  .footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }
  .footer__copy { justify-self: center; text-align: center; }
  .footer__socials { justify-self: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero__contacts { gap: 0.75rem 1.25rem; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .contact__item { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .contact__value { text-align: left; }
}
