
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
    --bg:          #0d1a0d;
    --bg-section:  #111f11;
    --bg-alt:      #0a150a;
    --card:        #142014;
    --green:       #4a8c5c;
    --green-light: #6dab80;
    --green-dim:   #2a5c35;
    --amber:       #c8902e;
    --amber-light: #e8b050;
    --text:        #c2d4bc;
    --text-dim:    #7a9278;
    --text-head:   #deecd8;
    --border:      #2a4030;
    --nav-h:       56px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.8;
}

/* ===== HEADINGS ===== */

h1, h2, h3, h4 {
    font-family: 'Courier Prime', monospace;
    color: var(--text-head);
    font-weight: 700;
    line-height: 1.25;
}

h1 { font-size: clamp(2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--green-light); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-light); text-decoration: underline; }
a:hover { color: var(--amber-light); }

/* ===== CODE BLOCKS ===== */

code {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85em;
    color: var(--green-light);
    background: rgba(74, 140, 92, 0.12);
    padding: 0.1em 0.35em;
    border: 1px solid var(--border);
}

em { color: var(--amber-light); font-style: italic; }

/* ===== LAYOUT ===== */

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

section {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

section.alt { background: var(--bg-alt); }
section.mid { background: var(--bg-section); }

.divider {
    height: 1px;
    background: var(--border);
}

/* ===== NAVIGATION SECTION ===== */

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.nav-logo {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--green-light);
    text-decoration: none;
    letter-spacing: 0.1em;
}

.nav-logo:hover { color: var(--text-head); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    text-decoration: none;
    text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--green-light);
}

.nav-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dim);
}

/* ===== PAGE HEADER ===== */

.page-header {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
}

.page-header.alt { background: var(--bg-alt); }

.breadcrumb {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb span { margin: 0 0.4rem; }
.breadcrumb .current { color: var(--green-light); }

.page-header-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    color: var(--amber);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-dim);
    margin-top: 0.6rem;
    font-style: italic;
}

/* ===== SECTION LABELS ===== */

.section-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 0.5rem;
}

.section-title { margin-bottom: 1rem; }

.section-body {
    font-size: 1rem;
    max-width: 700px;
    color: var(--text);
    line-height: 1.85;
}

/* ===== CARDS ===== */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.5rem;
}

.card h3 { color: var(--green-light); margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; color: var(--text); }

.card-tag {
    display: inline-block;
    margin-top: 1rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    width: 100%;
}

/* ===== GRIDS ===== */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== DATA TABLE ===== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
}

.data-table th {
    text-align: left;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid rgba(42, 64, 48, 0.4);
    color: var(--text);
    font-size: 0.85rem;
}

.data-table tr.highlight td { color: var(--green-light); }
.data-table tr.amber-row td { color: var(--amber-light); }

/* ===== BAR CHART ===== */

.bar-wrap { display: flex; flex-direction: column; gap: 0.8rem; }

.bar-item {}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.bar-track {
    height: 6px;
    background: var(--border);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--green);
    transition: width 0.9s ease;
}

.bar-fill.amber { background: var(--amber); }
.bar-fill.dim   { background: #3a5a44; }
.bar-fill.faint { background: #2a3d2f; }

/* ===== PIPELINE ===== */

.pipeline { display: flex; flex-direction: column; gap: 0; }

.pipeline-step {
    display: flex;
    gap: 1.2rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border);
}

.pipeline-step:last-child { border-bottom: none; }

.step-num {
    font-family: 'Courier Prime', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--green-dim);
    flex-shrink: 0;
    width: 2.5rem;
    padding-top: 0.15rem;
}

.step-content h3 {
    font-size: 1rem;
    color: var(--text-head);
    margin-bottom: 0.4rem;
}

.step-content p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.step-badge {
    display: inline-block;
    margin-top: 0.5rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.63rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green-light);
    border: 1px solid var(--green-dim);
    padding: 0.15em 0.5em;
}

/* ===== REFERENCES ===== */

.ref-item {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1rem 1.2rem;
    font-size: 0.88rem;
}

.ref-item cite {
    display: block;
    font-style: italic;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 0.3rem;
}

.ref-item a {
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--green-light);
}

/* ===== SCROLL REVEAL ===== */

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

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

footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.footer-logo {
    font-family: 'Courier Prime', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-light);
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.footer-tagline {
    font-style: italic;
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-bottom: 1.2rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.footer-nav a {
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
}

.footer-nav a:hover { color: var(--green-light); }

.footer-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.8;
}

/* ===== IMG PLACEHOLDER ===== */

.img-frame {
    border: 1px solid var(--border);
    background: var(--card);
}

.img-frame-label {
    font-family: 'Courier Prime', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
}

.img-placeholder {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a140a;
}

.img-placeholder::after {
    content: attr(data-hint);
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 1rem;
    text-align: center;
    line-height: 1.6;
    white-space: pre-line;
}

/* ===== AMBER ACCENT CARD ===== */
.card.amber-accent { border-color: rgba(200, 144, 46, 0.3); }
.card.amber-accent h3 { color: var(--amber-light); }

/* ===== MOBILE ===== */

@media (max-width: 700px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.8rem;
    }

    .nav-links.open { display: flex; }
    .nav-menu-toggle { display: flex; }

    nav { position: relative; }

    section { padding: 2.5rem 0; }
    .page-header { padding: 2.5rem 0 2rem; }
}
