* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000;
    --bg-panel: rgba(0, 8, 0, 0.9);
    --green: #33aa33;
    --green-mid: #228822;
    --green-dim: #226622;
    --green-dark: #112211;
    --glow: 0 0 4px rgba(51, 170, 51, 0.5);
    --glow-sm: 0 0 2px rgba(51, 170, 51, 0.4);
    --accent: #aa8833;
    --accent-dim: #665522;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background: var(--bg);
    color: var(--green);
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--green-dim) var(--bg);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: var(--bg);
    border: 1px solid var(--green-dark);
}

*::-webkit-scrollbar-thumb {
    background: var(--green-dim);
    border-radius: 0;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--green);
    box-shadow: 0 0 4px var(--green);
}

*::-webkit-scrollbar-corner {
    background: var(--bg);
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.stars-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 160px 120px, rgba(51,170,51,0.8), transparent),
        radial-gradient(1px 1px at 200px 50px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 220px 150px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 260px 90px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 300px 180px, rgba(51,170,51,0.6), transparent);
    background-size: 350px 200px;
    animation: starsMove 120s linear infinite;
}

.stars-layer:nth-child(2) {
    background-image:
        radial-gradient(1px 1px at 25px 45px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 75px 100px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 125px 25px, rgba(51,170,51,0.7), transparent),
        radial-gradient(1px 1px at 175px 75px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 225px 130px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 275px 60px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 325px 110px, rgba(51,170,51,0.5), transparent);
    background-size: 400px 180px;
    animation: starsMove 180s linear infinite reverse;
    opacity: 0.7;
}

.stars-layer:nth-child(3) {
    background-image:
        radial-gradient(2px 2px at 50px 80px, rgba(51,170,51,0.4), transparent),
        radial-gradient(2px 2px at 150px 40px, rgba(51,170,51,0.3), transparent),
        radial-gradient(2px 2px at 250px 120px, rgba(51,170,51,0.5), transparent);
    background-size: 300px 150px;
    animation: starsMove 200s linear infinite;
    opacity: 0.5;
}

@keyframes starsMove {
    from { transform: translate(0, 0); }
    to { transform: translate(-50%, -50%); }
}

#boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#boot-overlay.active {
    opacity: 1;
    visibility: visible;
}

#boot-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--green), transparent);
    animation: bootScan 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px var(--green), 0 0 40px var(--green);
}

@keyframes bootScan {
    0% { top: 0; opacity: 1; }
    50% { opacity: 0.5; }
    100% { top: 100%; opacity: 0; }
}

.boot-content {
    text-align: center;
}

.boot-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--green);
    box-shadow: var(--glow);
    margin-bottom: 1rem;
    animation: bootPulse 0.3s ease-in-out infinite alternate;
}

@keyframes bootPulse {
    from { box-shadow: 0 0 4px rgba(51, 170, 51, 0.4); }
    to { box-shadow: 0 0 8px rgba(51, 170, 51, 0.6); }
}

.boot-text {
    font-size: 0.8rem;
    color: var(--green);
    text-shadow: var(--glow-sm);
}

.click-prompt {
    margin-top: 1.5rem;
    font-size: 0.65rem;
    color: var(--green-dim);
    letter-spacing: 2px;
    animation: promptPulse 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes promptPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; color: var(--green); }
}

.cursor {
    animation: blink 0.4s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

main {
    width: 100%;
    height: 100%;
}

#main-content {
    width: 100%;
    max-width: 1100px;
    height: calc(100vh - 40px);
    max-height: 750px;
    position: relative;
    z-index: 1;
    opacity: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#main-content.visible {
    animation: mainUnveil 0.6s ease-out forwards;
}

@keyframes mainUnveil {
    0% {
        opacity: 0;
        clip-path: inset(50% 50% 50% 50%);
        filter: brightness(2);
    }
    30% {
        opacity: 1;
        clip-path: inset(40% 0% 40% 0%);
        filter: brightness(1.5);
    }
    100% {
        opacity: 1;
        clip-path: inset(0% 0% 0% 0%);
        filter: brightness(1);
    }
}

