/* ═══════════════════ RESET & BASE ═══════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  color: #111;
  background-color: #fff;
  overflow-x: hidden; /* Fix responsividade */
}

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

/* Ensure any large inline elements wrap and don't force horizontal scroll */
.cv-page,
.container,
.experience-list,
.experience-box,
.formation-content {
  box-sizing: border-box;
  max-width: 100%;
  word-break: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

@media (max-width: 767px) {
  .container {
    padding: 0 1.5rem;
  }
}

.cv-topbar {
  margin-top: 0;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* ═══════════════════ HEADER NAV & LANG SWITCHER ═══════════════════ */

.cv-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.8rem;
  border: 1px solid #4f4f4f;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #fff;
  color: #4f4f4f;
  font-size: 14px;
  border: none !important;
  background-color: #eaeaea !important;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: background 0.3s;
}

.cv-links a {
  color: #111;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.lang-btn:hover {
  color: #111;
}

.lang-btn.active {
  color: #fff;
  background: #111;
}

@media (max-width: 720px) {
  .cv-back-button {
    grid-column: 1;
    width: fit-content;
    border: none !important;
    background-color: #eaeaea !important;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
  }
  .lang-switcher {
    grid-column: 2;
    justify-self: end;
  }
}

/* ═══════════════════ CV CONTENT ═══════════════════ */
.cv-page {
  padding: 0;
}

.cv-section {
  padding: 4rem 0;
}

.cv-experience-section {
  background: #fff;
}

.experience-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.experience-label {
  gap: 0.4rem;
  font-size: clamp(4rem, 6vw, 6rem);
  font-weight: 800;
  line-height: 0.9;
  color: #e6e6e6;
  transform: rotate(-90deg);
  align-self: center;
  justify-self: center;
}

@media (max-width: 720px) {
  .experience-label {
    transform: none;
  }
}

.experience-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.experience-list {
  display: grid;
  gap: 1.5rem;
}

.experience-item {
  display: grid;
  align-items: start;
}

.experience-date {
  color: #7f7f7f;
  font-size: 0.92rem;
  line-height: 1.75;
  white-space: nowrap;
}

.experience-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  background: #f8f8f8;
  border: 1px solid #e3e4e6;
  border-radius: 24px;
  padding: 1.75rem;
  min-height: 180px;
  position: relative;
}

.experience-box p {
  line-height: 1.4;
}

.experience-box::before {
  content: "";
  position: absolute;
  top: 1.9em;
  left: -0.55rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #247bff;
}

.experience-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.experience-company {
  font-size: 1rem;
  margin: 0;
  color: #111;
}

.experience-role {
  color: #202020;
  font-weight: 700;
  font-size: 1rem;
}

