/* ==========================================
   CSS Variables and Global Styles
   ========================================== */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #6b7280;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background: #ffffff;
    --background-light: #f8fafc;
    --background-dark: #f1f5f9;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Monaco', 'Cascadia Code', monospace;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 4rem 0;
    --border-radius: 0.75rem;
    --border-radius-sm: 0.375rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ==========================================
   Layout Components
   ========================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-primary);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.bg-light {
    background-color: var(--background-light);
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-medium);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 4rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    animation: subtle-float 20s ease-in-out infinite;
}

@keyframes subtle-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-1%, -1%) rotate(1deg); }
    66% { transform: translate(1%, -0.5%) rotate(-1deg); }
}

.institution-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.institution-badge {
    display: inline-block;
    background: linear-gradient(45deg, var(--secondary-color), var(--text-secondary));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-medium);
}

.institution-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
}

.title {
    margin: 2rem 0;
    color: var(--text-primary);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.title .highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.authors {
    margin: 2rem 0;
    position: relative;
    z-index: 1;
}

.author-group {
    margin-bottom: 1rem;
}

.author {
    display: inline-block;
    margin: 0 1rem 0.5rem 0;
    font-weight: 500;
    color: var(--text-primary);
}

.affiliations {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.author-notes {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.author-notes span {
    margin: 0 1rem;
}

.hero-buttons {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    color: white;
}

.btn-secondary {
    background: var(--background-light);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-light);
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

/* ==========================================
   Abstract Section
   ========================================== */
.abstract-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.abstract-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.key-results {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.result-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: transform var(--transition-medium);
    min-width: 150px;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.result-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.result-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================
   Contributions Section
   ========================================== */
.contributions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contribution-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-medium);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contribution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: left var(--transition-medium);
}

.contribution-card:hover::before {
    left: 0;
}

.contribution-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.card-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.contribution-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contribution-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================
   Method Section
   ========================================== */
.method-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.method-tabs .tab-btn {
    background: rgba(37, 99, 235, 0.05);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-medium);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.method-tabs .tab-btn:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
}

.method-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08) !important;
    box-shadow: var(--shadow-light) !important;
    transform: none !important;
}

.method-tabs .tab-btn:focus {
    outline: none;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.method-tabs .tab-btn:active {
    background: rgba(37, 99, 235, 0.08);
}

.method-content {
    margin-top: 2rem;
}

.method-content .tab-content {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.method-content .tab-content.active {
    display: grid;
}

.method-diagram {
    text-align: center;
}

.responsive-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: transform var(--transition-medium);
}

.responsive-img:hover {
    transform: scale(1.02);
}

.image-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
    text-align: center;
    font-style: italic;
}

.method-description h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.method-description h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.5rem;
}

.method-description ul {
    padding-left: 1.5rem;
}

.method-description li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* ==========================================
   Results Section
   ========================================== */
.results-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.results-tabs .tab-btn {
    background: rgba(37, 99, 235, 0.05);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-medium);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.results-tabs .tab-btn:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
}

.results-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08) !important;
    box-shadow: var(--shadow-light) !important;
    transform: none !important;
}

.results-tabs .tab-btn:focus {
    outline: none;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.results-tabs .tab-btn:active {
    background: rgba(37, 99, 235, 0.08);
}

.results-content {
    margin-top: 2rem;
}

.results-content .tab-content {
    display: none;
}

.results-content .tab-content.active {
    display: block;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.result-section.full-width {
    grid-column: 1 / -1;
}

.table-image {
    text-align: center;
}

.result-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* ==========================================
   Video Demonstrations Section
   ========================================== */
.method-comparison-label {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(37, 99, 235, 0.05);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.comparison-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.baseline-label,
.method-label {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    display: inline-block;
}

.baseline-label {
    background: rgba(156, 163, 175, 0.2);
    color: var(--text-secondary);
    border: 2px solid var(--text-secondary);
}

.method-label {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 700;
}
.video-model-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.video-model-tabs .tab-btn {
    background: rgba(37, 99, 235, 0.05);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-medium);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.video-model-tabs .tab-btn:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
}

.video-model-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08) !important;
    box-shadow: var(--shadow-light) !important;
    transform: none !important;
}

.video-model-tabs .tab-btn:focus {
    outline: none;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.video-model-tabs .tab-btn:active {
    background: rgba(37, 99, 235, 0.08);
}

.video-content {
    margin-top: 2rem;
}

.video-content .tab-content {
    display: none;
}

.video-content .tab-content.active {
    display: block;
}

.video-comparison-grid {
    display: grid;
    gap: 3rem;
}

.video-comparison {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    background: white;
    box-shadow: var(--shadow-light);
}

.video-comparison h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
}

.video-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.video-item {
    text-align: center;
}

.video-item h5 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.video-item video {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-medium);
    background: var(--background-dark);
}

.video-item video:hover {
    box-shadow: var(--shadow-heavy);
}

.performance-table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.performance-table table {
    width: 100%;
    border-collapse: collapse;
}

.performance-table th {
    background: var(--background-dark);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.performance-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.highlight-row {
    background: rgba(37, 99, 235, 0.05);
}

.highlight-row td {
    color: var(--text-primary);
}

.chart-placeholder {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

/* ==========================================
   Gallery Section
   ========================================== */
.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(37, 99, 235, 0.05);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
    color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.tab-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.tab-btn.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.tab-btn:focus {
    outline: none;
    box-shadow: var(--shadow-heavy), 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tab-btn:active {
    transform: translateY(0px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.comparison-grid,
.attention-grid,
.samples-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.comparison-grid {
    grid-template-columns: 1fr 1fr;
}

.attention-grid {
    grid-template-columns: 1fr 1fr;
}

.samples-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.comparison-item {
    text-align: center;
}

.comparison-item h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.gallery-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-medium);
    cursor: pointer;
}

.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-heavy);
}

.section-desc {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   Citation Section
   ========================================== */
.citation-box {
    background: var(--background-dark);
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-light);
}

#bibtex-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: none;
    border: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    overflow-x: auto;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }