/* ========================================
   RESEARCH PORTFOLIO - Charles Abdoulaye NGOM
   Minimalist Academic Design
   ======================================== */

/* === CSS Variables === */
:root {
    --bg-primary: #FFFCF8;
    --bg-secondary: #FFF9F0;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b6b6b;
    --text-light: #888888;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e5e5e5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --font-serif: 'Crimson Pro', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.2s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* === Mobile Navigation === */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.mobile-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.mobile-nav-brand {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.mobile-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav-menu {
    display: none;
    flex-direction: column;
    padding: 0 1.5rem 1rem;
    gap: 0.5rem;
}

.mobile-nav-menu.active {
    display: flex;
}

.mobile-nav-link {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    transition: color var(--transition);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-color);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Page Layout === */
.page-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* === Sidebar === */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 3rem 2rem;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Profile Photo */
.profile-photo {
    width: 240px;
    height: 240px;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

/* Name & Title */
.name {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.title {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

/* Affiliation */
.affiliation {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.affiliation a {
    color: var(--text-muted);
    border-bottom: 1px solid transparent;
}

.affiliation a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.location {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all var(--transition);
}

.quick-link:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.quick-link i {
    font-size: 0.9rem;
}

/* Contact Links */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.contact-link:hover {
    color: var(--accent-color);
}

.contact-link i {
    width: 20px;
    font-size: 1rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.contact-link:hover i {
    color: var(--accent-color);
}

.contact-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === Main Content === */
.main-content {
    padding: 3rem 4rem;
    max-width: 900px;
}

/* === Sections === */
.section {
    margin-bottom: 3.5rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--text-primary);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.section-subtitle a {
    color: var(--accent-color);
}

/* === About / Bio === */
.bio {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.bio a {
    border-bottom: 1px solid var(--accent-color);
}

.bio a:hover {
    border-bottom-width: 2px;
}

.bio strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Research Interests */
.research-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.interest {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-color);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 20px;
    transition: all var(--transition);
}

.interest:hover {
    background: rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

/* === News Section === */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.news-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    flex-shrink: 0;
    width: 80px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.news-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.news-content strong {
    color: var(--text-primary);
}

/* === Publications === */
.publications-list {
    display: flex;
    flex-direction: column;
}

.publication {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 0;
}

.pub-divider {
    height: 1px;
    background: var(--border-color);
}

.pub-year {
    flex-shrink: 0;
    width: 50px;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pub-details {
    flex: 1;
}

.pub-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.pub-title a {
    color: var(--text-primary);
    transition: color var(--transition);
}

.pub-title a:hover {
    color: var(--accent-color);
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.pub-authors strong {
    color: var(--text-primary);
}

.pub-venue {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.pub-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.pub-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-color);
    padding: 0.3rem 0;
}

.pub-link:hover {
    text-decoration: underline;
}

.pub-link i {
    font-size: 0.85rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.publication[data-page],
.pub-divider[data-page] {
    display: none;
}

.publication[data-page].active,
.pub-divider[data-page].active {
    display: flex;
}

.pub-divider[data-page].active {
    display: block;
}

/* === Experience === */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.experience-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.experience-item:last-child {
    border-bottom: none;
}

.exp-left {
    flex-shrink: 0;
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exp-period {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.exp-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.exp-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.exp-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.exp-logo-icon i {
    font-size: 1.25rem;
    color: var(--accent-color);
}

.exp-details {
    flex: 1;
}

.exp-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.exp-company {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.exp-company a {
    color: var(--text-secondary);
    border-bottom: 1px solid transparent;
}

.exp-company a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.exp-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === Education === */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.education-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.education-item:last-child {
    border-bottom: none;
}

.edu-period {
    flex-shrink: 0;
    width: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.edu-details {
    flex: 1;
}

.edu-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.edu-institution {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.edu-institution a {
    color: var(--text-secondary);
}

.edu-institution a:hover {
    color: var(--accent-color);
}

.edu-thesis {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* === Awards === */
.awards-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.award-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.award-item:last-child {
    border-bottom: none;
}

.award-year {
    flex-shrink: 0;
    width: 60px;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.award-details {
    flex: 1;
}

.award-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.award-event {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.35rem;
}

.award-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === Community === */
.community-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.community-item {
    display: flex;
    gap: 1.25rem;
    padding: 1rem 0;
}

.comm-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
}

.comm-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comm-details {
    flex: 1;
}

.comm-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.comm-title a {
    color: var(--text-primary);
}

.comm-title a:hover {
    color: var(--accent-color);
}

.comm-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.comm-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.comm-description a {
    border-bottom: 1px solid var(--accent-color);
}

/* === Skills === */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.skill-category {
    padding: 1rem 0;
}

.skill-cat-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.skill-items {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === Contact === */
.contact-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.contact-email {
    font-size: 1rem;
}

.contact-email a {
    color: var(--accent-color);
    border-bottom: 1px solid transparent;
}

.contact-email a:hover {
    border-bottom-color: var(--accent-color);
}

/* === Footer === */
.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.footer-note {
    font-size: 0.8rem;
}

.footer-note a {
    color: var(--text-muted);
}

.footer-note a:hover {
    color: var(--accent-color);
}

/* === Responsive Design === */
@media (max-width: 1100px) {
    .main-content {
        padding: 2.5rem 3rem;
    }
}

@media (max-width: 900px) {
    .mobile-nav {
        display: block;
    }

    .page-wrapper {
        grid-template-columns: 1fr;
        padding-top: 60px;
    }

    .sidebar {
        position: relative;
        height: auto;
        padding: 2rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-content {
        max-width: 400px;
        margin: 0 auto;
    }

    .main-content {
        padding: 2rem;
        max-width: 100%;
    }

    .publication {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pub-year {
        width: auto;
        font-size: 0.9rem;
    }

    .experience-item,
    .education-item,
    .award-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .exp-left {
        width: auto;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .exp-logo {
        width: 45px;
        height: 45px;
    }

    .edu-period,
    .award-year {
        width: auto;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 15px;
        scroll-padding-top: 60px;
    }

    .page-wrapper {
        padding-top: 55px;
    }

    .main-content {
        padding: 1.5rem;
    }

    .profile-photo {
        width: 180px;
        height: 180px;
    }

    .name {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .bio {
        font-size: 1rem;
    }

    .quick-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .quick-link {
        width: 100%;
        justify-content: center;
    }

    .community-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pagination-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .pagination-info {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 400px) {
    .profile-photo {
        width: 160px;
        height: 160px;
    }

    .mobile-nav-content {
        padding: 0.75rem 1rem;
    }

    .mobile-nav-menu {
        padding: 0 1rem 1rem;
    }
}

/* === Print Styles === */
@media print {
    .page-wrapper {
        display: block;
    }

    .sidebar {
        position: relative;
        height: auto;
        page-break-after: always;
    }

    .section {
        page-break-inside: avoid;
    }

    a {
        color: var(--text-primary);
    }

    a[href]::after {
        content: none;
    }
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.5s ease-out;
}

/* === Scrollbar Styling === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* === Selection === */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: var(--text-primary);
}
