/* ══════════════════════════════════════════════
   Base Layout — Strategic Intelligence Briefs
   Shared across all profile pages
   ══════════════════════════════════════════════ */

:root {
    --bg: #FAFAF8;
    --bg-secondary: #F5F5F3;
    --text: #1C1C19;
    --muted: #787873;
    --light: #A8A8A3;
    --border: #EBEBE7;
    --quote-border: #D4D4CF;
    --brand: #E8B931;
    --sidebar-w: 240px;
    --font: 'Inter', -apple-system, 'Helvetica Neue', 'Segoe UI', sans-serif;
}

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

html {
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 40px 0 32px 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-back {
    display: block;
    padding: 0 28px 24px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    padding-bottom: 24px;
    transition: color 0.2s;
}

.sidebar-back:hover {
    color: var(--text);
}

.sidebar-name {
    padding: 0 28px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar nav a {
    display: block;
    padding: 8px 28px;
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.2s, background 0.2s;
}

.sidebar nav a:hover {
    color: var(--text);
    background: var(--bg-secondary);
}

.sidebar nav a.active {
    color: var(--text);
    font-weight: 600;
    background: var(--bg-secondary);
    border-left: 3px solid var(--brand);
    padding-left: 25px;
}

/* ── Hamburger (mobile) ── */
.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 200;
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 90;
}

.overlay.show {
    display: block;
}

/* ── Main content ── */
.main {
    margin-left: var(--sidebar-w);
    max-width: 720px;
    padding: 80px 48px 120px;
}

/* ── Page header ── */
.page-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    font-weight: 500;
}

h1, .page-title {
    font-size: 2.6rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 12px;
}

.subtitle, .page-subtitle {
    font-size: 1.05rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 80px;
}

/* ── Section headings ── */
h2 {
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: 24px;
}

h3 {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: -0.005em;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 16px;
}

.section-heading {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 28px;
    font-weight: 500;
}

/* ── Section spacing ── */
.section {
    margin-bottom: 0;
}

/* ── Typography ── */
p {
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.75;
}

.muted {
    color: var(--muted);
}

strong {
    font-weight: 600;
}

/* ── Blockquotes ── */
blockquote {
    border-left: 3px solid var(--quote-border);
    padding: 4px 0 4px 24px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text);
}

blockquote p {
    margin-bottom: 0;
    color: var(--text);
}

blockquote .source {
    font-style: normal;
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}

/* ── Lists ── */
ul, ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

li {
    margin-bottom: 10px;
    line-height: 1.75;
}

li ul, li ol {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* ── Dividers ── */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 64px 0;
}

.section-divider {
    height: 1px;
    background: var(--border);
    margin: 64px 0;
}

/* ── Framework sections (strategy pages) ── */
.framework {
    padding-top: 64px;
}

.framework-header {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 24px;
}

.framework-number {
    font-size: 3.5rem;
    font-weight: 200;
    line-height: 1;
    color: var(--light);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.framework-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.framework-body p {
    font-size: 15px;
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 16px;
}

.framework-body p:last-child {
    margin-bottom: 0;
}

.framework-body blockquote {
    border-left: 3px solid var(--quote-border);
    padding: 12px 0 12px 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.framework-body blockquote p {
    color: var(--muted);
    margin-bottom: 0;
}

.framework-separator {
    border: none;
    border-top: 1px solid var(--border);
    margin: 64px 0 0;
}

/* ── Application boxes (strategy pages) ── */
.application {
    margin-top: 20px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.application-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.application p {
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ── Timeline (used in some pages) ── */
.timeline {
    position: relative;
    padding: 8px 0 8px 32px;
    margin: 32px 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: var(--quote-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 8px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid var(--light);
    background: var(--bg);
    z-index: 1;
}

.timeline-era {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.timeline-item h4 {
    font-size: 17px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 10px;
}

.timeline-item p {
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 12px;
}

.timeline-item blockquote {
    margin: 16px 0 0;
}

/* ── Clean list (bullet replacement) ── */
.clean-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.clean-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    line-height: 1.75;
    color: var(--text);
}

.clean-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--light);
}

/* ── Progression (step indicator) ── */
.progression {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.progression-step {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.progression-arrow {
    color: var(--light);
    font-size: 14px;
}

/* ── Footer ── */
.footer {
    font-size: 12px;
    color: var(--light);
    padding-top: 0;
}

/* ── Label ── */
.label,
.section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 16px;
}

/* ── Quick facts grid (overview pages) ── */
.quick-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin: 32px 0;
}

.quick-fact {
    background: var(--bg);
    padding: 16px 20px;
}

.quick-fact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 4px;
}

.quick-fact-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

/* ── Section index grid (overview pages) ── */
.section-index {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
}

.section-card {
    display: block;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.section-card:hover {
    opacity: 0.7;
}

.section-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.section-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

/* ══════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════ */
@media (max-width: 840px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
    }

    .hamburger {
        display: flex;
    }

    .main {
        margin-left: 0;
        padding: 80px 28px 100px;
    }

    .section-index {
        grid-template-columns: 1fr;
    }

    .progression {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .progression-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    h1, .page-title {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .main {
        padding: 72px 20px 80px;
    }

    .subtitle, .page-subtitle {
        font-size: 1rem;
        margin-bottom: 60px;
    }

    .divider, .section-divider {
        margin: 48px 0;
    }

    .framework {
        padding-top: 48px;
    }

    .framework-separator {
        margin: 48px 0 0;
    }

    .framework-header {
        gap: 14px;
    }

    .framework-number {
        font-size: 2.2rem;
    }

    .framework-title {
        font-size: 1.1rem;
    }

    .quick-facts {
        grid-template-columns: 1fr;
    }
}
