* {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    box-sizing: border-box;
}

:root {
    /* COLLECTIVE BACKGROUND COLORS */
    --bg: hsl(220, 70%, 5%);
    --secondary-bg: hsl(220, 35%, 11%);
    --elevated-bg: hsl(220, 30%, 14%);

    /* BORDER COLORS */
    --border: hsla(0, 0%, 100%, 0.06);
    --secondary-border: hsl(191, 100%, 60%);
    --third-border: hsl(0, 0%, 14%);
    --fourth-border: hsl(0, 0%, 100%);

    /* SINGLE BACKGROUND COLORS */
    --accent: hsl(191, 100%, 60%);
    --accent-dark: hsl(191, 100%, 48%);
    --accent-light: hsl(191, 100%, 72%);
    --secondary-accent: hsl(0, 0%, 100%);

    /* HOVER COLORS */
    --hover-bg: hsl(191, 100%, 60%);
    --hover-border: hsl(191, 100%, 65%);
    --hover-secondary-border: hsl(0, 0%, 100%);
    --hover-main-text: hsl(0, 0%, 100%);
    --hover-secondary-text: hsl(0, 0%, 85%);

    /* TEXT COLORS */
    --main-text: hsl(0, 0%, 100%);
    --secondary-text: hsl(0, 0%, 80%);
    --third-text: hsl(0, 0%, 60%);
    --fourth-text: hsl(0, 0%, 10%);

    /* PROGRESS COLORS */
    --progress-container: hsl(220, 20%, 18%);
    --progress-bar: hsl(198, 76%, 47%);

    /* GRADIENTS */
    --gradient-primary:
        linear-gradient(135deg,
            hsl(220, 35%, 14%),
            hsl(220, 35%, 9%));

    --gradient-secondary:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0.01));

    --gradient-accent:
        linear-gradient(180deg,
            var(--accent-light),
            var(--accent-dark));


    /* SHADOWS */
    --shadow-sm:
        0 4px 10px rgba(0, 0, 0, 0.25);

    --shadow-md:
        0 10px 30px rgba(0, 0, 0, 0.35);

    --shadow-lg:
        0 18px 40px rgba(0, 0, 0, 0.5);

    --shadow-accent:
        0 8px 24px hsla(191, 100%, 60%, 0.35);


    /* GLASS/HIGHLIGHTS */
    --glass-highlight:
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    --glass-border:
        rgba(255, 255, 255, 0.08);

        
    /* TRANSITIONS */
    --transition-fast: 0.2s ease;
    --transition-main: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    min-height: 100vh;
}

.container {
    display: flex;
}


/* Header */
header {
    position: fixed;
    top: 0;
    right: 0;
    margin-left: 50px;
    height: 60px;

    display: flex;
    align-items: center;

    background: var(--bg);
    backdrop-filter: blur(10px);
    z-index: 900;

    left: 0;
    transition: left 0.5s ease;
    justify-content: space-between;
}


/* Move entire header */
header.active {
    left: 255px;
    /* Sidebar width + spacing */
}

.left-side {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.right-side {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding-right: 40px;
    margin-top: 20px;
}

.right-side p {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--secondary-border);
    border-radius: 15px;
    width: 100px;
    cursor: pointer;
    transition: 0.5s;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0 5px 0;
    color: var(--main-text);
}

.right-side a {
    color: var(--main-text);
    text-decoration: none;
}

.right-side a:visited {
    color: var(--main-text);
    text-decoration: none;
}

.right-side p:hover {
    background-color: var(--accent);
    color: var(--bg);
    border: 2px solid var(--accent);
}

.menu-btn {
    top: 20px;
    left: 20px;
    z-index: 1100;
    padding: 9px;
    margin-top: 10px;
    border: none;
    background-color: var(--accent);
    color: var(--fourth-text);
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
}

.search-bar {
    display: flex;
    align-items: center;
    flex-direction: row;
    border-radius: 5px;
    border: 2px solid var(--border);
    width: 500px;
    height: 30px;
    margin-top: 20px;
}

.search-bar input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    padding-left: 8px;
    font-size: 16px;
    font-style: italic;
    color: var(--main-text);
}

.search-icon {
    width: 30px;
    height: 30px;
    color: var(--main-text);
    padding-left: 8px;
}


/* SIDEBAR CONTENT */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    /* Hidden off screen */
    width: 250px;
    height: 100vh;
    background-color: var(--bg);
    color: var(--main-text);
    padding: 20px;
    transition: left 0.5s ease;
    z-index: 1000;
    border-right: 2px solid var(--border);
}

.sidebar.active {
    left: 0;
}

.sidebar-divider {
    margin: 15px 0;
    border: none;
    border-top: 1px solid var(--bg);
}

.sidebar-content div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sidebar-content svg {
    width: 20px;
    height: 20px;
    color: var(--main-text);
}

