/* ---------- Fontes locais (pasta fonts/ na raiz do projeto) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces/Fraunces-VariableFont_SOFT,WONK,opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --c-black: #0B0B0B;
  --c-gray: #28342A;
  --c-green: #3DE64D;
  --c-white: #F5F5F5;
  --c-muted: #9A9A9A;
  --f-title: "Fraunces", Georgia, serif;
  --f-body: "Poppins", system-ui, sans-serif;
  --header-h: 72px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--f-body);
  line-height: 1.6;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}

/* Layer 0: fundo geral do site, fixo atrás de todo o conteúdo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../img/BACKGROUND_ESCURO_BASEGERAL.png") center / cover no-repeat;
}

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

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--c-green);
  color: var(--c-black);
}
.skip-link:focus { left: 8px; }

:focus-visible {
  outline: 3px solid var(--c-green);
  outline-offset: 3px;
}

/* ---------- Header fixo (sempre visível) ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(11, 11, 11, .92);
  backdrop-filter: blur(8px);
}

.header-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 40px;
  width: auto;
}

.site-nav ul {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--c-white);
  transition: color .2s;
}
.site-nav a:hover { color: var(--c-green); }
.site-nav a.is-active { color: var(--c-green); }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--c-green);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--c-white);
}

/* ---------- Hero: capa com logotipo sobreposto à esquerda ---------- */
.hero {
  margin-top: var(--header-h);
}

/* Wrapper com a largura da capa: a logo usa % e escala junto com a foto */
.hero-stack {
  position: relative;
  width: 100%;
  line-height: 0;
}

.hero-photo {
  width: 100%;
  height: auto;
}

.hero-logo {
  position: absolute;
  left: 6%;
  top: 14%;
  width: 44%;
  max-width: 520px;
  height: auto;
}

/* ---------- Seções ---------- */
.section {
  padding: clamp(64px, 10vw, 120px) 0;
}

.section--green {
  background: var(--c-green) url("../img/BACKGROUND_VERDE.png") center / cover no-repeat;
  color: var(--c-black);
}

.section-title {
  margin: 0 0 40px;
  font-family: var(--f-title);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: .02em;
  text-align: center;
}

.section--green .section-title { color: var(--c-black); }

/* Justificado, com a última linha centralizada */
.lead {
  max-width: 900px;
  margin: 0 auto 28px;
  font-size: clamp(.95rem, 1.6vw, 1.1rem);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .02em;
  text-align: justify;
  text-align-last: center;
}

.highlight { color: var(--c-green); }

/* ---------- Softwares: 3 colunas x 2 linhas ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 48px auto 0;
  padding: 0;
  list-style: none;
  justify-items: center;
}

.skills-grid img { width: 100%; }

/* ---------- Portfólio: 2x2 ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.project-link {
  display: block;
  transition: transform .25s ease, filter .25s ease;
}

.project-link img { width: 100%; }

.project-link:hover {
  transform: translateY(-4px);
  filter: brightness(1.05);
}

/* ---------- Contato ---------- */
.cta {
  background: var(--c-black) url("../img/BACKGROUND_CONTATOS.png") center / cover no-repeat;
  text-align: center;
}

.cta-inner { padding: clamp(64px, 10vw, 120px) 0; }

.cta-title {
  margin: 0 0 24px;
  font-family: var(--f-title);
  font-weight: 800;
  line-height: 1.05;
}

.cta-kicker {
  display: block;
  font-family: var(--f-body);
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 500;
  color: var(--c-gray);
}

.cta-brand {
  display: block;
  font-size: clamp(2.6rem, 7vw, 5rem);
  color: var(--c-green);
}

.cta-sub a {
  font-size: clamp(.95rem, 1.6vw, 1.1rem);
  font-weight: 600;
  color: var(--c-gray);
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}

/* ---------- Rodapé ---------- */
.site-footer {
  padding: 24px 0;
  text-align: center;
  font-size: .8rem;
  color: var(--c-muted);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.back-to-top {
  display: inline-block;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--c-green);
  text-decoration: none;
}

/* ---------- Responsivo ---------- */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 16px 0;
    background: var(--c-black);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .hero-logo {
    left: 6%;
    top: 12%;
    width: 56%;
  }
}

@media (max-width: 480px) {
  .skills-grid { gap: 16px; }
  .projects { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}