@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --accent: hsl(3.4, 77.2%, 49.8%);
}

html,
body {
    height: 100%;
}

html {
    font-size: 10px;
}

body {
    margin: 0;
    font-family: Roboto, sans-serif;
    font-size: 1.6rem;
    line-height: 1.2;
    color: hsl(210, 5.3%, 14.9%);
}

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

h2 {
    margin-bottom: 10px;
}

h3 {
    margin-bottom: 10px;
}

img {
    max-width: 100%;
    width: 100%;
    height: auto;
}

input {
    appearance: none;
    border: none;
    background-color: hsl(215, 44%, 94%);
    padding: 10px 15px;
    border-radius: 50px;
    max-width: 100%;
    width: 100%;
    font-size: 1.6rem;
}

a {
    text-decoration: none;
    color: white;
}

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

.dashb {
    display: grid;
    grid-template-columns: 1fr 5fr;
    grid-template-rows: auto 1fr;
    min-height: 100%;
}



.dashb_header {
    display: grid;
    padding: 20px 40px;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    z-index: 1;
    box-shadow: 0 10px 10px -5px hsla(214.6, 41.5%, 63.1%, 0.2);
}

.header_search {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 20px;
}

.header_profile {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 30px;
    justify-content: end;
}

.header_profile > h2 {
    margin: 0;
}

.profile-img {
    max-width: 45px;
    border-radius: 50%;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: bold;
}


.header_user {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 20px;
    align-items: center;
}

.user-img {
    max-width: 75px;
    min-width: 50px;
    border-radius: 100%;
}

.user-gting {
    align-self: end;
    font-size: 1.4rem;
    font-weight: bold;
}

.user-curr {
    align-self: start;
    margin-bottom: 0;
    font-weight: 800;
    font-size: clamp(1.8rem, 1vw + 1rem, 2.8rem);
}


.header_actions {
    display: grid;
    grid-auto-flow: column;
    gap: 25px;
    align-items: center;
    justify-content: end;
}



.dashb_sidebar {
    grid-row: 1 / 3;
    background-color: hsl(216, 17.2%, 11.4%);
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 50px;
    color: white;
    fill: white;
    padding: 20px 25px;
}

.dashb_sidebar > nav {
    display: grid;
    gap: 60px;
}

.sb-item, .sidebar-logo {
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
    gap: 10px;
    transition: 0.2s all ease;
}

.sidebar-logo svg {
    width: 46px;
    height: 46px;
    justify-self: center;
}

.sidebar-nav {
    display: grid;
    gap: 20px;
}

.sb-item {
    font-size: 2rem;
    fill: white;
}

.sb-item.active {
    font-weight: bold;
    background-color: hsl(216, 16%, 19%);
    padding: 10px 0;
    border-radius: 8px;
}

.sb-item svg {
    justify-self: center;
    width: 24px;
    height: 24px;
}



.dashb_main {
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "projects news"
        "projects trending";
    gap: 20px;
    padding: 35px 25px;
    background-color: hsl(215, 44%, 94%);
}

.dashb_main h2 {
    font-size: 2rem;
}

.dashb_main p {
    color: hsl(212, 7%, 37%);
}

.dashb_main > div:first-child {
    grid-area: projects;
}

.main_proj {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    grid-auto-rows: minmax(325px, 1fr);
    gap: 25px;
}

.proj-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    border-left: 8px solid var(--accent);
    padding: 30px;
}

.proj-card_icons {
    display: grid;
    grid-auto-flow: column;
    justify-content: end;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}


.main_news, .main_trend, .proj-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 5px 10px 10px -5px hsla(214.6, 41.5%, 63.1%, 0.20);
}

.main_news {
    padding: 30px;
}

.main_news h3 {
    font-size: 1.6rem;
}

.main_news p {
    font-size: 1.4rem;
}

hr {
    margin: 20px 0;
    border: 1px solid hsl(214.3, 70%, 90%);
}

.main_trend {
    gap: 5px;
    display: grid;
    padding: 20px;
}

.trend-user {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 15px;
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid white;
    transition: 0.15s background-color ease;
}

.trend-img {
    border-radius: 100%;
    max-width: 50px;
}



/* Buttons */
button {
    appearance: none;
    background-color: unset;
    border: none;
    padding: 0;
    cursor: pointer;
}

.primary-btn {
    background-color: var(--accent);
    color: white;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.6rem;
    transition: 0.2s background-color ease;
}

.icon-btn {
    transition: all 0.1s ease;
    background-color: hsl(213, 70%, 96%);
    border: 1px solid hsl(211, 100%, 93%);
    border-radius: 50%;
    padding: 5px;
}

.icon-btn > svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: hsl(213, 12%, 20%);
    z-index: 1;
    position: relative;
}



/* Utilities */
.s-text {
    font-size: 1.4rem;
}

.header-icon {
    display: block;
    transition: 0.1s all ease;
    cursor: pointer;
    width: 24px;
    height: 24px;
}



/* Media queries */
@media (hover: hover) {
    .header-icon:hover {
        fill: grey;
        transform: scale(1.2);
    }

    .sb-item:hover {
        fill: var(--accent);
        color: hsl(207, 20%, 82%);
    }

    .primary-btn:hover {
        background-color: hsl(0, 98.8%, 30%);
    }

    .icon-btn:hover {
        transform: scale(1.1);
        background-color: hsl(213, 50%, 90%);
        border: 1px solid hsl(211, 50%, 90%);
    }

    .icon-btn:hover > svg {
        fill: hsl(213, 12%, 45%);
    }

    .trend-user:hover {
        background-color: hsl(212, 59%, 94%);
        border: 1px solid hsl(219, 100%, 94%);
    }
}


@media only screen and (max-width: 992px) {
    .dashb {
        grid-template-columns: 1fr;
    }

    .dashb_main {
        grid-template-columns: 5fr 3fr;
    }

    .dashb_sidebar {
        display: none;
    }
}


@media only screen and (max-width: 768px) {
    body {
        font-size: 1.4rem;
    }

    .dashb {
        grid-template-areas: none;
    }

    .dashb_header {
        padding: 15px;
        grid-template-columns: 1fr;
    }

    .header_search {
        gap: 10px;
    }

    .header_profile {
        display: none;
    }

    .user-img {
        width: 50px;
    }

    .header_actions {
        justify-content: center;
    }


    .dashb_main {
        grid-template-columns: 1fr;
        grid-template-areas: none;
        gap: 30px;
        padding: 35px 20px;
    }

    .dashb_main > div:first-child {
        grid-area: initial;
    }

    .main_proj {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        grid-auto-rows: minmax(250px, 1fr);
    }

    .proj-card {
        padding: 25px;
    }

    .primary-btn {
        padding: 10px 20px;
        font-size: 1.4rem;
    }
}