.sidebar-socials a {
    display: none;
    border: 2px solid var(--secondary-border);
    border-radius: 15px;
    width: 100px;
    cursor: pointer;
    transition: 0.5s;
    text-decoration: none;
    font-weight: bold;
    padding: 5px;
    padding-left: 7px;
    color: var(--main-text);
}

.sidebar-socials a:visited {
    color: var(--main-text);
    text-decoration: none;
}

.sidebar-socials a:hover {
    background-color: var(--accent);
    color: var(--bg);
    border: 2px solid var(--accent);
}

.learn-tab a {
    text-decoration: none;
    color: var(--secondary-text);
}

.learn-tab a:visited {
    text-decoration: none;
    color: var(--secondary-text);
}

.learn-tab a:hover {
    color: var(--main-text);
}

/* MAIN CONTENT SECTION */
.main-content {
    width: 100%;
    max-width: 1400px;
    margin-top: 55px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
}

.main-content svg {
    width: 20px;
    height: 20px;
}


/* PORTION 1 */
.portion1 {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 30px;

    border: 2px solid var(--border);
    border-radius: 12px;
    background-color: var(--secondary-bg);
}

.portion1-right-side {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.continue-learning-btn {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 10px;
    border: none;
    border-radius: 10px;

    background-color: var(--secondary-accent);
    color: var(--fourth-text);
    font-weight: bold;
    border: 2px solid var(--fourth-border);

    cursor: pointer;
    text-decoration: none;
}

.welcome-back {
    color: var(--main-text);
    font-weight: bold;
}

.continue {
    color: var(--accent);
    font-weight: bold;
}

.note {
    color: var(--third-text);
    font-weight: bold;
}

.continue-learning-btn:hover {
    background-color: var(--accent);
    color: var(--bg);
    border: 2px solid var(--accent);
    transition: 0.5s ease;
}

.take-a-quiz-btn {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 10px;
    border: none;
    border-radius: 10px;

    background-color: var(--secondary-bg);
    color: var(--main-text);
    font-weight: bold;
    border: 2px solid var(--secondary-border);

    cursor: pointer;
    text-decoration: none;
}

.take-a-quiz-btn:hover {
    background-color: var(--accent);
    color: var(--bg);
    border: 2px solid var(--accent);
    transition: 0.5s ease;
}


/* PORTION 2 */
.portion2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 300px));
    gap: 53px;
    margin-top: 30px;
}

.portion2 div {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 15px;
    border: 2px solid var(--border);
    background-color: var(--secondary-bg);
    width: 300px;
}

.portion2 div svg {
    width: 30px;
    height: 30px;
    color: var(--main-text);
}

.portion2 div h2 {
    color: var(--main-text);
}

.portion2 div h3 {
    padding: 0;
    margin: 0;
    color: var(--main-text);
}

.portion2 div p {
    padding: 0;
    margin: 0;
    color: var(--main-text);
}


/* PORTION 3 */
.portion3 {
    display: flex;
    flex-direction: row;
    margin-top: 30px;
    justify-content: space-between;
}

.portion3-your-topics {
    display: flex;
    flex-direction: column;
}

.portion3-your-topics h3 {
    margin: 0;
    padding: 0;
    color: var(--main-text);
}

.portion3-your-topics p {
    margin: 0;
    padding: 0;
    color: var(--main-text);
}

.portion3-view-all a {
    display: flex;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    color: var(--main-text);
    font-weight: bold;
    border: 2px solid var(--accent);
    border-radius: 15px;
    padding: 10px;
}

.portion3-view-all a:hover {
    border: 2px solid transparent;
    background-color: var(--accent);
    border-radius: 15px;
    color: var(--bg);
    transition: 0.5s ease;
    padding: 10px;
}


/* PORTION 4 */
.portion4 {
    display: flex;
    flex-direction: row;
    margin-top: 20px;
}

.grid-layout {
    display: grid;
    grid-template-columns: 300px 300px 300px 300px;
    justify-content: center;
    column-gap: 53px;
    row-gap: 20px;
}

.topic {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 10px;
    background-color: var(--secondary-bg);
}

.topic h3 {
    margin: 0;
    padding: 0;
    color: var(--main-text);
}

.topic p {
    margin: 0;
    padding: 20px 0px 20px 0px;
    color: var(--main-text);
}

.measurement {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: var(--progress-container);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    width: 50%;
    height: 100%;
    background-color: var(--progress-bar);
    border-radius: 0;
    transition: width 0.3s ease;
}


@media (max-width: 600px) {

    header {
        display: flex;
        flex-direction: column;
        margin-left: 0;
    }

    header.active {
        left: 300px;
        width: calc(100% - 300px);
    }

    .search-bar {
        width: 100%;
    }

    .right-side {
        display: none;
    }

    .sidebar-socials a {
        display: flex;
    }

    .portion1 {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .portion2 {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .portion2 div {
        width: 100%;
    }

    .portion3 {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .portion4 {
        display: flex;
        flex-direction: column;
    }

    .grid-layout {
        display: flex;
        flex-direction: column;
    }
}