.experience-text {
  color: #4d4d4d;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.experience-tags span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.85rem;
  border-radius: 6px;
  background: #d8d8d8;
  color: #333;
  font-size: 0.82rem;
  font-weight: 600;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.experience-tags span:hover {
  background: #c7c7c7;
}

.cv-formation-section {
  background: #131313;
  color: #fff;
  position: relative;
}

.formation-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.formation-label {
  gap: 0.3rem;
  color: #4f4f4f;
  font-size: clamp(4rem, 6vw, 6rem);
  font-weight: 800;
  line-height: 0.9;
  transform: rotate(-90deg);
  align-self: center;
  justify-self: center;
}

@media (max-width: 720px) {
  .formation-label {
    transform: none;
  }
}

.formation-content {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.formation-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.formation-card {
  position: relative;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 1.8rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

.formation-card::before {
  content: "";
  position: absolute;
  top: 1.75rem;
  left: 0;
  width: 4px;
  height: 40px;
  background: #247bff;
  border-radius: 999px;
}

.card-type {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #247bff;
}

.formation-card strong {
  font-size: 1.05rem;
  line-height: 1.4;
  color: #fff;
}

.card-school {
  color: #7a7a7a;
  font-size: 0.85rem;
}

.formation-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.formation-list,
.formation-languages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-title {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #247bff;
}

.list-title::before {
  content: "📘";
  font-size: 1rem;
}

.formation-languages .list-title::before {
  content: "🌐";
}

.formation-list ul,
.formation-languages ul {
  display: grid;
  gap: 0.9rem;
}

.formation-list li,
.formation-languages li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  color: #b8b8b8;
  font-size: 0.95rem;
}

.formation-list li strong,
.formation-languages li strong {
  color: #fff;
  font-weight: 600;
  grid-row: 1;
}

.formation-list li span:nth-child(2) {
  color: #7a7a7a;
  display: inline-block;
}

.formation-list li span:last-child {
  color: #7a7a7a;
  grid-row: 1;
  font-size: 0.9rem;
}

.formation-languages li span:last-child {
  color: #7a7a7a;
  grid-row: 1;
  font-size: 0.95rem;
}

.cv-contact-section {
  background: #050505;
  color: #fff;
  padding: 5rem 0 2rem;
  position: relative;
}

.cv-contact-section::before {
  content: "";
  position: absolute;
  top: -1.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: #247bff;
  box-shadow: 0 0 0 0.35rem rgba(36, 123, 255, 0.15);
  z-index: 9999;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
  padding: 1rem;
  width: 100%;
}

.contact-copy p {
  color: #e2e2e2;
  line-height: 1.3;
  /* Fix responsividade clamp: */
  font-size: clamp(1.2rem, 4vw, 2rem);
  text-align: center;
  padding: 0;
}
.contact-copy p span {
  color: greenyellow;
  font-weight: bold;
}

.contact-info p {
  /* Fix responsividade clamp: */
  font-size: clamp(1.2rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  width: 100%;
}

.contact-info p + p {
  margin-top: 0.65rem;
}

.contact-footer {
  padding-top: 2rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: #6d6d6d;
  font-size: 0.95rem;
  text-align: center;
}

@media (max-width: 1024px) {
  .experience-grid,
  .formation-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .formation-cards {
    grid-template-columns: 1fr;
  }
  .experience-item {
    grid-template-columns: 1fr;
  }

  /* Ensure experience boxes stack on narrower widths to avoid overflow */
  .experience-box {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    padding: 1.25rem !important;
  }
}

@media (max-width: 720px) {
  .experience-label,
  .formation-label {
    font-size: 3.2rem;
    white-space: nowrap;
    overflow: visible;
  }
  .experience-item {
    grid-template-columns: 1fr;
  }
  .formation-card {
    padding: 1.5rem;
  }
  .contact-grid {
    gap: 2rem;
  }
}

/* Prevent section labels and footer email from breaking on desktop */
@media (min-width: 721px) {
  .experience-label,
  .formation-label {
    white-space: nowrap;
    overflow: visible;
  }
  .contact-info p {
    white-space: nowrap;
    overflow: visible;
  }
}

/* Make the blue bullet visible on mobile: place it inside the box area */
@media (max-width: 720px) {
  .experience-box {
    /* restore original padding so the pseudo-element sits outside the box */
    padding-left: 1.75rem !important;
    overflow: visible; /* allow the bullet to render outside the box */
  }
  .experience-box::before {
    left: -0.55rem;
    top: 1.9em;
    width: 20px;
    height: 20px;
  }
}

.cv-back-button:hover {
  background-color: #dcdcdc !important;
}

.experience-title {
  transition: color 0.3s ease;
}
.formation-title {
  transition: color 0.3s ease;
}
.list-title {
  transition: color 0.3s ease;
}

.experience-title:hover,
.formation-title:hover,
.list-title:hover,
.experience-item:hover .experience-title,
.formation-grid > div:hover .formation-title,
.experience-item:hover .experience-company {
  color: #247bff !important;
}

/* Alinhamento Perfeito do Menu do Currículo */

.cv-links a,
.cv-back-button,
.btn-primary.btn-sm {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  text-decoration: none !important;
  line-height: 1 !important;
  height: 38px !important;
  box-sizing: border-box !important;
}

.lang-switcher {
  display: flex !important;
  align-items: center !important;
  height: 38px !important;
}

.btn-primary:hover {
  background: rgba(15, 15, 15, 0.8) !important;
}

/* Correção Logo Idêntica à Home */

/* Alinhamento Perfeito do Menu do Currículo */
.cv-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 1.5rem !important;
  height: 60px !important;
  padding: 0 !important;
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

.cv-links {
  display: flex !important;
  align-items: center !important;
  gap: 1.5rem !important;
  margin: 0 !important;
  height: 100% !important;
}

.cv-links a,
.cv-back-button,
.btn-primary.btn-sm {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  text-decoration: none !important;
  line-height: 1 !important;
  height: 38px !important;
  box-sizing: border-box !important;
}

.cv-back-button {
  border: none !important;
  background-color: #eaeaea !important;
  padding: 0 1.2rem !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  color: #333 !important;
  transition: background 0.3s !important;
  font-size: 0.85rem !important;
}
.cv-back-button:hover {
  background-color: #dcdcdc !important;
}

.lang-switcher {
  display: flex !important;
  align-items: center !important;
  height: 38px !important;
}

/* Botão Solicitar Orçamento igual ao da Home */
.btn-primary {
  background: #0f0f0f !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 0.75rem !important;
  padding: 0 1.5rem !important;
  transition: background 0.3s !important;
  font-family: "Inter", sans-serif !important;
}
.btn-primary:hover {
  background: rgba(15, 15, 15, 0.8) !important;
}

/* Padronização do arredondamento dos botões solicitada (4px) */
.btn-primary,
.btn-outline,
.cv-back-button,
.lang-btn,
.contact-email {
  border-radius: 4px !important;
}

/* Estilização dos textos do menu da página currículo igual aos textos do menu da home */
.cv-links a:not(.btn-primary),
.cv-back-button {
  font-family: "Inter", sans-serif !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #666666 !important;
  transition: all 0.3s !important;
  border: none !important;
  font-weight: 500 !important;
}

.cv-links a:not(.btn-primary) {
  background: transparent !important;
  padding: 0 !important;
}

.cv-links a:not(.btn-primary):hover {
  color: #0f0f0f !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.cv-back-button {
  background: #eaeaea !important;
  padding: 0 1.2rem !important;
  color: #333333 !important;
}

.cv-back-button:hover {
  background: #dcdcdc !important;
  color: #0f0f0f !important;
}

/* Ensure the language buttons and "Solicitar Orcamento" are aligned properly */
.cv-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2rem !important; /* Espaçamento entre os itens */
}

.cv-links {
  display: flex !important;
  align-items: center !important;
  gap: 1.5rem !important;
}

.cv-nav .logo {
  margin-right: auto !important; /* This pushes everything else to the right */
}

/* Hover efeito educação */
.formation-card strong,
.formation-card .card-school {
  transition: color 0.3s ease;
}
.formation-card:hover strong {
  color: #247bff !important;
}

/* MOBILE HEADER FIXES */
.cv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #111;
}

@media (max-width: 768px) {
  .cv-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .lang-switcher {
    grid-column: 1 / -1;
    order: -1;
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .cv-links {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
  }

  .cv-links.active {
    display: flex;
  }

  .cv-back-button {
    display: none;
  }
}

/* Fine adjustments: align hamburger in mobile and add desktop spacing */
@media (max-width: 767px) {
  /* Ensure site-header nav centers items and hamburger aligns with center */
  #site-header nav {
    align-items: center !important;
  }

  #site-header .menu-toggle {
    align-self: center !important;
    margin-top: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    height: auto !important;
  }

  #site-header .menu-toggle span {
    height: 2px !important;
    width: 24px !important;
    background: var(--fg, #111) !important;
    display: block !important;
  }
}

