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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

/* Main Content */
main {
    min-height: calc(100vh - 180px);
    padding: 3rem 0;
}

.hero h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.content {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content h2:first-child {
    margin-top: 0;
}

.content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.content a:hover {
    text-decoration: underline;
}

/* Lists */
.content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

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

/* Publication Item */
.publication-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

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

.publication-authors {
    color: #666;
    font-style: italic;
    margin-bottom: 0.3rem;
}

.publication-venue {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.publication-links a {
    display: inline-block;
    margin-right: 1rem;
    padding: 0.3rem 0.8rem;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.publication-links a:hover {
    background-color: #2980b9;
}

/* Code Projects */
.code-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
}

.code-title {
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.code-description {
    margin-bottom: 1rem;
}

.code-links a {
    display: inline-block;
    margin-right: 1rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Talks */
.talk-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.talk-item:last-child {
    border-bottom: none;
}

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

.talk-event {
    color: #666;
    font-style: italic;
    margin-bottom: 0.3rem;
}

.talk-date {
    color: #888;
    font-size: 0.9rem;
}

/* CV Section */
.cv-section {
    margin-bottom: 2rem;
}

.cv-download {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: background-color 0.3s;
}

.cv-download:hover {
    background-color: #2980b9;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .content {
        padding: 1.5rem;
    }
}
