/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --border-color: #e5e7eb;
    --accent-color: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

/* Header and Navigation */
header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Main content */
main {
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.section-overlap {
    margin-top: -20%;
    position: relative;
    z-index: 10;
    padding-top: 0;
}

.about-card {
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.alt-bg {
    background-color: var(--bg-gray);
}

/* Hero section */
.hero {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-small {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-small h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 900px;
    margin: 0 auto;
}

/* Network Visual Section */
.network-visual {
    width: 100%;
    padding: 0;
    margin: 0;
    background: var(--bg-white);
}

.network-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* Headings */
h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Key Features */
.key-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Modules */
.modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.module {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    position: relative;
}

.module-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.module h3 {
    margin-top: 1rem;
}

/* Technical Note */
.technical-note {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-top: 3rem;
}

.math-details {
    margin-top: 2rem;
}

.math-details h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.math-details h4:first-child {
    margin-top: 1rem;
}

.equation {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1rem 0;
    overflow-x: auto;
    text-align: center;
}

.equation code {
    color: var(--secondary-color);
    font-size: 1rem;
}

.technical-list {
    list-style: none;
    margin: 1rem 0;
    padding-left: 0;
}

.technical-list li {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.technical-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.2;
}

.technical-list .equation {
    margin-left: 0;
    margin-top: 0.75rem;
}

/* Vision Section */
.vision-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.vision-points {
    list-style: none;
    margin: 2rem 0;
}

.vision-points li {
    padding: 1rem 0 1rem 2.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.vision-points li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.future-goals {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Get Involved Section */
.involvement-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.option {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.code-block {
    background: #1f2937;
    border-radius: 6px;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre;
    display: block;
    color: #10b981;
}

/* Override highlight.js colors if needed */
.code-block pre code.hljs {
    background: transparent;
    padding: 0;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 1rem;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--secondary-color);
}

/* Footer */
footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

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

footer a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 0.5rem;
    opacity: 0.8;
}

.footer-date {
    margin-top: 0.5rem;
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Documentation Layout */
.docs-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    padding: 3rem 2rem;
}

.docs-sidebar {
    flex: 0 0 250px;
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    position: sticky;
    top: 100px;
    height: fit-content;
    align-self: start;
}

.docs-nav {
    width: 100%;
    display: block;
}

.docs-nav h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin: 2rem 0 0.75rem;
    font-weight: 600;
    width: 100%;
    display: block;
}

.docs-nav h3:first-child {
    margin-top: 0;
}

.docs-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
}

.docs-nav li {
    margin: 0.25rem 0;
    display: block;
    width: 100%;
}

.docs-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.docs-nav a:hover {
    background: var(--bg-gray);
    color: var(--primary-color);
}

.docs-content {
    flex: 1;
    max-width: 900px;
    min-width: 0;
}

.doc-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.doc-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.doc-section h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.doc-section h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.concept-box {
    background: var(--bg-gray);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.concept-box h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.concept-box ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: 0.5rem 0 0.5rem 1.75rem;
    position: relative;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-small h1 {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .key-features,
    .modules,
    .involvement-options {
        grid-template-columns: 1fr;
    }

    .docs-container {
        flex-direction: column;
        gap: 2rem;
    }

    .docs-sidebar {
        position: static;
        flex: 1 1 auto;
    }

    .section-overlap {
        margin-top: -20%;
    }

    .about-card {
        padding: 2rem;
    }
}