#main-content.visible .header {
    animation: headerSlide 0.4s ease-out 0.2s backwards;
}

@keyframes headerSlide {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#main-content.visible .sidebar {
    animation: sidebarReveal 0.5s ease-out 0.3s backwards;
}

@keyframes sidebarReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

#main-content.visible .main-area {
    animation: mainAreaReveal 0.5s ease-out 0.35s backwards;
}

@keyframes mainAreaReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 0 0 100%);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

#main-content.visible .footer {
    animation: footerSlide 0.4s ease-out 0.4s backwards;
}

@keyframes footerSlide {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.outer-frame {
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    pointer-events: none;
}

#main-content.visible .outer-frame {
    animation: frameReveal 0.6s ease-out forwards;
}

@keyframes frameReveal {
    0% {
        border-color: transparent;
    }
    30% {
        border-color: var(--green);
        box-shadow: inset 0 0 30px rgba(51, 170, 51, 0.2), 0 0 20px rgba(51, 170, 51, 0.3);
    }
    100% {
        border-color: var(--green-dim);
        box-shadow: none;
    }
}

.outer-frame::before,
.outer-frame::after {
    content: '';
    position: absolute;
    background: var(--green);
    box-shadow: var(--glow-sm);
}

.outer-frame.animate::before {
    top: 0;
    left: 0;
    height: 1px;
    animation: borderH 0.4s ease forwards;
}

.outer-frame.animate::after {
    bottom: 0;
    right: 0;
    height: 1px;
    animation: borderH 0.4s ease 0.1s forwards;
}

@keyframes borderH {
    from { width: 0; }
    to { width: 100%; }
}

.corner {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--green);
    opacity: 0;
}

#main-content.visible .corner {
    animation: cornerReveal 0.3s ease-out forwards;
}

#main-content.visible .corner.tl { animation-delay: 0.1s; }
#main-content.visible .corner.tr { animation-delay: 0.15s; }
#main-content.visible .corner.bl { animation-delay: 0.2s; }
#main-content.visible .corner.br { animation-delay: 0.25s; }

@keyframes cornerReveal {
    0% {
        opacity: 0;
        transform: scale(2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 10px var(--green);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: none;
    }
}

.corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner.tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.corner.bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.corner.br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.main-container {
    flex: 1;
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto 1fr auto;
    background: var(--bg-panel);
    border: 1px solid var(--green-dim);
    overflow: hidden;
    position: relative;
}

.main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--green) 50%, transparent 100%);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
}

#main-content.visible .main-container::before {
    animation: scanReveal 0.8s ease-out 0.1s forwards;
}

@keyframes scanReveal {
    0% {
        top: 0;
        opacity: 1;
        box-shadow: 0 0 15px var(--green), 0 5px 30px rgba(51, 170, 51, 0.4);
    }
    100% {
        top: 100%;
        opacity: 0;
        box-shadow: 0 0 5px var(--green), 0 5px 15px rgba(51, 170, 51, 0.2);
    }
}

.header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--green-dim);
    background: rgba(51, 170, 51, 0.02);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--green);
    box-shadow: var(--glow-sm);
}

.header-info h1 {
    font-size: 0.85rem;
    font-weight: normal;
    letter-spacing: 0.2em;
    text-shadow: var(--glow-sm);
}

.tagline {
    font-size: 0.55rem;
    color: var(--green-dim);
    letter-spacing: 0.1em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.6rem;
}

.header-right span {
    color: var(--green-dim);
}

.online-counter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-size: 0.55rem;
}

.online-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent);
    animation: onlinePulse 2s ease infinite;
}

