/* --- GLOBAL STYLES & SMOOTH SCROLL --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.7;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 160px 20px 20px;
}

a {
    color: #00529B;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #003B70;
    text-decoration: underline; /* UPDATED: Underline appears on hover */
}

/* --- SIDE NAVIGATION --- */
.side-nav {
    position: fixed;
    top: 50%;
    right: 35px;
    transform: translateY(-50%);
    z-index: 1000;
}

.side-nav .nav-link {
    display: block;
    font-weight: 600;
    text-decoration: none;
    text-align: right;
    padding: 6px 0;
    font-size: 0.9em;
    color: #aaa;
    transition: all 0.2s ease-in-out;
}

.side-nav .nav-link.active {
    color: #333;
    font-weight: 700;
    transform: scale(1.1);
}

/* --- HEADER (NOT STICKY) --- */
header {
    text-align: center;
    padding: 50px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 50px;
}

h1.name {
    font-size: 2.4em;
    margin: 0;
    font-weight: 700;
    color: #333;
}

p.title {
    font-size: 1.2em;
    color: #777;
    margin-top: 5px;
}

/* --- MAIN CONTENT & SECTIONS --- */
h2 {
    font-size: 2em;
    font-weight: 700;
    margin-top: 0;
    color: #333;
}

section {
    padding: 50px 0;
}

/* --- EXTERNAL LINKS IN HEADER --- */
.external-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.external-links a {
    color: #00529B;
    font-weight: 600;
    font-size: 0.95em;
    /* UPDATED: Removed the permanent underline from here */
}

/* --- ITEM STYLES (Education, Experience, etc.) --- */
.item, .publication-item { margin-bottom: 25px; }
.item-title strong, .pub-title strong { font-size: 1.15em; font-weight: 600; }
.item-meta, .pub-authors, .pub-venue { color: #6c757d; }
.item-description { padding-left: 20px; margin-top: 5px; }
.pub-links a { margin-right: 10px; }
.pub-authors strong { font-weight: 700; }

/* --- FOOTER --- */
footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9em;
    color: #aaa;
}

/* --- FIX for last section highlighting --- */
section:last-of-type {
    min-height: 100vh;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    body {
        padding: 0;
    }
    
    .side-nav {
        position: static;
        transform: none;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px 15px;
        padding: 15px;
        background-color: #f8f9fa;
        border-bottom: 1px solid #e9e9e9;
        box-shadow: none;
    }
    
    .side-nav .nav-link, .side-nav .nav-link.active {
        text-align: center;
        transform: none;
    }

    .container {
        padding: 20px;
    }

    header {
        padding-top: 25px;
    }
}