/* styles.css - Main styles for RAVENEA project page */

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* Smooth animations for all elements */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Header Section */
.header-section {
    padding: 80px 0 60px;
    background: var(--gradient-subtle);
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(82, 183, 136, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.header-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(233, 163, 25, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.paper-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 1.75rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--heading-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.author-line {
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.author-link {
    color: var(--author-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.author-link:hover {
    color: var(--primary-color);
}

.author-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.author-link:hover::after {
    width: 100%;
}

.equal-contribution {
    font-size: 0.9rem;
    color: var(--muted-color);
}

.institution-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.institution-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.institution-logo {
    height: 40px;
    width: auto;
}

.institution-text {
    font-size: 0.9rem;
    color: var(--muted-color);
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.5rem;
    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.5s ease;
}

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

.primary-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.4);
    color: white;
}

.secondary-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #40916c 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(82, 183, 136, 0.3);
}

.secondary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(82, 183, 136, 0.4);
    color: white;
}

.accent-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #dda15e 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(233, 163, 25, 0.3);
}

.accent-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 163, 25, 0.4);
    color: white;
}

.outline-btn {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.outline-btn:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.3);
}

/* Section Titles */
.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-top: 4rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* TL;DR Section */
.tldr-section {
    margin-top: 30px;
}

.tldr-box {
    background: var(--tldr-bg);
    border: 1px solid var(--tldr-border);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.tldr-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color), var(--accent-color));
}

.tldr-title {
    color: var(--primary-color);
    font-size: 2.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tldr-question {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
}

.tldr-question .lead {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-align: left;
}

.tldr-answer {
    font-size: 1.25rem;
    font-weight: 500;
    text-align: left;
    color: var(--text-color);
}

.highlight-answer {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Key Findings Cards */
.finding-card {
    height: 100%;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--card-bg);
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.finding-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    transition: height 0.3s ease;
}

.finding-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.finding-card:hover::before {
    height: 8px;
}

.finding-card-1::before {
    background: var(--primary-gradient);
}

.finding-card-1 h5 {
    color: var(--primary-color);
}

.finding-card-2::before {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #40916c 100%);
}

.finding-card-2 h5 {
    color: var(--secondary-color);
}

.finding-card-3::before {
    background: linear-gradient(135deg, var(--accent-color) 0%, #dda15e 100%);
}

.finding-card-3 h5 {
    color: var(--accent-color);
}

.finding-card h5 {
    font-size: 1.2rem;
    font-weight: 700;
}

.finding-card p {
    font-size: 1.05rem;
    color: var(--muted-color);
}

/* Figure Container */
.figure-container {
    box-shadow: var(--shadow-xl);
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.figure-caption {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--muted-color);
}

/* Abstract Section */
.abstract-box {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
}

.abstract-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.abstract-text {
    font-size: 1.1rem;
    text-align: justify;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Approach Cards */
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    transition: all 0.4s ease;
}

.icon-primary {
    background: var(--primary-gradient);
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.35);
}

.card {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--card-bg);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card:hover .icon-circle {
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-weight: 700;
    color: var(--heading-color);
    font-size: 1.25rem;
}

.card-text {
    color: var(--muted-color);
    line-height: 1.7;
}

/* Research Questions */
.custom-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.custom-nav-pills .nav-link {
    padding: 0.85rem 1.5rem;
    border-radius: 50px;
    background-color: var(--nav-pill-bg);
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    border: 1px solid transparent;
}

.custom-nav-pills .nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.custom-nav-pills .nav-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.35);
}

.research-question {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.research-question:hover {
    box-shadow: var(--shadow-lg);
}

.question-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: background-color 0.3s ease;
}

.question-header:hover {
    background-color: var(--primary-light);
}

.question-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    margin-right: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

.question-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
    line-height: 1.4;
}

.question-answer {
    padding: 1.75rem;
}

.answer-highlight {
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.findings-box {
    background: var(--findings-bg);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--secondary-color);
}

.findings-box h5 {
    color: var(--secondary-color);
    font-weight: 700;
}