@keyframes onlinePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent); }
    50% { opacity: 0.6; box-shadow: 0 0 3px var(--accent); }
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: var(--glow-sm);
    animation: statusPulse 1s ease infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.sidebar {
    border-right: 1px solid var(--green-dim);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.nav-section {
    border-bottom: 1px solid var(--green-dim);
}

.nav-header {
    padding: 0.4rem 0.6rem;
    font-size: 0.55rem;
    color: var(--green);
    letter-spacing: 0.1em;
    background: rgba(51, 170, 51, 0.03);
    border-bottom: 1px solid var(--green-dim);
}

.nav-list {
    padding: 0.4rem;
}

.nav-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--green-dim);
    padding: 0.45rem 0.6rem;
    font-family: inherit;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.1s ease;
    letter-spacing: 0.05em;
    text-align: left;
    margin-bottom: 0.2rem;
}

.nav-btn:hover {
    border-color: var(--green-dim);
    color: var(--green);
}

.nav-btn.active {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
    box-shadow: var(--glow-sm);
}

.viz-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.viz-header {
    padding: 0.4rem 0.6rem;
    font-size: 0.55rem;
    display: flex;
    justify-content: space-between;
    background: rgba(51, 170, 51, 0.03);
    border-bottom: 1px solid var(--green-dim);
}

.viz-title { color: var(--green); }
.viz-status { color: var(--accent); }

.viz-canvas {
    flex: 1;
    width: 100%;
    display: block;
    background: rgba(0, 0, 0, 0.3);
}

.main-area {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.terminal-header {
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--green-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(51, 170, 51, 0.03);
}

.terminal-title {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--green);
    text-shadow: var(--glow-sm);
    animation: titleFlicker 4s ease-in-out infinite;
}

@keyframes titleFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
}

.terminal-controls {
    font-size: 0.55rem;
    color: var(--green-dim);
}

.terminal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.section {
    display: none;
}

.section.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    animation: fuiReveal 0.4s ease-out;
    min-height: 0;
    overflow-x: hidden;
}

@keyframes fuiReveal {
    0% {
        opacity: 0;
        clip-path: polygon(50% 0%, 50% 0%, 50% 100%, 50% 100%);
    }
    50% {
        opacity: 1;
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
    100% {
        opacity: 1;
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    }
}

.cmd-line {
    color: var(--green);
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
    padding-left: 0.8rem;
    border-left: 2px solid var(--green);
    animation: cmdReveal 0.3s ease-out;
}

.cmd-line::before {
    content: '> ';
    color: var(--accent);
}

@keyframes cmdReveal {
    0% {
        opacity: 0;
        transform: translateX(-10px);
        border-left-color: transparent;
    }
    50% {
        border-left-color: var(--green);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.home-layout {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.home-data {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow-y: auto;
    min-height: 0;
}

.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    overflow: hidden;
}

.social-panel {
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.4);
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem;
    color: var(--green);
    text-decoration: none;
    font-size: 0.65rem;
    transition: all 0.15s ease;
}

.social-link:hover {
    background: rgba(51, 170, 51, 0.1);
    transform: scale(0.97);
}

.social-link.primary {
    background: rgba(51, 170, 51, 0.15);
    border-left: 2px solid var(--accent);
}

.social-link.secondary {
    opacity: 0.7;
    cursor: default;
}

.social-icon {
    color: var(--accent);
    font-size: 0.6rem;
}

.social-handle {
    color: var(--green);
}

.pulse-panel {
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 80px;
}

.pulse-panel .panel-header {
    flex-shrink: 0;
}

.pulse-canvas {
    width: 100%;
    flex: 1;
    display: block;
    min-height: 60px;
}

.data-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--green-dark);
    font-size: 0.7rem;
    animation: dataRowReveal 0.4s ease-out backwards;
}

.data-row:nth-child(1) { animation-delay: 0.1s; }
.data-row:nth-child(2) { animation-delay: 0.15s; }
.data-row:nth-child(3) { animation-delay: 0.2s; }
.data-row:nth-child(4) { animation-delay: 0.25s; }
.data-row:nth-child(5) { animation-delay: 0.3s; }
.data-row:nth-child(6) { animation-delay: 0.35s; }

