/* Page-specific styles for Research */
/* Extracted from style.css */


/* ═══════════════════════════════════════
   Research Page — Scientific Paper
   ═══════════════════════════════════════ */

/* ── Accordion ───────────────────────── */

.research-paper-accordion {
    max-width: 820px;
    margin: 0 auto 2em;
    border: 1px solid var(--color-border-light, #eaeaea);
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-page, #fff);
}

.paper-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.4em 1.6em;
    border: none;
    background: var(--color-bg-elevated, #f9f9f7);
    cursor: pointer;
    text-align: left;
    gap: 1em;
    transition: background 0.2s ease;
}

.paper-toggle:hover {
    background: var(--color-border-light, #eaeaea);
}

.paper-toggle-header {
    flex: 1;
    min-width: 0;
}

.paper-toggle-title {
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 0;
    color: var(--color-text-heading, #111);
}

.paper-toggle-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted, #666);
    margin: 0.3em 0 0;
}

.paper-toggle-tagline {
    font-size: 0.82rem;
    color: var(--color-text-muted, #999);
    margin: 0.2em 0 0;
    font-style: italic;
}

.paper-toggle-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.paper-toggle-icon::before,
.paper-toggle-icon::after {
    content: '';
    position: absolute;
    background: var(--color-text-muted, #666);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.paper-toggle-icon::before {
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.paper-toggle-icon::after {
    top: 50%;
    left: 50%;
    width: 2px;
    height: 16px;
    transform: translate(-50%, -50%);
}

.paper-toggle[aria-expanded="true"] .paper-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.paper-body {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.paper-body > .research-content {
    padding-top: 0.5em;
    padding-bottom: 2em;
}

.research-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 16px;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text-body, #3d3d3d);
}

.research-content p {
    margin-bottom: 1.2em;
    text-align: justify;
}

.research-content h2 {
    font-size: 1.5rem;
    margin: 2.5em 0 0.8em;
    padding-bottom: 0.3em;
    border-bottom: 2px solid var(--color-primary, #2a9d8f);
}

.research-content h3 {
    font-size: 1.2rem;
    margin: 1.8em 0 0.6em;
}

.section-num {
    color: var(--color-primary, #2a9d8f);
    margin-right: 0.5em;
    font-weight: 700;
}

/* Paper header */
.research-paper-header {
    text-align: center;
    margin-bottom: 2.5em;
    padding-bottom: 2em;
    border-bottom: 1px solid var(--color-border-light, #eaeaea);
}

.research-title {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 0.6em;
    color: var(--color-text-heading, #111);
}

.research-authors {
    font-size: 1.05rem;
    color: var(--color-text-muted, #666);
    margin-bottom: 0.3em;
}

.research-affiliation {
    font-size: 0.9rem;
    color: var(--color-text-muted, #666);
    font-style: italic;
}

.research-meta {
    display: flex;
    justify-content: center;
    gap: 2em;
    margin-top: 1em;
    font-size: 0.85rem;
    color: var(--color-text-muted, #666);
}

.research-meta code {
    background: var(--color-bg-elevated, #f9f9f7);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

/* Abstract box */
.research-abstract {
    background: var(--color-bg-elevated, #f9f9f7);
    border-left: 4px solid var(--color-primary, #2a9d8f);
    padding: 1.5em 2em;
    margin: 2em 0;
    border-radius: 0 6px 6px 0;
}

.research-abstract h2 {
    font-size: 1.2rem;
    margin: 0 0 0.8em;
    border-bottom: none;
    padding-bottom: 0;
}

.research-abstract .keywords {
    margin-top: 1em;
    font-size: 0.9rem;
    color: var(--color-text-muted, #666);
}

.research-abstract .keywords strong {
    color: var(--color-text-body, #3d3d3d);
}

/* Charts generic */
.research-chart {
    margin: 2em 0;
    padding: 1.5em;
    background: var(--color-bg-elevated, #f9f9f7);
    border-radius: 8px;
    border: 1px solid var(--color-border-light, #eaeaea);
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1em;
    text-align: center;
    color: var(--color-text-heading, #111);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5em;
    margin-top: 1em;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.legend-lamp { background: #e07b4c; }
.legend-jam  { background: var(--color-primary, #2a9d8f); }
.legend-funding { background: #27ae60; }
.legend-need    { background: #2980b9; }
.legend-budget  { background: #c0392b; }

/* Animated counters */
.stat-counters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2em;
    margin: 2em 0;
}

.stat-card {
    text-align: center;
    padding: 1.2em 1em;
    background: var(--color-bg-elevated, #f9f9f7);
    border-radius: 8px;
    border: 1px solid var(--color-border-light, #eaeaea);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-primary, #2a9d8f);
    font-variant-numeric: tabular-nums;
}

.stat-value.lamp-color { color: #e07b4c; }
.stat-value.funding-color { color: #27ae60; }
.stat-value.need-color { color: #2980b9; }
.stat-value.budget-color { color: #c0392b; }

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted, #666);
    margin-top: 0.3em;
}

/* Horizontal bar chart */
.hbar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

.hbar-row {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    align-items: center;
    gap: 0.8em;
}

.hbar-label {
    font-size: 0.85rem;
    text-align: right;
    white-space: nowrap;
}

.hbar-track {
    height: 28px;
    background: var(--color-bg-page, #f4f4f2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.hbar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hbar-fill.lamp { background: #e07b4c; }
.hbar-fill.jam  { background: var(--color-primary, #2a9d8f); }
.hbar-fill.funding { background: #27ae60; }
.hbar-fill.need    { background: #2980b9; }
.hbar-fill.budget  { background: #c0392b; }

.hbar-val {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Vertical bar chart */
.vbar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.5em;
    height: 220px;
    padding: 0 1em;
}

.vbar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 80px;
    height: 100%;
    justify-content: flex-end;
}

.vbar-pair {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 180px;
    width: 100%;
}

.vbar-col {
    flex: 1;
    border-radius: 4px 4px 0 0;
    height: 0%;
    transition: height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    min-width: 20px;
}

.vbar-col.lamp { background: #e07b4c; }
.vbar-col.jam  { background: var(--color-primary, #2a9d8f); }
.vbar-col.funding { background: #27ae60; }
.vbar-col.need    { background: #2980b9; }
.vbar-col.budget  { background: #c0392b; }

.vbar-col-val {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.vbar-lbl {
    font-size: 0.75rem;
    margin-top: 6px;
    text-align: center;
    color: var(--color-text-muted, #666);
    word-break: break-word;
}

/* SVG line chart */
.line-chart-svg {
    width: 100%;
    height: auto;
}

.line-chart-svg text {
    fill: var(--color-text-muted, #666);
    font-size: 11px;
}

.line-chart-svg .grid-line {
    stroke: var(--color-border-light, #eaeaea);
    stroke-width: 1;
}

.line-chart-svg .axis-line {
    stroke: var(--color-text-muted, #999);
    stroke-width: 1.5;
}

.line-chart-svg .data-line {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.line-chart-svg .data-line.lamp { stroke: #e07b4c; }
.line-chart-svg .data-line.jam  { stroke: var(--color-primary, #2a9d8f); }
.line-chart-svg .data-line.funding { stroke: #27ae60; }
.line-chart-svg .data-line.budget  { stroke: #c0392b; }

.line-chart-svg .data-dot {
    r: 4;
}

.line-chart-svg .data-dot.lamp { fill: #e07b4c; }
.line-chart-svg .data-dot.jam  { fill: var(--color-primary, #2a9d8f); }
.line-chart-svg .data-dot.funding { fill: #27ae60; }
.line-chart-svg .data-dot.budget  { fill: #c0392b; }

/* SVG donut chart */
.donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2em;
    flex-wrap: wrap;
}

.donut-svg {
    width: 200px;
    height: 200px;
}

.donut-segment {
    transition: opacity 0.6s ease;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    font-size: 0.88rem;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.donut-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* SVG radar chart */
.radar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2em;
    flex-wrap: wrap;
}

.radar-svg {
    width: 280px;
    height: 280px;
}

.radar-svg text {
    fill: var(--color-text-muted, #666);
    font-size: 11px;
}

.radar-svg .radar-grid {
    fill: none;
    stroke: var(--color-border-light, #eaeaea);
    stroke-width: 0.8;
}

.radar-svg .radar-axis {
    stroke: var(--color-border-light, #eaeaea);
    stroke-width: 0.8;
}

.radar-svg .radar-area {
    stroke-width: 2;
    transition: d 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.radar-svg .radar-area.lamp {
    fill: rgba(224, 123, 76, 0.15);
    stroke: #e07b4c;
}

.radar-svg .radar-area.jam {
    fill: rgba(42, 157, 143, 0.15);
    stroke: var(--color-primary, #2a9d8f);
}

.radar-svg .radar-area.funding {
    fill: rgba(39, 174, 96, 0.15);
    stroke: #27ae60;
}

.radar-svg .radar-area.need {
    fill: rgba(41, 128, 185, 0.15);
    stroke: #2980b9;
}

/* Data tables */
.research-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9rem;
}

.research-table th,
.research-table td {
    padding: 0.7em 1em;
    border: 1px solid var(--color-border-light, #eaeaea);
    text-align: left;
}

.research-table th {
    background: var(--color-bg-elevated, #f9f9f7);
    font-weight: 600;
    color: var(--color-text-heading, #111);
}

.research-table tbody tr:nth-child(even) {
    background: var(--color-bg-elevated, #f9f9f7);
}

.research-table .better {
    color: var(--color-primary, #2a9d8f);
    font-weight: 600;
}

.research-table .worse {
    color: #d45555;
    font-weight: 600;
}

/* Reference list */
.reference-list {
    list-style: none;
    padding: 0;
    counter-reset: ref;
}

.reference-list li {
    counter-increment: ref;
    padding: 0.5em 0 0.5em 2.5em;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.5;
}

.reference-list li::before {
    content: "[" counter(ref) "]";
    position: absolute;
    left: 0;
    font-weight: 600;
    color: var(--color-primary, #2a9d8f);
}

/* Citation block */
.citation-block {
    background: var(--color-bg-elevated, #f9f9f7);
    border: 1px solid var(--color-border-light, #eaeaea);
    border-radius: 6px;
    padding: 1.2em 1.5em;
    margin: 2em 0;
    font-size: 0.88rem;
    line-height: 1.6;
    position: relative;
}

.citation-block pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-family: inherit;
}

.citation-copy-btn {
    position: absolute;
    top: 0.8em;
    right: 0.8em;
    background: var(--color-primary, #2a9d8f);
    color: #fff;
    border: none;
    padding: 0.3em 0.8em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.citation-copy-btn:hover {
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 768px) {
    .research-content {
        font-size: 0.95rem;
    }

    .research-title {
        font-size: 1.35rem;
    }

    .research-meta {
        flex-direction: column;
        gap: 0.4em;
    }

    .stat-counters {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .hbar-row {
        grid-template-columns: 80px 1fr 50px;
    }

    .vbar-chart {
        height: 180px;
        gap: 0.3em;
    }

    .vbar-group {
        max-width: 60px;
    }

    .vbar-pair {
        height: 140px;
    }

    .donut-wrap,
    .radar-wrap {
        flex-direction: column;
    }

    .chart-legend {
        flex-wrap: wrap;
    }

    .research-table {
        font-size: 0.8rem;
    }

    .research-table th,
    .research-table td {
        padding: 0.4em 0.6em;
    }

    .paper-toggle {
        padding: 1em 1.2em;
    }

    .paper-toggle-title {
        font-size: 1.05rem;
    }

    .paper-toggle-tagline {
        display: none;
    }
}

/* ═══════════════════════════════════════
   Roadmap Page
   ═══════════════════════════════════════ */

.roadmap-content {
    max-width: 820px;
    margin: 0 auto;
}

.roadmap-content h2 {
    display: block;
    margin-top: 48px;
}

.roadmap-content h2:first-child {
    margin-top: 0;
}

