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

body {
    font-family: 'Open Sans', Arial, sans-serif;
    color: #2a2a2a;
    font-size: 16px;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 30px;
    padding-top: 100px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #ccc;
    padding: 14px 30px;
    z-index: 100;
}

nav .nav-inner {
    max-width: 800px;
    margin: 0 auto;
}

nav .site-title {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 26px;
    font-weight: 400;
    color: #2a2a2a;
    text-decoration: none;
    margin-bottom: 6px;
}

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

nav .nav-links a {
    margin-right: 20px;
    text-decoration: none;
    color: #888;
    font-size: 18px;
}

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

nav .nav-links a.active {
    color: #2a2a2a;
    text-decoration: none;
}

nav .nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2a2a2a;
}

/* Home page */
.home-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 40px;
}

.home-photo {
    width: 220px;
    min-width: 220px;
    border-radius: 3px;
}

.home-text h1 {
    font-family: Arial, sans-serif;
    font-size: 1.6em;
    font-weight: 400;
    margin-bottom: 8px;
    color: #2a2a2a;
}

.home-text p {
    margin-bottom: 12px;
}

a {
    color: #0027a0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Research page */
h2 {
    font-family: Arial, sans-serif;
    font-size: 22px;
    font-weight: 400;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2a2a2a;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.paper {
    margin-bottom: 22px;
}

.paper-title {
    font-weight: bold;
    color: #0027a0;
    text-decoration: none;
}

.paper-title:hover {
    text-decoration: underline;
}

.paper-authors {
    font-style: normal;
}

.paper-journal {
    font-style: normal;
}

.paper-journal strong {
    font-style: italic;
}

.paper-links a,
.paper-media summary {
    font-size: 0.9em;
    color: #0027a0;
    text-decoration: none;
}


.paper-links a:hover,
.paper-media summary:hover {
    text-decoration: underline;
}

.paper-media {
    font-size: 0.9em;
    margin-top: 2px;
    display: inline;
}

.paper-media summary {
    cursor: pointer;
    display: inline;
    color: #0027a0;
}

.paper-toggle {
    font-size: 0.81em;
    color: #0027a0;
    text-decoration: none;
    cursor: pointer;
}

.paper-toggle:hover {
    text-decoration: underline;
}

.paper-abstract {
    display: none;
    margin-top: 4px;
    margin-left: 18px;
    font-size: 0.81em;
    color: #2a2a2a;
}

.paper-abstract.open {
    display: block;
}

.paper-media-list {
    margin-top: 4px;
    margin-left: 18px;
    font-size: 0.9em;
}

.paper-media-list a {
    color: #0027a0;
    text-decoration: none;
}

.paper-media-list a:hover {
    text-decoration: underline;
}

/* Code page */
.code-project {
    margin-bottom: 20px;
}

.code-project p {
    margin-bottom: 16px;
}

.code-project h3 {
    margin-bottom: 6px;
}

/* Teaching page */
.teaching-section {
    margin-bottom: 25px;
}

.teaching-section h3 {
    margin-bottom: 8px;
    color: #2a2a2a;
}

.teaching-section ul {
    list-style: none;
    margin-left: 0;
}

.teaching-section li {
    margin-bottom: 4px;
}

/* Footer */
footer {
    margin-top: 50px;
    padding-top: 12px;
    border-top: 1px solid #ccc;
    font-size: 0.85em;
    color: #888;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding-top: 60px;
    }

    nav {
        padding: 10px 20px;
    }

    nav .nav-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    nav .site-title {
        display: inline;
        margin-bottom: 0;
        font-size: 20px;
    }

    nav .nav-toggle {
        display: block;
    }

    nav .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 10px;
    }

    nav .nav-links.open {
        display: flex;
    }

    nav .nav-links a {
        margin-right: 0;
        padding: 6px 0;
        font-size: 16px;
    }

    .home-container {
        flex-direction: column;
    }

    .home-photo {
        width: 180px;
        min-width: auto;
    }
}
