/* Modern rounded layout with depth and spacing - fully responsive flexbox */

.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2.5rem;
    min-height: 100vh;
    padding: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.content-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2rem;
    width: 100%;
    flex: 1;
    padding: 0;
    margin-top: 1rem;
}

#typewriter-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    z-index: 20;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 0;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
}

body.dark-mode #typewriter-container {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 2px 8px rgba(0, 0, 0, 0.2);
}

#typewriter-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12),
                0 4px 12px rgba(0, 0, 0, 0.06);
}

body.dark-mode #typewriter-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
                0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Content area for section swapping */
#content-area {
    flex: 1;
    position: relative;
    min-height: 200px;
}

.content-section {
    display: none;
    padding: 2rem 2.5rem;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#typewriter-container pre,
.content-section pre {
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

#typewriter-text {
    font-family: "Oxygen Mono", monospace;
    color: inherit;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
    .container {
        padding: 2rem;
        gap: 2rem;
    }
    
    .content-section {
        padding: 1.75rem 2rem;
    }
}

/* Mobile landscape and smaller */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .content-row {
        gap: 1.5rem;
        margin-top: 0.5rem;
    }
    
    #typewriter-container {
        border-radius: 20px;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    #typewriter-container pre {
        font-size: 0.9rem;
    }
}

/* Mobile portrait */
@media (max-width: 600px) {
    .container {
        padding: 1.25rem;
        gap: 1.25rem;
    }
    
    .content-row {
        gap: 1rem;
    }
    
    #typewriter-container {
        border-radius: 16px;
    }
    
    .content-section {
        padding: 1.25rem;
    }
    
    .menu-bar {
        padding: 0.625rem 0.875rem;
        border-radius: 16px 16px 0 0;
    }
    
    #typewriter-container pre {
        font-size: 0.85rem;
        line-height: 1.6;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .container {
        padding: 1rem;
    }
    
    #typewriter-container {
        border-radius: 12px;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .menu-bar {
        padding: 0.5rem 0.75rem;
        border-radius: 12px 12px 0 0;
    }
    
    #typewriter-container pre {
        font-size: 0.8rem;
    }
}
