/** FONTS */
/* rubik-300 - latin */
@font-face {
    font-family: 'Rubik';
    font-style: normal;
    font-weight: 300;
    src: local(''),
         url('../fonts/rubik-v14-latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
         url('../fonts/rubik-v14-latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
  }
  /* rubik-500 - latin */
  @font-face {
    font-family: 'Rubik';
    font-style: normal;
    font-weight: 500;
    src: local(''),
         url('../fonts/rubik-v14-latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
         url('../fonts/rubik-v14-latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
  }
  /* rubik-regular - latin */
  @font-face {
    font-family: 'Rubik';
    font-style: normal;
    font-weight: 400;
    src: local(''),
         url('../fonts/rubik-v14-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
         url('../fonts/rubik-v14-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
  }

/** COLORS */
:root {
    --main-background: hsl(226, 43%, 10%);
    --blue: hsl(246, 80%, 60%);
    --dark-blue: hsl(235, 46%, 20%);
    --desaturated-blue: hsl(235, 45%, 61%);
    --pale-blue: hsl(236, 100%, 87%);
    --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-selfcare: hsl(43, 84%, 65%);
}

* { 
    box-sizing: border-box;
}

body{
    padding: 0;
    margin: 0;
    font-size: 18px;
    color:#fff;
    font-family: 'Rubik';
    font-weight: 400;
    background-image: url('../images/frontend-bg.png');
    background-size: contain;
}

.main {
    max-width: 1440px;
    margin: 10vmin auto 40px;
    background-color: var(--main-background);
    padding: 15% 9%;
}
.main-content {
    margin: auto;
    height:max-content;
    display: grid;
    grid-template-columns: 24% 76%;
    gap:25px;

}

section.user {
    border: 1px solid transparent;
    border-radius: 14px;
    display:grid;
    grid-template-rows: 72% auto;
}
.user-info {
    padding: 25px;
    background-color: var(--blue);
    border-radius: 14px;
}
.user-info span:first-of-type {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    line-height: 2;
}
.user-bg {
    background-color: var(--dark-blue);
    border-radius: 14px;
}
.user-info img {
    border: 3px solid white;
    border-radius: 50%;
    margin-bottom: 35px;
    display:block;
} 

.user-name{
    font-size: 2.3rem;
    margin-top: 10px;
    margin-bottom: 20px;
    font-weight: 300;
    color: rgba(255,255,255,0.9);
}

.user ul {
    list-style-type: none;
    padding:25px;
    margin:0;
}

ul>li {
    padding:0;
    margin:14px 0;
    font-size: 0.95rem;
}

ul>li>a {
    color:rgba(255,255,255,0.5);
    text-decoration: none;
}

ul>li>a:focus, ul>li>a:hover {
    color:rgba(255,255,255,1);
}

/** SECTION CARDS*/ 
.cards-section {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap:25px;
}

.cards-section>article {
    border-radius: 14px;
}
article#Work {
    background-color: var(--light-red-work);
    background-image: url(../images/icon-work.svg);
    background-repeat: no-repeat;
    background-position: 87% -6%;
}

article#Work {
    background-color: var(--light-red-work);
    background-image: url(../images/icon-work.svg);
    background-repeat: no-repeat;
    background-position: 87% -6%;
}

article#Play {
    background-color: var(--soft-blue-play);
    background-image: url(../images/icon-play.svg);
    background-repeat: no-repeat;
    background-position: 87% -6%;
}

article#Study {
    background-color: var(--light-red-study);
    background-image: url(../images/icon-study.svg);
    background-repeat: no-repeat;
    background-position: 87% -6%;
}

article#Exercise {
    background-color: var(--lime-green-exercise);
    background-image: url(../images/icon-exercise.svg);
    background-repeat: no-repeat;
    background-position: 87% -2%;
}

article#Social {
    background-color: var(--violet-social-);
    background-image: url(../images/icon-social.svg);
    background-repeat: no-repeat;
    background-position: 87% -9%;
}

article#SelfCare {
    background-color: var(--soft-orange-selfcare);
    background-image: url(../images/icon-self-care.svg);
    background-repeat: no-repeat;
    background-position: 87% -6%;
}

article .over-bg{
    height: 40px;
}

.card {
    padding:25px;
    border-radius: 14px;
    background-color: var(--dark-blue);
}

.card:hover {
    background-color: var(--desaturated-blue);
}
article .card div:first-child {
    display:flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 500;
}

article .card .hours-current {
    font-size: 3.3rem;
    font-weight: 300;
    margin: 25px 0 15px;
}

article .card .hours-prev{
    font-size: 0.9rem;
    color:rgba(255,255,255,0.7);
}


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

@media (min-width:767px) and (max-width: 1080px) {
    .main-content {
        grid-template-columns: 32% auto;
        gap:25px;
    
    }
    .cards-section {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (min-width:350px) and (max-width: 766px) {
    .main-content {
        display: block;
        gap:25px;
    }

    section.user {
        height:200px;
        margin-bottom: 25px;
    }
    .user-info {
        display: grid;
        grid-template-columns: 30% auto;
        align-items: center;
        justify-items: center;
        gap:15px;
    }

    .user-info img {
        margin-bottom: 0;

    }

    .user-name {
        font-size: 1.35rem;
    }
    .user ul {
        display:flex;
        justify-content: space-between;
        padding:25px;
        overflow-y: visible;
        margin-top: -1.15rem;
    }

    .cards-section {
        grid-template-columns:1fr;
        
    }

    article .card {
        position: relative;
    }
    article .card .hours-current {
        font-size: 1.8rem;
        margin: 14px 0 0;
        display:inline-block;
    }

    article .card .hours-prev {
        display:inline-block;
        width:max-content;
        text-align:right;
        position: absolute;
        right:25px;
        top:69px;

    }


}