/* munju.wiki - Brutalist Problem Encyclopedia */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #4A4A4A;
    background: #FFF8F0;
    overflow-x: hidden;
    position: relative;
}

/* ===== Dot Grid Background ===== */
.dot-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, #4A4A4A 0.5px, transparent 0.5px);
    background-size: 32px 32px;
    opacity: 0.08;
}

/* ===== Wiki Header ===== */
.wiki-header {
    position: relative;
    z-index: 1;
    padding: 12vh 2rem 6vh;
    max-width: 55ch;
    margin-left: 10vw;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.wiki-header.revealed {
    opacity: 1;
    transform: translateY(0);
}

.wiki-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #111111;
    border-bottom: 3px solid #111111;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.wiki-meta {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #4A4A4A;
    margin-top: 0.75rem;
}

/* ===== Broken Grid ===== */
.broken-grid {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem 8rem;
}

.entry {
    position: relative;
    max-width: 55ch;
    margin-bottom: 4rem;
}

.entry-1 { margin-left: calc(10vw * 1); }
.entry-2 { margin-left: calc(10vw * 2.5); }
.entry-3 { margin-left: calc(10vw * 0.8); }
.entry-4 { margin-left: calc(10vw * 3); }
.entry-5 { margin-left: calc(10vw * 1.5); }

.entry-border {
    border: 3px solid #111111;
    padding: 2rem;
    background: #FFF8F0;
    position: relative;
    z-index: 2;
}

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

.entry.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Entry Content ===== */
.entry-id {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    color: #FFB4B4;
    display: block;
    margin-bottom: 0.75rem;
}

.entry h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #111111;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.entry p {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #4A4A4A;
    margin-bottom: 0.75rem;
}

.entry p:last-of-type {
    margin-bottom: 0;
}

.meta-tag {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: #C4B4FF;
    margin-top: 1rem;
    border: 1px solid #C4B4FF;
    padding: 0.25rem 0.5rem;
}

/* ===== Pulse Attention ===== */
.pulse-active {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(196, 180, 255, 0); }
    50% { box-shadow: 0 0 12px rgba(196, 180, 255, 0.4); }
}

/* ===== Organic Blobs ===== */
.blob {
    position: absolute;
    z-index: 1;
    opacity: 0.25;
    pointer-events: none;
}

.blob-pink {
    width: 120px;
    height: 120px;
    background: #FFB4B4;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: -30px;
    right: -40px;
}

.blob-mint {
    width: 100px;
    height: 100px;
    background: #B4FFD4;
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    bottom: -20px;
    left: -30px;
}

.blob-lavender {
    width: 140px;
    height: 140px;
    background: #C4B4FF;
    border-radius: 50% 50% 30% 70% / 40% 60% 40% 60%;
    top: -40px;
    left: -50px;
}

/* ===== Colophon ===== */
.colophon {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 2rem 6rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.colophon.revealed {
    opacity: 1;
}

.colophon p {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #4A4A4A;
    opacity: 0.5;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .entry-1, .entry-2, .entry-3, .entry-4, .entry-5 {
        margin-left: 0;
    }

    .wiki-header {
        margin-left: 0;
    }

    .broken-grid {
        padding: 2rem 1.25rem 6rem;
    }
}
