/* ==========================================================
   Learn Cytometry — Main Stylesheet
   ========================================================== */

:root {
    --primary: #20507A;
    --primary-dark: #164066;
    --primary-light: #2d6a9f;
    --accent: #1B9AAA;
    --accent-light: #e0f4f7;
    --bg: #fbfbfd;
    --surface: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.09);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.13);
    --radius: 16px;
    --radius-lg: 24px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    font-size: 17px;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    transition: box-shadow 0.3s;
}

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-logo:hover { text-decoration: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
    background: rgba(32, 80, 122, 0.06);
    text-decoration: none;
}

.nav-links .nav-cta {
    background: transparent;
    color: var(--primary) !important;
    border: 1.5px solid var(--primary);
    padding: 5px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-left: 4px;
    transition: background 0.2s, color 0.2s;
}

.nav-links .nav-cta:hover {
    background: var(--primary);
    color: white !important;
}

/* ── HAMBURGER (mobile) ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 2px;
    margin-left: 8px;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
    display: none;
}
@media (max-width: 768px) {
    .nav-mobile {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(72vw, 280px);
        background: white;
        z-index: 200;
        padding: 80px 28px 40px;
        box-shadow: -8px 0 32px rgba(13,40,64,0.18);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .nav-mobile.open {
        transform: translateX(0);
    }
    .nav-mobile a {
        padding: 15px 0;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--primary);
        text-decoration: none;
        border-bottom: 1px solid var(--border);
        width: 100%;
        text-align: right;
        transition: color 0.15s;
    }
    .nav-mobile a:last-child { border-bottom: none; color: var(--accent); }
    .nav-mobile a:hover { color: var(--accent); }
}
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13,40,64,0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s;
}
.nav-backdrop.open {
    display: block;
    opacity: 1;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    background: linear-gradient(140deg, #0d2840 0%, #20507A 55%, #2a6598 100%);
    padding: 100px 24px 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 70% 30%, rgba(27, 154, 170, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.04) 0%, transparent 45%);
    pointer-events: none;
}

/* Subtle grid texture */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(27, 154, 170, 0.18);
    color: #7dd8e8;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 7px 18px;
    border-radius: 50px;
    margin-bottom: 32px;
    border: 1px solid rgba(27, 154, 170, 0.28);
}

.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
}

.hero h1 em {
    font-style: normal;
    color: #7dd8e8;
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.68);
    max-width: 520px;
    margin: 0 auto 44px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 52px;
}

.hero-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hero-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-trust-item strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1;
}

.hero-trust-item span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.hero-trust-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.15);
}

.hero-free-line {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-free-badge {
    display: inline-flex;
    align-items: center;
    background: #e63946;
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 50px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 12px rgba(230, 57, 70, 0.5);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(27, 154, 170, 0.4);
    letter-spacing: -0.01em;
}
.btn-primary:hover {
    background: #14849a;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(27, 154, 170, 0.5);
    text-decoration: none;
    color: white;
}

.btn-ghost {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    transition: all 0.25s;
    letter-spacing: -0.01em;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 11px 26px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s;
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(32,80,122,0.25);
    text-decoration: none;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section-light { background: #f1f7fb; }

.section-label {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.section-label::before, .section-label::after {
    content: '';
    display: block;
    width: 36px;
    height: 1px;
    background: rgba(27, 154, 170, 0.35);
}

.section-title {
    text-align: center;
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 52px;
    line-height: 1.7;
}

.section-cta {
    text-align: center;
    margin-top: 44px;
}

/* ============================================================
   VIDEO CARDS
   ============================================================ */

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.video-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
}
.video-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.video-thumb-num {
    position: absolute;
    top: 12px;
    left: 14px;
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.play-btn {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s, background 0.25s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.video-card:hover .play-btn {
    transform: scale(1.12);
    background: white;
}
.play-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--primary);
    margin-left: 3px;
}

.video-info { padding: 16px 18px 18px; }

.video-chapter {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 5px;
}

.video-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

/* ============================================================
   CHAPTERS — grouped by part
   ============================================================ */

.parts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.part-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.part-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.part-num {
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.part-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
}

.part-chapters {
    padding: 8px 0;
}

.chapter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    transition: background 0.18s;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}
.chapter-row:last-child { border-bottom: none; }

.chapter-row:hover {
    background: rgba(32, 80, 122, 0.05);
    text-decoration: none;
}

.ch-num {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--accent);
    min-width: 28px;
    opacity: 0.8;
}

.ch-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    flex: 1;
}

.ch-arrow {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.18s;
}
.chapter-row:hover .ch-arrow { opacity: 1; }

/* ============================================================
   AUTHOR SECTION
   ============================================================ */

.author-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: grid;
    grid-template-columns: 220px 1fr;
    border: 1px solid var(--border);
    max-width: 780px;
    margin: 0 auto;
}

.author-photo-side {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 24px;
    text-align: center;
    gap: 12px;
}

.author-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.author-photo-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.author-photo-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.author-body {
    padding: 36px 36px;
}

.author-body p {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 24px;
}

.author-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.author-pill {
    background: rgba(32, 80, 122, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: 50px;
    border: 1px solid rgba(32, 80, 122, 0.12);
}

.author-stats {
    display: flex;
    gap: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.author-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 3px;
}
.author-stat span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================================
   CONSULTING CTA
   ============================================================ */

.consulting-box {
    background: linear-gradient(140deg, #0d2840 0%, #20507A 55%, #2a6598 100%);
    border-radius: var(--radius-lg);
    padding: 60px 48px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.consulting-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 30%, rgba(27, 154, 170, 0.25) 0%, transparent 55%);
    pointer-events: none;
}

.consulting-box h2 {
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
    font-weight: 800;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
    letter-spacing: -0.025em;
}

.consulting-box p {
    font-size: 1rem;
    color: rgba(255,255,255,0.72);
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

.consulting-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
    position: relative;
    z-index: 2;
}

.consulting-tag {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    background: #091929;
    color: rgba(255,255,255,0.5);
    padding: 44px 24px;
    text-align: center;
    font-size: 0.85rem;
}

.footer-logo {
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255,255,255,0.7);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    display: block;
}
.footer-logo span { color: var(--accent); }

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: white; }

.footer-divider {
    width: 40px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 24px auto;
}

.footer-sisters-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.3);
    display: block;
    margin-bottom: 12px;
}

.footer-sister-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.footer-sister-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}
.footer-sister-links a:hover { color: rgba(255,255,255,0.9); }

.lang-badge {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.5);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ============================================================
   ARTICLE PAGES (chapters)
   ============================================================ */

.article-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border);
    z-index: 200;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.15s linear;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .hero { padding: 72px 20px 60px; }

    .nav-links a:not(.nav-cta) { display: none; }
    .nav-links .nav-cta { display: none; }
    .nav-links { gap: 0; }
    .nav-hamburger { display: flex; }

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

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

    .author-card {
        grid-template-columns: 1fr;
    }
    .author-photo-side {
        flex-direction: row;
        justify-content: flex-start;
        padding: 20px 24px;
        gap: 16px;
    }
    .author-initials { width: 52px; height: 52px; font-size: 1.1rem; margin-bottom: 0; }
    .author-photo-name, .author-photo-role { text-align: left; }

    .consulting-box { padding: 40px 24px; }

    .section { padding: 56px 0; }

    .hero-trust { gap: 20px; }
    .hero-trust-divider { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); }
}
