@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

* {
    /* optional outline */
    /* outline: 1px solid red; */

    /* just default everything to 0 */
    margin: 0px;
    padding: 0px;
}

p, button {
    font-family: Roboto, Verdana, Geneva, Tahoma, sans-serif;
}

body {
    display: grid;
    grid-template-columns: 1fr 5fr;
}



#sidebar {
    grid-column: 1/2;
    grid-row: 1/3;
    display: grid;
    /* row sections: Dashboard (title), navigation, "branding", blank to push everything up */
    grid-template-rows: 1fr 6fr 3fr 4fr;
    gap: 30px;
    
    background-color: rgb(0, 166, 255);

    padding: 20px;
}
#sidebar p {
    color: white;
}

#dashboard {
    display: flex;
}
#dashboard img {
    width: 50px;
    color: white;
}
#dashboard p {
    align-content: center;
    margin-left: 10px;

    font-size: 22px;
    font-weight: bold;
}

#navigation {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
}
/* set all direct children of navigation to flex */
#navigation > * {
    display: flex;
}
#navigation img {
    margin-left: 12px;
    width: 25px;
}
#navigation p {
    align-content: center;
    margin-left: 10px;

    font-size: 18px;
    font-weight: bold;
}

#branding {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
}
#branding > * {
    display: flex;
}
#branding img {
    margin-left: 12px;
    width: 25px;
}
#branding p {
    align-content: center;
    margin-left: 10px;

    font-size: 18px;
    font-weight: bold;
}



#header {
    grid-column: 2/3;
    display: grid;
    grid-template-columns: 5fr 1fr 2fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;

    padding: 20px;
}

#searchbar {
    grid-row: 1/2;
    grid-column: 1/2;
    
    display: flex;
}
#searchbar img {
    margin-left: 20px;
    width: 25px;
}
#searchbar input {
    margin-left: 10px;
    /* margin-right: 10px; */
    /* I can't set the height directly because it messes with flexbox, so I have to make do */
    margin-top: 10px;
    margin-bottom: 10px;

    /* extends search bar to end of container */
    flex-grow: 1;
    overflow: auto;

    font-size: 20px;

    background-color: rgb(219, 226, 236);

    border: none;
    border-radius: 50px;

    /* start typing to the right a bit more */
    padding-left: 20px;
}

#notif {
    grid-row: 1/2;
    grid-column: 2/3;
    display: flex;
    justify-content: end;
}
#notif img {
    margin-right: 20px;
    width: 25px;
}

#user {
    grid-row: 1/2;
    grid-column: 3/4;
    display: flex;
}
#user img {
    width: 40px;
}
#user p {
    margin-left: 20px;
    align-content: center;
    font-weight: bold;
}

#user-title {
    grid-row: 2/3;
    grid-column: 1/2;
    display: flex;
}
#user-title img {
    margin-left: 20px;
    width: 60px;
}
#user-title p {
    margin-left: 20px;
    align-content: center;

    flex-grow: 1;
    overflow: auto;

    font-weight: bold;
    font-size: 22px;
}
#user-title p::first-line {
    font-size: 12px;
}

#actions {
    grid-row: 2/3;
    grid-column: 2/4;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;

    /* horizontally centers all children for some reason */
    text-align: center;
}
#actions > .action {
    /* vertically centers */
    align-content: center;
}
.action button {
    width: 100px;
    height: 40px;

    font-size: 16px;
    font-weight: bold;
    color: white;

    border-radius: 20px;
    border: none;

    background-color: rgb(0, 166, 255);
}
.action button:active {
    background-color: rgb(0, 99, 152);
}



#main-content {
    grid-column: 2/3;
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 5fr 2fr;
    background-color: rgb(219, 226, 236);
}

#projects {
    grid-row: 1/3;
    grid-column: 1/2;
    display: grid;
    grid-template-rows: 1fr repeat(3, 5fr);
    grid-template-columns: 1fr 1fr;
    gap: 20px;

    padding: 20px;
}
#projects > .header {
    grid-column: 1/3;
    align-self: self-end;

    font-size: 20px;
    font-weight: bold;
}
#projects .card {
    background-color: white;
    border-radius: 10px;

    padding-left: 20px;
    padding-right: 15px;
    padding-top: 30px;
    padding-bottom: 15px;

    display: grid;
    grid-template-rows: 3fr 1fr;
    grid-template-columns: 2fr 1fr;

    border-left: solid gold 4px;
}
.card {
    /* adds a shadow to not just project cards, but all cards */
    box-shadow: 4px 4px 5px rgb(210, 210, 210);
}
.project-text {
    grid-row: 1/2;
    grid-column: 1/3;
}
.project-text > .name {
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: bold;
}
.project-text > .description {
    margin-bottom: 4px;
    font-size: 14px;
    color: gray;
}
.project-icons {
    grid-column: 2/3;
    display: flex;
    align-items: end;
    justify-content: end;
}
.project-icons img {
    margin-left: 20px;
    width: 25px;
}

#announcements {
    grid-row: 1/2;
    grid-column: 2/3;
    display: grid;
    grid-template-rows: 1fr 7fr;
    gap: 20px;

    padding: 20px;
}
#announcements > .header {
    align-self: self-end;
    font-size: 20px;
    font-weight: bold;
}
#announcements > .card {
    display: grid;
    gap: 15px;

    padding: 20px;
    padding-top: 30px;
    padding-bottom: 30px;

    border-radius: 10px;

    background-color: white;
}
#announcements .announcement:not(:last-child) {
    /* for dividing lines, selecting each .announcement except the last one */
    padding-bottom: 10px;
    border-bottom: solid 1px rgb(215, 215, 215);
}
.announcement > .name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 2px;
}
.announcement > .description {
    font-size: 12px;
    color: gray;
}


#trending {
    grid-row: 2/3;
    grid-column: 2/3;
    display: grid;
    grid-template-rows: 1fr 7fr;
    gap: 20px;

    padding: 20px;
}
#trending > .header {
    align-self: self-end;
    font-size: 20px;
    font-weight: bold;
}
#trending > .card {
    display: grid;
    gap: 10px;
    padding: 20px;

    background-color: white;
    border-radius: 10px;
}
.trending-item {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 4fr;
}
.trending-item .creator {
    font-size: 14px;
    /* align-self: self-end; */
    margin-top: auto;
}
.trending-item .name {
    font-size: 14px;
    color: gray;
    margin-bottom: auto;
}
.trending-item img {
    grid-row: 1/3;
    grid-column: 1/2;
    width: 40px;

    /* centers img */
    margin: auto;
}
