:root {
    --bg-color: #0d0d12;
    --sidebar-bg: #161618;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #6b6b6b;
    --accent-orange: #d97742;
    --accent-orange-hover: #e88753;
    --border-color: #27272a;
    --card-bg: #131316;
    --hover-bg: #1c1c1f;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-pixel: 'Silkscreen', monospace;
    --sidebar-width: 60px;
    --sidebar-expanded-width: 200px;
}

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

body {
    background-color: var(--bg-color);
    background: radial-gradient(circle at 50% 0%, #16161c 0%, #0d0d12 40%, #09090b 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    justify-content: center;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 20px;
    z-index: 100;
    transition: width 0.3s ease;
}

.sidebar-inner {
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: var(--sidebar-width);
    overflow: hidden;
    transition: width 0.3s ease;
}

.sidebar:hover .sidebar-inner {
    width: var(--sidebar-expanded-width);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-text {
    margin-left: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar:hover .nav-text {
    opacity: 1;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--hover-bg);
}

.nav-item.active {
    color: var(--accent-orange);
    background-color: rgba(217, 119, 66, 0.1);
}

.nav-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 4px 0;
}

/* Main Content Area */
.content-area {
    padding: 60px 40px;
    width: 100%;
    max-width: 680px;
}

.section-container {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

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

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

/* Home Section Styles */
.profile-header {
    margin-bottom: 60px;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.pixel-name {
    font-family: var(--font-pixel);
    font-size: 1.8rem;
    color: var(--accent-orange);
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.profile-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.time-location {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.experience-text {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.intro-paragraph {
    font-size: 1rem;
    color: #d1d1d6;
    max-width: 100%;
    margin-bottom: 32px;
    line-height: 1.7;
}

.intro-paragraph p {
    margin-bottom: 20px;
}

.intro-paragraph .highlight {
    background-color: rgba(217, 119, 66, 0.15);
    color: #e88753;
    padding: 2px 6px;
    border-radius: 4px;
}

.more-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: var(--border-color);
    text-underline-offset: 4px;
}

.more-link:hover {
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid #333336;
}

.btn-secondary:hover {
    background-color: var(--hover-bg);
    border-color: var(--text-secondary);
}

.btn-secondary i {
    margin-right: 8px;
}

/* List Sections */
.list-section {
    margin-bottom: 48px;
}

.list-section h2 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 500;
}

.list-item {
    margin-bottom: 24px;
    cursor: pointer;
    padding: 8px 0;
    transition: transform 0.2s ease;
}

.list-item:hover {
    transform: translateX(4px);
}

.list-item h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.list-item .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Project Hover Feature */
.project-hover-item {
    position: relative;
    padding: 16px;
    margin-left: -16px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    z-index: 1;
}

.project-hover-item:hover {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    transform: translateX(4px);
    z-index: 10;
}

.project-preview-img {
    position: absolute;
    top: 50%;
    left: 380px;
    right: auto;
    transform: translateY(-50%) scale(0.95);
    width: 320px;
    height: auto;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.project-hover-item:hover .project-preview-img {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

@media (max-width: 1200px) {
    .project-preview-img {
        display: none;
    }
}

/* Additional Work Grid */
.additional-work {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.work-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    aspect-ratio: 16 / 10;
    position: relative;
}

.work-card:hover {
    transform: scale(1.02);
    border-color: var(--text-secondary);
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 40px 16px 16px 16px;
    display: flex;
    align-items: flex-end;
}

.work-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Footer */
.site-footer {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 40px;
}

.badge-container {
    margin-bottom: 40px;
}

.wall-badge {
    height: 200px;
    border-radius: 100px;
}

.email-pill {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    margin-bottom: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.email-pill:hover {
    background-color: var(--hover-bg);
    border-color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: var(--text-primary);
    background-color: var(--hover-bg);
    border-color: var(--text-secondary);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Section Headers for Writing & Playground */
.section-header {
    margin-bottom: 48px;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.section-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Writing Section */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.article-item {
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    margin-left: -12px;
}

.article-item:hover {
    background-color: var(--hover-bg);
}

.article-item h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.article-item .article-desc {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Playground Section */
.playground-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.play-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-card.tall {
    grid-row: span 2;
}

.play-card.full-width {
    grid-column: span 2;
}

.play-card:hover {
    border-color: var(--text-secondary);
    background-color: var(--hover-bg);
}

.play-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.play-card .coming-soon {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        top: auto;
        bottom: 20px; /* Fallback */
        bottom: max(20px, env(safe-area-inset-bottom));
        left: 50%;
        transform: translateX(-50%);
        height: auto;
        width: max-content;
        max-width: 95vw;
        padding-left: 0;
        z-index: 1000;
    }

    .sidebar-inner {
        flex-direction: row;
        width: 100%;
        border-radius: 40px;
        padding: 8px 12px;
        gap: 6px;
        overflow-x: auto;
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    
    .sidebar-inner::-webkit-scrollbar {
        display: none;
    }

    .sidebar:hover .sidebar-inner {
        width: auto;
    }

    .nav-item {
        padding: 8px 10px;
    }

    .nav-item i {
        font-size: 1.2rem;
    }

    .nav-text {
        display: none !important;
    }

    .nav-divider {
        border-top: none;
        border-left: 1px solid var(--border-color);
        margin: 0 8px;
        height: 24px;
        align-self: center;
    }
    
    .content-area {
        padding: 40px 20px 100px 20px; 
    }
    
    .action-buttons {
        flex-direction: row;
        gap: 12px;
    }
    
    .action-buttons .btn-primary,
    .action-buttons .btn-secondary {
        flex: 1;
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
    
    .playground-grid {
        grid-template-columns: 1fr;
    }
    
    .additional-work {
        grid-template-columns: 1fr;
    }
    
    .play-card.full-width, .play-card.tall {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Skill Pills */
.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.skill-pill {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.skill-pill:hover {
    border-color: var(--accent-orange);
    color: var(--text-primary);
    transform: translateY(-2px);
}


    
    .pixel-name {
        font-size: 2rem;
    }
    
    .profile-title {
        flex-direction: column;
        gap: 8px;
    }
    
    .time-location {
        text-align: left;
    }
}

/* Markdown Rendered Content Styles */
.markdown-content {
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 700px;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3 {
    margin-top: 40px;
    margin-bottom: 16px;
    font-weight: 600;
}

.markdown-content h1 { font-size: 2.2rem; color: var(--accent-orange); }
.markdown-content h2 { font-size: 1.6rem; }
.markdown-content h3 { font-size: 1.3rem; }

.markdown-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.markdown-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.markdown-content em {
    color: var(--text-muted);
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.markdown-content li {
    margin-bottom: 8px;
}

.markdown-content a {
    color: var(--accent-orange);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.markdown-content a:hover {
    color: var(--accent-orange-hover);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    font-size: 1rem;
    font-family: inherit;
}

.back-btn:hover {
    color: var(--text-primary);
}
