/* Center the main content area */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* Push content below fixed header */
.page-content {
    padding-top: 20px;
}

.site-header {
    position: sticky;
    width: 100%;
    max-width: 100%;
    top: 0;
    background: white;
    z-index: 100;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Main paper layout */
.paper-container {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 80px;
    align-items: start;
}

/* Sticky table of contents */
.sidebar {
    position: sticky;
    top: 100px;
    font-size: 0.95rem;
}

.sidebar p {
    font-weight: bold;
    margin-bottom: 10px;
}

/* TOC box styling */
#markdown-toc {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 16px;
    background: #fafafa;
    list-style: none;
}

.paper-sticky-buttons {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.paper-sticky-buttons a {
    padding: 8px 16px;    
    max-width: 80px;
    font-size: 0.9rem; 
    border-radius: 6px;      
    background: #0366d6;
    color: white;
    text-decoration: none;
    transition: background 0.2s;
}

.paper-sticky-buttons a:hover {
    background: #024c9a;
}

/* Paper text column */
.paper-content {
    max-width: 750px;
}

/* Improve readability */
.paper-content p {
    line-height: 1.7;
}

body {
    background: white;
}

/* Prevent headings from hiding under header when clicked */
html {
    scroll-padding-top: 100px;
}

.paper-meta {
    margin-top: 10px;
    margin-bottom: 40px;
    font-size: 1.05rem;
    color: #444;
    text-align: center;
}

.paper-meta strong {
    font-size: 1.1rem;
}

.paper-content h1 {
    text-align: center;
}

.paper-figure img {
    display: block;
    margin-bottom: 0.5rem;
}

.paper-figure {
    margin-bottom: 1rem;
}

.figure-caption {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* Mobile layout */
@media (max-width: 900px) {

    .paper-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }

}