:root {
    --page-pad: clamp(10px, 1.2vw, 16px);
    --xp-bg: #bcbcbc;
    --xp-panel: #c8c8c8;
    --xp-light: #ffffff;
    --xp-mid: #dcdcdc;
    --xp-dark: #7a7a7a;
    --xp-darker: #4e4e4e;
    --xp-blue: #090b95;
    --xp-blue-deep: #060778;
    --xp-blue-soft: #0f4eab;
    --xp-green: #15f71a;
    --xp-green-dark: #0a7f10;
    --text-dark: #0f0f0f;
    --text-light: #ffffff;
    --text-soft: #d4dcff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    padding: var(--page-pad);
    font-family: Tahoma, "MS Sans Serif", sans-serif;
    font-size: 16px;
    color: var(--text-dark);
    background:
        linear-gradient(
            to bottom,
            #bdbdbd 0,
            #bdbdbd 78px,
            var(--xp-blue) 78px,
            var(--xp-blue) 70%,
            var(--xp-blue-soft) 70%,
            var(--xp-blue-soft) 100%
        );
    overflow-x: hidden;
}

.bg-blur {
    display: none;
}

.glass {
    border-top: 2px solid var(--xp-light);
    border-left: 2px solid var(--xp-light);
    border-right: 2px solid var(--xp-dark);
    border-bottom: 2px solid var(--xp-dark);
    background: var(--xp-panel);
    box-shadow: inset 1px 1px 0 var(--xp-mid), inset -1px -1px 0 #878787;
    border-radius: 0;
}

