/* 
   Cognitive Sovereignty Foundation — Academic Design
   Mobile-first, serious typography, white/black
*/

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.7;
    color: #1a1a1a;
    background-color: #ffffff;
    font-weight: 400;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #000000;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #000000;
    padding-bottom: 0.5em;
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.3em;
}

h4 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 1.2em;
}

a {
    color: #000000;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover {
    color: #444444;
}

a.no-underline {
    text-decoration: none;
}

a.no-underline:hover {
    text-decoration: underline;
}

em {
    font-style: italic;
}

strong {
    font-weight: 600;
}

ul, ol {
    margin-left: 1.5em;
    margin-bottom: 1.2em;
}

li {
    margin-bottom: 0.5em;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-paper {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 0;
    margin-bottom: 0;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.5px;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

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

.hero {
    background-color: #f5f5f5;
    padding: 4rem 0;
    margin-bottom: 3rem;
    text-align: center;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000000;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333333;
}

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

.section {
    padding: 3rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.section h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.paper-section, .foundation-section, .signup-section {
    background-color: #ffffff;
}

/* ============================================
   PAPER SECTION
   ============================================ */

.paper-abstract {
    font-size: 1.1rem;
    font-style: italic;
    color: #333333;
    margin-bottom: 1rem;
}

.paper-abstract-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #444444;
}

/* ============================================
   FOUNDATION SECTION
   ============================================ */

.foundation-mission {
    font-size: 1rem;
    line-height: 1.8;
    color: #333333;
}

/* ============================================
   SIGNUP SECTION
   ============================================ */

.signup-container {
    max-width: 500px;
    text-align: center;
}

.email-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.email-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #999999;
    font-family: Georgia, serif;
    font-size: 0.95rem;
}

.email-form input:focus {
    outline: none;
    border-color: #000000;
}

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

.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-family: Georgia, serif;
    border: 2px solid #000000;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.button:hover {
    background-color: #ffffff;
    color: #000000;
}

.email-form .button {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
}

/* ============================================
   PAPER PAGE LAYOUT
   ============================================ */

.paper-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 200px);
}

.paper-meta {
    margin: 2rem 0 3rem 0;
    padding: 1.5rem;
    background-color: #f5f5f5;
    border-left: 3px solid #000000;
    font-size: 0.9rem;
    line-height: 1.6;
}

.paper-meta p {
    margin-bottom: 0.5rem;
}

/* ============================================
   TABLE OF CONTENTS (SIDEBAR)
   ============================================ */

.toc-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.toc {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-left: 2px solid #000000;
}

.toc h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc ul {
    list-style: none;
    margin: 0;
}

.toc li {
    margin-bottom: 0.6rem;
}

.toc a {
    font-size: 0.9rem;
    color: #333333;
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.8rem;
    transition: all 0.2s ease;
}

.toc a:hover {
    color: #000000;
    border-left-color: #000000;
}

/* ============================================
   PAPER CONTENT
   ============================================ */

.paper-content section {
    margin-bottom: 3rem;
}

.paper-content h2 {
    font-size: 1.6rem;
    border-bottom: 2px solid #000000;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.paper-content h3 {
    font-size: 1.2rem;
    border: none;
    margin-top: 1.5rem;
}

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

.footer {
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666666;
}

.footer a {
    color: #000000;
}

.footer a:hover {
    color: #444444;
}

/* ============================================
   RESPONSIVE DESIGN (MOBILE-FIRST)
   ============================================ */

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Paper layout - stack on mobile */
    .paper-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .toc-sidebar {
        position: static;
        top: auto;
        margin-bottom: 2rem;
    }

    .toc {
        max-height: 300px;
        overflow-y: auto;
    }

    .email-form {
        flex-direction: column;
    }

    .email-form input {
        min-width: 100%;
    }

    .email-form .button {
        width: 100%;
    }

    section {
        padding: 2rem 0;
    }

    .section h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    .section {
        padding: 1.5rem 0;
    }

    .section h3 {
        font-size: 1.2rem;
    }

    .button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.1rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body {
        background-color: #ffffff;
        color: #000000;
    }

    .header, .footer, .toc-sidebar {
        display: none;
    }

    .paper-container {
        grid-template-columns: 1fr;
        padding: 0;
    }

    a {
        text-decoration: none;
        color: #000000;
    }

    h2 {
        page-break-after: avoid;
    }

    p {
        orphans: 3;
        widows: 3;
    }
}
