/* PeptideXme — Main Stylesheet
   All colors driven by CSS variables set from site_config.yaml.
   Edit site_config.yaml to change colors — no CSS editing needed.
*/

:root {
    --color-primary: #0A2342;
    --color-secondary: #2CA6A4;
    --color-accent: #50C878;
    --color-warning: #F5A623;
    --color-alert: #E8635F;
    --color-background: #FAFBFC;
    --color-surface: #F0F2F5;
    --color-text: #1A1A2E;
    --color-text-light: #5A6178;
    --color-border: #D8DCE3;
    --color-white: #FFFFFF;
    --font-body: 'Inter', 'Source Sans Pro', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --radius: 8px;
    --shadow-sm: 0 1px 3px rgba(10, 35, 66, 0.08);
    --shadow-md: 0 4px 12px rgba(10, 35, 66, 0.12);
    --shadow-lg: 0 8px 24px rgba(10, 35, 66, 0.16);
    --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 15px;
}

a { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
    background: var(--color-primary);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}
.navbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.navbar-brand {
    color: var(--color-white);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.navbar-brand span { color: var(--color-secondary); }
.navbar-nav {
    display: flex;
    list-style: none;
    gap: 4px;
}
.navbar-nav a {
    color: rgba(255,255,255,0.75);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.navbar-nav a:hover {
    color: var(--color-white);
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}
.navbar-nav a.active {
    color: var(--color-white);
    background: var(--color-secondary);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px;
}
.page-header {
    margin-bottom: 32px;
}
.page-header h1 {
    font-size: 32px;
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}
.page-header .subtitle {
    font-size: 17px;
    color: var(--color-text-light);
    margin-top: 4px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 {
    color: var(--color-primary);
    font-size: 18px;
    margin-bottom: 12px;
}
.card p { color: var(--color-text-light); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a3a5c 100%);
    color: var(--color-white);
    padding: 64px 24px;
    text-align: center;
}
.hero h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}
.hero h1 span { color: var(--color-secondary); }
.hero .subtitle {
    font-size: 22px;
    color: var(--color-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}
.hero .description {
    max-width: 700px;
    margin: 0 auto 32px;
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
}
.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary {
    background: var(--color-secondary);
    color: var(--color-white);
}
.btn-primary:hover { background: #238a88; text-decoration: none; }
.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover { border-color: var(--color-white); text-decoration: none; }
.btn-download {
    background: var(--color-accent);
    color: var(--color-primary);
}
.btn-download:hover { background: #44b86e; text-decoration: none; }

/* ============================================================
   SECTION
   ============================================================ */
.section {
    margin-bottom: 48px;
}
.section-title {
    font-size: 24px;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}
.section-description {
    color: var(--color-text-light);
    margin-bottom: 24px;
    font-size: 16px;
}

/* ============================================================
   PIPELINE STAGES
   ============================================================ */
.pipeline-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 32px;
}
.pipeline-stage {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-secondary);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 0;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}
.pipeline-stage:hover {
    border-left-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}
.pipeline-stage-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pipeline-stage-number {
    background: var(--color-primary);
    color: var(--color-white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.pipeline-stage-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-primary);
}
.pipeline-stage-desc {
    color: var(--color-text-light);
    font-size: 14px;
    margin-top: 4px;
}
.pipeline-stage-detail {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}
.pipeline-stage.expanded .pipeline-stage-detail { display: block; }
.pipeline-arrow {
    text-align: center;
    color: var(--color-border);
    font-size: 20px;
    margin: 4px 0;
}

/* ============================================================
   TABLES
   ============================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}
.data-table th {
    background: var(--color-surface);
    color: var(--color-primary);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--color-border);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.data-table th:hover { background: #e4e7ec; }
.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}
.data-table tr:hover td { background: var(--color-surface); }
.data-table .mono { font-family: var(--font-mono); font-size: 12px; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: rgba(80,200,120,0.15); color: #2d8c4e; }
.badge-warning { background: rgba(245,166,35,0.15); color: #b3740a; }
.badge-alert { background: rgba(232,99,95,0.15); color: #b34a47; }
.badge-info { background: rgba(44,166,164,0.15); color: #1e7a78; }
.badge-neutral { background: var(--color-surface); color: var(--color-text-light); }

/* ============================================================
   REPORT
   ============================================================ */
.report-header {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 32px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.report-header h1 { font-size: 28px; }
.report-header .report-id {
    font-family: var(--font-mono);
    font-size: 24px;
    color: var(--color-secondary);
    font-weight: 700;
}
.report-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.report-meta-item {
    background: rgba(255,255,255,0.08);
    padding: 10px 14px;
    border-radius: var(--radius);
}
.report-meta-item .label {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}
.report-meta-item .value {
    font-size: 14px;
    color: var(--color-white);
    font-weight: 500;
    margin-top: 2px;
}

.report-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 24px;
    overflow-x: auto;
    flex-wrap: wrap;
}
.report-tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.report-tab:hover { color: var(--color-primary); }
.report-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-secondary);
}
.report-section { display: none; }
.report-section.active { display: block; }

