/* Estilo compartilhado das páginas de perfil geradas por scripts/gerar_perfis.py.
   Baseado em arnaldo-perfil.html. */

img {
  opacity: 0.8 !important;
}

* {
  font-family: "Roboto Mono", monospace !important;
}

:root {
  --bg-color: #f5f2e6;
  --text-main: #2b2b2b;
  --text-highlight: #8a0e14;
  --accent: #a8080e;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Roboto Mono', monospace;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  /* .red-banner-section is 100vw wide, which includes the scrollbar */
  overflow-x: hidden;
}

/* Header */
.global-header {
  background-color: var(--text-highlight);
  padding: 15px 40px;
  display: flex;
  justify-content: flex-end;
  gap: 40px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.global-header a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.global-header a:hover {
  opacity: 0.7;
}

/* Container */
.profile-container {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

p {
  font-size: 20px;
  margin: 0;
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

.highlight-bold {
  color: var(--text-highlight);
  font-weight: 700;
}

/* Source line at the end of the profile */
/* Same look as the quote attribution (.quote-author) */
.source-note {
  font-size: 16px;
  color: var(--text-highlight);
  font-style: normal;
}

.source-note a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.highlight-bg,
.highlight-black-bg {
  display: inline;
  color: #f5f2e6 !important;
  font-weight: 700 !important;
  padding: 3px 8px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.highlight-bg {
  background-color: var(--text-highlight);
}

.highlight-black-bg {
  background-color: #000000;
}

/* Hero */
.hero-section {
  display: flex;
  flex-direction: column;
  margin: 40px 0;
  width: 100%;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.hero-photo {
  width: 32%;
  max-width: 320px;
  flex-shrink: 0;
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-header-right {
  margin-left: -6%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  min-width: 0;
}

/* --title-chars: tamanho da maior linha do nome, definido em cada página */
.hero-title {
  font-size: min(150px, calc(((min(100vw, 1100px) - 60px) * 0.64 / var(--title-chars, 10) - 2px) / 0.6));
  line-height: 0.95;
  color: var(--text-highlight);
  margin: 0;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 2px;
  overflow-wrap: anywhere;
}

.hero-meta-info {
  color: var(--text-main);
  font-size: clamp(14px, 1.6vw, 20px);
  line-height: 1.4;
  margin-top: auto;
  margin-left: calc(6% + 40px);
  padding: 30px 2px 10px;
}

/* Seções de texto */
.text-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 50px;
  margin-top: 60px;
  align-items: start;
}

.section-label {
  margin: 0;
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 2.2;
  position: sticky;
  top: 90px;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-body p {
  font-size: 18px;
  line-height: 1.9;
}

/* Faixa vermelha (conclusão da CNV) */
.red-banner-section {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-color: var(--text-highlight);
  color: #f5f2e6;
  padding: 70px 5vw;
  margin-top: 80px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.red-banner-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
  box-sizing: border-box;
}

.red-banner-section .text-section {
  margin-top: 0;
}

.red-banner-section p {
  color: #f5f2e6;
  opacity: 1;
}

.red-banner-section .section-body p {
  font-weight: 700;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-container>* {
  animation-delay: 0.2s;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .global-header {
    padding: 15px 20px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }

  .profile-container {
    margin: 30px auto;
    padding: 0 20px;
  }

  .hero-photo {
    width: 38%;
  }

  .hero-title {
    font-size: min(150px, calc(((100vw - 40px) * 0.6 / var(--title-chars, 10) - 2px) / 0.6));
  }

  .hero-meta-info {
    margin-left: calc(6% + 16px);
    font-size: 14px;
  }

  .text-section {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
  }

  .section-label {
    position: static;
  }

  .section-body p {
    font-size: 15px;
  }

  .red-banner-section {
    padding: 50px 0;
  }

  .red-banner-container {
    padding: 0 20px;
  }
}

/* Idiomas: i18n.js define <html lang> como pt-br, en ou es; cada texto
   traduzido existe em três blocos [data-l] e só o do idioma atual aparece. */
html:not([lang="en"]):not([lang="es"]) [data-l]:not([data-l="pt"]),
html[lang="en"] [data-l]:not([data-l="en"]),
html[lang="es"] [data-l]:not([data-l="es"]) {
  display: none !important;
}

.section-body > [data-l] {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
