@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@400;600;700;800&display=swap');

/* NOTE: Syne is intentional here — it's a unique display font not used elsewhere */

:root {
    --white:    #FFFFFF;
    --offwhite: #F8F8FC;
    --pale:     #F0EFF9;
    --lavender: #E4E1F5;
    --indigo:   #2D1B69;
    --deep:     #1A0F3E;
    --mid:      #5B4FCF;
    --violet:   #8B7FE8;
    --soft:     #BDB8F0;
    --ink:      #0F0D1A;
    --body:     #2E2A42;
    --muted:    #6B6584;
    --light:    #9D98B8;
    --border:   #DDD9F0;
    --border-dark:#C4BEE8;
    --accent2:  #E8C547;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--white);
    color: var(--body);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════
   CENTERED TOP NAV — unconventional style
   Full-width bar, links centered, brand left
═══════════════════════════════════════════ */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 48px;
    height: 66px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.top-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.q-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--mid), var(--indigo));
    display: flex; align-items: center; justify-content: center;
    color: white; font-family: 'Syne', sans-serif;
    font-size: 1rem; font-weight: 800;
}
.top-nav-brand-text {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--indigo);
    letter-spacing: -0.3px;
}

/* CENTER: nav links in a pill */
.top-nav-links {
    background: var(--pale);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 8px;
    display: flex;
    gap: 2px;
    list-style: none;
}
.top-nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 999px;
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.top-nav-links a:hover, .top-nav-links a.active {
    background: var(--indigo);
    color: white;
}

/* RIGHT: nothing / filler */
.top-nav-right { text-align: right; }
.top-nav-right span {
    font-size: 0.7rem;
    color: var(--light);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ═══════════════════════════════
   HERO — split diagonal layout
═══════════════════════════════ */
.hero {
    min-height: 100vh;
    padding-top: 66px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
}

.hero-left {
    background: var(--indigo);
    padding: 80px 64px 80px 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.hero-left::after {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.hero-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--soft);
    margin-bottom: 22px;
}
.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    color: white;
    line-height: 1.0;
    margin-bottom: 22px;
    letter-spacing: -1.5px;
}
.hero h1 em {
    font-style: normal;
    color: var(--accent2);
}
.hero-sub {
    font-size: 1rem;
    color: var(--soft);
    line-height: 1.82;
    margin-bottom: 36px;
    font-weight: 300;
    max-width: 400px;
}
.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hero-pill {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.hero-right {
    background: var(--pale);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    gap: 20px;
    position: relative;
}
.hero-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(91,79,207,0.08) 0%, transparent 70%);
}

.hero-img-main {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 6px solid white;
    box-shadow: 0 20px 60px rgba(45,27,105,0.2);
    background: var(--lavender);
    position: relative;
    z-index: 1;
    animation: floatQ 7s ease-in-out infinite;
}
@keyframes floatQ {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.stat-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    position: relative;
    z-index: 1;
}
.stat-c {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(45,27,105,0.07);
}
.stat-c-n {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--indigo);
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-c-l {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.4;
}

/* ═══════════════════════════════
   WRAPPER
═══════════════════════════════ */
.wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
}

/* SECTIONS */
section { padding: 88px 0; }
section.alt { background: var(--offwhite); }

/* SECTION LABELS */
.eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.eyebrow::before {
    content: '';
    width: 20px; height: 2px;
    background: linear-gradient(90deg, var(--mid), var(--violet));
    border-radius: 2px;
}

/* HEADINGS */
.sect-h {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--indigo);
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}
.sect-h em { font-style: italic; color: var(--mid); font-weight: 600; }

h2.ch {
    font-family: 'Syne', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--indigo);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--lavender);
    letter-spacing: -0.3px;
}
h3.sh {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--mid);
    margin: 24px 0 10px;
}

/* CARDS */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(45,27,105,0.04);
}
.card p { font-size: 0.96rem; line-height: 1.85; color: var(--body); margin-bottom: 14px; }
.card p:last-child { margin-bottom: 0; }

/* GRIDS */
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:20px; }
.three-col { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }

/* TOPIC CARDS */
.t-card {
    background: white; border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
    text-decoration: none; color: inherit; display: block;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(45,27,105,0.05);
}
.t-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(45,27,105,0.12); }
.t-card-img { width:100%; height:180px; object-fit:cover; display:block; background:var(--lavender); }
.t-card-body {
    padding: 22px;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--mid), var(--violet)) 1;
}
.t-num { font-size:0.63rem; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:var(--soft); margin-bottom:7px; }
.t-card-body h3 { font-family:'Syne',sans-serif; font-size:1.1rem; font-weight:700; color:var(--indigo); margin-bottom:7px; }
.t-card-body p { font-size:0.83rem; color:var(--muted); line-height:1.6; }
.t-arrow { display:inline-flex; align-items:center; gap:5px; margin-top:11px; font-size:0.78rem; font-weight:700; color:var(--mid); }

