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

html,
body {
    width: 100%;
    height: 100%;
    font-family: "Inter", sans-serif;
    color: #fff;
    overflow: hidden; 
}

.scroll-wrapper {
    height: 100%;
    width: 100%;
    overflow-y: auto; 
    overflow-x: hidden;
}

span{
    line-height: 1.9;
}

:root{
    --title-color: #424242;
    --subTittle-color: #545454;
    --text: #4d4c50;
}

.container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('public/assets/project1/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.layout {
    width: 100%;
    height: 100%;
    display: flex;    
    padding: 0 10rem;
    flex-direction: column;
    justify-content: start;
    position: relative;
    background: linear-gradient(90deg,rgba(255, 87, 132, 0.855) 0%, rgba(255, 117, 154, 0.2) 100%);
}

.header {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    height: 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.header__name {
    font-size: 1.3rem;
    text-transform: uppercase;
    text-decoration: none;
    color: white;
}

.header .header_list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.header .header_list li a {
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}

.title-wrapper{
    display: flex;
    width: 100%;
    height: 85vh; 
}

.title {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    gap: 2rem;
}   

hr{
    width: 50%;
    height: 1px;
    border: none;
    border-radius: 3px;
    background: linear-gradient(90deg, #ffb1b1 0%, #ff6b86 100%);
    opacity: 1;
}

.title_content{
    display: flex;
    flex-direction: column;
}

.title_content span:first-child{
    font-weight: 550;
    font-size: 0.9rem;
}

.title_content a{
    font-size: 1.05rem;
    max-width: 25rem;
    text-decoration: none;
    color: white;
}

.title__name{
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

.title_icon {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-image{
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pm{
    width: 35rem;
    aspect-ratio: 1/1;
    background-image: url("/public/assets/project1/project.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.material-symbols-outlined {
    font-size: 3rem !important;
    cursor: pointer;
}

.technical{
    width: 100%;
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10rem;
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0 cover 50%;
    margin-bottom: 4rem;
}

.technical-content{
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    color: var(--title-color);
    gap: 4rem;
}

.technical-content .technical_title{
    text-transform: uppercase;
    font-size: 2.5rem;
    font-weight: 550;
    color: var(--title-color);
}

.technical-content div{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.technical-content div span{
    font-size: 1rem;
}

.skills-wrapper{
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.skills{
    margin-top: 3.5rem;
    height: 100%;
    aspect-ratio: 1/1;
    position: relative;
}

.square {
    position: absolute;
    width: 150px;
    aspect-ratio: 1/1;
    background: #4caf50;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border-radius: 10px;
    transform: translate(-50%, -50%);

    background-size: 60%;  
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    transition: background-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.square:hover{
    background-size: 70%;  
}

.project-images {
    display: flex;
    justify-content: center;
    gap: 5rem;
    padding: 7rem 0rem;
    background-color: #F6F5F4;
}

.card {
    position: relative;
    min-width: 500px;
    aspect-ratio: 1440/1024;
    overflow: hidden;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0 cover 50%;
}

.card .img,
.card .img-previous {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.5s ease;
}

.card .img {
    z-index: 2;
    opacity: 1;
}

.card .img-previous {
    z-index: 1;
}

.card:hover .img {
    opacity: 0;
}

.card:first-child .img{
    background-image: url(/public/assets/project1/capture_1.png);
}

.card:first-child .img-previous{
    background-image: url(/public/assets/project1/capture_1_b.png);
}

.card:nth-child(2) .img{
    background-image: url(/public/assets/project1/capture_2.png);
}

.card:nth-child(2) .img-previous{
    background-image: url(/public/assets/project1/capture_2_b.png);
}

.introduce{
    width: 100%;
    padding: 7rem 10rem;
    display: flex;
    color: var(--title-color);
    z-index: 50;
}

.intro-title{
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.intro-title span:first-child{
    font-size: 3.5rem;
    font-weight: 550;
    color: var(--title-color);
}

.intro-title span:nth-child(2){
    font-size: 1.25rem;
    color: var(--subTittle-color);
}

.intro-content{
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.intro-content span{
font-size: 0.9rem; 
}

.content{
    width: 100%;
    color: #181818;
    padding: 8rem 18rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.context{
    display: grid;
    grid-template-columns: 1fr 2fr;
}

.content-title{
    font-size: 2rem;
    font-weight: 600;
}

.context-content{
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.para{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text);
    font-size: 0.9rem;
}

.para ul{
    margin-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.content-subtitle{
    font-size: 1.3rem;
    font-weight: 600;
}

.challenge{
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.challenge-box{
    width: 100%;
    height: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eaeaea;
    padding: 0.5rem 2rem;
    color: var(--text);
}

.carousel-wrapper{
    width: 100%;
    padding: 4rem 0;
    background-color: #F6F5F4;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel {
    width: 700px;
    aspect-ratio: 1440/1024;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    background: #fff;
    position: relative;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(.77,0,.18,1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.img1 {
    background-image: url('public/assets/project1/capture_3.png');
}
.img2 {
    background-image: url('public/assets/project1/capture_4.png');
}

.footer {
    background: #f6f6f6b1;
    height: fit-content;
    color: rgb(83, 83, 83);
    padding: 4rem 10rem;

    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer__content {
    margin-bottom: 12px;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.footer__content_1 {
    width: 100%;
    display: flex;
    gap: 8rem;
}

.f1 {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    white-space: nowrap;
}

.f_title {
    font-weight: 350;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #757575;
}

.f_icon {
    display: flex;
    gap: 1.5rem;
    font-size: 1.75rem;
}

.f_icon a {
    color: #000000;
    text-decoration: none;
}

.bold {
    font-weight: 600 !important;
}

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 40px;
    width: 50px;
    height: 50px;
    color: rgb(0, 0, 0);          
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 4rem;
    opacity: 0;              
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 9999;
}

.scroll-to-top.show {
    opacity: 1;               
    pointer-events: auto;
}

.title-wrapper{
    transform: translateY(0);
    transition: transform 0.1s linear;
    will-change: transform;
}

@keyframes appear {
    0% {
        transform: translateY(30%);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes appear_x_left {
    0% {
        opacity: 0;
        transform: translate(-30%, 30%);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes appear_x_right {
    0% {
        opacity: 0;
        transform: translate(30%, 30%);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

::-webkit-scrollbar {
    background: #181818;
    /* Nền đen */
}

::-webkit-scrollbar-thumb {
    background: #444;
    /* Thanh trượt xám */
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
    /* Xám sáng hơn khi hover */
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #444 #181818;
    /* thumb #444, track #181818 */
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Icon toggle menu ẩn trên desktop */
.menu-toggle {
    display: none;
    font-size: 1.75rem;
    color: white;
    cursor: pointer;
}

/* Menu xổ xuống */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.767);
    position: fixed;
    top: 0rem;
    left: 0rem;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    padding: 1rem 2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow: hidden;

    justify-content: center;
    align-items: center;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    list-style: none;
    font-size: 2rem;
}

.mobile-menu a {
    color: #e8e8e8;
    text-decoration: none;
    font-weight: 300;
}

.exit-menu-mobile{
    position: absolute;
    font-size: 2rem;
    top: 1.5rem;
    right: 4.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .header .header_list {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-menu.show {
        display: flex;
    }
}

@media (max-width: 1200px) {
    .content{
        padding: 8rem 8rem;
    }

    .footer{
        padding: 4rem 8rem;
    }

    .footer__content_1{
        grid-template-columns: 2fr 2fr 1fr;
    }
}

/* Responsive cho carousel và layout */
@media (max-width: 1024px) {
    .layout{
        padding: 0 6rem;
    }

    .introduce{
        padding: 7rem 6rem;
    }

    .project-images {
        flex-direction: column;
        align-items: center;
    }
    .card {
        width: 100%;
        max-width: 500px;
        min-width: 0; 
    }

    .technical{
        flex-direction: column;
        position: relative;
        height: 90vh;
        padding: 2rem 10rem;
    }

    .technical-content{
        align-items: center;
    }

    .technical-text{
        opacity: 0;
    }

    .skills{
        position: absolute;
        left: 45%;
        top: 50%;
        transform: translate(5%, 5%);
    }

    .content{
        padding: 8rem 8rem;
    }

    .footer{
        padding: 4rem 6rem;
    }

    .footer__content_1{
        gap: 4rem;
    }
}

@media (max-width: 900px) {
    .layout{
        padding: 0 4rem;
    }

    .introduce{
        padding: 7rem 4rem;
        flex-direction: column;
        gap: 2rem;
    }

    .title{
        flex: 0;
        gap: 1rem;
    }

    .intro-title{
        gap: 0rem;
    }

    .technical{
        flex-direction: column;
        position: relative;
    }

    .technical-text{
        opacity: 0;
    }

    .skills{
        position: absolute;
        left: 45%;
        top: 50%;
        transform: translate(5%, 5%);
    }

    .content{
        padding: 6rem 4rem;
    }

    .context{
        display: flex;
        flex-direction: column;
    }

    .footer{
        padding: 4rem 4rem;
    }

    .footer__content_1{
        flex-direction: column;
        gap: 2rem;
    }

    .f1{
        gap: 0rem;
    }

    .exit-menu-mobile{
        right: 4rem;
    }
}

@media (max-width: 768px) {
    .pm{
        width: 25rem;
    }
}

@media (max-width: 600px) {
    .layout{
        padding: 0 2rem;
    }
    .title-wrapper{
        gap: 0rem;
    }
    .title__name{
        margin-bottom: 0;
    }
    .project-image{
        flex: 0;
        margin-top: 4rem;
    }
    .pm{
        display: none;
    }
    .title{
        flex: 0;
        gap: 1rem;
    }
    .introduce{
        padding: 7rem 2rem;
        flex-direction: column;
        gap: 2rem;
    }

    .intro-title{
        gap: 0rem;
    }

    .technical{
        flex-direction: column;
        position: relative;
        padding: 0 4rem;
        height: 60vh;
    }

    .technical-text{
        opacity: 1;
    }

    .skills-wrapper{
        display: none;
    }

    .technical .title{
        font-size: 2rem;
        white-space: nowrap;
    }

    .skills{
        position: absolute;
        left: 45%;
        top: 50%;
        transform: translate(5%, 5%);
    }

    .content{
        padding: 6rem 2rem;
    }

    .exit-menu-mobile{
        right: 2rem;
    }

    .footer{
        padding: 4rem 2rem;
    }
}

@media (max-width: 500px) {
    .header__name{
        font-size: 1rem;
    }

    .intro-title span:first-child{
        font-size: 2rem;
    }

    .intro-title span:nth-child(2){
        font-size: 1rem;
    }

    .intro-content span{
        font-size: 1.05rem;
    }

    .technical{
        padding: 0 2rem;
    }

    .technical-content .technical_title{
        font-size: 2rem;
    }
}


@keyframes menuItemFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu.show ul.header_list_mb li {
    opacity: 0;
    animation: menuItemFadeIn 0.5s forwards;
}

.mobile-menu.show ul.header_list_mb li:nth-child(1) {
    animation-delay: 0.1s;
}
.mobile-menu.show ul.header_list_mb li:nth-child(2) {
    animation-delay: 0.25s;
}
.mobile-menu.show ul.header_list_mb li:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes exitBtnFadeIn {
    from {
        opacity: 0;
        transform: scale(0.7) rotate(-30deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.mobile-menu.show .exit-menu-mobile {
    opacity: 0;
    animation: exitBtnFadeIn 0.5s 0.15s forwards;
}