/* nonri.net - Memphis Professional Wiki */
/* Colors: #1A1A2E, #FF6B8A, #FFFFFF, #1A2438, #4ECDC4, #B0C4DE, #EDF2FA, #FFD93D */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    color: #1A1A2E;
    background-color: #EDF2FA;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #1A2438;
    color: #B0C4DE;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(-260px);
    animation: slideInSidebar 0.3s ease forwards;
}

.sidebar-header {
    padding: 24px 20px 16px;
}

.sidebar-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
}

/* Memphis decorative bars */
.memphis-bar,
.memphis-divider {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bar-line {
    height: 3px;
    border-radius: 1px;
}

.bar-pink { background: #FF6B8A; }
.bar-yellow { background: #FFD93D; }
.bar-teal { background: #4ECDC4; }

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-section {
    margin-bottom: 4px;
}

.nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    background: none;
    border: none;
    color: #B0C4DE;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

.nav-toggle.active {
    color: #FFFFFF;
}

.toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.nav-tree {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-tree.open {
    max-height: 200px;
}

.nav-link {
    display: block;
    padding: 6px 20px 6px 40px;
    color: #6B7C8E;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #4ECDC4;
    background: rgba(78, 205, 196, 0.05);
}

/* Sidebar Illustration */
.sidebar-illustration {
    padding: 20px;
    text-align: center;
}

.memphis-character {
    width: 80px;
    height: 80px;
    opacity: 0.6;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    position: relative;
    min-height: 100vh;
    padding: 0 40px;
    opacity: 0;
    animation: fadeInMain 0.5s ease 0.3s forwards;
}

/* Floating Memphis Shapes */
.memphis-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

.shape-circle {
    border-radius: 50%;
}

.shape-triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.shape-zigzag {
    background: repeating-linear-gradient(
        -45deg,
        #FFD93D,
        #FFD93D 4px,
        transparent 4px,
        transparent 8px
    );
}

.shape-1 {
    width: 60px;
    height: 60px;
    background: #FF6B8A;
    top: 15%;
    right: 8%;
    opacity: 0.12;
    animation: shapeAppear 0.4s ease 0.5s forwards;
}

.shape-2 {
    width: 45px;
    height: 45px;
    background: #FFD93D;
    top: 35%;
    right: 4%;
    opacity: 0.15;
    animation: shapeAppear 0.4s ease 0.6s forwards;
}

.shape-3 {
    width: 35px;
    height: 35px;
    background: #4ECDC4;
    top: 60%;
    right: 12%;
    opacity: 0.1;
    animation: shapeAppear 0.4s ease 0.7s forwards;
}

.shape-4 {
    width: 50px;
    height: 20px;
    top: 80%;
    right: 6%;
    opacity: 0.1;
    animation: shapeAppear 0.4s ease 0.8s forwards;
}

/* Content Sections */
.content-section {
    padding: 60px 0;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(26, 36, 56, 0.08);
}

.content-section:last-child {
    border-bottom: none;
}

.section-inner {
    max-width: 680px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero */
.hero-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 16px;
}

.hero-description {
    font-size: clamp(0.95rem, 1.05vw, 1.1rem);
    line-height: 1.8;
    color: #6B7C8E;
    margin-top: 20px;
}

/* Section Heading */
.section-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 16px;
}

/* Page Markers */
.page-marker {
    margin-bottom: 12px;
}

.marker-code {
    font-family: 'Source Code Pro', monospace;
    font-size: 12px;
    color: #FF6B8A;
    background: rgba(255, 107, 138, 0.08);
    padding: 3px 8px;
    border-radius: 3px;
}

/* Body Text */
.body-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(0.95rem, 1.05vw, 1.1rem);
    line-height: 1.8;
    color: #1A1A2E;
    opacity: 0.85;
    margin-bottom: 20px;
}

/* Code Blocks */
.code-block {
    font-family: 'Source Code Pro', monospace;
    font-size: 13px;
    background: #1A2438;
    color: #B0C4DE;
    padding: 16px 20px;
    border-radius: 4px;
    border-left: 3px solid #4ECDC4;
    line-height: 1.7;
}

.code-comment {
    color: #6B7C8E;
}

/* Pattern Grid */
.pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.pattern-item {
    text-align: center;
    padding: 20px;
    background: #FFFFFF;
    border: 2px solid #1A1A2E;
    border-radius: 4px;
}

.pattern-shape {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
}

.pattern-circle-demo {
    border-radius: 50%;
    background: #FF6B8A;
}

.pattern-triangle-demo {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: #FFD93D;
}

.pattern-zigzag-demo {
    background: repeating-linear-gradient(
        -45deg,
        #4ECDC4,
        #4ECDC4 4px,
        transparent 4px,
        transparent 8px
    );
}

.pattern-label {
    font-family: 'Source Code Pro', monospace;
    font-size: 11px;
    color: #6B7C8E;
}

/* Keyframes */
@keyframes slideInSidebar {
    to { transform: translateX(0); }
}

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

@keyframes shapeAppear {
    to { opacity: 0.15; }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 0 20px;
    }

    .pattern-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .sidebar {
        transform: translateX(-220px);
        width: 220px;
    }

    .main-content {
        margin-left: 0;
    }
}
