/*=============== LOCAL FONTS ===============*/
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins/Poppins-Regular.woff2') format('woff2'),
        url('../fonts/Poppins/Poppins-Regular.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins/Poppins-Medium.woff2') format('woff2'),
        url('../fonts/Poppins/Poppins-Medium.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins/Poppins-SemiBold.woff2') format('woff2'),
        url('../fonts/Poppins/Poppins-SemiBold.woff') format('woff');
    font-weight: 600;
    font-display: swap;
}

:root {
    scroll-behavior: smooth;
    --hue: 207;
    --sat: 90%;
    --lig: 61%;
    --first-color: hsl(var(--hue), var(--sat), var(--lig));
    --first-color-alt: hsl(var(--hue), var(--sat), 57%); /* -4% */
    --second-color: hsl(203, 95%, 77%); /* #8ED1FC */
    --title-color: hsl(var(--hue), 12%, 15%);
    --text-color: hsl(var(--hue), 12%, 45%);
    --text-color-light: hsl(var(--hue), 8%, 75%);
    --text-color-lighten: hsl(var(--hue), 8%, 92%);
    --body-color: hsl(var(--hue), 100%, 99%);
    --container-color: hsl(var(--hue), 24%, 12%);

    --color02: #fff;
    --color-toolbar: rgba(10, 87, 164, 0.22);
    --color-toolbar2: rgba(0, 0, 0, 0.22);
    --box-shadow: rgba(116, 116, 116, 0.136);
    transition: background-color 0.5s ease;

    /*.5rem = 8px | 1rem = 16px ...*/
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.813rem;
    --smaller-font-size: 0.75rem;
}

@media screen and (min-width: 968px) {
    :root {
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: 0.875rem;
        --smaller-font-size: 0.813rem;
    }
}  

body.dark {
    --title-color: hsl(var(--hue), 12%, 95%);
    --text-color: hsl(var(--hue), 12%, 75%);
    --text-color-light: hsl(var(--hue), 8%, 40%); /* tooltip */
    --body-color: hsl(calc(var(--hue) + 7), 40%, 8%);
    --container-color: #fff;
    
    --color02: hsl(var(--hue), 24%, 12%);
    --color-toolbar: rgba(49, 140, 231, 0.22);
    --color-toolbar2: rgba(255, 255, 255, 0.22);
    --box-shadow: rgba(255, 255, 255, 0.12);
    transition: background-color 0.5s ease;
}

::-webkit-scrollbar {
    width: 7px;
    background-color: var(--body-color);
    transition: background-color 0.5s ease;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); 
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5); 
    background-color: var(--first-color);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--first-color-alt);
    background-image: linear-gradient(-45deg , var(--first-color) , var(--second-color));
}


* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    transition: font-family 0.3s ease;
    display: block;
    /* chặn select cho các trình duyệt */
    -khtml-user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
    unselectable: on;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    pointer-events: none;
}

svg {
    place-items: center;
    transition: background-color 0.5s ease;
}


main {
    overflow: hidden;
}

h1,
h2,
h3 {
    color: var(--title-color);
    font-weight: 600;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

/* preloader */
#loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: var(--body-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader {
    display: flex;
    align-items: center;
}

.bar {
    display: inline-block;
    width: 8px;
    height: 35px;
    background-color: rgba(66, 164, 245, 0.742);
    border-radius: 10px;
    animation: scale-up4 1s linear infinite;
}

.bar:nth-child(2) {
    height: 50px;
    margin: 0 5px;
    animation-delay: .25s;
}

.bar:nth-child(3) {
    animation-delay: .5s;
}

@keyframes scale-up4 {
    20% { background-color: var(--first-color-alt); transform: scaleY(1.5); }
    40% { transform: scaleY(1); }
}

.hide {
    opacity: 0;
    visibility: hidden;
}


header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
    background-color: transparent;
    border-bottom: none;
}

header.scrolled {
    border-bottom: 1px solid var(--box-shadow);
    backdrop-filter: blur(10px);
}

.header {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0px 15px;
    transition: background-color 0.5s ease;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}


.h__logo {
    color: var(--container-color);
    font-weight: 500;
    transition: 0.4s;
    font-size: .938rem;
    transition: background-color 0.5s ease;
}

.h__logo:hover {
    color: var(--first-color);
    transition: background-color 0.5s ease;
}


