/* ===== Variáveis (tema dark techy por padrão) ===== */
:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #00e5a0;   /* verde neón */
  --accent-2: #58a6ff; /* azul */
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-sans: "Inter", system-ui, sans-serif;
  --radius: 10px;
  --max: 960px;
}

/* ===== Modo claro ===== */
[data-theme="light"] {
  --bg: #f6f8fa;
  --bg-soft: #ffffff;
  --border: #d0d7de;
  --text: #1f2328;
  --text-muted: #57606a;
  --accent: #0a7d5a;
  --accent-2: #0969da;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

.container { width: 90%; max-width: var(--max); margin: 0 auto; }

.accent { color: var(--accent); }
.accent-2 { color: var(--accent-2); }
a { color: var(--accent-2); text-decoration: none; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .nav { background: rgba(246, 248, 250, 0.85); }
.nav__inner { display: flex; align-items: center; gap: 20px; padding: 14px 0; }
.nav__logo { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--text); }
.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav__links a { font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--accent); }
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; font-size: 16px; padding: 4px 10px; line-height: 1;
}

/* ===== Hero ===== */
.hero { padding: 90px 0 70px; }
.hero__inner { display: flex; align-items: center; gap: 52px; }
.hero__texto { flex: 1; min-width: 0; }
.hero__foto {
  flex-shrink: 0;
  width: 220px; height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 10px rgba(0, 229, 160, 0.07);
}
@media (max-width: 760px) {
  .hero__inner { flex-direction: column-reverse; align-items: flex-start; gap: 32px; }
  .hero__foto { width: 150px; height: 150px; }
}
.hero__hi { font-family: var(--font-mono); color: var(--accent); font-size: 15px; margin-bottom: 14px; }
.hero__name { font-family: var(--font-mono); font-size: clamp(32px, 6vw, 52px); font-weight: 700; line-height: 1.1; }
.hero__role { font-family: var(--font-mono); font-size: clamp(18px, 3vw, 26px); color: var(--text-muted); font-weight: 500; margin: 8px 0 22px; }
.hero__desc { max-width: 500px; color: var(--text-muted); font-size: 17px; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ===== Botões ===== */
.btn {
  font-family: var(--font-mono); font-size: 15px; padding: 11px 22px;
  border-radius: var(--radius); border: 1px solid transparent; transition: all 0.2s; cursor: pointer;
}
.btn--primary { background: var(--accent); color: #0d1117; font-weight: 500; }
.btn--primary:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn--outline { border-color: var(--accent); color: var(--accent); }
.btn--outline:hover { background: rgba(0, 229, 160, 0.1); transform: translateY(-2px); }
.btn--ghost { border-color: var(--border); color: var(--accent-2); }
.btn--ghost:hover { border-color: var(--accent-2); transform: translateY(-2px); }

/* ===== Seções ===== */
.section { padding: 60px 0; border-top: 1px solid var(--border); }
.section__title { font-family: var(--font-mono); font-size: clamp(22px, 4vw, 30px); margin-bottom: 28px; }
.section__subtitle { font-family: var(--font-mono); font-size: 20px; color: var(--text-muted); margin: 40px 0 16px; }
.about p { color: var(--text-muted); max-width: 640px; margin-bottom: 16px; font-size: 17px; }
.about strong { color: var(--text); }

/* ===== Skills ===== */
.skills { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.skills li {
  font-family: var(--font-mono); font-size: 14px; background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px; color: var(--accent);
}

/* ===== Projetos ===== */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 20px; }
@media (max-width: 520px) {
  .projects { grid-template-columns: 1fr; }
}
.card {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px; transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card__icon { font-size: 26px; }
.card__links { display: flex; gap: 8px; flex-wrap: wrap; }
.card__links a {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 13px; color: var(--accent);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 5px 12px; transition: all 0.2s;
}
.card__links a::after { content: "↗"; font-size: 12px; }
.card__links a:hover {
  border-color: var(--accent);
  background: rgba(0, 229, 160, 0.1);
  transform: translateY(-1px);
}
.card__title { font-family: var(--font-mono); font-size: 19px; margin-bottom: 8px; }
.card__desc { color: var(--text-muted); font-size: 15px; margin-bottom: 16px; }
.card__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.card__tags li { font-family: var(--font-mono); font-size: 12px; color: var(--accent-2); }
.card__tags li::before { content: "#"; opacity: 0.6; }

/* --- Screenshot do projeto --- */
.card { overflow: hidden; }
.card__shot {
  display: block;
  width: calc(100% + 44px);
  height: auto;              /* anula o atributo height="540" do <img>, senão o aspect-ratio é ignorado */
  margin: -22px -22px 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease;
}
.card:hover .card__shot { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .card__shot, .card:hover .card__shot { transition: none; transform: none; }
}

/* ===== Outros projetos ===== */
.others { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.others li {
  font-family: var(--font-mono); font-size: 14px; color: var(--text-muted);
  position: relative; padding-left: 20px;
}
.others li::before {
  content: "▸"; position: absolute; left: 0;
  color: var(--accent); opacity: 0.7;
}
.others a {
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.others a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== Contato ===== */
.contato__text { color: var(--text-muted); font-size: 17px; margin-bottom: 24px; max-width: 500px; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer p { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); text-align: center; }

/* ===== Animação de entrada ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
