
        .clear { clear: both; }

         body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            max-width: 900px;
            margin: 0 auto;
            padding: 0 20px;
            line-height: 1.6;
            color: #2b1810;
            font-size: 0.95em;
        }

        /* Navigation Bar Styles */
        .nav-bar {
            background-color: #fff;
            padding: 1em 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid #eee;
            margin-bottom: 2em;
        }

        .nav-bar ul {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            justify-content: center;
            gap: 2em;
        }

        .nav-bar li {
            margin: 0;
            padding: 0;
        }

        .nav-bar a {
            text-decoration: none;
            color: #2b1810;
            font-weight: 500;
            transition: color 0.3s;
        }

        .nav-bar a:hover {
            color: cornflowerblue;
        }

        h1 {
            font-size: 1.8em;  /* Slightly reduced from 2em */
            margin-top: 1em;
            padding-top: 0;
            margin-bottom: 1em;
            font-weight: bold;
        }

        h2 {
            font-size: 1.3em;
            margin-top: 2.5em;
            margin-bottom: 0.75em;
            font-weight: bold;
            color: #2b1810;
            scroll-margin-top: 100px;  /* This ensures the section header appears below the sticky nav */
        }

        ul {
            list-style-type: circle;
            padding-left: 20px;
            margin: 0;
            margin-bottom: 2em;
            color: #2b1810;
        }

        li {
            margin-bottom: 0.5em;
            display: flex;
            padding-left: 0.5em;
            position: relative;
            color: #2b1810;
        }

        li:before {
            content: none;
            position: absolute;
            left: 0;
            color: #000;
        }
   
        a {
            color: inherit;  /* This makes links same color as regular text */
            text-decoration: underline;
            text-decoration-color: cornflowerblue;  /* Light red underline */
            text-underline-offset: 3px;  /* Keep your existing offset */
        }

        a:hover {
            color: inherit;  /* Keep text color same on hover */
            text-decoration-color: cornflowerblue;  /* Slightly darker red on hover */
            font-weight: medium;
        }

        .date {
            color: #5c4236;  /* Medium brown for dates */
            font-size: 0.9em;
            margin-left: 1em;
            flex-shrink: 0;
        }

        .book-link {
            color: rgb(85, 26, 139);
            flex-grow: 1;
            margin-right: 1em;
        }

        .container {
            display: flex;
            max-width: 1200px;
            margin: 20px auto;
            gap: 20px;
            padding: 5px;
            padding-top: 0;
            margin-top: 0;
        }

        .about-section {
            display: flex;
            gap: 40px;
            align-items: flex-start;
            margin-bottom: 2em;
        }

        .profile-content {
            flex: 1;
        }

        .profile-photo-desktop {
            width: 200px;
            flex-shrink: 0;
        }

        .profile-photo-desktop img {
            width: 100%;
            height: auto;
            border-radius: 5px;
        }

        .desktop-only {
            display: block;
        }
        
        .mobile-only {
            display: none;
        }

        .container ul li {
            margin-top: 0;
            padding-top: 0;
            margin-bottom: 0.05em;
        }

        .container > ul {
            margin-top: 0;
            padding-top: 0;
            margin: 0;
            padding: 0.5rem 0;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            width: 100%;
            gap: 0.25rem 0.25rem;
            font-size: 1rem;
            margin-bottom: 1rem;
        }

        .container > ul > li {
            margin-top: 0;
            padding-top: 0;
            margin: 0;
            list-style: none;
        }

        .main-content .section.content ul {
            list-style-type: disc !important;
            padding-left: 2rem !important;
            margin: 1rem 0 !important;
        }

        .main-content .section.content ul li {
            display: list-item !important;
            margin-bottom: 0.5rem;
        }

        .section.content ul {
            list-style-type: circle;
            padding-left: 1.5rem;
        }

        .section.content ul li {
            margin-bottom: 0.5rem;
        }

        .left-rail {
            width: 200px;
            flex-shrink: 0;
            position: sticky;
            top: 30px;
            margin-top: 7.5em;
            display: flex;
            flex-direction: column;
        }

        .left-rail .profile-photo {
            margin-bottom: 2em;
            max-width: 200px;
        }

        .left-rail .profile-photo img {
            width: 100%;
            height: auto;
            border-radius: 5px;
            margin-bottom: 0.5em;
            display: block;
        }

        .left-rail .photo-caption {
            font-size: 0.85em;
            font-style: italic;
            color: #5c4236;
            margin-bottom: 1em;
        }

        .left-rail ul {
            position: sticky;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column; /* Make navigation vertical */
            width: 100%;
            gap: 1em; /* Add space between nav items */
        }

        .left-rail li {
            margin: 0;
            padding: 0;
            white-space: nowrap;
            width: 100%; /* Take full width of container */
        }

        .left-rail li a {
            display: block;
            padding: 0.5em 0;
            text-decoration: none;
        }

        .main-content {
            flex: 1;
            min-width: 0;
        }

        html {
           scroll-behavior: smooth;
        }

        /* Hamburger menu styles */
        .menu-toggle {
            display: none;
            position: absolute;
            right: 20px;
            top: 20px;
            cursor: pointer;
            font-size: 24px;
            z-index: 1001;
        }

        @media (max-width: 768px) {
            .container {
                flex-direction: column;
                padding: 20px;
                margin: 0;
            }

            .main-content {
                width: 100%;
            }

            .main-content h1 {
                width: 100%;
                text-align: center;
                margin: 0.5em 0;
                font-weight: bold;
            }

            .about-section {
                flex-direction: column;
            }

            .profile-photo-desktop {
                width: 100%;
                max-width: 300px;
                margin: 1em auto 2em;
                order: -1;
            }

            .menu-toggle {
                display: block;
            }

            .nav-bar ul {
                display: none;
                position: fixed;
                top: 0;
                right: 0;
                width: 250px;
                height: 100vh;
                background: white;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 1.5em;
                box-shadow: -2px 0 5px rgba(0,0,0,0.1);
                z-index: 1000;
            }

            .nav-bar ul.show {
                display: flex;
            }

        }

    .abstract-content {
        display: none;
        margin-left: 0;
        margin-top: 10px;
        padding: 10px;
        background-color: #faf7f5;  /* Light warm background */
        border-left: 3px solid #d4c4bc;  /* Muted brown border */
        color: #3a251a;  /* Slightly lighter brown for abstract text */
        font-size: 0.95em;  /* Slightly smaller font for abstract */
        line-height: 1.6;
    }

    .abstract-content.show {
        display: block;
    }



    .paper {
        margin-bottom: 2em;
    }

    .paper-title {
        font-weight: 600;
        margin-bottom: 0.15em;
    }

    .paper-note {
        font-size: 0.85em;
        font-style: italic;
        color: #5c4236;
        margin-bottom: 0.15em;
    }

    .abstract-link {
        display: inline-block;
        font-size: 0.9em;
        cursor: pointer;
        margin-bottom: 0.25em;
    }

    .paper-meta {
        font-size: 0.9em;
        color: #5c4236;
        margin-bottom: 0.25em;
    }

    .paper-meta .sep {
        color: #d4c4bc;
        margin: 0 0.5em;
    }

    .paper-status {
        font-size: 0.85em;
        color: #5c4236;
    }

    .photo-caption {
        font-size: 0.85em;
        font-style: italic;
        color: #5c4236;  /* Medium brown for captions */
        margin-bottom: 2em;
    }
    /* Ensure a persistent back link on mobile: fixed to bottom-left */
    .back-link {
        position: fixed;
        bottom: 1rem;
        left: 1rem;
        background: #faf7f5;
        padding: 0.4rem 0.8rem;
        border-radius: 6px;
        text-decoration: underline;
        text-underline-offset: 3px;
        z-index: 1001;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        display: inline-block;
    }

    @media (min-width: 769px) {
        /* On larger screens, let site control placement or hide if not needed */
        .back-link {
            position: static;
            box-shadow: none;
        }
    }