.figure-box {
    background: linear-gradient(135deg, #fefcf3 0%, #d8f3dc 100%);
    border-radius: var(--radius-lg);
}

/* Key Takeaways */
.highlight-box {
    background: var(--highlight-bg);
    border-radius: var(--radius-xl);
    border-left: 6px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(233, 163, 25, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.findings-list {
    list-style-type: none;
    padding-left: 0;
}

.takeaway-badge {
    font-size: 1rem;
    min-width: 40px;
    text-align: center;
    background: var(--primary-gradient) !important;
    border-radius: 50% !important;
}

/* Resources Section */
.resources-card {
    height: 100%;
    border: none;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.resources-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resources-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.resources-card:hover::before {
    opacity: 1;
}

.key-point-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    font-size: 2rem;
    transition: all 0.4s ease;
}

.resources-card:hover .key-point-icon {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.35);
}

/* Citation Section */
.citation-box {
    background: linear-gradient(135deg, #fefcf3 0%, #f4f1de 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.citation-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
}

.citation-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-left: 1rem;
}

.citation-box code {
    color: var(--text-color);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* FAQ Accordion */
.accordion-item {
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.accordion-item:hover {
    box-shadow: var(--shadow-md);
}

.accordion-button {
    font-weight: 700;
    color: var(--heading-color);
    background-color: var(--card-bg);
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-light);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

.accordion-button::after {
    transition: transform 0.3s ease;
}

.accordion-body {
    background-color: var(--card-bg);
    padding: 1.25rem 1.5rem;
    line-height: 1.7;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, var(--bg-color) 0%, #e2e8f0 100%);
    color: var(--footer-text);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Scaling Card */
.scaling-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.scaling-title {
    color: var(--heading-color);
    font-weight: 700;
}

/* Progress bars */
.progress {
    background-color: var(--progress-bg);
    border-radius: 10px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 15px;
}

.card-title {
    color: var(--heading-color);
    font-weight: 700;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background-color: var(--primary-light);
    color: var(--primary-color);
}
/* Results Tables */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.table-title {
    color: var(--heading-color);
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.table-description {
    font-size: 0.95rem;
    color: var(--muted-color);
}

.results-table {
    font-size: 0.85rem;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.results-table thead th {
    background: #2d6a4f !important;
    color: #ffffff !important;
    font-weight: 700;
    text-align: center;
    padding: 0.75rem 0.5rem;
    border: none !important;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table thead th:first-child {
    text-align: left;
    border-radius: var(--radius-md) 0 0 0;
}

.results-table thead th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.results-table tbody td {
    text-align: center;
    padding: 0.6rem 0.5rem;
    vertical-align: middle;
    border-color: var(--border-color);
    transition: background-color 0.2s ease;
}

.results-table tbody tr:hover td {
    background-color: rgba(82, 183, 136, 0.05);
}

.results-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
}

.results-table .frozen-model td {
    color: #52796f;
    background-color: #fefcf3;
}

.results-table .our-model td {
    background: linear-gradient(135deg, rgba(82, 183, 136, 0.08) 0%, rgba(45, 106, 79, 0.05) 100%);
}

.results-table .best-row td {
    background: linear-gradient(135deg, rgba(82, 183, 136, 0.15) 0%, rgba(45, 106, 79, 0.1) 100%);
    font-weight: 700;
}

.results-table .section-header td {
    background: linear-gradient(135deg, #f4f1de 0%, #d8f3dc 100%);
    font-weight: 700;
    padding: 0.75rem 0.5rem;
    border-top: 2px solid var(--border-color);
    color: var(--heading-color);
}

.table-legend {
    font-size: 0.85rem;
    color: var(--muted-color);
}

/* Downstream table specific */
.downstream-table {
    font-size: 0.75rem;
}

.downstream-table thead th {
    padding: 0.5rem 0.35rem;
    font-size: 0.7rem;
}

.downstream-table tbody td {
    padding: 0.4rem 0.3rem;
}

/* Table responsive container */
.table-responsive {
    border-radius: var(--radius-md);
    overflow-x: auto;
}

/* Animation utilities */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Logo animation */
.logo {
    transition: transform 0.4s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Image hover effects */
.figure-container img {
    transition: transform 0.4s ease;
}

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

/* Badge animations */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Modern scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b7e4c7 0%, #74c69d 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #74c69d 0%, #52b788 100%);
}