@keyframes dataRowReveal {
    0% {
        opacity: 0;
        transform: translateX(20px);
        border-bottom-color: transparent;
    }
    70% {
        border-bottom-color: var(--green);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        border-bottom-color: var(--green-dark);
    }
}

.data-label {
    color: var(--green-dim);
    letter-spacing: 0.08em;
}

.data-value {
    color: var(--green);
}

.data-value.highlight {
    color: var(--accent);
}

.data-value.secondary {
    color: var(--green);
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.mini-stat {
    border: 1px solid var(--green-dim);
    padding: 0.5rem;
    text-align: center;
    background: rgba(51, 170, 51, 0.02);
    animation: miniStatReveal 0.35s ease-out backwards;
}

.mini-stat:nth-child(1) { animation-delay: 0.35s; }
.mini-stat:nth-child(2) { animation-delay: 0.4s; }
.mini-stat:nth-child(3) { animation-delay: 0.45s; }

@keyframes miniStatReveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.mini-stat-num {
    font-size: 1.2rem;
    color: var(--green);
    text-shadow: var(--glow-sm);
    display: block;
}

.mini-stat-lbl {
    font-size: 0.5rem;
    color: var(--green-dim);
    letter-spacing: 0.05em;
}

.file-system {
    margin-top: 0.8rem;
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.8rem;
    animation: fileSystemReveal 0.5s ease-out 0.4s backwards;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@keyframes fileSystemReveal {
    0% {
        opacity: 0;
        border-color: transparent;
        transform: scale(0.95);
    }
    50% {
        border-color: var(--green);
        box-shadow: 0 0 10px rgba(51, 170, 51, 0.3);
    }
    100% {
        opacity: 1;
        border-color: var(--green-dim);
        transform: scale(1);
        box-shadow: none;
    }
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--green-dim);
    margin-bottom: 0.8rem;
}

.file-header-title {
    font-size: 0.65rem;
    color: var(--green);
    letter-spacing: 0.1em;
}

.file-header-status {
    font-size: 0.55rem;
    color: var(--accent);
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    flex: 1;
    align-content: stretch;
}

.file-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.3);
    font-family: inherit;
    text-decoration: none;
    animation: folderReveal 0.3s ease-out backwards;
    min-height: 80px;
}

.file-folder:nth-child(1) { animation-delay: 0.5s; }
.file-folder:nth-child(2) { animation-delay: 0.55s; }
.file-folder:nth-child(3) { animation-delay: 0.6s; }
.file-folder:nth-child(4) { animation-delay: 0.65s; }

@keyframes folderReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
        border-color: transparent;
    }
    60% {
        border-color: var(--green);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        border-color: var(--green-dim);
    }
}

.file-folder:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: scale(0.96);
}

.file-folder.active-folder {
    border-color: var(--green);
    background: rgba(51, 170, 51, 0.15);
}

.folder-icon {
    width: 48px;
    height: 38px;
    position: relative;
    margin-bottom: 0.5rem;
}

.folder-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 8px;
    background: var(--green-dim);
    border-radius: 3px 3px 0 0;
    transition: all 0.15s ease;
}

.folder-icon::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 0;
    width: 100%;
    height: 31px;
    background: transparent;
    border: 1px solid var(--green-dim);
    border-radius: 0 4px 4px 4px;
    transition: all 0.15s ease;
}

.file-folder:hover .folder-icon::before {
    background: #fff;
}

.file-folder:hover .folder-icon::after {
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.file-folder.active-folder .folder-icon::before {
    background: var(--green);
}

.file-folder.active-folder .folder-icon::after {
    border-color: var(--green);
    box-shadow: var(--glow-sm);
}

.folder-label {
    font-size: 0.55rem;
    color: var(--green-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    transition: all 0.15s ease;
}

.file-folder:hover .folder-label {
    color: #fff;
}

.file-folder.active-folder .folder-label {
    color: var(--green);
}

.avatar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.avatar-ring-container {
    width: 100px;
    height: 100px;
    position: relative;
    animation: avatarReveal 0.5s ease-out 0.2s backwards;
}

@keyframes avatarReveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
        filter: brightness(2);
    }
    50% {
        filter: brightness(1.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

.avatar-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--green);
    border-radius: 50%;
    box-shadow: var(--glow);
    animation: ringSpin 12s linear infinite;
}

.avatar-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: var(--glow);
}

