/* =============================================
  style.css — Portfólio de Rodolfo Batista de Morais
  
  Índice:
  1. Variáveis & Reset
  2. Tipografia base
  3. Layout (container, sections)
  4. Topbar & Navegação
  5. Hero
  6. Seção: Sobre
  7. Seção: Experiência (timeline)
  8. Seção: Formação
  9. Seção: Habilidades
  10. Seção: Projetos
  11. Seção: Contato
  12. Footer
  13. Utilitários (badges, tags)
  14. Responsivo (mobile)
=============================================== */


/* =============================================
  1. Variáveis & Reset
=============================================== */
:root {
  /* Cores principais — altere aqui para mudar o tema */
  --color-accent:       #2a6dd9;
  --color-accent-light: #e8f0fd;
  --color-text:         #1a1a1a;
  --color-text-muted:   #6b7280;
  --color-border:       #e5e7eb;
  --color-bg:           #ffffff;
  --color-bg-alt:       #f8f9fb;   /* fundo das seções alternadas */

  /* Tipografia */
  --font-sans: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Espaçamentos */
  --section-gap: 5rem;
  --container-width: 760px;

  /* Topbar */
  --topbar-height: 60px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 1rem);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}


/* =============================================
  2. Tipografia base
=============================================== */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 500;
}


/* =============================================
  3. Layout
=============================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-gap) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.section__body {
  font-size: 1rem;
  color: var(--color-text);
  max-width: 600px;
  line-height: 1.8;
}

.placeholder-text {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.95rem;
}


/* =============================================
  4. Topbar & Navegação
=============================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  max-width: 960px; /* topbar um pouco mais larga que o conteúdo */
}

.topbar__brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.brand-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.brand-slash,
.brand-role {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.topbar__nav {
  display: flex;
  gap: 1.75rem;
}

.topbar__nav a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.topbar__nav a:hover {
  color: var(--color-text);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Botão de idioma */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  transition: border-color 0.2s;
}

.lang-toggle:hover {
  border-color: var(--color-accent);
}

.lang-sep {
  color: var(--color-border);
}

/* A opção ativa fica mais escura */
.lang-option.active {
  color: var(--color-text);
  font-weight: 500;
}

/* Hambúrguer (oculto em desktop) */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--color-text);
  transition: all 0.2s;
}

/* Menu mobile */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  gap: 0.25rem;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  font-size: 0.95rem;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}


/* =============================================
  5. Hero
=============================================== */
.hero {
  padding: calc(var(--topbar-height) + 4rem) 0 4rem;
}

.hero__inner {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.hero__avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.hero__name {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.hero__role {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.hero__tagline {
  font-size: 1rem;
  color: var(--color-text);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.hero__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.hero__link svg {
  flex-shrink: 0;
  opacity: 0.6;
}


/* =============================================
  6. Sobre
=============================================== */
.lang-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 3px 10px;
  border-radius: 4px;
}


/* =============================================
  7. Experiência (timeline)
=============================================== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
  padding-left: 1.5rem;
  border-left: 1px solid var(--color-border);
}

.timeline__item {
  position: relative;
}

.timeline__marker {
  position: absolute;
  left: -1.5rem;
  top: 6px;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg-alt);
}

/* Ajuste para seções sem background alternado */
.section:not(.section--alt) .timeline__marker {
  border-color: var(--color-bg);
}

.timeline__content {
  padding-left: 0.5rem;
}

.timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline__role {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

.timeline__company {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.timeline__period {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}

.timeline__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.timeline__list li {
  font-size: 0.9rem;
  color: var(--color-text);
  padding-left: 1rem;
  position: relative;
  line-height: 1.6;
}

.timeline__list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}


/* =============================================
  8. Formação
=============================================== */
.edu-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
}

.edu-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.edu-card__degree {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

.edu-card__institution {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.edu-card__note {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}


/* =============================================
  9. Habilidades
=============================================== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.skills-group__title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.skills-group__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 3px 10px;
  border-radius: 4px;
}

/* Tags de soft skills têm visual levemente diferente */
.tag--soft {
  font-family: var(--font-sans);
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
  padding: 3px 0;
}

.tag--soft::before {
  content: '·  ';
  color: var(--color-border);
}


/* =============================================
  10. Projetos
=============================================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.project-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: var(--color-accent);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.project-card__title {
  font-size: 0.95rem;
  font-weight: 500;
}

.project-card__links {
  display: flex;
  gap: 8px;
}

.project-card__links a {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.project-card__links a:hover {
  color: var(--color-accent);
}

.project-card__desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}


/* =============================================
  11. Contato
=============================================== */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-item:hover {
  color: var(--color-accent);
}

.contact-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}


/* =============================================
  12. Footer
=============================================== */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.footer__built {
  opacity: 0.6;
}


/* =============================================
  14. Responsivo (mobile)
=============================================== */
@media (max-width: 640px) {

  .topbar__nav {
    display: none; /* substituído pelo menu mobile */
  }

  .menu-toggle {
    display: flex;
  }

  /* Topbar em mobile não tem altura fixa definida (cresce com o menu aberto) */
  .topbar {
    height: auto;
    min-height: var(--topbar-height);
  }

  .topbar__inner {
    height: var(--topbar-height);
  }

  .hero {
    padding-top: calc(var(--topbar-height) + 2.5rem);
  }

  .hero__inner {
    flex-direction: column;
    gap: 1.25rem;
  }

  .hero__name {
    font-size: 1.4rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .timeline__header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .footer__inner {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }

  .topbar__brand .brand-name {
    /* Abrevia o nome em telas muito pequenas se quiser */
  }
}
