:root {
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --accent: #2563eb; /* Academic Blue */
    --accent-hover: #1d4ed8;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Merriweather', serif; /* For academic feel */
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #60a5fa;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; transition: background-color 0.3s ease, color 0.3s ease; }

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-color);
    font-size: 16px;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* --- Modern Navigation --- */
nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px); /* Glassmorphism */
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 15px 0;
}

[data-theme="dark"] nav { background: rgba(15, 23, 42, 0.85); }

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links { display: flex; gap: 30px; }

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

nav a:hover, nav a.active { color: var(--accent); }

/* --- Theme Toggle Button --- */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* --- Hero Section --- */
.profile { margin: 60px 0; animation: fadeIn 0.8s ease-out; }

.profile-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: var(--shadow);
}

.profile h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.role {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 5px;
}

/* --- Tags/Badges (For Skills) --- */
.badge {
    display: inline-block;
    background-color: var(--bg-color);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 5px;
    margin-bottom: 5px;
}

/* --- Cards (Projects/News/Experience) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.card:hover { transform: translateY(-3px); border-color: var(--accent); }

/* --- Typography --- */
h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin: 50px 0 25px 0;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Publication Specifics --- */
.pub-card {
    margin-bottom: 20px;
    padding: 20px;
    border-left: 4px solid var(--border);
    background: var(--card-bg);
}
.pub-card:hover { border-left-color: var(--accent); }

/* --- Footer --- */
footer {
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 768px) {
    .profile-wrapper { flex-direction: column; text-align: center; }
    .profile h1 { font-size: 2rem; }
}