/* ===== CSS Variables ===== */
:root {
    --color-primary: #1a365d;
    --color-secondary: #2c5282;
    --color-accent: #2b6cb0;
    --color-text: #2d3748;
    --color-text-light: #4a5568;
    --color-background: #ffffff;
    --color-section-bg: #f7fafc;
    --color-border: #e2e8f0;
    --color-sidebar: #f8fafc;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Crimson Pro', Georgia, 'Times New Roman', serif;
    --sidebar-width: 280px;
    --nav-height: 48px;
    --transition: 0.3s ease;
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
}

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

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-primary);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    margin-left: var(--sidebar-width);
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 1rem;
    transition: all var(--transition);
}

.nav-link:hover {
    color: #ffffff;
    text-decoration: none;
}

.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ===== Layout ===== */
.layout {
    display: flex;
    padding-top: var(--nav-height);
    min-height: 100vh;
}

/* ===== Fixed Sidebar ===== */
.sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--nav-height));
    background: var(--color-sidebar);
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
}

.sidebar-content {
    padding: 2rem 1.5rem;
    text-align: center;
}

.photo-container {
    margin-bottom: 1.25rem;
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

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

.affiliation {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.sidebar-contact {
    border-top: 1px solid var(--color-border);
    padding-top: 1.25rem;
    text-align: left;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-light);
}

.contact-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.contact-item a {
    font-size: 0.85rem;
    color: var(--color-text-light);
    word-break: break-all;
}

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

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.social-link {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 500;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
    max-width: 800px;
}

/* ===== Sections ===== */
.section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

/* ===== Bio ===== */
.bio {
    margin-bottom: 1rem;
    text-align: justify;
}

.bio:last-child {
    margin-bottom: 0;
}

/* ===== Research Grid ===== */
.research-grid {
    display: grid;
    gap: 1rem;
}

.research-item {
    padding: 1rem 1.25rem;
    background: var(--color-section-bg);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 4px 4px 0;
}

.research-item h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 0.4rem;
}

.research-item p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* ===== Papers ===== */
.paper-year {
    margin-bottom: 1.75rem;
}

.paper-year:last-child {
    margin-bottom: 0;
}

.year-heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.paper-list {
    list-style: none;
}

.paper-item {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
    position: relative;
}

.paper-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 5px;
    height: 5px;
    background: var(--color-accent);
    border-radius: 50%;
}

.paper-title {
    font-weight: 600;
    color: var(--color-text);
    display: block;
    margin-bottom: 0.2rem;
}

.paper-authors {
    color: var(--color-text-light);
    display: block;
    font-size: 0.9rem;
}

.paper-venue {
    color: var(--color-text-light);
    font-style: italic;
    font-size: 0.9rem;
}

.paper-link {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ===== Contact Section ===== */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-detail {
    display: flex;
    gap: 0.5rem;
}

.contact-label {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-text);
    min-width: 110px;
    flex-shrink: 0;
}

/* ===== Footer ===== */
.footer {
    margin-left: var(--sidebar-width);
    text-align: center;
    padding: 1.5rem 2rem;
    background: var(--color-section-bg);
    color: var(--color-text-light);
    font-size: 0.85rem;
    font-family: var(--font-heading);
    border-top: 1px solid var(--color-border);
}

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
    :root {
        --sidebar-width: 240px;
    }

    .main-content {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
        --nav-height: 48px;
    }

    .nav-container {
        margin-left: 0;
    }

    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar-content {
        padding: 1.5rem;
    }

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

    .name {
        font-size: 1.3rem;
    }

    .sidebar-contact {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .footer {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .nav-container {
        gap: 0.5rem;
    }

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