/* ULTRA CLEAN ACADEMIC CSS - Professional Standards Only */

/* Reset Everything */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Document Root */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Body - Clean Academic Layout */
body {
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    line-height: 1.8;
    color: #000;
    background: #fff;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 60px;
}

/* Container - Consistent Spacing */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Navigation - Fixed and Clean */
.academic-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 2px solid #000;
    padding: 15px 0;
    z-index: 1000;
}

.academic-nav .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 14pt;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: #000;
    text-decoration: none;
    font-size: 11pt;
    padding: 5px 10px;
    display: block;
}

.nav-links a:hover {
    background: #000;
    color: #fff;
}

/* Back Button - Properly Positioned */
.back-button {
    position: fixed;
    top: 80px;
    left: 20px;
    background: #000;
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 10pt;
    z-index: 999;
}

/* Header/Hero - Clean and Centered */
.hero {
    margin-top: 80px;
    padding: 60px 0;
    text-align: center;
    border-bottom: 2px solid #000;
}

.title {
    font-size: 24pt;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 14pt;
    color: #333;
    margin-bottom: 30px;
}

/* Stats Grid - Properly Aligned */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
}

.stat {
    text-align: center;
    padding: 10px;
}

.stat .value {
    font-size: 20pt;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    white-space: nowrap;
    min-height: 28pt;
}

.stat .label {
    font-size: 9pt;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

/* Sections - Clear Separation */
.section {
    padding: 40px 0;
    border-bottom: 1px solid #ddd;
}

.section:last-child {
    border-bottom: none;
}

.section.alt {
    background: #fafafa;
    margin: 0 -60px;
    padding-left: 60px;
    padding-right: 60px;
}

/* Headings - Hierarchical */
h1 {
    font-size: 20pt;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

h2 {
    font-size: 16pt;
    margin: 30px 0 15px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #333;
}

h3 {
    font-size: 13pt;
    margin: 20px 0 10px 0;
    font-weight: bold;
}

h4 {
    font-size: 11pt;
    margin: 15px 0 10px 0;
    font-style: italic;
}

/* Paragraphs - Justified */
p {
    margin: 15px 0;
    text-align: justify;
    line-height: 1.8;
}

/* Lists - Clean */
ul, ol {
    margin: 15px 0 15px 30px;
    line-height: 1.8;
}

li {
    margin: 5px 0;
}

/* Tables - Professional */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 11pt;
}

table caption {
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
}

table th {
    background: #000;
    color: #fff;
    padding: 10px;
    text-align: left;
    font-weight: bold;
}

table td {
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: top;
}

table tr:nth-child(even) td {
    background: #f9f9f9;
}

/* Code Blocks - Clean */
pre {
    background: #f5f5f5;
    border: 1px solid #000;
    padding: 15px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 10pt;
    margin: 20px 0;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 10pt;
    background: #f0f0f0;
    padding: 2px 4px;
}

/* Special Boxes */
.abstract,
.warning-box,
.requirement-box,
.implementation-note {
    background: #fff;
    border: 2px solid #000;
    padding: 20px;
    margin: 30px 0;
}

.abstract {
    font-style: italic;
    border-left: 4px solid #000;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.warning-box {
    background: #fff;
    border: 3px solid #000;
    font-weight: bold;
}

/* Theorem/Proof Blocks */
.theorem,
.lemma,
.definition,
.proposition,
.proof {
    margin: 20px 0;
    padding: 15px;
    border-left: 3px solid #000;
    background: #fafafa;
}

.proof:after {
    content: " ■";
    float: right;
    font-size: 14pt;
}

/* Feature Grid - Aligned */
.spec-grid,
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.spec-card,
.feature {
    border: 1px solid #000;
    padding: 20px;
    background: #fff;
}

.spec-card h3,
.feature h3 {
    font-size: 12pt;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #333;
}

/* Comparison Tables */
.comparison-table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

.comparison-table th {
    background: #000;
    color: #fff;
    padding: 10px;
    text-align: center;
    white-space: nowrap;
}

.comparison-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #333;
}

.status-exists {
    background: #e8f5e9;
}

.status-partial {
    background: #fff3e0;
}

.status-none {
    background: #ffebee;
}

/* Timeline */
.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.timeline-item {
    border: 1px solid #000;
    padding: 15px;
    text-align: center;
}

/* Footer */
footer {
    margin-top: 60px;
    padding: 40px 0 20px 0;
    border-top: 2px solid #000;
    font-size: 10pt;
    color: #666;
}

