/* ============================================================
   ACADEMIC THEME - Clean Professional Styling
   ============================================================ */

/* CSS Variables */
:root {
    --color-primary: #e65100;
    --color-secondary: #f57c00;
    --color-accent: #ff9800;
    --color-text: #2d3748;
    --color-text-light: #4a5568;
    --color-background: #ffffff;
    --color-background-alt: #f7fafc;
    --color-border: #e2e8f0;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --max-width: 900px;
    --spacing: 1.5rem;
}

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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-background);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
    margin: 0 0 1rem;
}

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

a:hover {
    text-decoration: underline;
}

/* Header */
.site-header {
    background: var(--color-primary);
    color: #fff;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-branding {
    flex: 1;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}

.site-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
}

.nav-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #fff;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: 0.3s;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-primary);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

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

    .nav-menu a {
        padding: 0.75rem 1rem;
    }

    .header-content {
        position: relative;
    }
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Home Page */
.home-intro {
    background: var(--color-background-alt);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.home-bio {
    margin-bottom: 2rem;
}

.profile-section {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-image {
    flex-shrink: 0;
}

.profile-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--color-primary);
}

.profile-name {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-size: 1.8rem;
    color: var(--color-primary);
}

.profile-title {
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.profile-text h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.profile-text .position {
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-bottom: 0.25rem;
}

.profile-text .institution {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.profile-text .email a {
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* News List */
.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.news-list .date {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-right: 1rem;
}

/* Page Content */
.page-header h1 {
    margin-top: 0;
}

.page-content {
    line-height: 1.8;
}

.page-content ul,
.page-content ol {
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* Publications Styling */
.publication {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.publication:last-child {
    border-bottom: none;
}

.publication-toc {
    display: block;
    max-width: 100%;
    max-height: 250px;
    margin-top: 0.75rem;
    border-radius: 4px;
    background: #fff;
}

.publication-title {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.publication-authors {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.publication-venue {
    font-style: italic;
    color: var(--color-text-light);
}

.publication-links {
    margin-top: 0.5rem;
}

.publication-links a {
    display: inline-block;
    margin-right: 1rem;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    background: var(--color-background-alt);
    border-radius: 4px;
}

/* Article */
.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info p {
    margin: 0.25rem 0;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

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

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Code Highlighting */
.highlight {
    background: var(--color-background-alt);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.9em;
    background: var(--color-background-alt);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

/* TOC Slider */
.toc-slider-section {
    margin-top: 2rem;
}

.toc-slider {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
}

.toc-track {
    display: flex;
    transition: transform 0.4s ease;
}

.toc-slide {
    min-width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
}

.toc-slide.active {
    display: flex;
}

.toc-slide img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
}

.toc-caption {
    text-align: center;
    margin-top: 0.75rem;
}

.toc-caption-text {
    font-size: 0.95rem;
    color: var(--color-text);
    margin: 0 0 0.25rem;
    line-height: 1.4;
}

.toc-journal {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-style: italic;
    margin: 0;
}

.toc-prev,
.toc-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.toc-prev { left: 0.5rem; }
.toc-next { right: 0.5rem; }

.toc-prev:hover,
.toc-next:hover {
    background: white;
    border-color: var(--color-primary);
}

.toc-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 0 0.5rem;
}

.toc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    cursor: pointer;
    transition: background 0.2s;
}

.toc-dot.active {
    background: var(--color-primary);
}

@media (max-width: 600px) {
    .toc-slide img {
        max-height: 200px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-light); }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }

/* Images inside page content */
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
