@font-face {
    font-family: 'Rubik';
    src: url('assets/fonts/Rubik-VariableFont_wght.ttf');
}

:root {
    --blue: hsl(246, 80%, 60%);
    --light-red-work: hsl(15, 100%, 70%);
    --soft-blue-play: hsl(195, 74%, 62%);
    --light-red-study: hsl(348, 100%, 68%);
    --lime-green-exercise: hsl(145, 58%, 55%);
    --violet-social: hsl(264, 64%, 52%);
    --soft-orange-self-care: hsl(43, 84%, 65%);
    --very-dark-blue: hsl(226, 43%, 10%);
    --dark-blue: hsl(235, 46%, 20%);
    --desaturated-blue: hsl(235, 45%, 61%);
    --pale-blue: hsl(236, 100%, 87%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif;
}

.attribution { 
    font-size: 11px; text-align: center; 
    position: static;
    bottom: 0;
    margin: 10px;
    color: white;
}
.attribution a { color: hsl(228, 45%, 44%); }

body {
    background-color: var(--very-dark-blue);
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 110vh;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1110px;
    grid-template-areas:
        "profile-card card-work card-play card-study"
        "profile-card card-exercise card-social card-self-care";
}

.profile-card {
    grid-area: profile-card;
    background-color: var(--dark-blue);
    border-radius: 15px;
    color: var(--pale-blue);
}

.user-info {
    background-color: var(--blue);
    padding: 30px 30px 80px;
    border-radius: 15px;
}

.user-info img {
    width: 80px;
    border-radius: 50%;
    border: 3px solid white;
    margin-bottom: 10px;
}

.user-info p {
    font-size: 15px;
    font-weight: 400;
    margin-top: 30px;
}

.user-info h1 {
    font-size: 40px;
    font-weight: 300;
    color: white;
}

.time-options {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.time-options p {
    color: var(--pale-blue);
    font-size: 16px;
    cursor: pointer;
    transition: .2s ease-in-out;
}

.time-options p:hover {
    color: white;
    transition: .2s ease-in-out;
}

.time-options .active {
    color: white;
}

.card {
    background-color: var(--dark-blue);
    padding: 30px;
    border-radius: 15px;
    color: white;
    position: relative;
    transition: .2s ease-in-out;
    cursor: pointer;
    overflow: hidden;
}

.card:hover {
    transition: .2s ease-in-out;
    transform: scale(1.03);
    box-shadow: inset 0 0 0.1em #ffffff7a;
}

.card-top-background {
    height: 45px;
    margin: -30px -30px 25px;
    background-size: 30%;
    background-repeat: no-repeat;
    background-position: 90%;
    border-radius: 15px 15px 0 0;
}

.card.work .card-top-background {
    grid-area: card-work;
    background-color: var(--light-red-work);
    background-image: url('assets/images/icon-work.svg');
}

.card.play .card-top-background {
    grid-area: card-play; 
    background-color: var(--soft-blue-play);
    background-image: url('assets/images/icon-play.svg');
}

.card.study .card-top-background  {
    grid-area: card-study;
    background-color: var(--light-red-study);
    background-image: url('assets/images/icon-study.svg');
}

.card.exercise .card-top-background  {
    grid-area: card-exercise;
    background-color: var(--lime-green-exercise);
    background-image: url('assets/images/icon-exercise.svg');
}

.card.social .card-top-background  {
    grid-area: card-social;
    background-color: var(--violet-social);
    background-image: url('assets/images/icon-social.svg');
}

.card.self-care .card-top-background  {
    grid-area: card-self-care;
    background-color: var(--soft-orange-self-care);
    background-image: url('assets/images/icon-self-care.svg');
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    z-index: 1;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 400;
}

.card-header img {
    width: 20px;
    height: 5px;
}

.card-content {
    margin-top: 10px;
    transition: .3s ease-in-out;
}

.current-time {
    font-size: 54px;
    font-weight: 300;
    margin-bottom: 10px;
}

.previous-time {
    font-size: 15px;
    color: var(--pale-blue);
}


@media (max-width: 500px) {
    body {
        overflow: auto;
        min-height: 100vh;
    }
    .cards-container {
        padding: 20px 0;
        grid-template-columns: 1fr;
        gap: 25px;
        grid-template-areas:
            "profile-card"
            "card-work"
            "card-play"
            "card-study"
            "card-exercise" 
            "card-social" 
            "card-self-care";
    }

    .user-info {
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 20px;
        padding: 0 30px 30px;
    }
    
    .user-info img {
        width: 60px;
        margin-bottom: -30px;
    }

    .user-info h1 {
        font-size: 32px;
    }

    .time-options {
        flex-direction: row;
        justify-content: space-around;
    }

    .card-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 501px) and (max-width: 890px) {
    body {
        overflow: auto;
        min-height: 100vh;
    }

    .cards-container {
        padding: 40px 0;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        max-width: auto;
        grid-template-areas:
            "profile-card card-work"
            "profile-card card-play"
            "card-study card-exercise" 
            "card-social card-self-care";
    }
}