@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.avatar-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 1px solid var(--green);
}

.avatar-label {
    font-size: 0.55rem;
    color: var(--green-dim);
    text-align: center;
}

.radar-container {
    width: 80px;
    height: 80px;
    margin-top: 0.5rem;
    animation: radarReveal 0.4s ease-out 0.4s backwards;
}

@keyframes radarReveal {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.radar-canvas {
    width: 100%;
    height: 100%;
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.about-main {
    min-width: 0;
    overflow-y: auto;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    overflow: hidden;
}

.network-panel {
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.4);
    animation: panelReveal 0.5s ease-out 0.3s backwards;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid var(--green-dim);
    font-size: 0.5rem;
}

.panel-title {
    color: var(--green);
    letter-spacing: 0.1em;
}

.panel-status {
    color: var(--accent);
}

.network-canvas {
    width: 100%;
    flex: 1;
    display: block;
    min-height: 100px;
}

@keyframes panelReveal {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.globe-section {
    margin-top: 1rem;
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.4);
    padding: 0.8rem;
    animation: globeSectionReveal 0.5s ease-out 0.4s backwards;
}

@keyframes globeSectionReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 50% 0 50%);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

.globe-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.globe-canvas-large {
    width: 160px;
    height: 160px;
}

.globe-info {
    text-align: left;
}

.globe-title {
    font-size: 0.55rem;
    color: var(--green-dim);
    letter-spacing: 0.15em;
    margin-bottom: 0.3rem;
}

.globe-location {
    font-size: 1rem;
    color: var(--green);
    text-shadow: var(--glow-sm);
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.globe-coords {
    font-size: 0.6rem;
    color: var(--green-dim);
    font-family: 'Share Tech Mono', monospace;
}

.about-text {
    font-size: 0.65rem;
    color: var(--green-dim);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.about-text p {
    margin-bottom: 0.4rem;
}

.about-paragraph {
    font-size: 0.6rem;
    color: var(--green-dim);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding: 0.6rem;
    border-left: 2px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.3);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stat-box {
    border: 1px solid var(--green-dim);
    padding: 0.6rem;
    text-align: center;
    background: rgba(51, 170, 51, 0.02);
    animation: statReveal 0.4s ease-out backwards;
}

.stat-box:nth-child(1) { animation-delay: 0.2s; }
.stat-box:nth-child(2) { animation-delay: 0.3s; }
.stat-box:nth-child(3) { animation-delay: 0.4s; }

@keyframes statReveal {
    0% {
        opacity: 0;
        transform: scale(0.9);
        border-color: transparent;
    }
    50% {
        border-color: var(--green);
        box-shadow: var(--glow-sm);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        border-color: var(--green-dim);
        box-shadow: none;
    }
}

.stat-num {
    font-size: 1.4rem;
    color: var(--green);
    text-shadow: var(--glow-sm);
    display: block;
}

.stat-lbl {
    font-size: 0.5rem;
    color: var(--green-dim);
    letter-spacing: 0.05em;
}

.services-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.service-tag {
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--green-dim);
    font-size: 0.55rem;
    color: var(--green-dim);
    transition: all 0.1s ease;
    animation: tagReveal 0.3s ease-out backwards;
}

.service-tag:nth-child(1) { animation-delay: 0.3s; }
.service-tag:nth-child(2) { animation-delay: 0.35s; }
.service-tag:nth-child(3) { animation-delay: 0.4s; }
.service-tag:nth-child(4) { animation-delay: 0.45s; }
.service-tag:nth-child(5) { animation-delay: 0.5s; }
.service-tag:nth-child(6) { animation-delay: 0.55s; }
.service-tag:nth-child(7) { animation-delay: 0.6s; }
.service-tag:nth-child(8) { animation-delay: 0.65s; }

@keyframes tagReveal {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.service-tag:hover {
    border-color: var(--green);
    color: var(--green);
}

.portfolio-intro {
    font-size: 0.6rem;
    color: var(--green-dim);
    line-height: 1.6;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    border-left: 2px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.3);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.portfolio-item {
    display: block;
    padding: 0.5rem;
    border: 1px solid var(--green-dim);
    background: rgba(51, 170, 51, 0.02);
    text-decoration: none;
    transition: all 0.1s ease;
    animation: itemReveal 0.4s ease-out backwards;
}

.section.active .portfolio-item {
    animation: itemReveal 0.4s ease-out backwards;
}

@keyframes itemReveal {
    0% {
        opacity: 0;
        transform: translateY(15px);
        border-color: transparent;
    }
    50% {
        border-color: var(--green);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        border-color: var(--green-dim);
    }
}

.portfolio-item:hover {
    border-color: var(--green);
    box-shadow: var(--glow-sm);
    transform: scale(0.97);
}

.item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.5rem;
    color: var(--green-dim);
}

.item-id { color: var(--accent); }

.item-status {
    display: flex;
    gap: 3px;
    align-items: center;
}

.item-status::before,
.item-status::after {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--green-dim);
    animation: statusPulse 1.5s ease-in-out infinite;
}

