html, body {
    overflow: hidden;
}

.skills-wrapper {
    display: flex;
    flex-direction: column;
    width: 95vw;
    height: 95vh;
    height: 95dvh;
    box-sizing: border-box;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

.tab {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: clamp(20px, 1.8vw, 30px);
    color: #4A3728;
    border: 1px solid #c4a882;
    padding: 12px 0;
    cursor: pointer;
    width: 30%;
    text-align: center;
    transition: background-color 300ms;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.12);
}

.top-row .tab {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.bottom-row .tab {
    border-radius: 0 0 8px 8px;
    border-top: none;
}

.lang-tab     { background-color: #faedcb; }
.class-tab    { background-color: #c9e4de; }
.stack-tab    { background-color: #c6def1; }
.exploring-tab { background-color: #f7d9c4; }

.lang-tab:hover     { background-color: #E7D7B1; }
.class-tab:hover    { background-color: #ADCCC5; }
.stack-tab:hover    { background-color: #AAC5DE; }
.exploring-tab:hover { background-color: #E1C0A5; }

.content-box {
    flex: 1;
    display: flex;
    border: 1px solid #c4a882;
    box-shadow: 6px 6px 24px rgba(0,0,0,0.18);
    overflow: hidden;
    transition: background-color 400ms;
    background-color: #faedcb;
}

.sidebar {
    width: 20%;
    border-right: 1px solid #c4a882;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

.sidebar-item {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(196, 168, 130, 0.35);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 1.8vw, 24px);
    color: #4A3728;
    transition: background-color 200ms;
    user-select: none;
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

.sidebar-item.active {
    background-color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
}

.sidebar-item.featured {
    color: #8B6914;
    font-weight: 600;
}

.sidebar-item.featured.active {
    color: #6B4F0A;
}

.detail-panel {
    flex: 1;
    padding: clamp(1.2rem, 2.5vw, 2.5rem);
    overflow-y: auto;
    scrollbar-width: none;
}

.detail-panel::-webkit-scrollbar {
    display: none;
}

.detail-panel h3 {
    font-family: 'DM Mono', monospace;
    font-weight: 600;
    color: #4A3728;
    font-size: clamp(28px, 3vw, 44px);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.detail-panel p {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    color: #4A3728;
    line-height: 1.75;
    font-size: clamp(20px, 1.8vw, 28px);
}

.detail-panel a {
    color: #4A3728;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(74, 55, 40, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 200ms;
}

.detail-panel a:hover {
    text-decoration-color: #4A3728;
}

.home-btn {
    background-color: #e8d0d0;
    border: 1px solid #c4a882;
    border-radius: 0 0 8px 8px;
    border-top: none;
    padding: 12px 30px;
    font-size: 2rem;
    font-weight: 900;
    color: #4A3728;
    text-decoration: none;
    transition: background-color 300ms;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.12);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-btn:hover {
    background-color: #d4b8b8;
}

/* ---- Mobile ---- */

@media (max-width: 768px) {
    .skills-wrapper {
        width: 100%;
        height: 100dvh;
    }

    .tab {
        font-size: clamp(15px, 4vw, 22px);
        padding: 10px 0;
    }

    /* Stack the content box vertically: the sidebar becomes a horizontal,
       scrollable chip row above the detail panel. */
    .content-box {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid #c4a882;
        scrollbar-width: none;
        flex-shrink: 0;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }

    .sidebar-items {
        display: flex;
        flex-direction: row;
    }

    .sidebar-item {
        white-space: nowrap;
        border-bottom: none;
        border-right: 1px solid rgba(196, 168, 130, 0.35);
        flex-shrink: 0;
        font-size: clamp(14px, 3.6vw, 18px);
        padding: 12px 16px;
    }

    .detail-panel {
        flex: 1;
        min-height: 0;
    }

    .detail-panel h3 {
        font-size: clamp(24px, 6vw, 34px);
    }

    .detail-panel p {
        font-size: clamp(16px, 4.2vw, 20px);
    }

    .home-btn {
        font-size: 1.5rem;
        padding: 10px 22px;
    }
}