* {
    box-sizing: border-box;
}

:root {
    font-family: 'Roboto', sans-serif;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* MAIN */

.main-grid {
    display: grid;
    height: 100vh;
    overflow: hidden;
    grid-template-columns: 260px auto;
}

.sidebar {
    height: auto;
    background-color: #365fc7;
}

.content {
    height: auto;
    overflow: auto;
    background-color: #f5f5f5;
}

.icon-btn {
    height: 48px;
    width: 48px;
    padding: 0;
}

.icon-btn img {
    height: 48px;
    width: 48px;
    padding: 12px;
    vertical-align: middle; /* Without this, input is pushed down => todo: understand this line */
}

.avatar {
    height: 40px;
    width: 40px;
    margin: 4px 0;
    border: 1px solid #eeeeee;
    border-radius: 24px;
    object-fit: cover;
}


/* SIDEBAR */

.app-title {
    margin: 16px;
}

.icon-text-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: 48px auto;
}

.icon-text-grid h1,
.icon-text-grid p {
    margin: 0;
    line-height: 48px;
}

.icon-text-grid .icon {
    width: 48px;
    height: 48px;
    padding: 4px;
}

.sidebar ul {
    margin-top: 40px;
}

li.icon-text-grid {
    padding: 0 16px;
}

li.icon-text-grid .icon {
    padding: 12px;
}

.sidebar li:hover {
    background-color: #2e4d9b;
}


/* HEADER */

header {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: 48px 64px;
    padding: 16px 40px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px 0 rgba(0,0,0,0.2);
}

.span-icon {
    grid-column: span 1;
    text-align: center;
}

.span-input {
    grid-column: span 11;
}

.span-username,
.span-user-info {
    display: flex;
    flex-flow: row wrap;
}

.span-username {
    grid-column: span 5;
    justify-content: flex-end;
}

.span-user-info {
    grid-column: span 10;
}

.span-button {
    grid-column: span 2;
}

header input {
    width: 80%;
    height: 32px;
    margin-left: 8px;
    border-radius: 16px;
    border: 1px solid #dadada;
    background-color: #eeeeee;
}

.span-username p {
    line-height: 48px;
    margin-left: 12px;
}

.span-username .avatar {
    margin: 4px 8px 4px 16px;
}

.span-user-info .avatar {
    height: 56px;
    width: 56px;
    border-radius: 28px;
}

.user-info {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    margin-left: 16px;
}

.user-info .user {
    margin-top: 4px;
}

.header-btn {
    width: 100%;
    height: 40px;
    margin: 12px 0;
    background-color: #365fc7;
    color: #ffffff;
    border-radius: 20px;
}


/* CONTENT */

.content-main {
    display: grid;
    grid-template-columns: minmax(360px, 3fr) minmax(360px, 1fr);
    padding: 40px 24px;
}

.projects-grid {
    overflow: auto;
    display: grid;
    gap: 32px;
    padding: 8px;
    grid-template-rows: repeat(auto-fit, 1fr);
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.extras {
    padding: 0 8px 0 24px;
}

.projects .content-title {
    padding-left: 8px;
    margin-bottom: 8px;
}

.extras .content-title {
    margin-bottom: 16px;
}

.extras > div {
    margin-bottom: 54px;
}

.card {
    padding: 8px;
    background-color: #FFFFFF;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    border-radius: 8px;
}

.projects .card {
    border-left: 8px solid #fe885d;
    padding: 16px 32px;
}

.projects-grid .card h2 {
    margin-top: 16px;
}

.projects-grid .card p,
.announcements p {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
    color: #707070;
}

.projects-grid .card p {
    margin-top: 8px;
    line-clamp: 5;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    height: 82px;
}

.button-div {
    text-align: end;
    margin-top: 16px;
}

.button-div button {
    width: 48px;
    height: 48px;
    padding: 0;
}

.button-div button img {
    width: 100%;
    height: 100%;
    padding: 12px;
}

.extras .card {
    padding: 16px 32px;
}

.announcements li {
    padding: 16px 0;
}

.announcements li:nth-child(1),
.announcements li:nth-child(2) {
    border-bottom: 1px solid #dadada;
} 

.announcements p {
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    height: 48px;
    margin-top: 6px;
}

.trending li {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    padding: 10px 0;
}

.trending-user {
    margin-left: 16px;
}

.trending-info {
    margin-top: 4px;
    color: #707070;
}

/* TYPOGRAPHY */

.sidebar,
.header-btn {
    color: #ffffff;
}

.icon-text-grid h1,
.span-username p,
.user-info p,
.header-btn,
.content-title,
.projects h2,
.extras h2,
.trending-username {
    font-weight: 700;
}

.icon-text-grid h1 {
    font-size: 1.5rem;
}

.user-info .user {
    font-size: 1.25rem;
}

.content-title {
    font-size: 1.125rem;
}

.span-username p,
.projects h2,
.header-btn {
    font-size: 1rem;
}

.user-info .text,
.projects-grid .card p,
.announcements h2,
.announcements p,
.trending-info {
    font-size: 0.875rem;
}