:root {
    --bg: #ffffff;
    --text: #000000;
    --accent: #0066cc;
    --accent-hover: #0052a3;
    --border: #e0e0e0;
    --code-bg: #f5f5f5;
    --link-color: #0066cc;
}

[data-theme="dark"] {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --accent: #4dabf7;
    --accent-hover: #339af0;
    --border: #404040;
    --code-bg: #2d2d2d;
    --link-color: #4dabf7;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Aria", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    width: 70%;
    margin: 0 auto;
    padding: 3rem 4rem;
}

header {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 2.5%;
}

.header-content {
    width: 60%;
}

.header-photo {
    width: 40%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-photo img {
    width: 240px;
    height: 240px;
    object-fit: cover;
    display: block;
}

h1 {
    font-size: 2.5rem;
    font-weight: normal;
    margin-bottom: 1rem;
    color: var(--text);
    text-align: center;
}

.bio {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.contact-links {
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.contact-links a {
    color: var(--link-color);
    text-decoration: none;
}

.contact-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.contact-links .separator {
    margin: 0 0.5rem;
}

.profile-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

h2 {
    font-size: 1.8rem;
    font-weight: normal;
    margin-bottom: 1rem;
    color: var(--text);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
    color: var(--text);
}

p {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    color: var(--text);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

strong {
    font-weight: normal;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

section {
    margin-bottom: 4rem;
}

article {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 2.5%;
}

.article-image {
    width: 35%;
    min-width: 120px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
}

.article-image img,
.article-image video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: block;
    aspect-ratio: auto;
    object-fit: contain;
}

.article-content {
    width: 65%;
}

.article-links {
    margin-bottom: 0.5rem;
}

.article-links a {
    margin-right: 0.5rem;
}

.article-links .separator {
    margin: 0 0.5rem;
}

.article-authors {
    margin-bottom: 0.5rem;
    color: #888888;
}

.article-authors strong {
    color: #000000;
}

[data-theme="dark"] .article-authors strong {
    color: #ffffff;
}

[data-theme="dark"] .article-authors {
    color: #aaaaaa;
}

.article-venue {
    font-style: italic;
    margin-bottom: 0.5rem;
}

article:last-child {
    border-bottom: none;
}

footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 0.9rem;
    color: var(--text);
}

footer a {
    color: var(--link-color);
}

#theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
}

#theme-toggle:hover {
    border-color: var(--accent);
    background-color: var(--code-bg);
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    header {
        flex-direction: column-reverse;
        gap: 1.5rem;
    }

    .header-content,
    .header-photo {
        width: 100%;
    }

    article {
        flex-direction: column;
        gap: 1rem;
    }

    .article-image,
    .article-content {
        width: 100%;
    }

    h1 {
        font-size: 2rem;
        text-align: left;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1rem;
    }

    .bio {
        font-size: 1rem;
    }
}
