/* General Body and Typography */
body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: #333;
    background-color: #fdfdfd;
    margin: 0;
    padding: 0;
    max-width: 100VW;
    wrap-option: wrap;
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    gap: 30px;
}

/* Header Styling */
.paper-header {
    margin: 2rem auto 2rem auto;
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1.5rem;
}

.paper-header h1 {
    max-width: 95vw;
    text-wrap: pretty;
    font-size: 2.2rem;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.journal-info {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    color: #888;
}

.author-info p {
    margin: 0.2rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.author-info strong {
    color: #0056b3;
}

/* Sidebar Navigation */
.sidebar {
    flex: 0 0 200px; /* Do not grow, do not shrink, base width 200px */
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.sidebar h3 {
    font-size: 1.1rem;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 8px;
    margin-top: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px 0;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.sidebar li a:hover {
    color: #0056b3;
}


/* Main Content Area */
.content-area {
    flex: 1; /* Take up remaining space */
    max-width: 800px;
}

#paper-content {
    wrap-option: wrap;
    max-width: 100%;
}

#paper-content h2 {
    max-width: 95vw;
    text-wrap: pretty;
    font-size: 1.8rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

#paper-content h3 {
    max-width: 95vw;
    text-wrap: pretty;
    font-size: 1.4rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    margin-top: 2rem;
}

#paper-content p,
#paper-content li {
    line-height: 3;
    word-wrap: break-word;
    text-wrap: pretty;
    max-width: 90vw;
    box-sizing: border-box;
    font-size: 1.1rem;
    text-align: justify;
}

#paper-content a {
    color: #0056b3;
    text-decoration: none;
}

#paper-content a:hover {
    text-decoration: underline;
}

#paper-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #0056b3;
    background-color: #f0f7ff;
    font-style: italic;
    color: #444;
}

#paper-content code {
    background-color: #f4f4f4;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

/* =================================== */
/* Responsive Design          */
/* =================================== */

/* For tablets and smaller (stacks the sidebar) */
@media (max-width: 992px) {
    .container {
        flex-direction: column; /* Stack sidebar and content */
        margin: 1.5rem auto;
        padding: 0 15px;
        gap: 25px;
    }

    .sidebar {
        flex: 1 1 auto; /* Reset the flex-basis */
        width: 100%;
        max-width: 800px; /* Allow sidebar to match content width */
        margin: 0 auto;    /* Center it when stacked */
    }

    .content-area {
        /* flex: 1; is already set and fine */
        margin: 0 auto; /* Center it when stacked */
    }
}

/* For small mobile phones (typography and spacing) */
@media (max-width: 600px) {
    body {
        line-height: 1.7; /* Adjust line height for small screens */
    }

    .container {
        max-width: 100vw;
        box-sizing: border-box;
        margin: 1rem auto;
        wrap-option: wrap;
        padding: 0 15px;
        gap: 20px;
    }

    .paper-header {
        margin: 1rem auto 1.5rem auto;
        padding-bottom: 1rem;
    }

    .paper-header h1 {
        font-size: 1.8rem; /* Smaller heading */
    }

    #paper-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    #paper-content h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }

    #paper-content p,
    #paper-content li {
        font-size: 1rem; /* Slightly smaller body text */
    }

    #paper-content blockquote {
        margin: 1rem 0;
        padding: 0.8rem 1rem;
    }
}