/* CALLOUT */
.callout {
    background: linear-gradient(135deg, var(--indigo), #3D2090);
    border-radius: 12px;
    padding: 26px 30px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}
.callout::before {
    content:''; position:absolute; top:-40px; right:-40px;
    width:150px; height:150px; border-radius:50%;
    background: rgba(255,255,255,0.05);
}
.callout-lbl {
    font-size:0.67rem; font-weight:700; letter-spacing:2px;
    text-transform:uppercase; color:var(--soft);
    margin-bottom:7px;
}
.callout p { color:var(--lavender); font-size:0.93rem; line-height:1.78; margin:0; position:relative; z-index:1; }

/* LISTS */
ul.ql, ol.ql { list-style:none; padding:0; margin:14px 0; }
ul.ql li, ol.ql li {
    padding:10px 0 10px 30px; border-bottom:1px solid var(--border);
    font-size:0.93rem; color:var(--body); position:relative; line-height:1.7;
}
ul.ql li:last-child, ol.ql li:last-child { border-bottom:none; }
ul.ql li::before {
    content:''; position:absolute; left:0; top:18px;
    width:12px; height:12px; border-radius:50%;
    background: linear-gradient(135deg, var(--mid), var(--violet));
}
ol.ql { counter-reset:qq; }
ol.ql li { counter-increment:qq; }
ol.ql li::before {
    content:counter(qq);
    position:absolute; left:0; top:10px;
    width:22px; height:22px;
    background:linear-gradient(135deg,var(--mid),var(--violet));
    color:white; font-size:0.67rem; font-weight:700;
    border-radius:50%; line-height:22px; text-align:center;
}

/* TABLE */
.tw { overflow-x:auto; border:1px solid var(--border); border-radius:12px; margin:20px 0; box-shadow:0 2px 10px rgba(45,27,105,0.04); }
table { width:100%; border-collapse:collapse; font-size:0.88rem; }
table caption { font-family:'Syne',sans-serif; font-size:0.95rem; font-weight:700; color:var(--indigo); text-align:left; padding:14px 20px 10px; background:var(--offwhite); border-bottom:1px solid var(--border); }
thead th { background:linear-gradient(135deg,var(--indigo),#3D2090); color:var(--lavender); padding:12px 20px; text-align:left; font-size:0.75rem; font-weight:700; letter-spacing:0.8px; text-transform:uppercase; }
tbody td { padding:11px 20px; border-bottom:1px solid var(--border); color:var(--body); vertical-align:top; }
tbody tr:last-child td { border-bottom:none; }
tbody tr:nth-child(even) { background:var(--offwhite); }
tbody tr:hover { background:var(--pale); }

/* IMAGES */
.img-full { width:100%; border-radius:12px; display:block; object-fit:cover; aspect-ratio:16/8; border:1px solid var(--border); margin:20px 0; box-shadow:0 4px 20px rgba(45,27,105,0.08); background:var(--lavender); }
.img-cap { font-size:0.75rem; color:var(--muted); font-style:italic; text-align:center; margin-top:-12px; margin-bottom:20px; }
.img-pair { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:20px 0; }
.img-pair img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; border-radius:10px; border:1px solid var(--border); background:var(--lavender); }
.img-pair figcaption { font-size:0.72rem; color:var(--muted); font-style:italic; margin-top:5px; text-align:center; }

/* EXT CARDS */
.ext-card {
    background:white; border:1px solid var(--border); border-radius:14px;
    padding:24px 28px; margin-bottom:14px;
    display:flex; gap:20px; align-items:flex-start;
    box-shadow:0 2px 10px rgba(45,27,105,0.04);
    transition:border-color 0.2s, transform 0.2s;
}
.ext-card:hover { border-color:var(--violet); transform:translateX(4px); }
.ext-num {
    font-family:'Syne',sans-serif; font-size:1.7rem; font-weight:800;
    color:var(--lavender); min-width:44px; line-height:1; padding-top:4px;
}
.ext-body h4 { font-family:'Syne',sans-serif; font-size:1.05rem; font-weight:700; color:var(--indigo); margin-bottom:5px; }
.ext-body p { font-size:0.84rem; color:var(--muted); line-height:1.6; margin-bottom:9px; }
.ext-url { font-size:0.77rem; color:var(--mid); text-decoration:none; font-weight:500; }
.ext-url:hover { text-decoration:underline; }
.visit-btn {
    display:inline-flex; align-items:center; gap:6px;
    background:linear-gradient(135deg,var(--mid),var(--indigo));
    color:white; padding:7px 16px; border-radius:8px;
    font-size:0.78rem; font-weight:700; text-decoration:none;
    margin-top:8px; transition:opacity 0.2s;
}
.visit-btn:hover { opacity:0.85; }

/* NAV FWD */
.nav-fwd {
    display:flex; align-items:center; justify-content:space-between;
    background:var(--pale); border:1px solid var(--border); border-radius:14px;
    padding:22px 28px; text-decoration:none; color:inherit;
    margin-top:40px; transition:border-color 0.2s;
}
.nav-fwd:hover { border-color:var(--violet); }
.nav-fwd-lbl { font-size:0.68rem; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--muted); margin-bottom:3px; }
.nav-fwd-title { font-family:'Syne',sans-serif; font-size:1.25rem; font-weight:700; color:var(--indigo); }
.nav-fwd-arr {
    width:40px; height:40px; border-radius:50%;
    background:linear-gradient(135deg,var(--mid),var(--indigo));
    color:white; display:flex; align-items:center; justify-content:center;
    font-size:1rem; flex-shrink:0;
}

/* PAGE HERO */
.page-hero {
    padding: 100px 0 64px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--pale) 0%, var(--white) 100%);
}
.chapter-pill {
    display:inline-flex; align-items:center; gap:8px;
    background:white; border:1px solid var(--border);
    color:var(--mid); font-size:0.68rem; font-weight:700;
    letter-spacing:2px; text-transform:uppercase;
    padding:5px 14px; border-radius:999px; margin-bottom:14px;
}
.page-hero h1 {
    font-family:'Syne',sans-serif; font-size:clamp(2.2rem,4vw,3.8rem);
    font-weight:800; color:var(--indigo); line-height:1.06;
    margin-bottom:16px; letter-spacing:-1px; max-width:720px;
}
.page-hero h1 em { font-style:italic; color:var(--mid); font-weight:600; }
.page-hero p { font-size:1rem; color:var(--muted); max-width:580px; line-height:1.82; font-weight:300; }