/* Force language buttons vertically centered inside header-actions on mobile */
@media (max-width: 767px) {
  #site-header .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  #site-header .lang-switcher {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    margin: 0 !important;
  }

  #site-header .lang-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 32px !important;
    line-height: 1 !important;
    padding: 0.25rem 0.45rem !important;
    font-size: 0.75rem !important;
    box-sizing: border-box !important;
  }

  /* ensure hamburger aligns with the language buttons baseline/center */
  #site-header .menu-toggle {
    align-self: center !important;
    margin: 0 !important;
  }
}

@media (min-width: 768px) {
  /* Add a bit of spacing between fixed header and the experience section on desktop */
  .cv-experience-section {
    margin-top: 3.5rem;
  }
}

/* Small mobile tweaks to match home header appearance */
@media (max-width: 767px) {
  /* Make menu toggle look like home */
  #site-header .menu-toggle {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    width: 24px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
  }

  #site-header .menu-toggle span {
    display: block !important;
    height: 2px !important;
    background: var(--fg, #111) !important;
    width: 100% !important;
  }

  /* Match language button sizing from home */
  #site-header .lang-btn {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.7rem !important;
  }
}

/* Experience box: single-column layout on small screens */
@media (max-width: 768px) {
  .experience-box {
    grid-template-columns: 1fr !important;
    padding: 1rem !important;
    min-height: auto !important;
    gap: 0.75rem !important;
  }

  .experience-card-header {
    margin-bottom: 0.25rem !important;
    display: block !important;
  }

  .experience-company {
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.25rem !important;
  }

  .experience-role {
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
    font-weight: 600 !important;
  }

  .experience-text {
    margin-bottom: 0.5rem !important;
  }

  .experience-tags {
    margin-top: 0.5rem !important;
  }
}
