.gh0st-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
    gap: min(4vw, 3.5rem);
}

.gh0st-shell:not(.has-sidebar) {
    display: block;
}

.gh0st-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 3.5rem min(5vw, 4rem) 3rem;
}

.gh0st-shell:not(.has-sidebar) .gh0st-main {
    padding: 2.5rem min(5vw, 4rem) 3rem;
}

#gh0st-sidebar.sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: flex-start;
    margin: 0;
    padding: 2.75rem 2.25rem;
    width: min(300px, 28vw);
    min-height: calc(100vh - 3rem);
    background: linear-gradient(
        180deg,
        rgba(9, 13, 23, 0.96),
        rgba(12, 18, 31, 0.88)
    );
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.45);
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    color: #e2e8f0;
    z-index: 100;
    backdrop-filter: blur(18px);
    font-size: 1rem;
    line-height: 1.6;
}

#gh0st-sidebar .sidebar-logo {
    display: block;
    text-align: center;
}

#gh0st-sidebar .sidebar-logo-image {
    width: 82px;
    height: 82px;
    margin: 0 auto;
    border-radius: 24px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 30px rgba(14, 18, 30, 0.55);
    transition: transform 0.25s ease;
}

#gh0st-sidebar .sidebar-logo:hover .sidebar-logo-image,
#gh0st-sidebar .sidebar-logo:focus .sidebar-logo-image {
    transform: scale(1.06);
}

#gh0st-sidebar .sidebar-identity {
    text-align: center;
    font-family: "Roboto Mono", "SFMono-Regular", ui-monospace, Menlo,
        Monaco, "Liberation Mono", "Courier New", monospace;
    text-transform: none;
}

.gh0st-word {
    display: inline-flex;
    gap: 0.18em;
    justify-content: center;
    font-weight: 700;
    font-size: clamp(1.45rem, 1.6vw + 1rem, 2.35rem);
    letter-spacing: 0.08em;
    line-height: 1.1;
    color: #94a3b8;
    user-select: none;
}

.gh0st-letter {
    position: relative;
    width: 1ch;
    height: 1.22em;
    overflow: hidden;
}

.gh0st-glyph {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    text-align: center;
    color: #64748b;
    filter: drop-shadow(0 0 10px rgba(94, 234, 212, 0.22));
}

.gh0st-glyph.final {
    color: #5eead4;
}

.gh0st-glyph.ghost {
    color: rgba(148, 163, 184, 0.28);
}

.sidebar-tagline {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(148, 163, 184, 0.78);
    text-transform: none;
}

.sidebar-menu-links--visible {
    display: block;
}

#gh0st-sidebar .sidebar-list {
    margin: 0;
    padding-left: 1.25rem;
    border-left: 1.5px solid rgba(94, 234, 212, 0.35);
    list-style: none;
    text-transform: none;
    text-indent: 0;
    line-height: 1.55;
}

#gh0st-sidebar .sidebar-list li {
    margin: 0.3rem 0 0.3rem 0.4rem;
}

#gh0st-sidebar .sidebar-list li::before {
    content: "\2014";
    margin-right: 0.4rem;
    color: rgba(148, 163, 184, 0.4);
}

#gh0st-sidebar .sidebar-list a {
    display: inline-block;
    color: #cbd5f5;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.06em;
    transition: color 0.2s ease, transform 0.2s ease;
}

#gh0st-sidebar .sidebar-list a:hover,
#gh0st-sidebar .sidebar-list a:focus {
    color: #5eead4;
    transform: translateX(6px);
}

@media (max-width: 1280px) {
    #gh0st-sidebar.sidebar {
        width: min(280px, 32vw);
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 1024px) {
    .gh0st-shell {
        flex-direction: column;
        gap: 2rem;
    }

    #gh0st-sidebar.sidebar {
        position: relative;
        top: 0;
        width: 100%;
        min-height: auto;
        border-radius: 0 0 28px 28px;
        flex-direction: column;
        gap: 1.75rem;
    }

    .gh0st-main {
        padding: 2.25rem 1.5rem 2.75rem;
    }

    #gh0st-sidebar .sidebar-list {
        border-left: none;
        border-top: 1.5px solid rgba(94, 234, 212, 0.35);
        padding-left: 0;
        padding-top: 1.25rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.75rem 1.5rem;
    }

    #gh0st-sidebar .sidebar-list li {
        margin: 0;
    }

    #gh0st-sidebar .sidebar-list li::before {
        display: none;
    }

    #gh0st-sidebar .sidebar-list a {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .gh0st-word {
        font-size: clamp(1.6rem, 6vw, 2.1rem);
    }

    #gh0st-sidebar.sidebar {
        padding: 2rem 1.5rem;
    }

    .sidebar-tagline {
        font-size: 0.8rem;
    }

    .gh0st-main {
        padding: 2rem 1.125rem 2.5rem;
    }
}
