/* =========================================================
   style.css – Site pessoal Marcelo T. Yamashita – IFT-UNESP
   ========================================================= */

/* ---------- Reset simples ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---------- Tipografia e corpo ---------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #222222;
    line-height: 1.6;
}

/* Limita a largura e centraliza o conteúdo principal */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem 1.5rem;
}

/* ---------- Cabeçalho principal (páginas index) ---------- */
header {
    background-color: #003f7d; /* azul institucional aproximado */
    color: #ffffff;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    margin-bottom: 1.5rem;
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Layout da foto + textos no topo */
.header-flex {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.foto-perfil img {
    width: 140px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    display: block;
}

.header-textos {
    flex: 1;
}

header h1 {
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

header h2 {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Links rápidos (ORCID / Scholar / BibTeX) */
.perfis-rapidos {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    opacity: 0.95;
}

.perfis-rapidos a {
    color: #fffa;
    text-decoration: none;
}

.perfis-rapidos a:hover,
.perfis-rapidos a:focus {
    text-decoration: underline;
}

.perfis-rapidos span {
    margin: 0 0.25rem;
    color: #fffa;
}

/* Seletor de idioma */
.idiomas {
    margin-top: 0.4rem;
}

.idiomas a {
    color: #fffa;
    font-size: 0.85rem;
    text-decoration: none;
}

.idiomas a:hover {
    text-decoration: underline;
}

/* ---------- Navegação ---------- */
nav {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0.3rem;
}

nav ul {
    list-style: none;
    max-width: 1000px;
    margin: 0.3rem auto 0.5rem auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 0.35rem 0.7rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: #ffffff;
    border-radius: 4px;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

nav a:hover,
nav a:focus {
    background-color: rgba(255, 255, 255, 0.18);
}

/* =========================================================
   IMPORTANTE (mobile)
   Você não está usando o checkbox/label do “menu” no HTML.
   Então, em telas pequenas, NÃO escondemos a lista do nav.
   ========================================================= */

/* Mantidos apenas por compatibilidade (não aparecem) */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
}

/* ---------- Seção de introdução ---------- */
#intro {
    max-width: 1000px;
    margin: 0 auto 1.5rem auto;
    padding: 1.25rem 1.5rem;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#intro p {
    margin-bottom: 0.2rem;
}

#intro p:first-child {
    font-size: 1rem;
}

/* ---------- Seções gerais ---------- */
section {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

section h3 {
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3rem;
}

section h4 {
    font-size: 1rem;
    margin-top: 0.7rem;
    margin-bottom: 0.4rem;
}

section p {
    margin-bottom: 0.5rem;
}

section ul {
    margin-left: 1.1rem;
    margin-bottom: 0.5rem;
}

section li {
    margin-bottom: 0.2rem;
}

/* Link secundário dentro de seções (ex: "ver lista completa") */
.link-secundario {
    margin-top: 0.7rem;
}

.link-secundario a {
    font-size: 0.9rem;
}

/* ---------- Links em geral ---------- */
a {
    color: #005bb5;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

/* ---------- Contato ---------- */
#contato p {
    margin-bottom: 0.25rem;
}

/* ---------- Rodapé ---------- */
footer {
    border-top: 1px solid #dddddd;
    padding: 0.8rem 1.5rem 1.2rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #666666;
    background-color: #f0f0f0;
}

/* =================================================================
   Estilos adicionais para páginas internas (research.html / divulgacao.html)
   ================================================================= */

/* Cabeçalho simplificado das subpáginas */
body.page-publications header.subpage-header,
body.page-outreach header.subpage-header {
    background-color: transparent;
    color: #222222;
    padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #dddddd;
}

.subpage-header h1 {
    max-width: 1000px;
    margin: 0 auto 0.3rem auto;
    font-size: 1.6rem;
}

.subpage-header p {
    max-width: 1000px;
    margin: 0 auto 0.3rem auto;
    font-size: 0.95rem;
    color: #444444;
}

.subpage-header .back-link {
    max-width: 1000px;
    margin: 0.4rem auto 0 auto;
    font-size: 0.9rem;
}

.subpage-header .back-link a {
    color: #005bb5;
}

/* Conteúdo mais estreito nas subpáginas */
.content-narrow {
    max-width: 900px;
    margin: 0 auto 3rem auto;
    padding: 0 1.5rem;
}

/* Lista de publicações / textos por ano */
.pub-list {
    list-style: none;
    margin: 0 0 0.5rem 0;
    padding: 0;
}

.pub-list li {
    margin-bottom: 0.7rem;
}

.pub-list strong {
    font-weight: 600;
}

.notes {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #555555;
}

/* =================================================================
   Galeria de imagens (palestras, eventos)
   ================================================================= */

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.8rem;
}

.galeria-grid figure {
    background-color: #fafafa;
    border-radius: 4px;
    padding: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.galeria-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
    margin-bottom: 0.4rem;
}

.galeria-grid figcaption {
    font-size: 0.85rem;
    color: #555555;
}

/* =================================================================
   Responsividade
   ================================================================= */

@media (max-width: 768px) {

    header {
        padding: 1rem 1rem 0.5rem 1rem;
    }

    .header-flex {
        flex-direction: row;
        align-items: center;
    }

    header h1 {
        font-size: 1.4rem;
    }

    header h2 {
        font-size: 0.9rem;
    }

    main {
        padding: 0 1rem 2.5rem 1rem;
    }

    section,
    #intro {
        padding: 1rem 1rem;
    }

    /* No mobile, mostra SEMPRE os itens do menu (sem “Menu”/toggle) */
    .nav-toggle-label {
        display: none;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0.4rem auto 0.6rem auto;
        padding-bottom: 0.25rem;
    }

    nav li + li {
        margin-top: 0.15rem;
    }

    nav a {
        padding: 0.55rem 0;
        width: 100%;
    }
}
