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

body {
    background: #FAFAF8;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.72;
    color: #4A4A4A;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #1A1A1A;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    padding: 32px 20px;
    z-index: 100;
    transform: translateX(-240px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar.visible { transform: translateX(0); }

.sidebar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #FAFAF8;
    margin-bottom: 40px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 12px; }

.nav-item {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #999;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    transition: color 0.15s ease;
}

.nav-item:hover { color: #FAFAF8; }

.cat-dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    flex-shrink: 0;
}

.cat-red { background: #E63946; }
.cat-blue { background: #2B5BA3; }
.cat-yellow { background: #F4B942; }

.color-bar {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    height: 3px;
    background: #E63946;
    z-index: 99;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-out;
}

.color-bar.visible { transform: scaleX(1); }

.bento-grid {
    margin-left: 240px;
    padding: 32px;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    width: 100%;
}

.bento-block {
    background: #FFFFFF;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 32px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.15s ease;
    position: relative;
}

.bento-block.visible { opacity: 1; transform: scale(1); }

.bento-block:hover {
    transform: translateY(-2px) scale(1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero-block {
    grid-column: span 8;
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 360px;
}

.geo-composition { width: 280px; height: 280px; flex-shrink: 0; }

.geo-shape { transition: transform 0.6s ease-out; }
.hero-block:hover .geo-circle { transform: translate(-8px, -8px); }
.hero-block:hover .geo-rect { transform: rotate(15deg) translate(8px, 0); }
.hero-block:hover .geo-tri { transform: translate(0, 8px); }

.hero-text h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 36px;
    letter-spacing: -0.02em;
    color: #1A1A1A;
    margin-bottom: 16px;
}

.ref-block { grid-column: span 4; }

.cat-indicator {
    width: 16px;
    height: 16px;
    position: absolute;
    top: -8px;
    left: -8px;
    transition: transform 0.2s ease;
}

.bento-block:hover .cat-indicator { transform: scale(1.2); }

.cat-indicator.circle { background: #E63946; border-radius: 50%; }
.cat-indicator.square { background: #2B5BA3; }
.cat-indicator.triangle {
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid #F4B942;
    background: none;
}

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: #1A1A1A;
    margin-bottom: 12px;
}

.code-snippet {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #2B5BA3;
    display: block;
    margin-top: 12px;
    padding: 8px 12px;
    border-left: 3px solid #2B5BA3;
    background: rgba(43, 91, 163, 0.04);
    transition: border-color 0.15s ease;
}

.bento-block:hover .code-snippet { border-color: #E63946; }

.section-divider {
    grid-column: span 12;
    text-align: center;
    padding: 8px 0;
}

.divider-bar {
    height: 3px;
    width: 100%;
    margin-bottom: 8px;
}

.bar-red { background: #E63946; }

.divider-motif svg { width: 80px; height: 24px; }

.wide-block { grid-column: span 8; }

.concept-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 2px;
    border: 1px solid #E8E8E6;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tag-red:hover { border-color: #E63946; color: #E63946; }
.tag-blue:hover { border-color: #2B5BA3; color: #2B5BA3; }
.tag-yellow:hover { border-color: #F4B942; color: #F4B942; }

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        transform: none;
        padding: 16px 20px;
    }
    .sidebar.visible { transform: none; }
    .color-bar { left: 0; }
    .bento-grid {
        margin-left: 0;
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .hero-block, .ref-block, .wide-block, .section-divider { grid-column: span 1; }
    .hero-block { flex-direction: column; }
    .geo-composition { width: 200px; height: 200px; }
}
