@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --dashboardgap: 12px;
    --blue: #1992D4;
    --darkblue: #1683BF;
    --darkerblue: #1475AA;
    --white: #ffffff;
    --greybg: #E2E8F0;
    --greyfont: #636363;
    --greyborder: #D2D2D2;
    --orange: #F0B429;
    --iconsize: 3rem;
    --avatarsize: 3rem;
    --annoucmentpadding: 1rem;
    --trendingpadding: 0.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5;
}

.main-container {
    display: grid;
}

.dropdown-menu {
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
}

.dropdown-menu > div {
    width: 2.5rem;
    height: 0.33rem;
    background-color: var(--white);
    margin: 0.375rem 0;
    border-radius: 4rem;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--white);
    box-shadow: 0px 8px 16px 0px rgba(0, 0 ,0, 0.2);
}

.dropdown-content a {
    color: #000000;
    padding: 1rem;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    color: var(--white);
    background-color: var(--blue);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropdown-menu {
    background-color: var(--darkblue);
}

.dashboard-container {
    display: grid;
    color: var(--white);
    background-color: var(--blue);
    padding: 20px;
    align-content: start;
    gap: 1rem;
    font-weight: bold;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header-icon-container {
    display: flex;
    gap: var(--dashboardgap);
}

.dashboard-header-icon {
    width: var(--iconsize);
    height: var(--iconsize);
}

.dashboard-header-icon svg path {
    fill: var(--white);
}

.dashboard {
    display: none;
}

.dashboard a {
    color: var(--white);
    text-decoration: none;
}

.dashboard a:hover {
    text-decoration: underline;
}

.dashboard-icon {
    display: flex;
    justify-content: center;
    width: var(--iconsize);
    height: calc(var(--iconsize) / 2);
}

.dashboard-icon svg {
    width: 50%;
    height: auto;
}

.dashboard-icon svg path {
    fill: var(--white);
}

.navigation-container {
    display: grid;
    gap: 1rem;
    padding: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar svg {
    --multiplier: 1.5;
    --iconsize: 3rem;
    
    width: calc(var(--iconsize) / var(--multiplier));
    height: calc(var(--iconsize) / var(--multiplier));
}

.search-bar input {
    width: 100%;
    height: 2rem;
    background-color: var(--greybg);
    border-radius: 4rem;
    outline: none;
    border: none;
    padding-left: 1rem;
    padding-right: 1rem;
}

.search-bar input:focus {
    border: 0.0625rem solid var(--blue);
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.user-profile-small {
    display: none;
}

.user-profile-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-weight: bold;
}

.user-profile-large-username {
    font-size: 1.5rem;
}

.user-profile-large-username a {
    color: #000000;
    text-decoration: none;
}

.user-profile-large-username a:hover {
    text-decoration: underline;
}

.user-profile-large img {
    --multiplier: 2;

    width: calc(var(--avatarsize) * var(--multiplier));
    height: calc(var(--avatarsize) * var(--multiplier));
}

.buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

button {
    background-color: var(--blue);
    color: var(--white);
    outline: none;
    border: none;
    font-weight: bold;
    width: 100%;
    height: 2rem;
    border-radius: 4rem;
    font-size: 1rem;
}

button:hover {
    cursor: pointer;
    background-color: var(--darkblue);
}

button:active {
    background-color: var(--darkerblue);
    scale: 0.95;
}

.main-body-container {
    display: grid;
    background-color: var(--greybg);
    box-shadow: inset 0px 8px 8px 0px rgba(0, 0, 0, 0.15);
    padding: 20px;
    gap: 1rem;
}

.main-body-header {
    font-size: 1.25rem;
    font-weight: bold;
    padding-bottom: 0.75rem;
    word-break: break-word;
}

.main-body-block {
    padding: 30px;
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: 4px 8px 8px 0px rgba(0, 0, 0, 0.20);
}

.announcements-container,
.trending-container,
.projects-container {
    overflow: hidden;
    text-overflow: ellipsis;
}

.announcements-container,
.projects-container {
    word-break: break-word;
}

.announcements-container > div:not(:first-child) {
    padding-top: var(--annoucmentpadding);
}

.announcements-container > div:not(:last-child) {
    padding-bottom: var(--annoucmentpadding);
    border-bottom: 0.0625rem solid var(--greyborder);
}

.main-body-title {
    font-weight: bold;
}

.main-body-text {
    color: var(--greyfont);
}

.trending {
    display: flex;
    flex-direction: column;
}

.trending-container {
    display: flex;
    flex-direction: column;
    word-break: break-all;
}

.trending-container > div {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.trending-container img {
    width: var(--avatarsize);
    height: var(--avatarsize);
}

.trending-container > div:not(:first-child) {
    padding-top: var(--trendingpadding);
}

.trending-container > div:not(:last-child) {
    padding-bottom: var(--trendingpadding);
}

.project-icons-container {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    padding-top: 1rem;
}

.trending-username a {
    color: #000000;
    text-decoration: none;
}

.trending-username a:hover {
    text-decoration: underline
}

.projects-grid {
    display: grid;
    gap: 1rem;
}

.projects-container {
    display: flex;
    flex-direction: column;
    justify-content:space-between;
    border-left: 0.75rem solid var(--orange);
}

.projects-container svg {
    --multiplier: 1.5;
    --iconsize: 3rem;

    width: calc(var(--iconsize) / var(--multiplier));
    height: calc(var(--iconsize) / var(--multiplier));
    cursor: pointer;
}

.main-body-projects,
.main-body-announcements,
.main-body-trending {
    margin-bottom: 1rem;
}

@media only screen and (min-width: 1024px) {
    .main-container {
        min-height: 100vh;
        display: grid;
        grid-template-columns: calc(1rem * 20) 1fr;
        grid-template-rows: auto 1fr;
    }

    .main-container > div:first-child {
        grid-row: 1 / 3;
    }

    .dashboard-container {
        justify-content: flex-start;
    }

    .dashboard-container :nth-child(7) {
        margin-bottom: 4rem;
    }

    .dashboard-header {
        margin-bottom: 2rem;
    }
    
    .dashboard {
        display: flex;
        gap: var(--dashboardgap);
    }

    .dropdown-menu {
        display: none;
    }

    .navigation-container {
        display: grid;
        grid-template-columns: 3fr auto;
        grid-template-rows: 1fr 1.5fr;
    }

    .search-bar {
        grid-column: 1;
        grid-row: 1;
        padding-left: 20px;
        padding-right: 20px;
    }

    .search-bar input {
        max-width: 1200px;
    }

    .user-profile-small {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-left: 20px;
        padding-right: 20px;
        gap: 2rem;
        grid-column: 2 / 5;
        grid-row: 1;
    }

    .user-profile-small svg {
        --multiplier: 1.5;
        --iconsize: 3rem;

        width: calc(var(--iconsize) / var(--multiplier) );
        height: calc(var(--iconsize) / var(--multiplier) );
        flex-shrink: 0;
        cursor: pointer;
    }

    .user-profile-small img {
        width: var(--avatarsize);
        height: var(--avatarsize);
    }

    .user-profile-username {
        font-weight: bold;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-profile-username a {
        color: #000000;
        text-decoration: none;
    }

    .user-profile-username a:hover {
        text-decoration: underline;
    }

    .user-profile-large {
        justify-content: flex-start;
        grid-column: 1;
        grid-row: 2;
        padding-left: 20px;
        padding-right: 20px;
    }

    .buttons {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 1rem;
        grid-column: 2 / 5;
        grid-row: 2;
        padding-left: 20px;
    }

    button {
        width: 7.5rem;
        height: 2.5rem;
    }

    .main-body-container {
        grid-template-columns: 1fr minmax(350px, 500px);
        grid-template-rows: auto 1fr;
    }

    .main-body-projects {
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        grid-auto-rows: minmax(250px, 1fr);
    }
}
