:root {
    /* Color Palette - Academic Modern + Aimara Brand */
    --primary: #00a8cc;
    /* Aimara Lab Celeste */
    --primary-dark: #0084a0;
    /* Darker Cyan for readability/hover */
    --primary-light: rgba(0, 168, 204, 0.1);

    --text-main: #111827;
    /* Gray 900 */
    --text-secondary: #374151;
    /* Gray 700 */
    --text-muted: #6b7280;
    /* Gray 500 */

    --bg-page: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f3f4f6;
    /* Gray 50 */

    --border-subtle: #e5e7eb;
    /* Gray 200 */
    --border-strong: #d1d5db;
    /* Gray 300 */

    --radius-sm: 4px;
    --radius-md: 6px;

    /* Spacing */
    --space-section: 4rem;

    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --primary: #22d3ee;
    /* Bright Cyan (Cyan-400) */
    --primary-dark: #67e8f9;
    /* Even lighter for text/hover in dark mode */
    --primary-light: rgba(34, 211, 238, 0.1);

    --text-main: #ffffff;
    /* Pure White */
    --text-secondary: #e5e5e5;
    /* Gray 200 */
    --text-muted: #a3a3a3;
    /* Gray 400 */

    --bg-page: #000000;
    /* Pure Black */
    --bg-card: #0a0a0a;
    /* Almost Black */
    --bg-hover: #171717;
    /* Gray 900 */

    --border-subtle: #262626;
    /* Gray 800 */
    --border-strong: #404040;
    /* Gray 700 */
}

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

body {
    font-family: var(--font-body);
    line-height: 1.8;
    color: var(--text-secondary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 0.5em;
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

/* Navbar - Sticky & Minimalist */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .navbar {
    background: rgba(0, 0, 0, 0.8);
    /* Matching pure black theme */
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    padding: 1.4rem 0;
    /* Full height clickable area approx */
}

.nav-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Controls integrated into Navbar */
.controls {
    display: flex;
    gap: 0.8rem;
}

/* Layout - Academic Left-Aligned Grid */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--space-section) 0;
    /*border-bottom: 1px solid var(--border-subtle);
    scroll-margin-top: 80px;*/
    /* Offset for sticky navbar */
}

.section:last-child {
    border-bottom: none;
}

/* Header / Hero - Left Aligned */
.header-section {
    padding-top: 8rem;
    /* Increased for fixed navbar */
    padding-bottom: 4rem;
    display: grid;
    grid-template-columns: 180px 1fr;
    /* Profile | Content */
    gap: 3rem;
    align-items: start;
}

.profile-image-container {
    width: 160px;
    height: 160px;
}

.profile-image {
    width: 100%;
    height: 100%;
    /* border-radius: 5px;  Square/Rounded for academic look */
    border-radius: 50%;
    /* Keeping round for now, but cleaner */
    object-fit: cover;
    filter: grayscale(100%);
    /* B&W default for serious academic look */
    transition: filter 0.3s;
}

.profile-image:hover {
    filter: grayscale(0%);
}

.header-content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0;
    border-bottom: 2px solid var(--border-subtle);
    /* Underline style badge */
    color: var(--text-main);
    font-weight: 600;
}

.badge-founder {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

/* Section Styling */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    /* border-bottom: 2px solid var(--text-main);  Strong academic underline */
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
    display: block;
}

/* About / Bio */
.description-text {
    font-size: 1.05rem;
    max-width: 800px;
    /* Optimal reading width */
}

.description-text p {
    margin-bottom: 1.2rem;
}

/* Cards - Minimal Academic List */
.cards-list {
    display: grid;
    gap: 2rem;
}

.card {
    padding-left: 1.5rem;
    border-left: 2px solid var(--border-subtle);
    transition: border-left-color 0.2s;
}

.card:hover {
    border-left-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.card-period {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-feature-settings: "tnum";
}

.card-subtitle {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.card-description {
    font-size: 0.95rem;
}

/* Thesis Highlight */
.thesis-card {
    background: var(--bg-hover);
    padding: 2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.thesis-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.thesis-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Publications */
.publications-grid {
    display: grid;
    gap: 1.5rem;
}

.publication-card {
    /* List view for papers looks more academic */
    display: flex;
    flex-direction: column;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.publication-card:last-child {
    border-bottom: none;
}

.publication-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--primary-dark);
}

[data-theme="dark"] .publication-title {
    color: var(--primary);
}

.publication-venue {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-category-title {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.skill-tags {
    display: flex;
    flex-direction: column;
    /* List view for skills */
    gap: 0.5rem;
}

.skill-tag {
    font-size: 0.95rem;
    position: relative;
    padding-left: 1rem;
}

.skill-tag::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Controls */
/* Controls - Integrated & Minimalist */
.controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    /* Circle buttons */
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background-color: var(--bg-hover);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-section {
        grid-template-columns: 1fr;
        text-align: left;
        padding-top: 6rem;
    }

    .profile-image-container {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links {
        display: none;
        /* Hide nav links on mobile for now to avoid clutter */
    }

    .navbar {
        justify-content: center;
    }

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