/* ---- CV page ---- */
    .cv-embed {
        flex: 1;
        min-width: 0;
    }

    .cv-embed iframe {
        width: 100%;
        height: 85vh;
        min-height: 600px;
        border: 1px solid #e4dcd6;
        border-radius: 5px;
        background: #faf7f5;
    }

    .cv-fallback {
        font-size: 0.9em;
        color: #5c4236;
        margin-top: 0.75em;
    }

    .cv-fallback-mobile {
        display: none;
    }

    @media (max-width: 768px) {
        .cv-embed iframe {
            display: none;      /* iOS Safari will not render a PDF in an iframe */
        }
        .cv-fallback-mobile {
            display: block;
        }
    }

/* ---- section subheads on the research page ---- */
    .section-group {
        margin-bottom: 3em;
    }

    .site-title a {
        text-decoration: none;
        color: inherit;
    }

/* ---- first paragraph aligns with the top of the photo ---- */
    .profile-content > p:first-child {
        margin-top: 0;
    }

    .last-updated {
        margin-top: 2.5em;
        color: #5c4236;
        font-size: 0.9em;
    }

/* ---- research page banner ---- */
    .research-banner {
        margin: 0 0 2.5em;
    }

    .research-banner img {
        display: block;
        width: auto;
        max-width: 100%;
        max-height: 340px;
        height: auto;
        margin: 0 auto;
        border-radius: 5px;
    }

    .banner-caption {
        text-align: center;
        font-size: 0.85em;
        font-style: italic;
        color: #5c4236;
        margin-top: 0.6em;
    }
