/* Core Layout & Setup */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #f5f5f5; /* White/Light gray writing */
    background-color: #1e1e1e; /* Dark gray background */
    margin: 0;
    padding: 0;
}

/* Fixed Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    background-color: rgba(30, 30, 30, 0.95); /* Dark gray to match body */
    border-bottom: 1px solid #333; /* Darker border line */
    z-index: 1000;
    padding: 12px 0;
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.nav-links a {
    color: #b0b0b0; /* Dimmer text for inactive tabs */
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover, .nav-active {
    color: #4da6ff !important; /* Vibrant light blue for hover/active links */
}

/* Layout Container */
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Profile Layout (Text Left, Image Right) */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    margin-bottom: 30px;
}

.profile-main {
    flex: 1;
    padding-right: 40px;
}

h1 {
    font-size: 2.2rem;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.subtitle {
    font-size: 1.1rem;
    color: #ccc;
    margin: 0 0 5px 0;
}

.affiliation {
    font-style: italic;
    margin: 0 0 15px 0;
    color: #999;
}

.email {
    margin: 5px 0;
    font-size: 0.95rem;
    color: #e0e0e0;
}

.social-links a {
    color: #4da6ff; /* Light blue links for readability on dark backgrounds */
    text-decoration: none;
    font-weight: 500;
}

.social-links a:hover {
    text-decoration: underline;
}

/* Image Placement */
.profile-img img {
    width: 200px;
    height: 200px;
    border-radius: 6px;
    object-fit: cover;
    border: 0px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* General Formatting */
hr {
    border: 0;
    border-top: 1px solid #333;
    margin: 30px 0;
}

section {
    margin-bottom: 40px;
    scroll-margin-top: 70px;
}

h2 {
    font-size: 1.4rem;
    color: #ffffff;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

ul {
    padding-left: 20px;
    margin: 0;
}

li {
    margin-bottom: 8px;
    color: #e0e0e0;
}

li strong {
    color: #ffffff;
}

/* Publications */
.publication-item {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.pub-title {
    font-weight: 600;
    color: #ffffff;
}

.pub-authors {
    font-size: 0.95rem;
    color: #ccc;
}

.pub-authors strong {
    color: #ffffff;
}

.pub-venue {
    font-size: 0.95rem;
    font-style: italic;
    color: #999;
}

.pub-links {
    font-size: 0.9rem;
    margin-top: 2px;
}

.pub-links a {
    color: #4da6ff;
    text-decoration: none;
}

/* Books Layout Styling */
.books-intro {
    font-style: italic;
    color: #999;
    margin-bottom: 30px;
}

.book-card {
    display: flex;
    align-items: flex-start;
    margin-bottom: 35px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 25px;
}

.book-img img {
    width: 100px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    margin-right: 25px;
    border: 0px solid #333;
}

.book-info {
    flex: 1;
}

.book-info h3 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    color: #ffffff;
}

.book-author {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    color: #999;
    font-style: italic;
}

.book-description {
    margin: 0;
    font-size: 0.95rem;
    color: #e0e0e0;
}

footer {
    margin-top: 60px;
    font-size: 0.85rem;
    color: #777;
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
}

footer a {
    color: #999;
    text-decoration: none;
}

footer a:hover {
    color: #4da6ff;
}

/* Responsive Scaling for Mobile Screens */
@media (max-width: 650px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    .nav-links a {
        margin: 0 10px;
        font-size: 0.9rem;
    }
    header {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }
    .profile-main {
        padding-right: 0;
        margin-top: 25px;
    }
    .book-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .book-img img {
        margin-right: 0;
        margin-bottom: 15px;
    }
}