/* Fonts */

@font-face {
    font-family: 'Roboto';
    src:
        url('Roboto-Regular.woff2') format('woff2'),
        url('Roboto-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src:
        url('Roboto-SemiBold.woff2') format('woff2'),
        url('Roboto-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src:
        url('Roboto-Bold.woff2') format('woff2'),
        url('Roboto-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* General styling */

:root {
    --primary-color: #1992d4;
    --secondary-color: #f0b429;
    --background-color: #e2e8f0;

    ---font-stack: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    line-height: 1.5;
    display: grid;
    grid-template-columns: 1fr 4fr;
    grid-template-rows: 1fr 4fr;
    grid-template-areas:
    "sidebar header"
    "sidebar main";
    height: 100vh;
    font-family: "Roboto", var(---font-stack);
}

/* Sidebar */

.sidebar {
    grid-area: sidebar;
    background-color: var(--primary-color);
    display: grid;
    align-content: start;
    gap: 30px;
    padding: 20px;
    color: white;
    font-weight: 600;
}

.sidebar .logo {
    display: flex;
    align-items: center;
    font-size: .9rem;
    gap: 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.sidebar-item:not(.sidebar-item:last-child) {
    padding-bottom: 4px;
}

.sidebar-item > * {
    cursor: pointer;
}

.sidebar-item > img {
    padding-right: 16px;
}

/* Header (top) */

.header {
    grid-area: header;
    padding: 20px 50px 20px 30px;
}

.header-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.search-bar input {
    background-color: var(--background-color);
    border: none;
    border-radius: 15px;
    padding: 8px 15px;
    width: 600px;
}

.search-bar, .profile {
    display: flex;
    align-items: center;
}

.search-bar {
    gap: 15px;
}

.profile {
    justify-self: end;
    gap: 20px;
}

.profile > * {
    cursor: pointer;
}

.profile span {
    font-weight: 700;
}

.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50px;
    background-color: var(--secondary-color);
}

/* Header (bottom) */

.header-bottom {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.header-bottom .welcome {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome .profile-photo {
    width: 60px;
    height: 60px;
    border-radius: 50px;
    background-color: var(--secondary-color);
}

.header-bottom .welcome-message {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: 1.2rem;
}

.header-bottom .welcome-message span:first-child{
    font-size: 0.9rem;
}

.header-bottom .actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-bottom .actions button {
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.header-bottom .actions button:hover {
    background-color: #157eb6;
}

/* Main Content */

.main-content {
    grid-area: main;
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-template-areas: 
    "projects announcements"
    "projects trending";
    background-color: var(--background-color);
    padding: 20px 50px 20px 30px;
}

.main-content h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

/* Projects */

.projects {
    grid-area: projects;
    margin-right: 20px;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    grid-auto-rows: 242px;
    gap: 20px;
}

.project {
    display: flex;
    flex-direction: column;
    background-color: white;
    border-left: solid 8px var(--secondary-color);
    border-radius: 10px;
    padding: 20px;
}

.project .icons {
    margin-top: auto;
    display: flex;
    align-self: flex-end;
    gap: 20px;
}

.project .icons > * {
    cursor: pointer;
}

/* Announcements */

.announcements {
    grid-area: announcements;
}

.announcements-container {
    border-radius: 10px;
    background-color: white;
    padding: 20px;
}

.announcements-container h3 {
    cursor: pointer;
}

.announcements-container hr {
    margin: 20px 0px;
}

/* Trending */

.trending {
    grid-area: trending;
    margin-top: 20px;
}

.trending-container {
    border-radius: 10px;
    background-color: white;
    padding: 20px;
}

.trending-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.trending-item > *{
    cursor: pointer;
}

.trending-item:last-child {
    margin-bottom: 0px;
}

.trending-item .profile-info {
    display: flex;
    flex-direction: column;
}

.trending-item .profile-info span:first-of-type{
    font-weight: 700;
}

.trending-item .profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50px;
    background-color: var(--secondary-color);
    flex-shrink: 0;
}