:root {
    --gray: rgb(232, 232, 232);
    --shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    --primary-blue: rgb(73, 146, 255);
    --highlight-yellow: rgb(254, 221, 0);
    --card-bg: white;
    --aside-subtext: gray;
}

html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
}

h1, h2, h3, h4, p, ul {
    margin: 0;
    padding: 0;
}

body {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 6fr;
}

/* Navigation stuff */

nav {
    background-color: var(--primary-blue) ;
    grid-area: 1 / 1/ 3 / 2;
    color: white;
    padding: 1rem 1rem 4rem 2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 15rem;
}

.logo {
    display: flex;
    gap: 10px;
}

.logo h1 {
    font-size: 2rem;
}
.logo img {
    max-width: 2.5rem;
}

nav ul {
    list-style: none;
    margin: 3rem 0 0 0;
    padding: 0;
}

nav img {
    max-width: 1.5rem;
}

nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


nav ul li {
    display: flex;
    font-size: 1.25rem;
    gap: 15px;
}

ul.settings {
    margin-top: auto;
}


/* Header stuff */

header {
    display: grid;
    grid-template: 1fr 1fr / 2fr 1fr;
    padding: 2rem 3rem;
    gap: 0.2rem;
    box-shadow: var(--shadow);
    z-index: 1;
}

header img {
    max-width: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.search {
    display: flex;
    gap: 10px;
    align-items: center;
    align-self: flex-start;

}

header input {
    width: 75%;
    padding: 10px;
    height: 2.5rem;
    border: none;
    background-color: var(--gray);
    border-radius: 25px;
}

.account-icons {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: end;
}

.account-icons img {
    max-width: 1.5rem;
}

.header-btns {
    display: flex;
    gap: 2rem;
    justify-content: end;
}

.header-btns button {
    background-color: var(--primary-blue);
    border: none;
    border-radius: 30px;
    padding: .5rem 2rem;
    font-size: 1rem;
    color: white;
    flex: 0;
    align-self: center;
    height: auto;
}

.greeting {
    display: flex;
    align-items: center; 
    gap: 1rem; 
}

.greeting img {
    max-width: 3rem;
    height: 3rem; 
}

/* Main article grid stuff */
main {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
    padding: 3rem;
    background-color: var(--gray);
    overflow-y: auto;
}

main h2 {
    margin-bottom: 1rem;
}

article {
    grid-area: 1 / 1 / 2 / 2; 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
    gap: 3rem;
}

.projects {
    grid-area: 1 / 1 / 3 / 2;
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 10rem;
    border-left: 8px solid var(--highlight-yellow);
}

.card p {
    margin-top: 1rem;
}

.card-btns {
    display: flex;
    list-style: none;
    align-self: end;
    margin-top: auto;
    gap: 1rem;

}

.card-btns img {
    height: 1.5rem;
}

.card, aside ul {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* Asides */

aside {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3rem;
}

aside hr {
    margin: 1rem 0;
    color: var(--gray);
}

aside ul {
    list-style: none;
}

aside img {
    max-width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
}


.announcements p {
    color: var(--aside-subtext);
    font-size: 0.8rem;
}


.trending ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trending li {
    display: flex;
    gap: 1rem;
}

.trending li div {
    display: flex;
    flex-direction: column;
}

.trending li div p + p {
    color: var(--aside-subtext);
}

@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr; 
    }
    
    article {
        grid-template-columns: 1fr; 
    }
}