/* ===================================
   Variables & Reset
   =================================== */

:root {
    /* Colors - Clean Academic */
    --color-primary: #2c3e50;
    --color-link: #2980b9;
    --color-link-hover: #3498db;
    --color-text: #333;
    --color-text-light: #666;
    --color-border: #ddd;
    --color-bg: #fff;
    --color-bg-alt: #f8f9fa;
    --color-accent: #e74c3c;
    
    /* Typography */
    --font-serif: 'Lora', Georgia, serif;
    --font-sans: 'Source Sans 3', -apple-system, sans-serif;
    
    /* Spacing */
    --spacing-unit: 1rem;
    --max-width: 1000px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
}

strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

/* ===================================
   Layout
   =================================== */

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

.main-content {
    margin-top: 80px;
    padding-bottom: 4rem;
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.site-title:hover {
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 400;
    color: var(--color-text);
}

.nav-links a:hover {
    color: var(--color-link);
}

/* ===================================
   Profile Section
   =================================== */

.profile-section {
    margin-top: 2rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* Sidebar */
.profile-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.profile-image-wrapper {
    margin-bottom: 1.5rem;
}

.profile-image {
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.contact-info {
    font-size: 0.95rem;
}

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

.affiliation {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--color-link);
    word-break: break-all;
}

.social-links i {
    margin-right: 0.25rem;
}

.documents {
    margin-top: 1rem;
}

.doc-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.doc-link:hover {
    background: var(--color-border);
    text-decoration: none;
}

/* Main Content */
.profile-main {
    min-width: 0;
}

.bio {
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* ===================================
   Sections
   =================================== */

section {
    margin-bottom: 3rem;
}

.research-list {
    list-style: none;
    padding-left: 0;
}

.research-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.research-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--color-link);
    font-weight: bold;
}

.collaboration-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--color-bg-alt);
    border-left: 3px solid var(--color-link);
    font-size: 0.95rem;
}

/* ===================================
   Publications
   =================================== */

.pub-note {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.pub-list {
    list-style: none;
    counter-reset: publication-counter;
    padding-left: 0;
}

.pub-list[reversed] {
    counter-reset: publication-counter calc(var(--list-length, 10) + 1);
}

.pub-list li {
    counter-increment: publication-counter -1;
    margin-bottom: 1.5rem;
    padding-left: 2.5rem;
    position: relative;
    line-height: 1.6;
}

.pub-list:not([reversed]) li {
    counter-increment: publication-counter;
}

.pub-list li::before {
    content: "[" counter(publication-counter) "]";
    position: absolute;
    left: 0;
    font-weight: 600;
    color: var(--color-text-light);
}

.pub-list a {
    font-weight: 400;
}

.award {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* ===================================
   News
   =================================== */

.news-list {
    list-style: none;
    padding-left: 0;
}

.news-list li {
    margin-bottom: 1rem;
    padding-left: 0;
}

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

/* ===================================
   Education
   =================================== */

.education-list {
    list-style: none;
    padding-left: 0;
}

.education-list li {
    margin-bottom: 1.5rem;
}

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

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    :root {
        --max-width: 100%;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .profile-sidebar {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-image-wrapper {
        max-width: 250px;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .main-content {
        margin-top: 60px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .navbar,
    .footer {
        display: none;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    a {
        color: var(--color-text);
        text-decoration: underline;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
}