/* Importing Poppins font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Reset and apply base font */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;;
    font-family: 'Poppins', sans-serif;
}

/* Centering the entire layout in the viewport */
body {
    height: 100vh;
    display: flex;
    background: royalblue;
    align-items: center;
    justify-content: center;
}

/* Container for all items*/
.container {
    position: relative;
    max-width: 700px;
    width: 100%;
    background: #fff;
    margin: 0 15px;
    padding: 10px 20px;
    border-radius: 7px;
}

/* Container for skill box*/
.container .skill-box {
    width: 100%;
    margin: 25px 0;
}

/* skill box title  */
.skill-box .title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;

}

/* skill bar */
.skill-box .skill-bar {
    height: 8px;
    width: 100%;
    border-radius: 7px;
    margin-top: 6px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.1);
}

/* skill in persent form*/
.skill-bar .skill-per {
    position: relative;
    display: block;
    height: 100%;
    width: 90%;
    border-radius: 7px;
    background: royalblue;
    animation: progress 0.5s ease-in-out forwards;
    opacity: 0;
}

/* different skill different percent */
.skill-per.css {
    width: 60%;
    animation: progress 1s ease-in-out forwards;
}
.skill-per.js {
    width: 70%;
    animation: progress 1.5s ease-in-out forwards;
}
.skill-per.node {
    animation: progress 2s ease-in-out forwards;
    width: 50%;
}

/* keyframes for animation */
@keyframes progress {
    0%{
        width: 0;
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* tooltip for showing persent */
.skill-per .tooltip {
    position: absolute;
    right: -14px;
    top: -28px;
    font-size: 10px;
    font-weight: 500;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
    background: royalblue;
    z-index: 1;

}

.tooltip::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    height: 10px;
    width: 10px;
    z-index: -1;
    background: royalblue;
    transform: translateX(-50%) rotate(45deg);
}