/* Color Palette (Paul Tol's Vibrant) & Theme Variables */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f8f9fa;
    --primary-color: #0077BB; /* Vibrant Blue */
    --accent-color: #EE7733;  /* Vibrant Orange */
    --badge-bg: #009988;      /* Vibrant Teal */
    --border-color: #dddddd;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --primary-color: #33BBEE; /* Vibrant Cyan */
    --accent-color: #EE7733;  /* Vibrant Orange remains great on dark */
    --badge-bg: #009988;
    --border-color: #333333;
}

/* Global Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; background-color: var(--bg-color); color: var(--text-color); transition: background-color 0.3s, color 0.3s; }
a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; color: var(--accent-color); }
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Header & Nav */
header { background-color: var(--header-bg); padding: 20px 0; border-bottom: 1px solid var(--border-color); margin-bottom: 40px; transition: background-color 0.3s; }
.header-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; }
h1 { font-size: 1.8rem; margin: 0; }
nav { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
nav a { color: var(--text-color); }
nav a.active { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); }
.theme-switch { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 5px; border-radius: 5px; transition: background 0.3s; }
.theme-switch:hover { background-color: var(--border-color); }

/* Main Layout */
.hero { display: flex; gap: 30px; align-items: center; margin-bottom: 50px; }
.profile-pic { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.bio h2 { margin-bottom: 10px; }
.bio p { margin-bottom: 15px; }

/* News & Lists */
h2 { margin-bottom: 20px; border-bottom: 2px solid var(--border-color); padding-bottom: 5px; }
.news-list { list-style: none; }
.news-list li { margin-bottom: 15px; padding-left: 15px; border-left: 3px solid var(--accent-color); }
.btn { display: inline-block; margin-top: 15px; padding: 8px 15px; background-color: var(--primary-color); color: white; border-radius: 5px; }
.btn:hover { background-color: var(--accent-color); color: white; text-decoration: none; }

/* Publications */
.publication { margin-bottom: 25px; }
.publication h3 { font-size: 1.2rem; margin-bottom: 5px; }
.publication p { margin-bottom: 10px; }
.pub-links { display: flex; gap: 10px; }
.badge { background-color: var(--badge-bg); color: #fff; padding: 3px 10px; border-radius: 12px; font-size: 0.85rem; }
.badge:hover { text-decoration: none; filter: brightness(1.1); color: #fff; }
.badge.pdf { background-color: #CC3311; } /* Vibrant Red */
.badge.arxiv { background-color: #0077BB; } /* Vibrant Blue */
.badge.code { background-color: #EE7733; } /* Vibrant Orange */

/* Footer */
footer { text-align: center; padding: 30px 0; margin-top: 50px; border-top: 1px solid var(--border-color); font-size: 0.9rem; opacity: 0.8; }

/* Responsive Media Queries */
@media (max-width: 768px) {
    .header-container { flex-direction: column; align-items: flex-start; gap: 10px; }
    .hero { flex-direction: column; text-align: center; }
    .profile-pic { margin: 0 auto; }
}