/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    font-size: 16px;
}

/* Top Navigation */
/* Desktop Navigation (inside right-column) */
.desktop-nav {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
}

.desktop-nav a {
    padding: 8px 20px 6px;
    text-decoration: none;
    color: rgb(27, 66, 115);
    font-weight: 500;
    transition: background-color 0.2s;
    border-bottom: 2px solid transparent;
}

.desktop-nav a:first-child {
    padding-left: 0;
}

.desktop-nav a:hover {
    background-color: #f5f5f5;
}

.desktop-nav a.active {
    border-bottom-color: rgb(27, 66, 115);
    color: rgb(27, 66, 115);
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
}

/* Mobile Navigation (below profile) */
.mobile-nav {
    display: none;
    gap: 8px;
    margin-top: 1.5rem;
    justify-content: center;
}

.mobile-nav a {
    padding: 8px 16px;
    text-decoration: none;
    color: rgb(27, 66, 115);
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.mobile-nav a.active {
    border-bottom-color: rgb(27, 66, 115);
    color: rgb(27, 66, 115);
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 88px 20px 40px;
    display: flex;
    gap: 60px;
    align-items: flex-start;
    overflow-x: hidden;
}

/* Left Column */
.left-column {
    flex: 0 0 280px;
    min-width: 280px;
}

/* Right Column */
.right-column {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Profile Photo */
.profile-photo {
    max-width: 280px;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #000;
}

/* Desktop-only name (above nav in right column) */
.desktop-name {
    display: block;
}

/* Mobile-only name (in left column) - styled like h1 */
.mobile-name {
    display: none;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #000;
}

@media (max-width: 768px) {
    .desktop-name {
        display: none;
    }
    
    .mobile-name {
        display: block;
    }
    
    .mobile-name {
        font-size: 1.5rem;
    }
}

h3 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #000;
}

.right-column h3:first-of-type {
    margin-top: 0;
}

p {
    margin-bottom: 1rem;
    color: #000;
}

p + .paper-details {
    margin-top: -0.9rem;
}

.bio,
.position,
.paper-title,
.paper-details {
    line-height: 1.4;
}

.cv-link {
    margin-top: 0rem;
}

strong {
    font-weight: 600;
}

/* Paper titles */
p strong {
    color: rgb(27, 66, 115);
}

em {
    color: rgb(27, 66, 115);
}

/* Journal names in paper details */
.paper-details em {
    color: #000;
}

.journal-name {
    color: rgb(69, 150, 244);
}

/* Links */
a {
    color: rgb(27, 66, 115);
    text-decoration: underline;
}

a:visited {
    color: rgb(27, 66, 115);
}

a:hover {
    color: rgb(27, 66, 115);
}

/* Email Link */
a.email-link {
    text-decoration: none;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgb(27, 66, 115);
    border-radius: 3px;
    color: rgb(27, 66, 115);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.social-btn:visited {
    color: rgb(27, 66, 115);
}

.social-btn:hover {
    background-color: rgb(27, 66, 115);
    color: #fff;
}

.social-btn svg {
    display: block;
}

/* Coauthor Links */
a.coauthor-link {
    color: #000 !important;
    text-decoration: none !important;
}

a.coauthor-link:visited {
    color: #000 !important;
    text-decoration: none !important;
}

a.coauthor-link:hover {
    color: #000 !important;
    text-decoration: none !important;
}

/* Award Links */
a.award-link {
    color: #000 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

a.award-link:visited {
    color: #000 !important;
    text-decoration: none !important;
}

a.award-link:hover {
    color: #000 !important;
    text-decoration: none !important;
}

/* News Items */
.news-item {
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.news-date {
    flex: 0 0 auto;
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

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

.news-content p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-content p:last-child {
    margin-bottom: 0;
}

.news-content strong {
    color: rgb(27, 66, 115);
}

.news-buttons {
    margin-top: 0.3rem;
}

.news-buttons .btn {
    display: inline-block;
}

/* Paper Details */
.paper-details {
    margin-left: 0;
    margin-bottom: 2rem;
}

/* Title-only entries use the same gap as the block under coauthors. */
.paper-title:not(:has(+ .paper-details)) {
    margin-bottom: 2rem;
}

.paper-details .btn {
    margin-top: 0.3rem;
    display: inline-block;
    line-height: 1.6;
}

/* Button Links */
a.btn {
    display: inline-block;
    padding: 0px 10px;
    border: 1px solid rgb(27, 66, 115);
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    margin-right: 4px;
}

a.btn:visited {
    color: rgb(27, 66, 115);
}

a.btn:hover {
    background-color: rgb(27, 66, 115);
    color: #fff;
}

/* Add arrow to external link buttons */
a.btn[target="_blank"]:not(.toggle-abstract):not(.toggle-coverage)::after {
    content: " ↗";
    font-size: 0.85em;
}

a.btn-coverage {
    border: 1px solid rgb(27, 66, 115);
    color: rgb(27, 66, 115);
}

a.btn-coverage:visited {
    color: rgb(27, 66, 115);
}

a.btn-coverage:hover {
    background-color: rgb(27, 66, 115);
    color: #fff;
}

/* Abstract Boxes */
.abstract {
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    margin-left: 0;
    padding: 0 0 0 1rem;
    border-left: 3px solid rgb(27, 66, 115);
}

/* News section abstracts - align with content */
.news-item + .abstract {
    margin-left: 84px;
}

.abstract p {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.2;
}

/* Coverage Boxes */
.coverage {
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    margin-left: 0;
    padding: 0 0 0 1rem;
    border-left: 3px solid rgb(27, 66, 115);
}

.coverage p {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.2;
}

.coverage-list a,
.coverage-list a:visited {
    color: rgb(27, 66, 115);
    text-decoration: none;
    white-space: nowrap;
}

.coverage-list a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 30px;
        padding: 30px 15px;
    }
    
    .left-column {
        flex: none;
        width: 100%;
        text-align: center;
    }
    
    .profile-photo {
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    .news-item + .abstract {
        margin-left: 84px;
    }
    
    a.award-link,
    .coverage-list a {
        white-space: normal;
    }
}