/* Summary cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.summary-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.summary-card .number {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-primary);
}
.summary-card .label {
    font-size: 12px;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.summary-card.accent .number { color: var(--color-secondary); }
.summary-card.success .number { color: var(--color-accent); }

/* Collapsible */
.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}
.collapsible-header::after {
    content: '▼';
    font-size: 10px;
    color: var(--color-text-light);
    transition: transform 0.2s;
}
.collapsible.collapsed .collapsible-header::after { transform: rotate(-90deg); }
.collapsible.collapsed .collapsible-content { display: none; }

/* ============================================================
   TEAM & ADVISOR PHOTOS
   ============================================================ */
.team-section {
    position: relative;
    min-height: 600px;
    padding: 0px;
    overflow: hidden;
    border-radius: var(--radius);
}
.team-bg {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 1;
    border-radius: var(--radius);
    z-index: 0;
}
.team-section .section-title,
.team-section .team-grid {
    position: relative;
    z-index: 1;
}
.team-card {
    text-align: center;
}
.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin: 0 auto 16px;
    border: 3px solid var(--color-secondary);
    box-shadow: var(--shadow-md);
}
.profile-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 700;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.6);
    padding: 24px;
    text-align: center;
    font-size: 13px;
    margin-top: 48px;
}
.footer .disclaimer {
    color: var(--color-warning);
    font-size: 12px;
    margin-top: 8px;
}
.footer-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 8px;
}
.footer-links a { color: rgba(255,255,255,0.6); }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-mono { font-family: var(--font-mono); }
.text-small { font-size: 12px; }
.text-muted { color: var(--color-text-light); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.w-full { width: 100%; }

/* Chart container */
.chart-container {
    width: 100%;
    margin: 16px 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--color-white);
}
.chart-container .chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

/* List styles */
.feature-list { list-style: none; padding: 0; }
.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 14px;
    padding-left: 24px;
    position: relative;
}
.feature-list li::before {
    content: '▸';
    color: var(--color-secondary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Differentiation table */
.diff-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.diff-table th {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}
.diff-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}
.diff-table td:first-child { font-weight: 600; color: var(--color-primary); }
.diff-table td:nth-child(2) { color: var(--color-text-light); }
.diff-table td:nth-child(3) { color: var(--color-text); background: rgba(80,200,120,0.05); }

/* Responsive */
@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .hero h1 { font-size: 28px; }
    .hero .subtitle { font-size: 16px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Print styles for PDF */
@media print {
    .navbar, .footer, .report-tabs, .btn { display: none !important; }
    .report-section { display: block !important; page-break-after: always; }
    .report-section:last-child { page-break-after: auto; }
    body { font-size: 11px; }
    .card { box-shadow: none; border: 1px solid #ccc; }
    .chart-container { page-break-inside: avoid; }
}
