/* =========================================================================
   ESTILO.CSS — stylesheet for Walter Valdevino's website
   Layout: fixed sidebar on the left, content on the right,
   whole block centered on the screen.
   ========================================================================= */

/* --- 1. COLOR AND SIZE VARIABLES ---------------------------------------- */
:root {
  --cor-texto:        #1a1a1a;
  --cor-texto-suave:  #555555;
  --cor-texto-fraco:  #8a8a8a;
  --cor-linha:        #e2e2e2;
  --cor-fundo:        #ffffff;
  --cor-fundo-barra:  #fafafa;
  --largura-barra:    250px;
  --largura-texto:    680px;
}

/* --- 2. BASIC RESET ------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--cor-texto);
  background: var(--cor-fundo);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

/* --- 3. GENERAL STRUCTURE (centered container: sidebar + content) ------- */
.container {
  display: flex;
  min-height: 100vh;
  max-width: 1140px;          /* limits total width...            */
  margin: 0 auto;             /* ...and centers it on the screen  */
  border-left: 1px solid var(--cor-linha);
  border-right: 1px solid var(--cor-linha);
}

/* --- 4. SIDEBAR ---------------------------------------------------------- */
.barra {
  width: var(--largura-barra);
  flex-shrink: 0;
  background: var(--cor-fundo-barra);
  border-right: 1px solid var(--cor-linha);
  padding: 40px 28px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;   /* allows pinning social icons to the bottom */
}

/* Profile photo */
.foto {
  width: 150px;             /* enlarged circle */
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 18px;
  border: 1px solid var(--cor-linha);
}

.nome {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 3px;
}

.instituicao {
  text-align: center;
  font-size: 11.5px;
  color: var(--cor-texto-fraco);
  line-height: 1.5;
  margin-bottom: 32px;
}

.instituicao a {
  color: var(--cor-texto-suave);
}

.instituicao a:hover {
  color: var(--cor-texto);
}

/* Navigation menu */
.menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu a {
  font-size: 14.5px;
  color: var(--cor-texto-suave);
}

.menu a:hover {
  color: var(--cor-texto);
  text-decoration: none;
}

.menu a.ativo {
  color: var(--cor-texto);
  font-weight: 600;
}

/* Social icons pinned at the bottom of the sidebar */
.social {
  margin-top: auto;         /* pushes the block to the bottom */
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 28px;
}

.social a {
  color: var(--cor-texto-fraco);
  line-height: 0;
}

.social a:hover {
  color: var(--cor-texto);
}

.social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* --- 5. CONTENT AREA ------------------------------------------------------ */
.conteudo {
  flex: 1;
  padding: 56px 48px;
}

.conteudo h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.conteudo h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cor-linha);
}

.conteudo p {
  color: var(--cor-texto-suave);
  margin-bottom: 18px;
  max-width: var(--largura-texto);
}

.destaque {
  font-size: 16px;
  color: var(--cor-texto) !important;
  line-height: 1.7;
}

/* --- 6. BUTTON (e.g. CV download) ---------------------------------------- */
.botao {
  display: inline-block;
  font-size: 14px;
  color: var(--cor-texto);
  border: 1px solid #c9c9c9;
  border-radius: 6px;
  padding: 9px 18px;
  margin-top: 6px;
}

.botao:hover {
  background: var(--cor-fundo-barra);
  text-decoration: none;
  border-color: #999;
}

/* --- 7. LISTS ------------------------------------------------------------- */
.lista {
  list-style: none;
  max-width: var(--largura-texto);
}

.lista li {
  padding: 14px 0;
  border-bottom: 1px solid var(--cor-linha);
  color: var(--cor-texto-suave);
  font-size: 15px;
}

.lista li:last-child {
  border-bottom: none;
}

.lista .ano {
  color: var(--cor-texto-fraco);
  font-size: 13px;
  margin-right: 4px;
}

/* Publications list (verbatim entries, separated by lines) */
.pub {
  max-width: var(--largura-texto);
}

.pub p {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cor-linha);
  word-break: break-word;   /* long URLs wrap instead of overflowing */
}

.pub p:last-child {
  border-bottom: none;
}

.pub img {
  max-width: 280px;
  height: auto;
  display: block;
  margin: 10px 0;
  border: 1px solid var(--cor-linha);
}

/* Separator used in the Slides page ("***") */
.sep {
  text-align: left;
  color: var(--cor-texto-fraco);
  letter-spacing: 0.3em;
}

/* --- 8. FOOTER ------------------------------------------------------------ */
.rodape {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--cor-linha);
  font-size: 12.5px;
  color: var(--cor-texto-fraco);
}

/* --- 9. RESPONSIVE (mobile) ----------------------------------------------- */
@media (max-width: 720px) {
  .container {
    flex-direction: column;
    border-left: none;
    border-right: none;
  }
  .barra {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--cor-linha);
    padding: 28px 24px;
  }
  .foto {
    width: 104px;
    height: 104px;
    margin-bottom: 12px;
  }
  .instituicao {
    margin-bottom: 20px;
  }
  .menu {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
  }
  .social {
    margin-top: 0;
    padding-top: 20px;
  }
  .conteudo {
    padding: 36px 24px;
  }
}

/* --- 10. COURSE (EMENTA) PAGES ------------------------------------------- */
.voltar {
  font-size: 13px;
  margin-bottom: 8px;
}

.voltar a {
  color: var(--cor-texto-fraco);
}

.ementa {
  max-width: var(--largura-texto);
  font-size: 15px;
}

.ementa p {
  color: var(--cor-texto-suave);
  margin-bottom: 16px;
  word-break: break-word;
}

.ementa strong {
  color: var(--cor-texto);
}

.ementa ul, .ementa ol {
  color: var(--cor-texto-suave);
  margin: 0 0 16px 20px;
}

.ementa li {
  margin-bottom: 6px;
}

.ementa img {
  max-width: 100%;
  height: auto;
  margin: 12px 0;
}

/* Course list: each item with title + term on its own line */
.cursos {
  list-style: none;
  max-width: var(--largura-texto);
}

.cursos li {
  padding: 12px 0;
  border-bottom: 1px solid var(--cor-linha);
  font-size: 15px;
}

.cursos li:last-child {
  border-bottom: none;
}