.footer-content {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.footer-content h4 {
    font-size: 11pt;
    font-weight: bold;
    color: #000;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
}

.footer-content ul li {
    margin-bottom: 0;
    display: inline-block;
}

.footer-content ul li::after {
    content: "•";
    margin-left: 15px;
    color: #ccc;
}

.footer-content ul li:last-child::after {
    content: "";
    margin-left: 0;
}

.footer-content ul li a {
    color: #666;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.footer-content ul li a:hover {
    border-bottom-color: #000;
}

.copyright {
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

/* Mobile Responsive - Clean */
@media screen and (max-width: 768px) {
    body {
        padding: 15px;
        font-size: 11pt;
        max-width: 100%;
    }

    .container {
        padding: 0 !important;
    }

    .academic-nav .container {
        padding: 0 15px !important;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .nav-links a {
        font-size: 9pt;
        padding: 4px 8px;
    }

    .hero {
        margin-top: 80px;
        padding: 30px 0;
    }

    .title {
        font-size: 16pt;
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: 11pt;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        padding: 20px 0;
    }

    .stat {
        padding: 8px 5px;
    }

    .stat .value {
        font-size: 14pt;
        white-space: nowrap;
    }

    .stat .label {
        font-size: 8pt;
    }

    h1 {
        font-size: 15pt;
        margin: 30px 0 15px 0;
    }

    h2 {
        font-size: 13pt;
        margin: 25px 0 12px 0;
    }

    h3 {
        font-size: 11pt;
        margin: 20px 0 10px 0;
    }

    h4 {
        font-size: 10pt;
    }

    p {
        font-size: 10pt;
        line-height: 1.6;
        margin: 12px 0;
    }

    .section {
        padding: 25px 0;
    }

    .section.alt {
        margin: 0 -15px;
        padding: 25px 15px;
    }

    .spec-grid,
    .features {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .timeline {
        grid-template-columns: 1fr !important;
    }

    table {
        font-size: 8pt;
        overflow-x: auto;
        display: block;
    }

    table th,
    table td {
        padding: 6px;
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
        font-size: 8pt;
    }

    .footer-content h4 {
        font-size: 9pt;
        margin-bottom: 8px;
    }

    .footer-content ul li {
        margin-bottom: 5px;
    }

    .copyright {
        font-size: 8pt;
        padding-top: 15px;
    }

    .back-button {
        position: static;
        display: inline-block;
        margin: 10px 0;
        font-size: 9pt;
        padding: 8px 12px;
    }

    pre {
        font-size: 7pt;
        padding: 8px;
        overflow-x: auto;
    }

    code {
        font-size: 8pt;
    }

    ul, ol {
        margin: 12px 0 12px 20px;
        font-size: 10pt;
    }

    li {
        margin: 4px 0;
        line-height: 1.5;
    }
}

@media screen and (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .nav-links {
        flex-direction: column;
        gap: 5px;
    }

    table {
        font-size: 8pt;
    }

    table th,
    table td {
        padding: 5px;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 10pt;
        padding: 0;
        max-width: 100%;
    }

    .academic-nav,
    .back-button,
    footer {
        display: none;
    }

    .hero {
        margin-top: 0;
        page-break-after: always;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    table,
    .theorem,
    .proof,
    .spec-card {
        page-break-inside: avoid;
    }

    .section.alt {
        margin: 0;
        padding: 20px 0;
        background: none;
    }
}

/* Remove ALL Visual Effects */
* {
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
    filter: none !important;
    opacity: 1 !important;
}

/* API Method Boxes */
.api-method {
    border: 1px solid #000;
    margin: 20px 0;
    padding: 0;
}

.api-method h3 {
    background: #000;
    color: #fff;
    margin: 0;
    padding: 10px 15px;
}

.api-method > * {
    padding: 0 15px;
}

/* Parameter Tables */
.parameter-table {
    width: 100%;
    margin: 15px 0;
}

.parameter-table th {
    background: #f5f5f5;
    text-align: left;
    padding: 8px;
    border: 1px solid #333;
}

.parameter-table td {
    padding: 8px;
    border: 1px solid #333;
}

/* Command Boxes */
.command-box {
    background: #000;
    color: #fff;
    padding: 15px;
    margin: 20px 0;
    font-family: monospace;
    overflow-x: auto;
    font-size: 10pt;
}

/* File Structure */
.file-structure {
    background: #f5f5f5;
    border: 1px solid #000;
    padding: 15px;
    font-family: monospace;
    font-size: 10pt;
    margin: 20px 0;
}

/* Step Numbers */
.step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: #000;
    color: #fff;
    text-align: center;
    line-height: 30px;
    margin-right: 10px;
    font-weight: bold;
}