/* BREADCRUMB */
.breadcrumb { font-size:0.78rem; color:var(--light); margin-bottom:28px; display:flex; align-items:center; gap:7px; }
.breadcrumb a { color:var(--mid); text-decoration:none; }

/* REFS */
ol.rl { counter-reset:r; list-style:none; padding:0; }
.rl li { counter-increment:r; padding:13px 0 13px 44px; border-bottom:1px solid var(--border); font-size:0.87rem; line-height:1.75; color:var(--body); position:relative; }
.rl li:last-child { border-bottom:none; }
.rl li::before {
    content:counter(r); position:absolute; left:0; top:13px;
    width:26px; height:26px;
    background:linear-gradient(135deg,var(--mid),var(--indigo));
    color:white; font-size:0.67rem; font-weight:700;
    border-radius:50%; line-height:26px; text-align:center;
}
.rl a { color:var(--mid); }
.rl a:hover { text-decoration:underline; }

/* TOC PILLS */
.toc-pills { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:28px; }
.toc-pills a {
    background:var(--pale); border:1px solid var(--border);
    color:var(--indigo); padding:7px 16px; border-radius:999px;
    font-size:0.78rem; font-weight:600; text-decoration:none; transition:all 0.2s;
}
.toc-pills a:hover { background:var(--indigo); color:white; border-color:var(--indigo); }

/* CONTACT BAND */
.contact-band {
    background:linear-gradient(135deg,var(--indigo),#3D2090);
    border-radius:16px; padding:36px 40px; color:white;
    display:grid; grid-template-columns:1fr 1fr; gap:32px;
    position:relative; overflow:hidden;
}
.contact-band::before {
    content:''; position:absolute; top:-60px; right:-60px;
    width:220px; height:220px; border-radius:50%;
    background:rgba(255,255,255,0.05);
}
.contact-band h3 { font-family:'Syne',sans-serif; font-size:1.05rem; color:white; margin-bottom:16px; font-weight:700; }
.ci { display:flex; gap:10px; margin-bottom:9px; font-size:0.87rem; position:relative; z-index:1; }
.ci-l { font-size:0.67rem; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--soft); min-width:86px; padding-top:2px; }
.ci-v { color:rgba(255,255,255,0.85); }
.ci-v a { color:var(--soft); text-decoration:none; }
.ci-v a:hover { color:white; }

.bmark { scroll-margin-top:86px; }

/* FOOTER */
footer {
    background:var(--indigo); color:var(--soft);
    padding:24px 48px;
    display:flex; justify-content:space-between; align-items:center;
    font-size:0.8rem;
}
footer a { color:var(--lavender); text-decoration:none; }
footer a:hover { color:white; }

/* RESPONSIVE */
@media (max-width:960px) {
    .top-nav { grid-template-columns:1fr auto; padding:0 20px; }
    .top-nav-right { display:none; }
    .hero { grid-template-columns:1fr; }
    .hero-left { padding:60px 28px; }
    .hero-right { padding:40px 28px; }
    .two-col,.three-col,.img-pair,.contact-band { grid-template-columns:1fr; }
    .wrapper { padding:0 20px; }
    .page-hero { padding:84px 0 48px; }
    footer { flex-direction:column; gap:8px; text-align:center; padding:18px; }
}
@media (max-width:640px) {
    .top-nav-links a { padding:6px 10px; font-size:0.75rem; }
}
