/* ============================================================
   ESTILOS MODERNOS DA PÁGINA INICIAL (HOME / FEED ACADÊMICO)
   Layout em 2 Colunas (Sidebar de Perfil + Feed Principal)
   ============================================================ */

.home-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    height: auto !important;
    text-align: left !important;
    padding: 0 !important;
}

/* Container de Topo (Navbar) */
.site-header {
    width: 100%;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(229, 57, 53, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.theme-dark .site-header {
    background: rgba(28, 30, 33, 0.9);
}

body.theme-light .site-header {
    background: rgba(245, 245, 245, 0.9);
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    color: #e53935;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

body.theme-dark .nav-menu a {
    color: #d1d5db;
}

body.theme-dark .nav-menu a:hover {
    color: #ef5350;
}

body.theme-light .nav-menu a {
    color: #4b5563;
}

body.theme-light .nav-menu a:hover {
    color: #e53935;
}

/* Layout Principal de 2 Colunas */
.main-wrapper {
    max-width: 1200px;
    width: 92%;
    margin: 36px auto 60px auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: start;
}

/* ============================================================
   COLUNA ESQUERDA: SIDEBAR / PERFIL
   ============================================================ */
.profile-sidebar {
    position: sticky;
    top: 90px;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .profile-sidebar {
    background-color: rgba(41, 43, 44, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-light .profile-sidebar {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.profile-avatar-container {
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e53935;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #e53935;
    text-align: center;
}

.profile-title {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
    line-height: 1.4;
}

body.theme-dark .profile-title {
    color: #e2e8f0;
}

body.theme-light .profile-title {
    color: #1e293b;
}

.profile-affil {
    font-size: 13px;
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.4;
}

body.theme-dark .profile-affil {
    color: #94a3b8;
}

body.theme-light .profile-affil {
    color: #64748b;
}

.profile-info-list {
    font-size: 13px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(229, 57, 53, 0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.theme-dark .profile-info-item {
    color: #cbd5e1;
}

body.theme-light .profile-info-item {
    color: #475569;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 22px;
}

.sidebar-link-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff !important;
    background-color: #e53935;
    transition: all 0.2s ease;
}

.sidebar-link-btn:hover {
    background-color: #c62828;
    transform: translateX(3px);
}

.topics-section h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    color: #e53935;
}

.topics-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.topic-pill {
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(229, 57, 53, 0.12);
    color: #ef5350;
    border: 1px solid rgba(229, 57, 53, 0.25);
}

/* ============================================================
   COLUNA DIREITA: FEED PRINCIPAL DE CONTEÚDO
   ============================================================ */
.feed-content {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.feed-card {
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-dark .feed-card {
    background-color: rgba(41, 43, 44, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-light .feed-card {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(229, 57, 53, 0.2);
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #e53935;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-action-link {
    font-size: 13.5px;
    font-weight: 700;
    color: #e53935;
    text-decoration: none;
    transition: transform 0.2s;
}

.section-action-link:hover {
    text-decoration: underline;
    transform: translateX(3px);
}

/* Bio Text */
.bio-paragraph {
    font-size: 15.5px;
    line-height: 1.7;
    margin-bottom: 16px;
}

body.theme-dark .bio-paragraph {
    color: #e2e8f0;
}

body.theme-light .bio-paragraph {
    color: #334155;
}

/* Featured Courses Grid */
.courses-grid-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.course-item-card {
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s, border-color 0.2s;
}

body.theme-dark .course-item-card {
    background-color: rgba(30, 32, 34, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-light .course-item-card {
    background-color: #f8fafc;
    border-color: rgba(0, 0, 0, 0.08);
}

.course-item-card:hover {
    transform: translateY(-3px);
    border-color: rgba(229, 57, 53, 0.4);
}

.course-item-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: inherit;
}

.course-item-desc {
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 14px;
}

body.theme-dark .course-item-desc {
    color: #94a3b8;
}

body.theme-light .course-item-desc {
    color: #64748b;
}

/* Timeline / News */
.timeline {
    position: relative;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: rgba(229, 57, 53, 0.3);
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e53935;
    box-shadow: 0 0 8px rgba(229, 57, 53, 0.6);
}

.timeline-date {
    font-size: 12px;
    font-weight: 700;
    color: #e53935;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.timeline-text {
    font-size: 14px;
    line-height: 1.5;
}

body.theme-dark .timeline-text {
    color: #cbd5e1;
}

body.theme-light .timeline-text {
    color: #475569;
}

/* Publications List */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pub-card {
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.theme-dark .pub-card {
    background-color: rgba(30, 32, 34, 0.85);
}

body.theme-light .pub-card {
    background-color: #f8fafc;
    border-color: rgba(0, 0, 0, 0.08);
}

.pub-card:hover {
    transform: translateY(-3px);
}

body.theme-dark .pub-card:hover {
    border-color: rgba(229, 57, 53, 0.45);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

body.theme-light .pub-card:hover {
    border-color: rgba(229, 57, 53, 0.45);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.12);
}

.pub-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.pub-title a,
.pub-title a:link,
.pub-title a:visited {
    text-decoration: none;
    transition: color 0.2s ease;
}

.pub-title a:hover {
    color: #ef5350 !important;
    text-decoration: underline;
}

body.theme-dark .pub-title,
body.theme-dark .pub-title a,
body.theme-dark .pub-title a:link,
body.theme-dark .pub-title a:visited {
    color: #ffffff !important;
}

body.theme-dark .pub-title a:hover {
    color: #ef5350 !important;
}

body.theme-light .pub-title,
body.theme-light .pub-title a,
body.theme-light .pub-title a:link,
body.theme-light .pub-title a:visited {
    color: #1e293b !important;
}

body.theme-light .pub-title a:hover {
    color: #e53935 !important;
}

.pub-authors {
    font-size: 13.5px;
    margin-bottom: 10px;
    line-height: 1.4;
}

body.theme-dark .pub-authors {
    color: #94a3b8;
}

body.theme-light .pub-authors {
    color: #64748b;
}

.pub-venue-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12.5px;
}

.pub-venue {
    font-style: italic;
    font-weight: 600;
}

body.theme-dark .pub-venue {
    color: #cbd5e1;
}

body.theme-light .pub-venue {
    color: #334155;
}

.pub-year-badge {
    background-color: rgba(229, 57, 53, 0.15);
    color: #ef5350;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11.5px;
}

.pub-cites-badge {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11.5px;
}

.pub-award-badge {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2) 0%, rgba(202, 138, 4, 0.3) 100%);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.4);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11.5px;
}

.pub-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: #e53935 !important;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(229, 57, 53, 0.1);
    border: 1px solid rgba(229, 57, 53, 0.25);
    transition: all 0.2s;
    margin-left: auto;
}

.pub-link-btn:hover {
    background: #e53935;
    color: #ffffff !important;
}

/* Footer */
.site-footer {
    width: 100%;
    padding: 24px;
    text-align: center;
    border-top: 1px solid rgba(229, 57, 53, 0.15);
    font-size: 13px;
    margin-top: auto;
}

body.theme-dark .site-footer {
    color: #94a3b8;
    background-color: #181a1b;
}

body.theme-light .site-footer {
    color: #64748b;
    background-color: #f1f5f9;
}

/* Responsividade Mobile */
@media (max-width: 900px) {
    .main-wrapper {
        grid-template-columns: 1fr;
        margin: 20px auto;
    }
    .profile-sidebar {
        position: static;
    }
    .site-header {
        padding: 14px 20px;
    }
    .nav-menu {
        display: none; /* Em telas muito pequenas simplifica para o toggle */
    }
    .feed-card {
        padding: 20px;
    }
}
