/* Mobile: 375px - Desktop: 1440px */
/* Family: [Rubik](https://fonts.google.com/specimen/Rubik) - Weights: 300, 400, 500 */
/* Font size: 18px (card titles e.g. Work, Play) */

:root {
    /* Primary Colors  */
    --purple-600: hsl(246, 80%, 60%); 
    --orange-300:hsl(15, 100%, 70%); /* Work */
    --blue-300: hsl(195, 74%, 62%); /* Play */
    --pink-400:hsl(348, 100%, 68%); /* Study */
    --green-400: hsl(145, 58%, 55%); /* Exercise */
    --purple-700: hsl(264, 64%, 52%); /* Social */
    --yellow-300: hsl(43, 84%, 65%); /* Self care */

    /* Neutral Colors  */
    --navy-950: hsl(226, 43%, 10%);
    --navy-900: hsl(235, 46%, 20%);
    --purple-500: hsl(235, 45%, 61%);
    --navy-200: hsl(236, 100%, 87%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background-color: var(--navy-950);
    font-family: 'Rubik', sans-serif;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tracking-card {
    max-width: 375px;
    width: 100%;
    padding: 24px;
}

.profile-card {
    grid-area: profile;
}

.profile-info {
    background-color: var(--purple-600);
    width: 100%;
    display: flex;
    align-items: center;
    border-radius: 15px;
    position: relative;
    column-gap: 1rem;
    padding: 2rem 1.75rem;
}

.profile-info img {
    width: 70px;
    height: 70px;
    border: 3px solid white;
    border-radius: 50%;
}

.profile-info p {
    font-size: 0.9375rem;
    color: var(--navy-200);
    margin-bottom: 0.25rem;
}

.profile-info h1 {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.2;
}

.profile-period {
    background-color: var(--navy-900);
    display: flex;
    justify-content: space-between;
    border-radius: 0 0 15px 15px;
    padding: 1.5rem 1.25rem;
    margin-top: -10px;
}

.profile-period button {
    background: none;
    border: none;
    color: var(--navy-200);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    flex: 1;
    text-align: center;
}

.profile-period button.active {
    color: white;
}

.cards {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

.card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}

.card-bg {
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    height: 50px;
    width: 100%;
    border-radius: 15px 15px 0 0;
    position: relative;
    overflow: hidden;
}

.card-bg img {
    position: absolute;
    top: -10px;
    right: 15px;
    width: 64px;
    height: 64px;
}

.card-body {
    background-color: var(--navy-900);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: -18px;
    position: relative;
    z-index: 1;
}

.card-body:hover {
    background-color: rgb(56, 60, 108);
    cursor: pointer;
}

.card-body header {
    font-size: 1.125rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-body header h2 {
    font-size: 1.125rem;
    font-weight: 500;
}

.card-body button {
    background: none;
    border: none;
    cursor: pointer;
}

.time {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    gap: 0;
}

.hours {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.2;
}

.previous {
  color: var(--navy-200);
  font-size: 0.9375rem;
  font-weight: 400;
}

.work {
    background-color: var(--orange-300);
    grid-area: work;
}

.play {
    background-color: var(--blue-300);
    grid-area: play;
}

.study {
    background-color: var(--pink-400);
    grid-area: study;
}

.exercise {
    background-color: var(--green-400);
    grid-area: exercise;
}

.social {
    background-color: var(--purple-700);
    grid-area: social;
}

.self-care {
    background-color: var(--yellow-300);
    grid-area: self-care;
}

@media (min-width: 1120px) {

    .tracking-card {
        max-width: 1120px;
        padding: 50px 20px;
        display: grid;
        grid-template-areas:
            "profile work play study"
            "profile exercise social self-care";
        grid-template-columns: 255px repeat(3, 1fr);
        gap: 1.875rem;
    }

    .profile-card {
        display: flex;
        flex-direction: column;
        align-self: stretch;
    }
    
    .profile-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 2.5rem 1.75rem;
        border-radius: 15px;
    }
    
    .profile-info img {
        width: 78px;
        height: 78px;
        margin-bottom: 2.5rem;
    }
    
    .profile-info p {
        font-size: 0.9375rem;
        margin-bottom: 0.5rem;
    }
    
    .profile-info h1 {
        font-size: 2.5rem;
        font-weight: 300;
        line-height: 1.2;
    }
    
    .profile-period {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        flex-shrink: 0;
        padding: 1.5rem 1.75rem;
        border-radius: 0 0 15px 15px;
        margin-top: -12px;
    }
    
    .profile-period button {
        text-align: left;
        font-size: 1.125rem;
    }
    
    .profile-period button:hover {
        color: white;
    }

    .cards {
        grid-template-columns: repeat(1, 1fr);
        gap: 1.875rem;
        margin-top: 0;
        display: contents;
    }

    .card-bg {
        height: 60px;
    }

    .card-bg img {
        width: 64px;
        top: -10px;
        right: 20px;
    }

    .card-body {
        padding: 1.875rem;
    }

    .card-body header {
        font-size: 1.125rem;
        font-weight: 500;
        margin-bottom: 1.5rem;
    }
    
    .card-body header h2 {
        font-size: 1.125rem;
        font-weight: 500;
    }

    .time {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 1.5rem;
        gap: 0.5rem;
    }

    .hours {
        font-size: 3rem;
    }

    .previous {
        font-size: 1rem;
    }
}