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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding-top: 60px;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 20px;
}

.nav-link {
    padding: 8px 15px;
    margin: 5px;
    color: #333;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 5px;
}

.nav-link:hover {
    background-color: #2563eb;
    color: white;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.2em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.3;
}

.publication-venue {
    font-size: 1.15em;
    color: #2563eb;
    font-weight: 600;
    margin: 10px 0 20px 0;
}

.authors {
    font-size: 1.1em;
    margin: 15px 0;
    color: #555;
    line-height: 1.8;
}

.authors a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.authors a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.authors sup {
    font-size: 0.75em;
    margin-left: 2px;
}

.affiliation {
    font-size: 1em;
    color: #666;
    margin: 10px 0 20px 0;
}

.affiliation sup {
    font-size: 0.75em;
    margin-right: 3px;
}

.links {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-link:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-link svg {
    flex-shrink: 0;
}

/* Sections */
section {
    margin-bottom: 50px;
}

h2 {
    font-size: 1.8em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

h3 {
    font-size: 1.4em;
    font-weight: 600;
    color: #2563eb;
    margin: 25px 0 15px 0;
}

h4 {
    font-size: 1.1em;
    font-weight: 600;
    color: #1a1a1a;
    margin: 15px 0 10px 0;
}

p {
    margin-bottom: 15px;
    text-align: justify;
    font-size: 1.05em;
    line-height: 1.7;
}

/* Abstract */
#abstract p {
    background-color: #f5f5f5;
    padding: 20px;
    border-left: 4px solid #2563eb;
    border-radius: 4px;
}

#abstract strong {
    color: #2563eb;
}

/* Figures */
.figure {
    margin: 30px 0;
    text-align: center;
}

.figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.caption {
    margin-top: 15px;
    font-size: 0.95em;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Method Points */
.method-points {
    margin: 25px 0;
}

.point {
    background-color: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.point ul {
    margin-left: 25px;
    margin-top: 10px;
}

.point li {
    margin: 8px 0;
    line-height: 1.6;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 25px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

thead {
    background-color: #2563eb;
    color: white;
}

th, td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #ddd;
}

th {
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

tbody tr:hover {
    background-color: #e9ecef;
}

.baseline {
    background-color: #fff;
}

.ours {
    background-color: #dbeafe !important;
    font-weight: 600;
}

.ours-distill {
    background-color: #e0f2fe !important;
    font-weight: 600;
}

.improvement {
    background-color: #f0fdf4 !important;
    font-style: italic;
    color: #166534;
}

/* Highlight Box */
.highlight-box {
    background: #2563eb;
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.highlight-box h4 {
    color: white;
    margin-top: 0;
    font-size: 1.3em;
}

.highlight-box p {
    margin-bottom: 0;
    text-align: left;
}

/* Dataset Grid */
.dataset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.dataset-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dataset-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dataset-card h4 {
    color: #2563eb;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.dataset-card p {
    margin: 8px 0;
    text-align: left;
    font-size: 0.95em;
}

.dataset-card strong {
    color: #1a1a1a;
}

/* Findings Grid */
.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.finding-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    text-align: center;
}

.finding-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.finding-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.finding-card h4 {
    color: #2563eb;
    margin: 10px 0 15px 0;
    font-size: 1.1em;
}

.finding-card p {
    text-align: center;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

/* Ablation Grid */
.ablation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 30px 0;
}

.ablation-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ablation-item h3 {
    margin-top: 0;
    font-size: 1.2em;
}

.ablation-item img {
    margin: 15px 0;
}

/* Citation */
#citation pre {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow-x: auto;
}

#citation code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #333;
    line-height: 1.5;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    border-top: 2px solid #e0e0e0;
    margin-top: 50px;
    color: #666;
    font-size: 0.9em;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #2563eb;
    color: white;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
    border-radius: 50%;
    text-decoration: none;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top:hover {
    background-color: #1d4ed8;
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }
    
    .nav-container {
        justify-content: flex-start;
    }
    
    .nav-link {
        font-size: 0.85em;
        padding: 6px 10px;
        margin: 3px;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.6em;
    }
    
    h2 {
        font-size: 1.4em;
    }
    
    h3 {
        font-size: 1.2em;
    }
    
    .authors {
        font-size: 1em;
    }
    
    .links {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-link {
        width: 100%;
        justify-content: center;
    }
    
    table {
        font-size: 0.85em;
    }
    
    th, td {
        padding: 8px 10px;
    }
    
    .findings-grid {
        grid-template-columns: 1fr;
    }
    
    .dataset-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .ablation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Utility Classes */
strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

sub {
    font-size: 0.8em;
    vertical-align: sub;
}

sup {
    font-size: 0.8em;
    vertical-align: super;
}