/*****/
/* Dark Light Toggle */
.dark-light {
    position: relative;
    width: 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.themeToggleInput {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.themeToggleLabel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--container-color);
    transition: all 0.3s ease;
}

.dark-light svg {
    width: 23px;
    height: 23px;
    transition: transform 0.4s ease;
    transform: rotate(40deg);
    box-sizing: content-box;
}

.dark-light:hover .themeToggleLabel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--color02);
    border-radius: 50%;
    box-shadow: 1px 1px 10px 2px var(--box-shadow);
    z-index: -1;
    transition: all 0.3s ease;
}

.dark-light .sunMoon {
    transform-origin: center center;
    transition: transform 0.4s ease;
    transform: scale(1);
}

.dark-light .sunRay {
    transform-origin: center center;
    transform: scale(0);
}

.dark-light mask > circle {
    transition: transform 0.64s cubic-bezier(0.41, 0.64, 0.32, 1.575);
    transform: translate(0px, 0px);
}

.dark-light.active svg { transform: rotate(90deg); }
.dark-light.active mask > circle { transform: translate(16px, -3px); }
.dark-light.active .sunMoon { transform: scale(0.55); }
.dark-light.active .sunRay { animation: showRay 0.4s ease forwards; }

.dark-light.active .sunRay:nth-child(1) { animation-delay: 0s; }
.dark-light.active .sunRay:nth-child(2) { animation-delay: 0.05s; }
.dark-light.active .sunRay:nth-child(3) { animation-delay: 0.1s; }
.dark-light.active .sunRay:nth-child(4) { animation-delay: 0.17s; }
.dark-light.active .sunRay:nth-child(5) { animation-delay: 0.25s; }
.dark-light.active .sunRay:nth-child(6) { animation-delay: 0.29s; }

@keyframes showRay {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}


.bg_img {
    text-align: center;
    position: relative;
    margin-bottom: -70px;
}

.background_img {
    width: 70%;
    max-width: 790px;
    height: 30vh;
    border-radius: 8px;
    position: relative;
    object-fit: cover;
    box-shadow: 1px 1px 10px 2px var(--box-shadow);
    display: block;
    margin: 0 auto;
}

.profile {
    position: relative;
    z-index: 1;
    padding-top: 5rem;
    transition: background-color 0.5s ease;
}

.profile__area {
    row-gap: 2rem;
    transition: background-color 0.5s ease;
    /* position: relative;
    transform: translateY(-15%); */
}

.profile__data {
    display: grid;
    text-align: center;
    width: max-content;
    margin: 0 auto;
    transition: background-color 0.5s ease;
}

.profile__border {
    border: 3.5px solid var(--first-color);
    position: relative;
    justify-self: center;
    border-radius: 50%;
    width: 135px;
    height: 135px;
    display: grid;
    place-items: center;
    margin-bottom: 1.25rem;
    transition: background-color 0.5s ease;
}

.profile__perfil {
    width: 120px;
    height: 120px;
    background: linear-gradient(180deg, hsl(var(--hue), var(--sat), var(--lig), 1) 0%, hsl(var(--hue), var(--sat), var(--lig), 0.2) 100%);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: background-color 0.5s ease;
}

.profile__perfil img {
    width: 120px;
}

.status_wrapper {
    position: absolute;
    bottom: 5px;
    left: 92px;
    display: inline-flex;
    align-items: center;
}

.status_indicator {
    width: 25px;
    height: 25px;
    background-color: #00A36C;
    border: 3px solid var(--body-color);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.status_indicator::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 163, 108, 0.7);
    border-radius: 50%;
    transform: translate(-10%, -50%) scale(1);
    opacity: 0;
    z-index: -1;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.status_tooltip {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    color: transparent;
    padding: 4px 12px 4px 28px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 1;
    overflow: hidden;
}

@keyframes pulseEffect {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.status_indicator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 163, 108, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    animation: pulseEffect 2s infinite ease-out;
}

.status_indicator:hover::before {
    animation: none;
    opacity: 0;
}

