/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Mono', monospace;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
}

/* Container layout */
.container {
    display: flex;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sidebar container */
#sidebar-container {
    width: 25%;
    flex-shrink: 0;
}

/* Sidebar styles */
.sidebar {
    width: 100%;
    background-color: #ffffff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.nav-header {
    margin-bottom: 2rem;
}

.nav-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.5rem;
}

.nav-header p {
    color: #666666;
    font-size: 0.9rem;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #666666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f5f5f5;
    color: #333333;
}

.nav-link.active {
    background-color: #ffffff;
    color: #007bff;
    font-weight: 600;
}

.nav-footer {
    margin-top: auto;
    padding-top: 2rem;
}

.nav-footer p {
    color: #999999;
    font-size: 0.8rem;
}

/* Main content area */
.content {
    width: 75%;
    padding: 3rem;
    background-color: #ffffff;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

/* Custom scrollbar for webkit browsers */
.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

/* Page content */
.page {
    max-width: 800px;
}

.page h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 1.5rem;
}

.page h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin: 2rem 0 1rem 0;
}

.page p {
    margin-bottom: 1rem;
    color: #555555;
}

.page ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.page li {
    margin-bottom: 0.5rem;
    color: #555555;
}

/* Project grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

.project-card p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.project-link {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #333333;
    transition: border-bottom-color 0.2s ease;
}

.project-link:hover {
    border-bottom-color: transparent;
}

/* Portrait image */
.portrait-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.portrait-image {
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

/* Blog list */
.blog-list {
    margin-top: 2rem;
}

.blog-item {
    margin-bottom: 1rem;
    padding: 1rem 1rem 0.25rem 1rem;
    background-color: #ffffff;
    border-radius: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-item:hover {
    transform: translateX(2px);
    background-color: #f5f5f5;
}

.blog-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.2rem;
}

.blog-language {
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.blog-item h3.blog-title {
    margin: 0;
    font-size: 1rem;
    flex: 1;
}

.blog-item h3.blog-title a {
    color: #333333;
    text-decoration: none;
    border-bottom: 1px solid #333333;
    transition: border-bottom-color 0.2s ease;
}

.blog-item h3.blog-title a:hover {
    border-bottom-color: transparent;
}

.blog-date {
    color: #666666;
    font-size: 0.9rem;
    margin: 0 0 0 0;
    font-style: italic;
}

/* Blog post styling */
.blog-post {
    max-width: 800px;
}

.blog-meta {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.blog-post h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin: 2rem 0 1rem 0;
}

.blog-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.blog-navigation a {
    color: #333333;
    text-decoration: none;
    border-bottom: 1px solid #333333;
    transition: border-bottom-color 0.2s ease;
}

.blog-navigation a:hover {
    border-bottom-color: transparent;
}

/* Blog content styling */
.blog-content {
    line-height: 1.7;
}

.blog-content h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #333333;
    margin: 2rem 0 1rem 0;
}

.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin: 2rem 0 1rem 0;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333333;
    margin: 1.5rem 0 0.75rem 0;
}

.blog-content p {
    color: #555555;
    margin-bottom: 1rem;
}

/* Contact info */
.contact-info {
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.contact-item a {
    color: #333333;
    text-decoration: none;
    border-bottom: 1px solid #333333;
    transition: border-bottom-color 0.2s ease;
}

.contact-item a:hover {
    border-bottom-color: transparent;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    #sidebar-container {
        width: 100%;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 1rem;
    }
    
    .content {
        width: 100%;
        height: auto;
        overflow-y: visible;
    }
    
    .nav-links {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        flex-grow: 0;
    }
    
    .nav-links li {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .content {
        width: 100%;
        padding: 2rem 1rem;
    }
    
    .page h2 {
        font-size: 2rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .portrait-container {
        min-height: 50vh;
        padding: 1rem;
    }
    
    .portrait-image {
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .sidebar {
        padding: 1rem 0.5rem;
    }
    
    .content {
        padding: 1.5rem 0.5rem;
    }
    
    .page h2 {
        font-size: 1.75rem;
    }
}

/* Random Items Styles */
#random-items {
    margin-bottom: 3rem;
}

.random-value {
    color: #007bff;
    font-weight: 500;
}

.random-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-family: 'Roboto Mono', monospace;
    display: inline;
    vertical-align: baseline;
    margin-left: 0.1rem;
}

.random-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.random-button:active {
    transform: scale(0.95);
}
