:root {
    --bg: #f5f5f7;
    --text: #111827;
    --muted: #6b7280;

    --glass: rgba(255,255,255,0.55);
    --stroke: rgba(255,255,255,0.5);

    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --soft-shadow: 0 4px 20px rgba(0,0,0,0.06);

    --radius-lg: 28px;
    --radius-md: 16px;

    --link: #2563eb;
}

/* ======================
   BASE RESET
====================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;

    background: var(--bg);
    color: var(--text);

    overflow-x: hidden;
}

/* ======================
   TYPOGRAPHY
====================== */

h1, h2, h3 {
    letter-spacing: -0.03em;
}

p {
    line-height: 1.75;
    color: #4b5563;
    max-width: 750px;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ======================
   NAVBAR (GLASS APPLE STYLE)
====================== */

nav {
    position: fixed;
    top: 18px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.box {
    width: min(1100px, 92%);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 16px;

    background: var(--glass);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);

    border: 1px solid var(--stroke);

    border-radius: 999px;

    box-shadow: var(--shadow);

    transition: all 0.3s ease;
}

.main-nav {
    margin: 0;
    padding: 0;

    list-style: none;

    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav li {
    display: flex;
    align-items: center;
}

.main-nav a {
    padding: 8px 14px;
    border-radius: 14px;

    color: #555;

    transition: all 0.2s ease;
}

.main-nav a:hover {
    background: rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.push {
    margin-left: auto;
}

.logo-nav-box img {
    width: 42px;
    height: 42px;
    transform: scale(1.8);
}

/* ======================
   STORY MODE (CANADA PAGE)
====================== */

.chapter {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 140px 10vw 100px;

    opacity: 0;
    transform: translateY(40px);

    transition: opacity 0.8s ease, transform 0.8s ease;
}

.chapter.show {
    opacity: 1;
    transform: translateY(0);
}

.chapter:nth-child(even) {
    background: linear-gradient(to bottom, #ffffff, #f7f7f9);
}

/* HERO */
.hero {
    text-align: center;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin: 0;
}

.hero p {
    color: var(--muted);
    margin-top: 20px;
    font-size: 1.2rem;
}

/* ======================
   WIKI SYSTEM (/wiki/* pages)
====================== */

/* Main layout wrapper */
div.wiki-page {
    max-width: 980px;
    margin: 140px auto;
    padding: 0 24px;
}

/* Wikipedia line styling under titles */
.wiki-page .wiki-title {
    font-size: 2rem;
    font-family: 'Linux Libertine', 'Georgia', serif !important;
    font-weight: normal;
    margin-bottom: 0px;
    border-bottom: 1px solid #a2a9b1;
    padding-bottom: 5px;
}

/* Wikipedia sub-tagline */
.wiki-page .wiki-subtitle {
    font-size: 0.85rem;
    color: #54595d;
    font-style: italic;
    margin-top: 4px;
    margin-bottom: 24px;
    font-family: sans-serif !important;
}

/* Continuous article prose - isolated so it won't affect blog text styles */
.wiki-page .wiki-content p {
    font-family: sans-serif !important;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 20px;
    max-width: 100%;
}

/* Wikipedia Side Infobox */
.wiki-page .wiki-infobox {
    font-family: sans-serif !important;
    float: right;
    width: 270px;
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    border-collapse: collapse;
    margin: 0 0 16px 24px;
    font-size: 0.85rem;
    color: #202122;
}

.wiki-page .wiki-infobox th, 
.wiki-page .wiki-infobox td {
    padding: 6px 8px;
    vertical-align: top;
    text-align: left;
}

.wiki-page .wiki-infobox .infobox-title {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    background-color: #eaecf0;
    border-bottom: 1px solid #a2a9b1;
}

.wiki-page .wiki-infobox .infobox-image {
    text-align: center;
    border-bottom: 1px solid #a2a9b1;
    padding: 10px;
    background: #ffffff;
}

.wiki-page .wiki-infobox .infobox-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 6px;
}

.wiki-page .wiki-infobox .infobox-caption {
    font-size: 0.75rem;
    color: #54595d;
}

.wiki-page .wiki-infobox th[scope="row"] {
    font-weight: bold;
    width: 35%;
    background-color: transparent;
}

.wiki-page .wiki-infobox td {
    border-left: 1px solid #eaecf0;
}

/* Bottom categories/links wrapper */
.wiki-page .wiki-note {
    font-family: sans-serif !important;
    clear: both; 
    padding: 10px 14px;
    margin-top: 30px;
    background: #f8f9fa;
    border: 1px solid #a2a9b1;
    border-radius: 0px; 
    font-size: 0.85rem;
    color: #202122;
}

/* Links strictly targeted ONLY inside the wiki page text components */
.wiki-page .wiki-content a,
.wiki-page .wiki-infobox a,
.wiki-page .wiki-note a {
    color: #0645ad !important;
}
.wiki-page .wiki-content a:visited,
.wiki-page .wiki-infobox a:visited,
.wiki-page .wiki-note a:visited {
    color: #0b0080 !important;
}
.wiki-page .wiki-content a:hover,
.wiki-page .wiki-infobox a:hover,
.wiki-page .wiki-note a:hover {
    text-decoration: underline !important;
}
/* ======================
   SMALL UI HELPERS
====================== */

.small {
    font-size: 0.85rem;
    color: var(--muted);
}

.center {
    text-align: center;
}

/* ======================
   SCROLL FIX
====================== */

section {
    scroll-margin-top: 120px;
}