.item-status::after {
    animation-delay: 0.3s;
}

.portfolio-item:hover .item-status::before,
.portfolio-item:hover .item-status::after {
    background: var(--green);
    box-shadow: 0 0 4px var(--green);
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

.portfolio-item h3 {
    color: var(--green);
    font-size: 0.65rem;
    font-weight: normal;
    margin-bottom: 0.15rem;
}

.portfolio-item p {
    color: var(--green-dim);
    font-size: 0.55rem;
}

.favourites-intro {
    color: var(--green-dim);
    font-size: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--green-dark);
    font-style: italic;
}

.favourites-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.favourite-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--green-dim);
    background: rgba(51, 170, 51, 0.02);
    text-decoration: none;
    transition: all 0.1s ease;
}

.favourite-item:hover {
    border-color: var(--green);
    box-shadow: var(--glow-sm);
    padding-left: 1rem;
    transform: scale(0.98);
}

.fav-rank {
    font-size: 1rem;
    color: var(--accent);
    min-width: 25px;
}

.fav-info h3 {
    color: var(--green);
    font-size: 0.7rem;
    font-weight: normal;
}

.fav-info span {
    font-size: 0.55rem;
    color: var(--green-dim);
}

.fav-arrow {
    margin-left: auto;
    color: var(--green);
    transition: transform 0.1s ease;
}

.favourite-item:hover .fav-arrow {
    transform: translateX(3px);
}

.contact-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    flex-shrink: 0;
}

.contact-bottom {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.contact-file-system {
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.8rem;
    min-height: 0;
}

.contact-file-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.contact-folder:hover {
    border-color: var(--accent);
    background: rgba(170, 136, 51, 0.1);
    transform: scale(0.96);
}

.contact-folder.primary {
    border-color: var(--accent);
    background: rgba(170, 136, 51, 0.15);
}

.contact-folder.secondary {
    opacity: 0.7;
    cursor: default;
}

.contact-folder:hover .folder-icon::before,
.contact-folder:hover .folder-icon::after {
    border-color: var(--accent);
}

.contact-folder:hover .folder-icon::before {
    background: var(--accent);
}

.contact-folder .folder-label {
    color: var(--green);
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}

.contact-folder .folder-handle {
    color: var(--accent);
    font-size: 0.6rem;
}

.contact-viz-panel {
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.contact-viz-panel .panel-header {
    flex-shrink: 0;
}

.contact-viz-panel .activity-canvas {
    width: 100%;
    flex: 1;
    display: block;
    min-height: 80px;
}

.activity-container {
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--green-dim);
    margin-bottom: 0.4rem;
    font-size: 0.55rem;
}

.activity-title {
    color: var(--green);
    letter-spacing: 0.1em;
}

.activity-status {
    color: var(--accent);
}

.activity-canvas {
    width: 100%;
    height: 80px;
    display: block;
}

.contact-info h2 {
    font-size: 0.8rem;
    font-weight: normal;
    margin-bottom: 0.4rem;
    color: var(--green);
}

.contact-info > p {
    color: var(--green-dim);
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--green-dim);
    color: var(--green-dim);
    text-decoration: none;
    font-size: 0.65rem;
    transition: all 0.1s ease;
}

