/* Theme Variables */
/* Theme Variables */
:root {
    --primary-color: #84B261;       /* Deep Blue */
    --secondary-color: #708F58;     /* Forest Green */
    --accent-color: #6366F1;        /* Indigo */
    --light-color: #FFFFFF;         /* Pure White */
    --dark-color: #000000;          /* Deep Charcoal */
    --text-color: #000000;          /* Medium Gray */         /* Medium Gray */
    --background-color: #FFFFFF;    /* White Background */
    --card-background: #FFFFFF;
    --header-gradient: linear-gradient(135deg, #EBF3FA 0%, #FFFFFF 100%);
    --footer-gradient: linear-gradient(to right, #1F2937, #84B261);
    --nav-gradient: linear-gradient(90deg, #1F2937 0%, #2D5F8B 100%);
    --header-text-color: #333333;
    --footer-text-color: #ffffff;
    --font-family: 'Nunito', 'Avenir Next', 'Segoe UI', sans-serif;
    --link-color: #2D5F8B;
}

/* Note: This only contains the color variables. The rest of the CSS file would remain unchanged. */

/* Font Settings */
body {
    font-family: var(--font-family);
    line-height: 1.8;
    font-size: 18px;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    scroll-behavior: smooth;
    counter-reset: finding-number;
}

/* Element Styles */
.header-section {
    background: var(--header-gradient);
    padding: 90px 0 70px 0;
    margin-bottom: 30px;
    color: var(--header-text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(57, 235, 37, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(-30deg);
    z-index: 0;
    pointer-events: none;
}

.navbar {
    background: var(--nav-gradient);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0; 
}

.navbar .nav-link {
    color: var(--light-color) !important; /* Force white color */
    font-weight: 600;
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

/* Ensure the navbar brand (Web-SSL) is also white */
.navbar-brand {
    color: var(--light-color) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Make sure the hover state maintains white text */
.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: var(--light-color) !important;
}

/* For active nav items */
.navbar .nav-link.active {
    color: var(--light-color) !important;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Paper title */
.paper-title {
    font-weight: 700;
    font-size: 53px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    /* background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); */
    -webkit-background-clip: text;
    /* -webkit-text-fill-color: transparent; */
    display: inline-block;
}

.paper-subtitle {
    font-weight: 400;
    font-size: 26px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

/* Author styles */
.author-line {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 10px 0;
    line-height: 1.5;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 1;
}

.author-link {
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 3px 5px;
    border-radius: 4px;
    color: var(--link-color);
}

.author-link:hover {
    background-color: rgba(0, 61, 124, 0.1);
    text-decoration: underline;
    transform: translateY(-2px);
}

/* Key Points Card */
.key-point-card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.key-point-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.key-point-card .card-body {
    padding: 1.5rem;
}

.key-point-card .card-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.key-point-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* Abstract */
/* .abstract { */
    /* background-color: var(--light-color); */
    /* padding: 30px; */
    /* border-radius: 15px; */
    /* margin: 40px 0; */
    /* border-left: 5px solid var(--accent-color); */
    /* box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); */
/* } */

/* Section title */
.section-title {
    margin: 60px 0 30px 0;
    font-weight: 600;
    font-size: 34px;
    color: var(--primary-color);
    padding-bottom: 10px;
    text-align: center;
    border-bottom: none;
    position: relative;
}

/* Full-width bottom border for section titles */
.section-title::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 15px auto 0 auto;
}

.footer {
    margin-top: 100px;
    padding: 50px 0;
    background: var(--footer-gradient);
    color: var(--footer-text-color);
}

/* Figure section styles */
.figure-section {
    margin: 50px 0;
    text-align: center;
}

.figure-container {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.figure-container:hover {
    transform: translateY(-5px);
}

.figure-caption {
    margin-top: 15px;
    font-size: 1.rem;
    color: var(--text-color);
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
}

/* Resources card */
.resources-card {
    height: 100%;
    transition: transform 0.3s ease;
    border-top: 4px solid var(--secondary-color);
    background-color: var(--card-background);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: none;
}

.resources-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Button styles */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    transition: all 0.3s ease;
    padding: 12px 24px;
    font-weight: 600;
}

.primary-btn:hover {
    background-color: #1d4ed8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    transition: all 0.3s ease;
    padding: 12px 24px;
    font-weight: 600;
}

.secondary-btn:hover {
    background-color: #4d6202;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.accent-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    transition: all 0.3s ease;
    padding: 12px 24px;
    font-weight: 600;
}

.accent-btn:hover {
    background-color: #e08a0b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn {
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
}

/* Result card */
.result-card {
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-card h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

/* Equal contribution footnote */
.equal-contribution {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 5px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Institution Logo Styles */
.institution-logos {
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* Add this rule to ensure logos are aligned properly */
.institution-logos * {
    display: flex;
    align-items: center;
}

.institution-logo-wrapper {
    display: inline-flex;
    align-items: left;
    margin: 0 5px;
    position: relative;
}

.institution-logo-wrapper sup {
    position: absolute;
    top: -5px;
    left: -12px;
    font-size: 14px;
    color: var(--text-color);
    align-items: right;
}

.institution-logo {
    height: auto; /* Let height adjust based on width */
    width: 140px; /* Fixed width for all logos */
    max-height: 40px; /* Maximum height constraint */
    object-fit: contain; /* Ensure the logo fits within dimensions without distortion */
    vertical-align: middle;
    transition: transform 0.2s ease;
    margin: 0 5px; /* Add some horizontal spacing between logos */
}

.princeton-logo img {
    transform: scale(1.9); /* Make MIT and Princeton logos larger */
}

/* Highlight box for key findings */
.highlight-box {
    background-color: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

/* Research question styles */
.research-question {
    background-color: var(--light-color);
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.research-question:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

/* Research question styles */
.pivot-box {
    background-color: var(--light-color);
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.pivot-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}


.question-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* .research-question.is-open .question-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 12px;
  margin-bottom: 12px;
} */

.question-toggle {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--question-toggle-icon-color);
  cursor: pointer;
  transition: var(--transition);
}

.question-toggle:hover,
.question-toggle:focus-visible {
  background-color: var(--question-toggle-bg);
  outline: none;
  box-shadow: 0 0 0 2px rgba(132, 178, 97, 0.25);
}

.question-toggle i {
  font-size: 0.9rem;
  pointer-events: none;
  transition: transform 0.3s ease;
}

/* .research-question.is-open .question-toggle {
  background-color: var(--question-toggle-bg-hover);
} */

/* .research-question.is-open .question-toggle i {
  transform: rotate(90deg);
} */

.question-content {
  margin-top: 16px;
}

.pivot-box-content {
  margin-top: 0px;
}


.question-number {
    background-color: var(--secondary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(90, 115, 2, 0.2);
}

.question-title {
    color: var(--dark-color);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.question-answer {
    margin-top: 15px;
    font-size: 1.05rem;
}

/* Chart styles */
.chart-container {
    background-color: var(--light-color);
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.chart-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

/* Scaling comparison */
.scaling-comparison {
    display: flex;
    margin: 40px 0;
    align-items: stretch;
}

.scaling-card {
    flex: 1;
    background: var(--light-color);
    border-radius: 15px;
    padding: 25px;
    margin: 0 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.scaling-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.scaling-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.mllm-scaling::before {
    background: var(--primary-color);
}

.vision-anlaysis::before {
    background: var(--background-color);
}

.scaling-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.scaling-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.mllm-scaling .scaling-icon {
    color: var(--primary-color);
}

.llm-scaling .scaling-icon {
    color: var(--secondary-color);
}

/* Findings list @@@@@ version1 check box @@@@@ */ 
/* .findings-list {
    margin: 30px 0;
    padding-left: 0;
}

.findings-list .finding-item {
    margin-bottom: 20px;
    position: relative;
    padding-left: 35px;
    list-style-type: none;
}

.findings-list .finding-item::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.rem;
    font-weight: bold;
} */

/* Findings list @@@@@ version2 number but reset @@@@@ */ 
/* .findings-list {
    margin: 30px 0;
    padding-left: 0;
    counter-reset: finding-number; 
}

.findings-list .finding-item {
    margin-bottom: 20px;
    position: relative;
    padding-left: 35px;
    list-style-type: none;
    counter-increment: finding-number;
}

.findings-list .finding-item::before {
    content: counter(finding-number);

    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 0.9rem; 
    font-weight: bold;
} */

/* body {
    counter-reset: finding-number; 
} */

/* Findings list */
.findings-list {
    margin: 30px 0;
    padding-left: 0;
}

.findings-list .finding-item {
    margin-bottom: 20px;
    position: relative;
    padding-left: 45px;
    list-style-type: none;
    counter-increment: finding-number;
    font-size: 1.2rem;
}

.findings-list .finding-item::before {
    content: counter(finding-number);

    position: absolute;
    left: 0;
    top: 5;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.rem; 
    font-weight: bold;

    /* display: flex;
    align-items: center;
    justify-content: center; */

    text-align: center; /* 수평 중앙 정렬 (기본) */
    line-height: 32px;
    text-indent: 1.1px;
}


/* Custom table styling */
.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 30px 0;
}

.custom-table thead th {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.custom-table tbody tr:nth-child(even) {
    background-color: rgba(37, 99, 235, 0.05);
}

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

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

/* Nav pills */
.custom-nav-pills {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.custom-nav-pills .nav-link {
    background: white;
    color: var(--dark-color);
    border-radius: 50px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.custom-nav-pills .nav-link:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.custom-nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Progress bars */
.progress {
    height: 15px;
    border-radius: 50px;
    margin-bottom: 10px;
    background-color: #f1f5f9;
    overflow: hidden;
}

.progress-bar {
    border-radius: 50px;
}

/* FAQ accordion */
.accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.accordion-button {
    font-weight: 600;
    padding: 20px;
    background-color: white;
    color: var(--dark-color);
}

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

.accordion-body {
    padding: 20px;
    background-color: white;
}

/* Data table styling */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 8px;
    margin: 25px 0;
    background-color: var(--card-background);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.data-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 12px 10px;
}

.data-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #edf2f7;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:nth-child(even) {
    background-color: rgba(37, 99, 235, 0.03);
}

.data-table .header-row {
    background-color: rgba(37, 99, 235, 0.1) !important;
    font-weight: 600;
}

.data-table .model-cell {
    text-align: left;
    font-weight: 600;
    min-width: 160px;
}

.data-table .highlight-cell {
    color: var(--primary-color);
    font-weight: 700;
}

.data-table .improvement-positive {
    color: #10b981;
    font-weight: 600;
}

.data-table .improvement-negative {
    color: #ef4444;
    font-weight: 600;
}

.data-table caption {
    caption-side: bottom;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .paper-title {
        font-size: 32px;
    }
    
    .paper-subtitle {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .scaling-comparison {
        flex-direction: column;
    }
    
    .scaling-card {
        margin: 10px 0;
    }
    
    .custom-nav-pills {
        flex-direction: column;
    }
    
    .custom-nav-pills .nav-link {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 5px;
    }
}

/* Mobile-Friendly CSS Updates - Only Applied to Mobile Devices */

/* Only apply these base styles at mobile breakpoints */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }

    body {
        font-size: 16px; /* Slightly smaller base font for mobile */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }
    
    /* Mobile-First Container */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Responsive Typography */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word; /* Prevent text overflow */
        hyphens: auto; /* Enable hyphenation for better text wrapping */
    }
}

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem; /* Smaller brand text on mobile */
    }
    
    .navbar-toggler {
        border: none;
        padding: 8px;
        margin-right: 5px;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }
    
    .navbar-toggler-icon {
        width: 1.2em;
        height: 1.2em;
    }
}

/* Header Section Responsiveness - Mobile Only */
@media (max-width: 768px) {
    .header-section {
        padding: 60px 0 40px 0; /* Reduced padding on mobile */
    }
    
    .paper-title {
        font-size: 2rem; /* Smaller title on mobile */
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .paper-subtitle {
        font-size: 1.2rem;
        margin-bottom: 20px;
        line-height: 1.4;
    }
    
    /* Responsive Author Line */
    .author-line {
        font-size: 0.9rem;
        gap: 8px 12px;
        flex-wrap: wrap;
        padding: 0 10px;
    }
    
    /* Institution Logos Responsive */
    .institution-logos {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .institution-logo {
        width: 100px; /* Smaller logos on mobile */
        max-height: 30px;
    }
    
    /* Responsive Action Buttons */
    .header-section .btn {
        margin-bottom: 10px;
        font-size: 0.85rem;
        padding: 8px 12px;
        width: auto;
        display: inline-block;
    }
}

/* Figure Responsiveness - Mobile Only */
@media (max-width: 768px) {
    .figure-container img {
        max-width: 100%;
        height: auto;
    }
    
    .figure-caption {
        font-size: 0.85rem;
        max-width: 100%;
    }
    
    /* Table Responsiveness */
    .data-table {
        font-size: 0.9rem; /* Increased from 0.8rem */
    }
    
    .data-table th, 
    .data-table td {
        padding: 8px 6px; /* Increased from 6px 4px */
    }
}

/* Mobile Responsiveness - Mid-range Mobile */
@media (max-width: 768px) {
    body {
        font-size: 17px; /* Increased from 15px */
    }
    
    .paper-title {
        font-size: 2rem; /* Increased from 1.8rem */
    }
    
    .paper-subtitle {
        font-size: 1.3rem; /* Increased from 1.1rem */
    }
    
    .section-title {
        font-size: 24px; /* Increased from 22px */
        margin: 35px 0 20px 0;
    }
    
    .author-line {
        font-size: 0.95rem; /* Increased from 0.85rem */
        line-height: 1.4;
    }
    
    .question-number {
        width: 32px; /* Slightly increased */
        height: 32px; /* Slightly increased */
        font-size: 1rem; /* Increased from 0.9rem */
    }
    
    .question-title {
        font-size: 1.25rem; /* Increased from 1.1rem */
    }
    
    .question-answer {
        font-size: 1.05rem; /* Increased from 0.95rem */
    }
    
    /* Better spacing for mobile */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, 
    .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
    .col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
    .col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Stack columns on mobile */
    .col-md-4, .col-md-6, .col-md-5, .col-md-7 {
        margin-bottom: 20px;
    }
    
    /* Navigation pills */
    .custom-nav-pills {
        flex-direction: column;
        gap: 5px;
        padding: 0 5px;
    }
    
    .custom-nav-pills .nav-link {
        width: 100%;
        padding: 10px 15px;
        text-align: center;
        font-size: 0.9rem;
    }
    
    /* Accordion improvements */
    .accordion-button {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    .accordion-body {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    /* Card improvements */
    .card {
        margin-bottom: 20px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Table scroll for mobile */
    .table-responsive {
        border: none;
        margin-bottom: 20px;
    }
    
    /* Fixed table header for mobile scrolling */
    .data-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
    }
    
    .data-table .model-cell {
        min-width: 120px;
    }
    
    /* Better spacing for lists */
    ul, ol {
        padding-left: 20px;
    }
    
    .findings-list .finding-item {
        padding-left: 25px;
        margin-bottom: 15px;
    }
    
    .findings-list .finding-item::before {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
}

/* Small Mobile Screens */
@media (max-width: 576px) {
    body {
        font-size: 16px; /* Increased from 14px */
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .header-section {
        padding: 40px 0 30px 0;
    }
    
    .paper-title {
        font-size: 1.8rem; /* Increased from 1.6rem */
    }
    
    .paper-subtitle {
        font-size: 1.2rem; /* Increased from 1rem */
    }
    
    .section-title {
        font-size: 22px; /* Increased from 20px */
    }
    
    .btn {
        font-size: 0.9rem; /* Increased from 0.8rem */
        padding: 8px 14px; /* Slightly increased padding */
    }
    
    /* Image scaling for very small devices */
    .figure-container {
        padding: 10px;
    }
    
    /* Better touch targets */
    .nav-link, .accordion-button {
        min-height: 44px; /* Minimum touch target size */
    }
    
    /* Further improve table readability */
    .data-table {
        font-size: 0.85rem; /* Increased from 0.75rem */
    }
    
    /* Improve code block readability */
    pre {
        padding: 10px;
        font-size: 0.85rem; /* Increased from 0.75rem */
        overflow-x: auto;
    }
    
    /* Improve footer spacing */
    footer {
        margin-top: 60px;
        padding: 30px 0;
    }
}

/* Fix for large lead text on mobile */
@media (max-width: 768px) {
    p.lead.fw-bold {
        font-size: 1.2rem !important; /* Increased from 1rem */
        line-height: 1.4;
        margin-bottom: 12px;
    }
}

/* Touch Optimizations - Only for Touch Devices */
@media (hover: none) and (max-width: 768px) {
    /* Disable hover effects on touch devices */
    .resources-card:hover, 
    .key-point-card:hover,
    .research-question:hover,
    .pivot-box:hover,
    .figure-container:hover,
    .result-card:hover,
    .scaling-card:hover {
        transform: none;
        box-shadow: var(--box-shadow);
    }
    
    /* Improve tap targets */
    button, 
    .btn, 
    a.nav-link, 
    .author-link {
        padding: 10px 15px;
    }
    
    /* Indicate tappable elements */
    a.nav-link:active, 
    .btn:active,
    .accordion-button:active {
        background-color: rgba(0, 0, 0, 0.05);
    }
}

/* Additional Mobile-Only Improvements */
@media (max-width: 768px) {
    /* Fix overflow issues in tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix for horizontal scroll on mobile in fluid containers */
    .container-fluid {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Improve progress bar readability on mobile */
    .progress {
        height: 12px;
    }
    
    /* Ensure tapping on accordion shows visual feedback */
    .accordion-button:active {
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    /* Make sure all images resize properly */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Improve form element spacing on mobile */
    input, select, textarea {
        margin-bottom: 15px;
    }
    
    /* Ensure code and pre elements don't overflow */
    code, pre {
        white-space: pre-wrap;
        word-break: break-word;
    }
    
    /* Ensure fixed position elements don't cause issues */
    .sticky-top {
        z-index: 1020;
    }
    
    /* Improve modal dialogs on mobile */
    .modal-dialog {
        margin: 10px;
    }
    
    /* Make sure buttons have sufficient spacing between them on mobile */
    .btn {
        margin-right: 5px;
        margin-bottom: 5px;
    }
    
    /* Fix Bootstrap columns so they work on mobile */
    .row > [class^="col-"] {
        margin-bottom: 20px;
    }
}

/* Critical Mobile Fixes - These are essential regardless of screen size */
/* These should be minimal and only target truly problematic areas */

/* Make sure tables don't break layouts on all screen sizes */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure images don't overflow their containers */
img {
    max-width: 100%;
}

/* Fix for Bootstrap navbar toggle */
.navbar-collapse {
    max-height: 80vh;
    overflow-y: auto;
}


/* Text Color Overrides */
body, p, h1, h2, h3, h4, h5, h6, li, td, th, div, span, a, .card-text, .lead, .section-title, 
.question-title, .figure-caption, .accordion-button, .accordion-body, .findings-list, .card-title {
  color: #000000 !important;
}

.question-answer p, .question-answer li, .accordion-body p {
  color: #000000 !important;
}

/* Keep white text on buttons and colored backgrounds */
.btn, 
.question-number, 
.accordion-button:not(.collapsed),
.data-table th {
  color: #FFFFFF !important;
}

/* Preserve special color elements */
.improvement-positive {
  color: #10b981 !important;
}

.improvement-negative {
  color: #ef4444 !important;
}

.highlight-cell {
  color: var(--primary-color) !important;
}

/* Specific override for colored paragraphs in TL;DR section */
p.lead.fw-bold strong {
  color: var(--primary-color) !important;
}

/* Fix for card headers with colored text */
.finding-card h5 {
  color: inherit !important;
}

/* Add these style overrides to fix the specific color issues */

/* Change "Not necessarily" to black in the TL;DR section */
.tldr-box p.lead strong {
    color: #000000 !important; /* Black color */
    font-size: 1.5rem;
}

/* Ensure the badge numbers in Key Takeaways section have white text */
#conclusions .badge.bg-primary {
    color: #FFFFFF !important; /* White text */
}

/* Make the webpage wider by increasing container max-widths */

/* Make the webpage moderately wider than default but not too wide */

/* Increase the width of all Bootstrap containers to a moderate size */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
    max-width: 85% !important; /* Use 85% of the viewport width instead of 95% */
    width: 85% !important;
}

/* For specific sections that need consistent width */
.col-lg-11.mx-auto {
    max-width: 85% !important;
    flex: 0 0 85% !important;
}

/* For extra large screens, set a more reasonable maximum */
@media (min-width: 1400px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        max-width: 1400px !important; /* Reduced from 1800px to a more readable width */
    }
    
    .col-lg-11.mx-auto {
        max-width: 1400px !important;
        flex: 0 0 1400px !important;
    }
}

/* Ensure images can scale properly in the containers */
.figure-container img {
    max-width: 100%;
    height: auto;
}

/* Update the text color in active nav pills to white */
.custom-nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white !important; /* Override the global text color with !important */
}

/* Ensure hover state also has proper contrast if background changes */
.custom-nav-pills .nav-link:hover {
    color: var(--primary-color) !important;
}

/* If there's a transition, make sure it applies to color too */
.custom-nav-pills .nav-link {
    transition: all 0.3s ease;
}

.motivation-card {
    background: var(--card-background);
    border-radius: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.motivation-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: nowrap;
}

.motivation-figure {
    flex: none;
    max-width: 460px;
    width: 100%;
}


.gradient-figure {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gradient-figure:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}

.gradient-figure img {
    border-radius: 12px;
    display: block;
    width: 100%;
}

.motivation-text {
    flex: 1 1 auto;
}

.motivation-list {
    list-style: disc;
    padding-left: 1.5rem;
}

.motivation-list li {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.motivation-list li:last-child {
    margin-bottom: 0;
}


.study-highlight {
    color: #434a9e !important;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.25s ease;
}

.study-highlight:hover {
    color: #183490 !important;
}

.study-hover-image {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: rgb(255, 255, 255);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1200;
}

.study-hover-image img {
    max-width: min(800px, 70vw);
    height: auto;
    display: block;
}

.study-highlight:hover .study-hover-image {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.citation-box { 
    background: #f1f1f1; 
}

.pivot-font {
  font-family: "Roboto Slab", serif;
}