.app-shell {
    max-width: 1260px;
    min-height: calc(100vh - var(--page-pad) * 2);
    min-height: calc(100dvh - var(--page-pad) * 2);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.sidebar {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.brand {
    min-width: 0;
}

.brand h1 {
    margin: 4px 0 0;
    font-family: "Silkscreen", monospace;
    font-weight: 700;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    letter-spacing: 0.02em;
    color: #101010;
    text-transform: none;
    line-height: 1.2;
}

.eyebrow {
    margin: 0;
    font-family: Tahoma, "MS Sans Serif", sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1f1f1f;
    font-weight: 700;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.menu-toggle {
    display: none;
    width: 34px;
    height: 34px;
    padding: 0;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    background: var(--xp-panel);
    border-top: 2px solid var(--xp-light);
    border-left: 2px solid var(--xp-light);
    border-right: 2px solid var(--xp-dark);
    border-bottom: 2px solid var(--xp-dark);
}

.menu-toggle:active {
    border-top-color: var(--xp-dark);
    border-left-color: var(--xp-dark);
    border-right-color: var(--xp-light);
    border-bottom-color: var(--xp-light);
}

.menu-toggle:focus-visible {
    outline: 2px dotted #222;
    outline-offset: 2px;
}

.menu-toggle-bar {
    width: 15px;
    height: 2px;
    background: #111;
    display: block;
}

.menu-toggle-bar + .menu-toggle-bar {
    margin-top: 4px;
}

.tab-btn {
    appearance: none;
    min-width: 102px;
    padding: 9px 12px;
    font-family: "Silkscreen", monospace;
    font-size: 0.66rem;
    color: #101010;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--xp-panel);
    border-top: 2px solid var(--xp-light);
    border-left: 2px solid var(--xp-light);
    border-right: 2px solid var(--xp-dark);
    border-bottom: 2px solid var(--xp-dark);
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.tab-btn:hover {
    background: #d9d9d9;
}

.tab-btn:active {
    border-top-color: var(--xp-dark);
    border-left-color: var(--xp-dark);
    border-right-color: var(--xp-light);
    border-bottom-color: var(--xp-light);
}

.tab-btn.is-active {
    background: var(--xp-green);
    color: #032600;
    border-top: 2px solid #9eff9b;
    border-left: 2px solid #9eff9b;
    border-right: 2px solid #107f16;
    border-bottom: 2px solid #107f16;
}

.main-content {
    border-top: 2px solid #1f46cd;
    border-left: 2px solid #1f46cd;
    border-right: 2px solid #04145f;
    border-bottom: 2px solid #04145f;
    background: var(--xp-blue);
    padding: clamp(12px, 1.8vw, 20px);
    min-height: 520px;
}

.tab-panel {
    display: none;
    height: 100%;
}

.tab-panel.is-active {
    display: block;
    animation: fade-in 0.14s linear;
}

.main-content .glass {
    background: var(--xp-blue);
    border-top: 2px solid #355dff;
    border-left: 2px solid #355dff;
    border-right: 2px solid #04145f;
    border-bottom: 2px solid #04145f;
    box-shadow: none;
}

.about-card,
.panel-card {
    min-height: 100%;
    padding: clamp(14px, 2.5vw, 22px);
}

.about-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}

.about-card h2 {
    margin: 6px 0 0;
    font-family: "Silkscreen", monospace;
    font-size: clamp(1.1rem, 2.4vw, 1.8rem);
    color: var(--text-light);
    line-height: 1.4;
    text-transform: none;
}

.main-content .eyebrow {
    color: #89ff84;
}

.profile-title {
    margin: 0;
    color: #ccdcff;
    font-size: 1rem;
    font-weight: 700;
}

.about-copy {
    display: grid;
    gap: 10px;
    max-width: 66ch;
}

.about-copy p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1rem;
}

.about-copy code {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 1px 4px;
}

.status-list {
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-chip {
    margin: 0;
    width: fit-content;
    padding: 7px 12px;
    border: 1px dotted var(--xp-green-dark);
    background: var(--xp-green);
    color: #053000;
    font-weight: 700;
    font-size: 0.84rem;
}

.panel-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.panel-head {
    border-bottom: 1px dashed #6f8dff;
    padding-bottom: 10px;
}

.panel-head h2 {
    margin: 6px 0 0;
    color: var(--text-light);
    font-family: "Silkscreen", monospace;
    font-size: clamp(1.02rem, 1.95vw, 1.34rem);
    line-height: 1.3;
}

.activity-list,
.links-list,
.meta-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.activity-list,
.links-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item,
.links-list a {
    background: var(--xp-blue-deep);
    border: 1px dashed #6384ff;
    padding: 12px;
}

.activity-item {
    display: grid;
    gap: 8px;
}

.activity-item time {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #95ff90;
    font-weight: 700;
}

.activity-item h3,
.link-label {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 700;
}

.activity-item p,
.link-desc {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.5;
}

.activity-link {
    width: fit-content;
    text-decoration: none;
    padding: 7px 12px;
    font-family: "Silkscreen", monospace;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #032600;
    background: var(--xp-green);
    border-top: 2px solid #9eff9b;
    border-left: 2px solid #9eff9b;
    border-right: 2px solid #107f16;
    border-bottom: 2px solid #107f16;
}

.activity-link:active {
    border-top-color: #107f16;
    border-left-color: #107f16;
    border-right-color: #9eff9b;
    border-bottom-color: #9eff9b;
}

.links-list a {
    text-decoration: none;
    display: grid;
    gap: 6px;
}

.links-list a:hover {
    background: #09117f;
}

.meta-panel {
    background: var(--xp-blue-soft);
    border-top: 2px solid #4482da;
    border-left: 2px solid #4482da;
    border-right: 2px solid #083c89;
    border-bottom: 2px solid #083c89;
    box-shadow: none;
    color: var(--text-light);
    padding: 14px;
    display: grid;
    gap: 10px;
}

.meta-panel .eyebrow,
.meta-panel h3 {
    color: var(--text-light);
}

.meta-panel h3 {
    margin: 0;
    font-family: "Silkscreen", monospace;
    font-size: 0.95rem;
    line-height: 1.45;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.meta-list li {
    border: 1px dotted #9ec5ff;
    background: rgba(3, 35, 95, 0.35);
    padding: 8px;
    display: grid;
    gap: 4px;
}

.meta-list span {
    color: #d6e8ff;
    font-size: 0.8rem;
}

.meta-list strong {
    color: #9cff95;
    font-family: "Silkscreen", monospace;
    font-size: 0.7rem;
}

.empty-state {
    margin: 10px 0 0;
    color: #c8d6ff;
}

.hidden {
    display: none;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #b6b6b6 #2d2d2d;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #2d2d2d;
}

*::-webkit-scrollbar-thumb {
    background: #b6b6b6;
    border: 1px solid #4a4a4a;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .meta-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .sidebar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .menu {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transition: max-height 0.2s linear, opacity 0.16s linear;
    }

    .sidebar.is-open .menu {
        max-height: 240px;
        opacity: 1;
        pointer-events: auto;
    }

    .tab-btn {
        width: 100%;
        text-align: left;
    }

    .main-content {
        min-height: 0;
    }

    .activity-list,
    .links-list {
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 640px) {
    body {
        --page-pad: 8px;
    }

    .sidebar,
    .main-content,
    .meta-panel {
        padding: 10px;
    }

    .meta-list {
        grid-template-columns: 1fr;
    }

    .about-card,
    .panel-card {
        padding: 12px;
    }

    .about-copy p,
    .activity-item p,
    .link-desc {
        font-size: 0.95rem;
    }
}
