/* Main Page Styling */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-body {
    padding: 60px 20px;
}

.hero .title,
.hero .publication-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero .publication-authors {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.hero .author-block {
    display: inline-block;
    margin: 0 8px 8px;
}

.hero .author-block a {
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transition: border-bottom-color 0.3s ease;
}

.hero .author-block a:hover {
    border-bottom-color: #fff;
}

.publication-affiliations {
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    justify-content: center;
    line-height: 1.5;
    margin: 10px auto 0;
    max-width: 820px;
}

.publication-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-style: italic;
    margin-top: 12px;
}

/* Publication Links */
.publication-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.link-block {
    display: inline-block;
}

.external-link.button {
    background: #363636;
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.external-link.button:hover {
    background: #f0f0f0 !important;
    color: #363636 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.external-link.button .icon {
    margin-right: 8px;
}

/* Sections */
.section {
    padding: 60px 20px;
    background-color: #f8f9fa;
}

.section .container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

/* Titles and Headers */
.title {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 25px;
    font-size: 2rem;
}

.title.is-3 {
    font-size: 1.75rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.title.is-4 {
    font-size: 1.3rem;
    color: #555;
    margin-top: 30px;
}

.title.left {
    text-align: left;
    border-bottom: 2px solid #764ba2;
    padding-bottom: 10px;
}

/* Horizontal Lines */
.tldr-line {
    border: none;
    height: 2px;
    background: linear-gradient(to right, #667eea, #764ba2);
    margin: 15px 0 30px 0;
}

/* Content */
.content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.content p {
    margin-bottom: 20px;
    text-align: justify;
}

.bottom-space-big {
    margin-bottom: 40px;
}

.bottom-space-small {
    margin-bottom: 15px;
}

.teaser-figure {
    margin: 10px auto 45px;
}

.teaser-figure img {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: block;
    height: auto;
    width: 100%;
}

.results-summary-copy {
    margin-bottom: 25px;
}

.benchmark-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 30px;
    text-align: left;
}

.benchmark-item {
    background: #f8f9ff;
    border: 1px solid #e2e6ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 18px;
}

.benchmark-item strong {
    color: #4f62c9;
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
    margin-bottom: 8px;
}

.benchmark-item span {
    color: #555;
    display: block;
    font-size: 0.95rem;
    line-height: 1.45;
}

.benchmark-figure {
    margin: 0 0 30px;
}

.benchmark-figure img {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: block;
    height: auto;
    width: 100%;
}

.energy-formula {
    margin: 8px auto 28px;
    max-width: 760px;
}

.energy-formula img,
.policy-figure img {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: block;
    height: auto;
    width: 100%;
}

.policy-figure {
    margin: 0 auto 25px;
}

.qualitative-figure {
    margin: 0 auto 30px;
}

.qualitative-figure img {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: block;
    height: auto;
    width: 100%;
}

/* Images and Captions */
.image-item {
    margin: 30px 0;
    text-align: center;
}

.responsive-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.responsive-img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.img-85 {
    width: 85%;
    margin: 0 auto;
}

.img-100 {
    width: 100%;
}

.img-inline {
    display: inline-block;
}

.caption {
    font-size: 0.95rem;
    color: #777;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.6;
}

/* Columns Layout */
.columns {
    margin-bottom: 30px;
}

.column {
    padding: 15px;
}

/* Image Container for Side-by-Side */
.image-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.image-container .image-item {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
}

/* Video Carousel */
.video-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    background: #f5f5f5;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.video-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    max-width: 600px;
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-wrapper video.active {
    display: block;
}

.video-wrapper video:not(.active) {
    display: none;
}

/* Navigation Buttons */
.nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 18px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.nav:active {
    transform: scale(0.95);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

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

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

footer .content {
    color: #ecf0f1;
}

footer a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 2px solid rgba(102, 126, 234, 0.5);
    transition: border-bottom-color 0.3s ease;
}

footer a:hover {
    border-bottom-color: #667eea;
}

/* Plotly Styling */
.plotly {
    background-color: white !important;
}

.plot-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 30px 0;
}

/* Code Blocks */
code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    color: #d63384;
    font-family: 'Courier New', monospace;
}

pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

pre code {
    color: #ecf0f1;
    background: none;
    padding: 0;
}

pre.citation {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    white-space: pre-wrap;
}

.citation-coming-soon {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    color: #555;
    margin: 0;
    padding: 18px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .hero .title,
    .hero .publication-title {
        font-size: 1.8rem;
    }

    .title.is-3 {
        font-size: 1.3rem;
    }

    .publication-links {
        flex-direction: column;
        align-items: stretch;
    }

    .link-block {
        width: 100%;
    }

    .external-link.button {
        width: 100%;
        text-align: center;
    }

    .image-container {
        flex-direction: column;
    }

    .image-container .image-item {
        max-width: 100%;
    }

    .section .container {
        padding: 20px;
    }

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

    .video-carousel {
        flex-direction: column;
        padding: 20px;
    }

    .nav {
        min-width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content, .image-item, .video-carousel {
    animation: fadeIn 0.6s ease-in-out;
}

/* Equal Contribution Text */
.equal-contribution {
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
}

/* Math Responsive */
.math-responsive {
    overflow-x: auto;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}
