@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* ===== VARIÁVEIS DE TEMA DARK ===== */
:root {
  --bg: #0d0d0d;
  --card: #161616;
  --ink: #e6e6e6;
  --muted: #bfbfbf;
  --line: #2f2f2f;
  --accent: #ffffff;
}

/* ===== BASE ===== */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  text-align: center;
  overflow-x: hidden;
}

header {
  padding: 60px 20px;
  animation: fadeIn 1s ease-out;
}

.highlight { color: var(--accent) !important; }

h1, h2 { margin: 10px 0; }

p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* ===== BOTÕES DARK OUTLINE ===== */
.btn {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  background: var(--accent) !important;
  color: #000 !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.primary {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important;
}

.primary:hover {
  background: var(--accent) !important;
  color: #000 !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

/* ===== SKILLS ===== */
.skills-section { padding: 60px 20px; }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-top: 25px;
}

.skill {
  background-color: var(--card);
  padding: 20px 25px;
  border-radius: 12px;
  width: 110px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.skill:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 12px rgba(255,255,255,0.08);
}

.skill i {
  font-size: 42px;
  margin-bottom: 8px;
  display: block;
}

.skill p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ===== PROJETOS ===== */
.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 40px;
}

.project-card {
  background-color: var(--card);
  border-radius: 15px;
  width: 300px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: slideUp 0.8s ease both;
}

.project-card:hover {
  transform: scale(1.04);
  box-shadow: 0 0 15px rgba(255,255,255,0.08);
}

.project-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ===== STACK ICONS ===== */
.stack-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 14px;
}

.stack-icons i {
  font-size: 22px;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.stack-icons i:hover {
  transform: scale(1.2);
  opacity: 1;
}

/* ===== DETALHE DE PROJETO ===== */
.project-detail {
  max-width: 760px;
  margin: 60px auto;
  background-color: var(--card);
  padding: 30px;
  border-radius: 15px;
  text-align: left;
}

.project-detail h2 { text-align: center; margin-top: 0; }
.project-detail p { color: var(--muted); }
.project-detail img { display: block; margin-bottom: 20px; border-radius: 12px; }

/* ===== RODAPÉ ===== */
footer {
  padding: 20px;
  color: #555;
  font-size: 14px;
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--accent);
  white-space: nowrap;
  animation: typing 3s steps(30, end), blink 0.75s step-end infinite;
  display: inline-block;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent); }
}

.fade-in-delayed {
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 0.5s;
}

.slide-up {
  animation: slideUp 1.2s ease both;
}

/* Language switch */
.lang-switch {
  position: fixed;
  top: 12px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 99;
}
.lang-switch .btn {
  padding: 6px 10px;
  border-radius: 6px;
}
.lang-switch .btn.active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 8px rgba(255,255,255,0.15);
}
@media (max-width: 600px) {
  .lang-switch { position: static; margin: 14px 0 -4px; }
}

/* ===== Navbar fixa ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(13,13,13,0.95), rgba(13,13,13,0.7));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-weight: 700; color: var(--ink); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-links a { color: var(--ink); opacity: 0.85; }
.nav-links a:hover { opacity: 1; text-decoration: underline; }
.btn-small { padding: 6px 10px; border-radius: 6px; }

/* ===== Seções ===== */
.section { max-width: 980px; margin: 60px auto; padding: 0 16px; text-align: center; }
.section .muted { color: var(--muted); }

/* ===== Timeline (experiência) ===== */
.timeline { list-style: none; padding: 0; margin: 20px auto; max-width: 720px; text-align: left; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-weight: 600; }
.timeline p { margin: 6px 0 0; }

/* ===== Modal CV ===== */
.modal[aria-hidden="true"] { display: none; }
.modal[aria-hidden="false"] { display: block; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  animation: fadeIn 180ms ease;
}
.modal-content {
  position: fixed; inset: 6% 6% auto 6%;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  display: flex; flex-direction: column; max-height: 88vh;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); animation: slideUp 220ms ease both;
}
.modal-head { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-body { flex: 1; min-height: 60vh; }
.modal-body object { width: 100%; height: 100%; display: block; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

/* ===== Reveals sutis ===== */
.observe { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.observe.reveal { opacity: 1; transform: translateY(0); }

/* Acessibilidade de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ==== Navbar centralizada com logo à esquerda e idioma à direita ==== */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* esquerda | centro | direita */
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(13,13,13,0.95), rgba(13,13,13,0.7));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

/* logo fica na esquerda */
.nav-logo { justify-self: start; font-weight: 700; color: var(--ink); text-decoration: none; }

/* links no centro */
.nav-links {
  justify-self: center;
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav-links a { color: var(--ink); opacity: .9; }
.nav-links a:hover { opacity: 1; text-decoration: underline; }

/* seletor de idioma vai pra direita (e não sobrepõe) */
.lang-switch {
  position: static;           /* deixa de ser fixed */
  justify-self: end;          /* alinha na direita do grid */
  display: flex;
  gap: 8px;
}
.lang-switch .btn { padding: 6px 10px; border-radius: 6px; }

/* espaço extra no topo do hero pra não encostar na navbar */
header.section { padding-top: 72px; }

/* responsivo: em telas pequenas, empilha centro */
@media (max-width: 700px) {
  .nav { grid-template-columns: 1fr auto; grid-template-areas:
        "logo lang" "links links"; row-gap: 8px; }
  .nav-logo { grid-area: logo; }
  .lang-switch { grid-area: lang; }
  .nav-links { grid-area: links; justify-self: center; flex-wrap: wrap; }
}
