/* 
Start of Josh Comeau's CSS reset 
https://www.joshwcomeau.com/css/custom-css-reset/ 
*/

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
    margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

body {
    /* 4. Add accessible line-height */
    line-height: 1.5;
    /* 5. Improve text rendering */
    -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
    font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
    isolation: isolate;
}

/* End of Josh Comeau's CSS reset */

:root {
    --header-blue: #1992d4;
}

body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px 1fr;
    font-family: "Inter", sans-serif;
}

.navigation {
    grid-column-start: 1;
    grid-column-end: 2;
    background-color: var(--header-blue);
    display: grid;
    grid-template-rows: auto 1fr;
    padding: 1rem;
    color: white;
    gap: 3rem;
}

.navigation img {
    filter: invert(1);
}

.navigation h1 {
    font-size: 1.5rem;
}

.navigation h1,
.navigation nav ul li a {
    display: grid;
    grid-template-columns: max-content auto;
    align-items: center;
    gap: 1rem;
}

.navigation nav ul li a {
    grid-template-columns: 3rem auto;
    font-weight: bold;
}

.navigation nav ul li a img {
    justify-self: center;
}

.navigation h1 img {
    width: 3rem;
    height: auto;
}

.navigation nav ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 3rem;
}

.navigation nav ul div {

    display: grid;
    grid-auto-flow: row;
    grid-auto-rows: max-content;
    gap: 1rem;
}

.navigation nav ul li a img {
    width: 1.5rem;
    height: auto;
}

.navigation nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
}

main {
    grid-column-start: 2;
    grid-column-end: 3;
    display: grid;
    grid-template-rows: 200px 1fr;
}

.user-controls {
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-rows: 0.8fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem 6rem 1rem 2rem;
}

.user-controls search img,
.notifications img {
    width: 20px;
    height: auto;
}

.user-controls .top-right a img {
    width: 40px;
    height: auto;
}

.user-controls .greeting img {
    width: 60px;
    height: auto;
}

.avatar {
    border-radius: 100%;
}

.user-controls search {
    display: grid;
    grid-template-columns: max-content 1fr;
    align-items: center;
    gap: 1rem;
}

.user-controls search input {
    background-color: #e2e8f0;
    border: none;
    border-radius: 1rem;
    padding: 0.2rem 1rem
}

.user-controls .top-right {
    display: grid;
    grid-template-columns: max-content 1fr;
    align-items: center;
    justify-self: end;
    gap: 1rem;
    margin-right: 1rem;
}

.user-controls .top-right a {
    display: grid;
    grid-template-columns: max-content 1fr;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: black;
    font-weight: bold;
}

.user-controls .top-right button {
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.user-controls .greeting {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    align-items: center;
    column-gap: 1rem;
    font-weight: bold;
}

.greeting p {
    font-size: 1.5rem;
}

.greeting p:first-of-type {
    font-size: 0.9rem;
}

.user-controls .greeting .avatar {
    grid-row: 1 / 3;
}

.user-controls .controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    gap: 3rem;
}

.user-controls .controls button {
    background-color: var(--header-blue);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    color: white;
    cursor: pointer;
}

.sections {
    background-color: #e2e8f0;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 20rem;
    gap: 2rem;
}

.projects {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1rem;
}

.projects .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 2rem;
}

.projects .cards article {
    height: 20rem;
    background-color: white;
    display: grid;
    grid-template-columns: 0.5rem 1fr;
    border-radius: 10px;
    gap: 1rem;
}

.cards article h3 {
    text-transform: capitalize;
}


.projects .cards .color {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    background-color: #f0b429;
}

.projects .cards img {
    width: 25px;
    height: auto;
}

.projects .cards article .content {
    display: grid;
    padding: 2rem 1rem 2rem 1rem;
    grid-template-rows: auto 1fr auto;
}

.projects article .content .actions {
    justify-self: end;
    align-self: end;
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 1rem;
}

.projects article .content p {
    color: rgba(0, 0, 0, 0.7);
}

.content .actions button {
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.side {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
}

.announcements {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1rem;
}

.announcements .news {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    justify-content: center;
}

.news article {
    align-content: center;
}


.news article:not(:last-of-type) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.news article p {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.7);
}

.news h3 {
    text-transform: capitalize;
}

.trending {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1rem;
}

.trending .users {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 1rem;
    align-items: center;
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
}

.trending .users .user {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.5rem;
    align-items: center;
}

.trending .users .user .avatar {
    grid-row: 1 / 3;
    width: 50px;
    height: auto;
}

.trending .users .user p {
    color: rgba(0, 0, 0, 0.8);
}

.trending .users .user p:first-of-type {
    font-weight: bold;
}

.projects article,
.news,
.users,
main header {
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

main header {
    z-index: 1;
}

body>header {
    z-index: 2;
}