.site-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    gap: 1rem;
}

.brand a {
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--text);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-nav {
    display: flex;
    gap: 1rem;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-light);
    padding: 0.2rem 1rem;
}

.site-nav a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.site-nav a:hover {
    color: var(--accent);
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    font-size: 1rem;
    color: var(--text);
}

@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .controls {
        width: 100%;
        justify-content: space-between;
    }
}

[data-theme="light"] {
    --bg: #fff;
    --accent-bg: #f5f7ff;
    --text: #212121;
    --text-light: #585858;
    --border: #898ea4;
    --accent: #0d47a1;
    --accent-hover: #1266e2;
    --accent-text: var(--bg);
    --code: #d81b60;
    --preformatted: #444;
    --marked: #fd3;
    --disabled: #efefef
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #212121;
    --accent-bg: #2b2b2b;
    --text: #dcdcdc;
    --text-light: #ababab;
    --accent: #ffb300;
    --accent-hover: #ffe099;
    --accent-text: var(--bg);
    --code: #f06292;
    --preformatted: #ccc;
    --disabled: #111
}

.publication-item {
    margin-bottom: 1.5rem;
}

.pub-title {
    font-weight: bold;
    font-size: 1.1em;
}

.pub-title a {
    text-decoration: none;
    color: inherit;
}

.pub-authors {
    color: inherit;
    opacity: 0.7;
    margin: 0.2rem 0;
}

.pub-venue {
    font-style: italic;
}

.btn-sm {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 5px;
    margin-top: 5px;
    background-color: #eee;
    color: #333;
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.btn-sm:hover {
    background-color: #ddd;
}

footer {
    flex-shrink: 1;
    width: 100%;
    margin-top: auto;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left,
.footer-right {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-center {
    font-family: "Courier New", monospace;
    font-style: italic;
    font-size: 0.85rem;
    opacity: 0.5;
}

.footer-right a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.footer-right a:hover {
    opacity: 1;
    text-decoration: underline;
}

.separator {
    margin: 0 0.5rem;
    opacity: 0.3;
}

@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}