/* LatticeZero Whitepaper Stylesheet */
:root {
    --primary: #1a5f7a;
    --accent: #00d4aa;
    --bg: #0a0a0a;
    --surface: #1a1a2e;
    --text: #e8e8e8;
}

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

body {
    font-family: 'Crimson Pro', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Download Banner */
.download-banner {
    background: linear-gradient(135deg, var(--primary), #2a7f9a);
    padding: 1rem 2rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.download-btn {
    background: var(--accent);
    color: #000;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.download-btn:hover {
    transform: translateY(-2px);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.title {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 1rem;
}

.author, .date {
    color: #888;
    font-size: 0.95rem;
}

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

/* Abstract */
.abstract {
    background: var(--surface);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin-bottom: 2rem;
}

.abstract h2 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* TOC */
#TOC {
    background: var(--surface);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

#TOC h2 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

#TOC ul {
    list-style: none;
    padding-left: 0;
}

#TOC ul ul {
    padding-left: 1.5rem;
    margin-top: 0.3rem;
}

#TOC li {
    margin: 0.4rem 0;
}

#TOC a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

#TOC a:hover {
    color: var(--accent);
}

/* Sections */
section {
    margin-bottom: 3rem;
}

h2 {
    color: var(--accent);
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

h3 {
    color: #fff;
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
}

h4 {
    color: #ccc;
    font-size: 1.1rem;
    margin: 1.2rem 0 0.5rem;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Equations */
.equation {
    background: var(--surface);
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    overflow-x: auto;
    text-align: center;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

th {
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

tr.highlight {
    background: rgba(0, 212, 170, 0.15);
}

tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Lists */
ol, ul {
    margin: 1rem 0 1rem 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* References */
.references {
    font-size: 0.9rem;
}

.references li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #333;
    margin-top: 3rem;
    color: #666;
    font-size: 0.9rem;
}

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

/* Links */
a {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    .title {
        font-size: 1.6rem;
    }

    .download-banner {
        flex-direction: column;
        text-align: center;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* MathJax overrides */
.MathJax {
    font-size: 1.1em !important;
}