.status_indicator:hover::after {
    opacity: 1;
    width: 145px;
    height: 30px;
    border-radius: 20px;
    background-color: rgba(22, 163, 74, 0.20);
    transform: translate(-10%, -50%) scale(1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.status_indicator:hover ~ .status_tooltip {
    color: rgb(22, 163, 74);
    transition: color 0.3s ease 0.4s;
}

img {
    max-width: 100%;
    height: auto;
}

.profile__name {
    font-size: var(--h2-font-size);
}

.profile_profession {
    font-size: var(--smaller-font-size);
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.profile__social {
    display: flex;
    justify-content: center;
    column-gap: 0.75rem;
    padding: 0 !important;
}

.profile__social_link {
    font-size: 1.25rem;
    color: var(--container-color);
    transition: .3s;
}

.profile__social_link:hover {
    color: var(--first-color);
}

.profile__info {
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    column-gap: 2.5rem;
}

.profile__info-group {
    text-align: center;
}

.profile__info_number {
    font-size: .938rem;
    margin-bottom: 0.25rem;
}

.profile__info-description {
    font-weight: 500;
    font-size: var(--small-font-size);
}

.counter {
    transition: opacity 0.5s ease-in-out;
}



.button {
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
    background-color: var(--first-color);
    background-image: linear-gradient(135deg, hsl(210, 100%, 45%) 0%, var(--first-color) 50%, hsl(204, 100%, 75%) 100%);
    color: #FFF !important;
    border-radius: 1rem;
    transition: .3s;
    justify-content: center;
    width: 180px;
    height: 60px;
    font-weight: 500;
}

.button:hover {
    background-color: var(--first-color-alt);
    box-shadow: 0 8px 24px hsla(var(--hue), var(--sat), var(--lig), 0.35);
}


.button i {
    font-size: 1.25rem;
    display: flex;
    transition: transform 0.2s ease-in-out;
}

.button i:hover {
    animation: shake 0.3s ease-in-out infinite;
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}


.profile__buttons,
.profile__buttons-small {
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.profile__buttons {
    column-gap: 1rem;
}

.profile__buttons-small {
    column-gap: 0.25rem;
}

.button__gray {
    font-size: 1.25rem;
    background-color: var(--text-color-lighten);
    color: var(--first-color) !important;
    border-radius: 50px;
    transition: background-color 0.5s ease;
}

.button__gray:hover {
    background-color: var(--text-color-light);
    transition: background-color 0.5s ease;
}

.button__small {
    display: flex;
    align-items: center;
    width: 50px;
    justify-content: center;
    transition: background-color 0.5s ease;
    height: 50px;
}


#project {
    padding: 2rem 0 2rem;
    transition: background-color 0.5s ease;
}


.note {
    position: relative;
    padding: 20px 20px 20px 50px;
    background: hsl(calc(var(--hue) - 8), 94%, 94%);
    color: hsl(calc(var(--hue) - 1), 99%, 31%);
    font-size: .85rem;
    line-height: 1.6em;
    border-radius: 10px;
    overflow: hidden;
}
.note:before {
    content: '';
    width: 60px;
    height: 60px;
    background: hsl(calc(var(--hue) - 1), 99%, 31%);
    display: block;
    border-radius: 50%;
    position: absolute;
    top: -8px;
    left: -12px;
    opacity: .05;
}
.note:after {
    content: '\002A';
    position: absolute;
    left: 18px;
    top: 20px;
    font-size: 22px;
    min-width: 15px;
    text-align: center;
}


.projects__content {
    grid-template-columns: 332px !important;
    justify-content: center;
    gap: 2rem;
    transition: background-color 0.5s ease;
}

.projects__card {
    position: relative;
    border-radius: 1rem;
    transition: background-color 0.5s ease;
    overflow: hidden;
}

.projects__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projects__modal {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: -100%;
    left: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: grid;
    align-items: flex-end;
    padding: 1.5rem;
    transition: bottom 0.3s ease;
}

.projects__tags {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.projects__tag {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: var(--small-font-size);
    white-space: nowrap;
}

.projects__tag--blue {
    background-color: rgba(59, 130, 246, 0.2);
    color: #dbeafe;
    transition: background-color 0.2s ease;
    border: .5px solid rgba(147, 197, 253, 0.5);
}
.projects__tag--blue:hover {
    background-color: rgba(59, 130, 246, 0.3);
}

.projects__tag--green {
    background-color: rgba(34, 197, 94, 0.2);
    color: #d1fae5;
    transition: background-color 0.2s ease;
    border: .5px solid rgba(74, 222, 128, 0.5);
}
.projects__tag--green:hover {
    background-color: rgba(34, 197, 94, 0.3);
}

.projects__tag--yellow {
    background-color: rgba(234, 179, 8, 0.2);
    color: #fef9c3;
    transition: background-color 0.2s ease;
    border: .5px solid rgba(250, 204, 21, 0.5);
}
.projects__tag--yellow:hover {
    background-color: rgba(234, 179, 8, 0.3);
}

.projects__tag--purple {
    background-color: rgba(168, 85, 247, 0.2);
    color: #f3e8ff;
    transition: background-color 0.2s ease;
    border: .5px solid rgba(192, 132, 252, 0.5);
}
.projects__tag--purple:hover {
    background-color: rgba(168, 85, 247, 0.3);
}

.projects__tag--gray {
    background-color: rgba(107, 114, 128, 0.2);
    color: #f3f4f6;
    transition: background-color 0.2s ease;
    border: .5px solid rgba(156, 163, 175, 0.5);
}
.projects__tag--gray:hover {
    background-color: rgba(107, 114, 128, 0.3);
}

.projects__tag--red {
    background-color: rgba(248, 113, 113, 0.2);
    color: #fecaca;
    transition: background-color 0.2s ease;
    border: .5px solid rgba(248, 113, 113, 0.5);
}
.projects__tag--red:hover {
    background-color: rgba(248, 113, 113, 0.3);
}

.projects__subtitle {
    font-size: var(--small-font-size);
}

.projects__subtitle,
.projects__title {
    color: #fafdff;
}

.projects__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.75rem;
}

.projects__button {
    width: 40px;
    height: 40px;
}

.projects__card:hover .projects__modal {
    bottom: 0;
}

.projects__card:hover .projects__tags {
    opacity: 1;
    transform: translateY(0);
}


.project__title {
    margin-top: 3rem;
    display: flex;
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 3.5rem;
    justify-content: center;
    position: relative;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.project__title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    right: 0;
    margin: 0 auto;
    width: 100%;
    background: var(--first-color);
    height: 4px;
    border-radius: 0px 0px 10px 10px
}

.project__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    right: 0;
    margin: 0 auto;
    width: calc(100% / 4);
    min-width: 28px;
    max-width: 100px;
    background: var(--first-color);
    height: 5px;
    border-radius: 0px 0px 10px 10px
}


/* Footer */
.footer__copy {
    display: block;
    text-align: center;
    font-size: .813rem;
    height: 150px;
    padding: 1rem 0 .8rem;
    /* background-color: var(--first-color); */
}

.footer__copy h5 {
    margin-bottom: 0.75rem;
    /* color: var(--title-color); */
    font-weight: 200;
    font-size: var(--smaller-font-size);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, var(--title-color) 30%, var(--first-color) 60%, var(--text-color-light) 100%);
}


/*=============== BACKGROUND EFFECT ===============*/

.background__effect {
    overflow: hidden;
}

/* Grid background */
.grid_background {
    position: fixed;
    inset: 0;
    height: 100%;
    width: 100%;
    background-image: linear-gradient(to right, #80808012 1px, transparent 1px),
                    linear-gradient(to bottom, #80808012 1px, transparent 1px);
    -webkit-mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, #000 50%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, #000 50%, transparent 100%);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: -2;
    /* opacity: 0.7; */
}

/* Shapes */
.global_shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.global_shapes {
    display: none;
}

body.dark .global_shapes {
    display: block;
}

.home__shape-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    mix-blend-mode: soft-light;
    /* opacity: .9; */
}



/*=============== BREAKPOINTS ==============*/

/* For mobile */
@media only screen and (min-width: 320px) and (max-width: 599px) {

    .profile__buttons {
        /* flex-direction: column; */
        row-gap: 1rem;
    }

    .background_img {
        object-fit: cover;
        width: 90%;
        max-width: 420px;
        height: 160px;
    }
    
    .home__shape-bg {
        width: 28rem;
        height: 28rem;
    }
}

@media only screen and (min-width: 600px) and (max-width: 992px) {

    .background_img {
        object-fit: cover;
        width: 80%;
        height: 20vh;
    }

    .projects__content {
        grid-template-columns: repeat(2, 270px) !important;
        align-items: center;
        justify-content: center;
    }
}

/* For desktop */
@media only screen and (min-width: 993px) and (max-width: 2560px) {

    .dark-light i:hover {
        width: 40px;
        height: 40px;
    }

    .projects__content {
        grid-template-columns: repeat(2, 380px) !important;
        align-items: center;
        justify-content: center;
    }
}
