/* ================================================
   lrx.wiki — Brutalist Knowledge Fortress
   Colors: #1A1A18 (bg), #E8D0B8 (cream), #D0C8C0 (stone),
           #8A3040 (burgundy), #7ACC6A (green), #4A4A48 (steel)
   Fonts: Bungee (display), Nunito Sans (body), Fira Code (code)
   ================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1A1A18;
    color: #D0C8C0;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

.bungee {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    text-transform: uppercase;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#hero-title {
    font-size: clamp(3rem, 10vw, 8rem);
    color: #E8D0B8;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(-120px);
    animation: bounceDropIn 0.9s cubic-bezier(0.22, 1.5, 0.36, 1) 0.3s forwards;
}

.hero-subtitle {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: #D0C8C0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 1s ease 1.4s forwards;
}

/* Leaf divider in hero */
.leaf-divider {
    opacity: 0;
    animation: fadeIn 1s ease 1.0s forwards;
}

.leaf-svg .leaf-stroke {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLeaf 2s ease 1.0s forwards;
}

@keyframes drawLeaf {
    to { stroke-dashoffset: 0; }
}

@keyframes bounceDropIn {
    0% {
        opacity: 0;
        transform: translateY(-120px);
    }
    60% {
        opacity: 1;
        transform: translateY(15px);
    }
    80% {
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* --- Content Spine --- */
#content-spine {
    position: relative;
    z-index: 1;
    max-width: 65ch;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

/* --- Section Headers --- */
.section-header-full {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    padding: 3rem 0 1.5rem;
    margin-bottom: 0.5rem;
}

.section-label {
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    color: #E8D0B8;
    letter-spacing: 0.04em;
    display: inline-block;
    position: relative;
}

.section-label::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #8A3040;
}

/* --- Nature Dividers --- */
.nature-divider {
    text-align: center;
    margin: 1rem 0 2.5rem;
    opacity: 0.8;
}

/* --- Knowledge Cards --- */
.knowledge-card {
    background: #4A4A48;
    border: 3px solid #8A3040;
    padding: 2rem 2.2rem;
    margin-bottom: 2rem;
    box-shadow: 8px 8px 0 rgba(138, 48, 64, 0.3);
    position: relative;
    opacity: 0;
    transform: translateY(-60px);
    transition: box-shadow 0.3s ease;
}

.knowledge-card.bounced-in {
    opacity: 1;
    transform: translateY(0);
    animation: cardBounce 0.7s cubic-bezier(0.22, 1.4, 0.36, 1) forwards;
}

@keyframes cardBounce {
    0% {
        opacity: 0;
        transform: translateY(-60px);
    }
    55% {
        opacity: 1;
        transform: translateY(10px);
    }
    75% {
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.knowledge-card:hover {
    box-shadow: 12px 12px 0 rgba(138, 48, 64, 0.45);
}

.card-title {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: #E8D0B8;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #8A3040;
}

.knowledge-card p {
    margin-bottom: 1rem;
    font-weight: 300;
    line-height: 1.8;
}

.knowledge-card strong {
    font-weight: 600;
    color: #E8D0B8;
}

/* --- Code Blocks --- */
.code-block {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #7ACC6A;
    background: #1A1A18;
    border: 1px solid #4A4A48;
    padding: 1rem 1.2rem;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

.code-block-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.code-block-group .code-block {
    margin-top: 0;
}

/* --- Sidebar Labels --- */
.sidebar-label {
    position: fixed;
    z-index: 2;
    font-size: clamp(1rem, 2vw, 1.6rem);
    color: #8A3040;
    opacity: 0.15;
    writing-mode: vertical-rl;
    letter-spacing: 0.3em;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-label-left {
    left: 1.5rem;
    text-orientation: mixed;
}

.sidebar-label-right {
    right: 1.5rem;
    text-orientation: mixed;
    transform: translateY(-50%) rotate(180deg);
}

/* --- Footer --- */
#site-footer {
    position: relative;
    z-index: 1;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    border-top: 3px solid #8A3040;
}

.footer-inner {
    max-width: 65ch;
    margin: 0 auto;
}

.footer-divider {
    margin-bottom: 1.5rem;
}

.footer-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #D0C8C0;
    margin-bottom: 0.3rem;
}

.footer-secondary {
    font-weight: 300;
    font-size: 0.8rem;
    color: #7ACC6A;
    opacity: 0.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #content-spine {
        padding: 2rem 1rem 4rem;
    }

    .knowledge-card {
        padding: 1.5rem 1.2rem;
        box-shadow: 5px 5px 0 rgba(138, 48, 64, 0.3);
    }

    .sidebar-label {
        display: none;
    }

    .section-header-full {
        padding: 2rem 1rem 1rem;
    }
}

@media (max-width: 480px) {
    #hero-title {
        font-size: clamp(2.5rem, 14vw, 5rem);
    }

    .knowledge-card {
        padding: 1.2rem 1rem;
    }

    .code-block {
        font-size: 0.75rem;
        padding: 0.8rem;
    }
}
