body { 
    display: flex; 
    flex-direction: column; 
    margin: 0; 
    background-color: var(--code-bg);
    color: var(--text);
    min-height: 100vh;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.navbar { 
    height: 64px; 
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 0 40px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    z-index: 100;
    flex-wrap: wrap;
}

.main-container { 
    display: flex; 
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar { 
    width: 260px; 
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 40px 20px;
}

.sidebar h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    opacity: 0.5;
    margin-bottom: 20px;
    padding-left: 10px;
}

.content-body {
    display: flex;
    flex: 1;
    align-items: stretch;
}

.content-area {
    flex: 1;
    padding: 40px;
    background: var(--code-bg);
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    min-height: 80vh;
    box-shadow: var(--shadow);
}

.nav-link { 
    color: var(--text); 
    text-decoration: none; 
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--social-bg);
    color: var(--text-h);
}

.btn-app {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-h);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-app:hover {
    background: var(--bg);
    border-color: var(--accent-border);
    color: var(--accent);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

body.app-fullscreen .navbar, 
body.app-fullscreen .sidebar { display: none; }
body.app-fullscreen .content-area { padding: 0; background: var(--bg); }
body.app-fullscreen .card { border: none; border-radius: 0; min-height: 100vh; box-shadow: none; }

@media (max-width: 1280px) {
    .navbar {
        height: auto;
        padding: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-group {
        width: 100%;
        justify-content: center;
        gap: 15px;
    }

    .options-menu {
        display: none; 
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--bg);
        z-index: 9999;
        padding: 40px 20px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .options-menu.show {
        display: flex;
    }

    .mobile-close-btn {
        display: block;
        background: none;
        border: none;
        position: absolute;
        top: 20px;
        right: 20px;
        color: var(--text);
        font-weight: bold;
        cursor: pointer;
        font-family: inherit;
        font-size: 14px;
        z-index: 10;
    }

    .theme-grid {
        width: 100%;
        max-width: 300px;
        gap: 20px;
    }

    .theme-btn {
        padding: 20px;
        font-size: 1.5rem;
    }

    .main-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .sidebar {
        width: 100% !important;
        max-width: 100%;
        padding: 20px;
        margin: 0;
        box-sizing: border-box;
        border-right: none;
        border-bottom: 1px solid var(--border);
        display: block;
    }

    .content-area {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 0;
        box-sizing: border-box;
    }

    .about-header h1 {
        font-size: 1.5rem;
    }

    .card, .tech-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }

    .content-body {
        flex-direction: column;
        align-items: stretch;
    }

    .site-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

.about-header {
    text-align: center;
    margin-bottom: 50px;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.stack-section h2 {
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.stack-section {
    width: 100%;
    overflow: hidden; 
}

.tech-card {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

.tech-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.tech-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--accent-bg);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.home-link {
color: var(--accent);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: border-color 0.2s;
font-weight: bold;
}
  
.home-link:hover {
    border-bottom-color: var(--accent);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 2rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: var(--accent);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.footer-nav a:hover {
    opacity: 1;
}

.login-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.login-modal {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow);
    color: var(--text);
}

.login-modal h3 { 
    margin-top: 0; 
    color: var(--text-h); 
    border-bottom: 1px solid var(--accent-border);
    padding-bottom: 10px;
}

.login-modal p { 
    font-size: 14px; 
    line-height: 1.6; 
    opacity: 0.9;
    text-align: justify;
    hyphens: none; 
}

.login-modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    opacity: 0.5;
}

.login-modal-close:hover { opacity: 1; }

/* .tech-tag.cpp { color: #00599c; background: rgba(0, 89, 156, 0.1); }
.tech-tag.ai { color: #f39c12; background: rgba(243, 156, 18, 0.1); } */