/* Modern CSS Variables for easy theming */
:root {
    --bg-color: #FAFAFA;
    --text-color: #000000;
    --link-color: #000000;
    --link-hover-color: #0000FF;
    --abstract-bg: #EAEAEA;
    --abstract-border: #CCCCCC;
}

/* Base Styles */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* Modern, crisp font stack */
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: var(--link-hover-color);
    text-decoration: underline;
    font-weight: bold;
}

a:active {
    text-decoration: none;
}

/* Header & Navigation Layout */
header {
    text-align: center;
    padding: 2rem 1rem 1rem 1rem;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
}

h1.myfont {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 2.5rem;
    margin: 0;
}

.title-link:hover {
    text-decoration: none;
}

.subtitle {
    margin-top: 0.25rem;
    font-size: 1.2rem;
    color: #555;
}

/* Main Content Container (Replaces the 85% width Table) */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem 1.5rem; /* Ensures it doesn't touch the edges on mobile */
}

/* Research Section Formatting */
.profile-links {
    margin-bottom: 2rem;
}

h2 {
    border-bottom: 2px solid #EEE;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    margin-top: 2.5rem;
    color: #333;
}

/* Paper Lists styling */
.paper-list {
    padding-left: 1.5rem;
}

.paper-list li {
    margin-bottom: 2.5rem; /* Gives breathing room between papers */
}

.paper-title {
    font-size: 1.1rem;
    font-weight: bold;
}

.paper-date {
    color: #666;
    font-size: 0.95rem;
}

.paper-links {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.paper-links a {
    margin-right: 0.5rem;
}

.publication-status, .media-coverage {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Modern Abstract Accordion (Replaces the hover popup) */
.abstract-box {
    background-color: var(--abstract-bg);
    border: 1px solid var(--abstract-border);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    max-width: 100%;
}

.abstract-box summary {
    cursor: pointer;
    font-weight: bold;
    outline: none;
    user-select: none;
}

/* The arrow for the summary tag is native, but we make sure the content inside looks good */
.abstract-box p {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #222;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    h1.myfont {
        font-size: 2rem;
    }
    
    nav {
        gap: 0.5rem;
        flex-direction: column; /* Stack the nav on very small screens */
    }
    
    .container {
        padding: 0 1rem;
    }
}