:root {
  --accent: #1F4E5F;
  --accent-light: #2a6b80;
  --accent-soft: #e8f0f2;
  --bg: #F7F6F5;
  --surface: #ffffff;
  --text: #1a1e21;
  --text-muted: #5a646b;
  --border: #e3e0de;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(31,78,95,.08), 0 8px 24px rgba(31,78,95,.06);
  --shadow-hover: 0 4px 12px rgba(31,78,95,.14), 0 16px 40px rgba(31,78,95,.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* i18n: alterna PT/EN via classe no <html> */
.en-only, html.en .pt-only { display: none; }
html.en .en-only { display: revert; }

/* ===== Nav ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-weight: 700; font-size: 1.05rem; color: var(--accent); text-decoration: none; }
.nav-links { display: flex; gap: 28px; align-items: center; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: .92rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.lang-toggle {
  display: flex; border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; font-size: .8rem; font-weight: 600; cursor: pointer;
  background: var(--surface);
}
.lang-toggle button {
  padding: 5px 12px; border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); font-weight: 600; font-size: .8rem; transition: all .2s;
}
.lang-toggle button.active { background: var(--accent); color: #fff; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger svg { display: block; }

/* ===== Hero ===== */
.hero {
  max-width: 1080px; margin: 0 auto; padding: 148px 24px 72px;
  display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center;
}
.hero-photo {
  width: 240px; height: 254px; object-fit: cover;
  border-radius: 20px; box-shadow: var(--shadow-hover);
  border: 4px solid #fff;
}
.hero-eyebrow {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-size: .8rem; font-weight: 600; padding: 6px 14px; border-radius: 20px;
  margin-bottom: 18px; letter-spacing: .02em;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 18px; }
.hero h1 span { color: var(--accent); }
.hero-lead { font-size: 1.12rem; color: var(--text-muted); max-width: 560px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  text-decoration: none; transition: all .2s; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); }
.btn-outline { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.hero-meta { display: flex; gap: 20px; margin-top: 28px; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .88rem; }
.hero-meta svg { color: var(--accent); flex-shrink: 0; }

/* ===== Sections ===== */
section { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }
.section-label {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 8px;
}
.section-title { font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 12px; }
.section-intro { color: var(--text-muted); max-width: 640px; margin-bottom: 36px; }

/* ===== Projects ===== */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: all .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #cdd8db; }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--accent);
}
.card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 4px; }
.card-sub { font-size: .85rem; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.card p { font-size: .92rem; color: var(--text-muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
}

/* ===== Experience ===== */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 32px;
  padding: 28px 0; border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-period { color: var(--accent); font-weight: 600; font-size: .9rem; }
.timeline-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.timeline-body .role-org { color: var(--text-muted); font-size: .9rem; margin-bottom: 12px; }
.timeline-body ul { list-style: none; }
.timeline-body li {
  position: relative; padding-left: 20px; margin-bottom: 8px;
  font-size: .93rem; color: var(--text-muted);
}
.timeline-body li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ===== Skills ===== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.skill-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.skill-block h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 14px; }

/* ===== Services ===== */
.services-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.service-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; font-size: .93rem; font-weight: 500;
}
.service-item svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* ===== Education / languages ===== */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* ===== Contact ===== */
.contact-card {
  background: var(--accent); color: #fff; border-radius: 20px;
  padding: 52px 40px; text-align: center;
}
.contact-card h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; }
.contact-card p { color: rgba(255,255,255,.85); max-width: 520px; margin: 0 auto 32px; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact-links .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.contact-links .btn:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.contact-links .btn-light { background: #fff; color: var(--accent); border-color: #fff; }
.contact-links .btn-light:hover { background: var(--accent-soft); }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border); padding: 28px 24px;
  text-align: center; color: var(--text-muted); font-size: .85rem;
}
footer a { color: var(--accent); text-decoration: none; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; text-align: center; }
  .hero-photo { width: 180px; height: 190px; margin: 0 auto; order: -1; }
  .hero-cta, .hero-meta { justify-content: center; }
  .projects-grid, .skills-grid, .services-list, .edu-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: #fff; padding: 20px 24px;
    border-bottom: 1px solid var(--border); gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
}
