/* Reset e Variáveis */
:root {
    --content-width: 90%;
    --max-content-width: 1400px;
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --page-padding: 40px; /* Novo: padding das páginas */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

p {
  text-align: justify;
  text-indent: 1.5em;
  line-height: 1.5; /* Melhora legibilidade entre linhas */
}

body {
    /* Fontes matemáticas/acadêmicas mais sóbrias */
    font-family: 'Charter', 'Bitstream Charter', 'Sitka Text', Cambria, serif;;
    line-height: 1.7;
    color: var(--text-color);
    background-color: #fff;
}

/* Alternativa: Para uma fonte mais moderna mas ainda acadêmica, use: */
/* font-family: 'Charter', 'Bitstream Charter', 'Sitka Text', Cambria, serif; */

/* Ou para algo mais próximo de LaTeX: */
/* font-family: 'Latin Modern Roman', 'Computer Modern', Georgia, serif; */

/* Header */
#main-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: var(--max-content-width);
    margin: 0 auto;
    text-align: center;
    padding: 0 var(--page-padding);
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-content h1 a {
    color: white;
    text-decoration: none;
}

.header-content .tagline {
    font-size: 1.05rem;
    opacity: 0.9;
    font-style: italic;
}

#main-header nav {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
}

#main-header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--page-padding);
}

#main-header nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    font-size: 1.05rem;
}

#main-header nav a:hover {
    opacity: 0.7;
}

/* Seção de Introdução */
.intro-section {
    max-width: var(--max-content-width);
    margin: 3rem auto;
    padding: 0 var(--page-padding);
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.intro-text h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.intro-text p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

.intro-image {
    text-align: center;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow);
    background: var(--light-bg);
    margin-bottom: 1.5rem;
}

.social-links h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.social-links ul {
    list-style: none;
}

.social-links li {
    margin-bottom: 0.5rem;
}

.social-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Seção de Posts */
.posts-section {
    max-width: var(--max-content-width);
    margin: 4rem auto;
    padding: 0 var(--page-padding);
}

.posts-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
}

.post-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.post-category {
    color: var(--accent-color);
    font-weight: 500;
}

.post-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.post-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-card h3 a:hover {
    color: var(--accent-color);
}

.post-card p {
    color: #666;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--primary-color);
}

/* Seção de Categorias */
.categories-section {
    background: var(--light-bg);
    padding: 3rem var(--page-padding);
    margin-top: 4rem;
}

.categories-section h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.categories-grid {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.category-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.category-card p {
    color: #666;
}

/* Footer */
#main-footer {
    background: var(--secondary-color);
    color: white;
    padding: 2rem var(--page-padding);
    margin-top: 4rem;
}

.footer-content {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --page-padding: 20px;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    #main-header nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Artigo Individual */
.article-content {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 var(--page-padding);
}

.article-header {
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.article-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    font-size: 1.05rem;
}

.article-content h3 {
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

/* MathJax styling */
.article-content .MathJax {
    overflow-x: auto;
    overflow-y: hidden;
}

/* Páginas de Categoria */
.category-intro {
    background: var(--light-bg);
    padding: 3rem var(--page-padding);
    border-bottom: 3px solid var(--accent-color);
}

.category-intro-content {
    max-width: var(--max-content-width);
    margin: 0 auto;
}

.category-intro-content h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.category-intro-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    text-align: justify;
}

nav a.active {
    text-decoration: underline;
    font-weight: 600;

}

