:root {
    --bg-gradient-start: #2c3e50;
    --bg-gradient-end: #000000;
    --text-primary: #f0f0f0;
    --text-secondary: #bdc3c7;
    --text-accent: #ffffff;
    --link-color: #3498db;
    --border-color: #34495e;
}

:root.light-mode {
    --bg-gradient-start: #f8f9fa;
    --bg-gradient-end: #e9ecef;
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-accent: #1a252f;
    --link-color: #2980b9;
    --border-color: #dee2e6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0;
    padding: 4em 2em;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 750px;
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5em;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 0.2em;
}

.theme-toggle:hover {
    border-color: var(--link-color);
    color: var(--link-color);
    transform: rotate(180deg);
}

header h1 {
    font-size: 2.8em;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-accent);
    margin: 0;
}

header p {
    font-size: 1.15em;
    color: var(--text-secondary);
    margin-bottom: 2.5em;
}

main p {
    margin-bottom: 1.5em;
}

main a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

main a:hover {
    border-bottom-color: var(--link-color);
}

#publications h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5em;
    color: var(--text-accent);
}

#previously h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5em;
    color: var(--text-accent);
}

#miscellaneous h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5em;
    color: var(--text-accent);
}

#reads-podcasts h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5em;
    color: var(--text-accent);
}

#about h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 2.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5em;
    color: var(--text-accent);
}

#publications ul {
    list-style: none;
    padding: 0;
}

#previously ul {
    list-style: none;
    padding: 0;
}

#miscellaneous ul {
    list-style: none;
    padding: 0;
}

#reads-podcasts ul {
    list-style: none;
    padding: 0;
}

#publications li {
    margin-bottom: 1em;
}

#previously li {
    margin-bottom: 1em;
}

#miscellaneous li {
    margin-bottom: 1em;
}

#reads-podcasts li {
    margin-bottom: 1em;
}

.social-links {
    margin-top: 3em;
    display: flex;
    gap: 1.8em;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.6em;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--link-color);
}