:root {
    --bg-color: #050a05;
    --text-color: #2e8b57;
    --text-bright: #80ffaa;
    --accent: #2e8b57;
    --glass: rgba(5, 15, 5, 0.95);
    --border: 1px solid #1f3d2b;
    --font-main: 'Courier New', Courier, monospace;
    --nav-height: 60px;
}

[data-theme="light"] {
    --bg-color: #f0f2f5;
    --text-color: #1f2937;
    --text-bright: #000;
    --accent: #1f2937;
    --glass: rgba(255, 255, 255, 0.98);
    --border: 1px solid #ccc;
}

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

body { 
    background: var(--bg-color); 
    color: var(--text-color); 
    font-family: var(--font-main); 
    height: 100dvh; 
    width: 100vw;
    overflow: hidden;
    display: flex; flex-direction: column;
}

.top-bar { 
    height: var(--nav-height); 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 0 10px; border-bottom: var(--border); 
    background: var(--bg-color); flex-shrink: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 4px; }

.nav-logo { 
    width: 48px; 
    height: 48px; 
    border-radius: 2px; 
    border: 1px solid var(--accent); 
    object-fit: cover;
    padding: 0;
    background: rgba(0,0,0,0.1);
}

.brand-name { font-weight: bold; letter-spacing: 0.5px; color: var(--text-bright); font-size: 1rem; }

.nav-controls { display: flex; align-items: center; gap: 6px; }

.btn-border { 
    background: rgba(46, 139, 87, 0.1); 
    border: 1px solid var(--accent); 
    color: var(--text-bright); 
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
}
.btn-border:hover { background: var(--accent); color: var(--bg-color); }

.icon-btn {
    width: 34px; height: 34px; padding: 0; font-size: 1.2rem;
}
.text-btn {
    padding: 0 10px; height: 34px; font-size: 0.75rem; font-weight: bold;
}

.social-link {
    text-decoration: none;
}

.icon-frame {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 5px;
    border: 1px solid transparent;
    padding: 2px;
}

.icon-frame img, .x-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(1);
    display: block;
}

[data-theme="light"] .x-logo-img, [data-theme="light"] .icon-frame img { filter: invert(0); }

.overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: var(--bg-color);
    z-index: 100; 
    flex-direction: column; display: flex; justify-content: center; align-items: center; 
    opacity: 1;
}
.menu-list li { 
    list-style: none; font-size: 1.5rem; margin: 20px 0; 
    cursor: pointer; color: var(--text-color); border-bottom: 2px solid transparent; 
}
.menu-list li:hover { border-bottom: 2px solid var(--accent); color: var(--accent); }
.close-btn { position: absolute; top: 20px; right: 20px; background:none; border:none; color:var(--text-color); font-size:2rem; cursor:pointer;}

.container { 
    flex-grow: 1; position: relative; overflow: hidden; 
    padding: 10px; max-width: 800px; margin: 0 auto; width: 100%;
    display: flex; flex-direction: column;
}
.full-height { height: 100%; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.hidden-section { display: none; }
.active-section { display: flex; animation: fadeUp 0.3s ease; height: 100%; }

.paper-doc { 
    background: var(--glass); 
    border: var(--border); 
    padding: 20px; 
    overflow-y: auto; 
    height: 100%; 
    display: block;
    -webkit-overflow-scrolling: touch;
}

.bio-card { background: var(--glass); border: var(--border); padding: 15px; overflow-y: auto; height: 100%; width: 100%; }
.code-block { background: rgba(0,0,0,0.3); padding: 10px; border-left: 3px solid var(--accent); font-family: monospace; color: #ccc; margin: 15px 0; font-size: 0.8rem; }
.keyword { color: #d19a66; } .string { color: #98c379; } 

.about-banner {
    width: calc(100% + 40px);
    margin: -20px -20px 15px -20px;
    height: 140px; 
    display: block;
    object-fit: cover;
    object-position: center;
    border-bottom: 1px solid var(--accent);
}

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