.contact-link:hover {
    border-color: var(--green);
    color: var(--green);
}

.link-icon {
    color: var(--accent);
    font-size: 0.55rem;
}

.contact-term {
    border: 1px solid var(--green-dim);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.6rem;
    font-size: 0.65rem;
}

.contact-term p {
    color: var(--green-dim);
    margin-bottom: 0.3rem;
}

.contact-term .blink {
    color: var(--green);
    animation: blink 0.8s step-end infinite;
}

.footer {
    grid-column: 1 / -1;
    padding: 0.4rem 1rem;
    border-top: 1px solid var(--green-dim);
    display: flex;
    justify-content: space-between;
    font-size: 0.5rem;
    color: var(--green-dim);
    background: rgba(51, 170, 51, 0.02);
}

.footer-right { color: var(--accent); }

@media (max-width: 1024px) {
    .file-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 800px) {
    html {
        height: auto;
        min-height: 100%;
    }

    body {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: visible;
        padding: 8px;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }

    #main-content {
        max-height: none;
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .main-container {
        overflow: visible;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--green-dim);
        flex-direction: column;
    }

    .main-area {
        overflow: visible;
    }

    .terminal-body {
        overflow-y: visible;
        flex: none;
    }

    .section.active {
        flex: none;
    }

    .home-data {
        overflow-y: visible;
    }

    .about-main {
        overflow-y: visible;
    }

    .nav-section {
        border-bottom: 1px solid var(--green-dim);
        border-right: none;
    }

    .nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .nav-btn {
        flex: 1;
        min-width: calc(50% - 0.15rem);
        text-align: center;
        padding: 0.5rem 0.3rem;
        font-size: 0.6rem;
    }

    .viz-panel {
        flex: none;
        min-height: 60px;
        max-height: 80px;
        overflow: hidden;
    }

    .viz-canvas {
        flex: none;
    }

    .header {
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.5rem;
    }

    .header-left {
        width: 100%;
        justify-content: center;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        font-size: 0.55rem;
    }

    .header-info h1 {
        font-size: 0.75rem;
    }

    .home-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .home-sidebar {
        order: -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .avatar-box {
        width: 100%;
        order: -1;
        margin-bottom: 0.3rem;
    }

    .social-panel {
        flex: 1;
        min-width: 120px;
    }

    .pulse-panel {
        flex: none;
        min-width: 120px;
        height: auto;
        max-height: 100px;
        min-height: 70px;
        overflow: hidden;
    }

    .pulse-canvas {
        flex: none;
        min-height: 50px;
        max-height: 70px;
    }

    .avatar-ring-container {
        width: 70px;
        height: 70px;
    }

    .avatar-img {
        width: 52px;
        height: 52px;
    }

    .data-row {
        grid-template-columns: 100px 1fr;
        font-size: 0.65rem;
        padding: 0.4rem 0;
    }

    .home-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }

    .mini-stat {
        padding: 0.4rem 0.2rem;
    }

    .mini-stat-num {
        font-size: 1rem;
    }

    .mini-stat-lbl {
        font-size: 0.45rem;
    }

    .file-system {
        margin-top: 0.8rem;
        padding: 0.5rem;
    }

    .file-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.3rem;
    }

    .folder-icon {
        width: 32px;
        height: 26px;
    }

    .folder-icon::before {
        width: 12px;
        height: 5px;
    }

    .folder-icon::after {
        top: 4px;
        height: 22px;
    }

    .folder-label {
        font-size: 0.45rem;
    }

    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }

    .stat-box {
        padding: 0.4rem;
    }

    .stat-num {
        font-size: 1.1rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .portfolio-item {
        padding: 0.4rem;
    }

    .portfolio-item h3 {
        font-size: 0.6rem;
    }

    .favourite-item {
        padding: 0.4rem 0.6rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .contact-bottom {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .contact-file-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .contact-folder {
        flex: 1;
        min-width: 100px;
        padding: 0.6rem;
    }

    .contact-viz-panel {
        flex: none;
        max-height: 100px;
        overflow: hidden;
    }

    .contact-viz-panel .activity-canvas {
        flex: none;
        min-height: 60px;
    }

    .about-paragraph {
        font-size: 0.55rem;
        padding: 0.5rem;
    }

    .about-layout {
        grid-template-columns: 1fr;
    }

    .about-sidebar {
        order: -1;
        margin-bottom: 0.5rem;
    }

    .network-panel {
        flex: none;
        max-height: 120px;
        overflow: hidden;
    }

    .network-canvas {
        flex: none;
        height: 80px;
        min-height: 60px;
    }

    .globe-section {
        padding: 0.5rem;
    }

    .globe-display {
        flex-direction: column;
        gap: 0.8rem;
    }

    .globe-canvas-large {
        width: 120px;
        height: 120px;
    }

    .globe-info {
        text-align: center;
    }

    .globe-location {
        font-size: 0.85rem;
    }

    .activity-container {
        padding: 0.4rem;
    }

    .activity-canvas {
        flex: none;
        height: 60px;
    }

    .terminal-body {
        padding: 0.6rem;
    }

    .cmd-line {
        font-size: 0.6rem;
        margin-bottom: 0.6rem;
    }

    .footer {
        padding: 0.3rem 0.6rem;
        font-size: 0.45rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 4px;
    }

    #main-content {
        min-height: auto;
    }

    .header-info h1 {
        font-size: 0.65rem;
        letter-spacing: 0.1em;
    }

    .tagline {
        font-size: 0.45rem;
    }

    .nav-btn {
        min-width: calc(50% - 0.15rem);
        font-size: 0.55rem;
        padding: 0.4rem 0.2rem;
    }

    .data-row {
        grid-template-columns: 80px 1fr;
        font-size: 0.6rem;
    }

    .data-label {
        font-size: 0.55rem;
    }

    .home-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .mini-stat-num {
        font-size: 0.9rem;
    }

    .file-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .folder-icon {
        width: 28px;
        height: 22px;
    }

    .folder-icon::before {
        width: 10px;
        height: 4px;
    }

    .folder-icon::after {
        top: 3px;
        height: 19px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }

    .portfolio-item {
        padding: 0.3rem;
    }

    .portfolio-item h3 {
        font-size: 0.55rem;
    }

    .portfolio-item p {
        font-size: 0.45rem;
    }

    .item-header {
        font-size: 0.4rem;
    }

    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-num {
        font-size: 1rem;
    }

    .about-text {
        font-size: 0.6rem;
    }

    .services-row {
        gap: 0.3rem;
    }

    .service-tag {
        font-size: 0.5rem;
        padding: 0.25rem 0.4rem;
    }

    .about-layout {
        grid-template-columns: 1fr;
    }

    .network-panel {
        max-height: 100px;
    }

    .network-canvas {
        height: 60px;
        min-height: 50px;
    }

    .globe-canvas-large {
        width: 100px;
        height: 100px;
    }

    .globe-location {
        font-size: 0.75rem;
    }

    .pulse-panel {
        max-height: 80px;
        min-height: 60px;
    }

    .pulse-canvas {
        min-height: 40px;
    }

    .radar-container {
        width: 60px;
        height: 60px;
    }

    .about-paragraph {
        font-size: 0.5rem;
        line-height: 1.6;
    }

    .activity-canvas {
        height: 50px;
    }

    .file-folder {
        padding: 0.5rem 0.3rem;
    }
}
