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

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

:root{
    --title-color: #424242;
    --subTittle-color: #7e7e7e;
    --text: #5f5f5f;
}

.scroll-wrapper {
    height: 100%;
    width: 100%;
    overflow-y: auto;    /* ✅ tạo scroll trong wrapper */
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.active{
    text-decoration: underline;
    text-underline-offset: 4px;
}

.container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* background-image: url('https://i.pinimg.com/originals/de/c7/7a/dec77af3e0bad3f8937f8144a60abcbc.gif'); */
    background-image: url('https://i.pinimg.com/originals/a3/50/87/a3508797091683ab55e1d0534c6ba97a.gif');
    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;
}

.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 {
    width: 100%;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1.5rem;
}

.title span:first-child {
    text-transform: uppercase;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.title .title__name {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.title .subtitle__name{
    max-width: 25rem;
    text-align: center;
    line-height: 1.5rem;
}

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

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

.content_1 {
    width: 100%;
    background: #fff;
    color: #000000;
    display: flex;
    justify-content: start;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 10rem 4rem 10rem;
    height: fit-content;

    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0 cover 40%;
}

.content_1 span {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    line-height: 1.6;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 2px;
}

.content_1 .icons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    gap: 2rem;
}

.icon-wrapper span{
    font-size: 0.875rem;
}

.icon {
    display: flex;
    align-items: center;
    height: fit-content;
    gap: 1.5rem;
    padding: 1rem;
    border: 2px solid black;
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
    background-color: white;
    height: 100%;
}

.icon:hover{
    box-shadow: 5px 5px 0px 0px rgba(0,0,0,0.75);
    -webkit-box-shadow: 5px 5px 0px 0px rgba(0,0,0,0.75);
    -moz-box-shadow: 5px 5px 0px 0px rgba(0,0,0,0.75);
}

.icon i {
    font-size: 3rem; /* icon to lên */
    flex-shrink: 0; /* giữ nguyên size icon khi text dài */
    color: #333;
}

.text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.text-wrapper span {
    font-size: 1.125rem; /* title: 18px */
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.text-wrapper small {
    font-size: 0.875rem; /* description nhỏ hơn */
    color: #666;
    line-height: 1.5rem;
}

.project {
    width: 100%;
    padding: 0 8rem;
    display: flex;
    height: fit-content;
    margin: 4rem 0;
}

.project_content {
    flex: 1;
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project_content .wrapper {
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project_content .wrapper h5 {
    font-size: 1.1rem;
    font-weight: 550;
    color: rgb(172, 172, 172);
    text-transform: uppercase;
}

.project_content .wrapper h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #4e4e4e;
}

.project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    padding: 4px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.ss {
    color: #ff6b86;
    background: #ffe5ea;
}

.ms {
    color: #515a5e;
    background: #e9eded;
}

.project__description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.722);
}

.image_container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.sq_insta {
    position: absolute;
    top: 50%;
    left: -75%;
    width: 80%;
    aspect-ratio: 1/1;
    transform: translateY(-50%);
    background-color: #ffc0cc;
}

.sq_music {
    position: absolute;
    top: 50%;
    right: -75%;
    width: 80%;
    aspect-ratio: 1/1;
    transform: translateY(-50%);
    background-color: #1F1F1F;
}

.image_container .img_insta {
    width: 80%;
    aspect-ratio: 1/1;
    background-image: url('public/assets/insta.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image_container .img_music {
    width: 80%;
    aspect-ratio: 1/1;
    background-image: url('public/assets/music.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.viewpj {
    text-decoration: none;
    text-transform: uppercase;
    display: flex;
    gap: 1rem;
    justify-content: start;
    align-items: center;
    font-weight: 700;
    font-size: 1.15rem;
    color: rgb(95, 95, 95);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.viewpj_1:hover {
    transform: translateX(10px);
    color: #fb7089;
}

.viewpj_2:hover {
    transform: translateX(10px);
    color: #000000;
}

@media (max-width: 1020px) {
    .content_1 {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
}

.animation_appear_left {
    animation: appear_x_left 2s linear forwards;
    animation-timeline: view();
    animation-range: entry 0 cover 50%;
}

.animation_appear_right {
    animation: appear_x_right 2s linear forwards;
    animation-timeline: view();
    animation-range: entry 0 cover 50%;
}

.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;
}

.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;
}


@keyframes appear {
    0% {
        opacity: 0;
        scale: 0.5;
    }

    100% {
        opacity: 1;
        scale: 1;
    }
}

@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;
    }
}

body.menu-open .layout {
    padding: 0 !important;
}

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

/* Menu xổ xuống */
.mobile-menu {
    display: none;

    position: fixed;
    inset: 0; /* tương đương top: 0; right: 0; bottom: 0; left: 0 */
    z-index: 1000;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.9);
    
    flex-direction: column;
    justify-content: center;
    align-items: center;

    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

.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;
}

.aboutMe{
    width: 100%;
    padding: 8rem 10rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.text{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.text span:first-child{
    font-family: "Caveat", cursive;
    font-size: 3rem;
    font-weight: 600;
    color: black;
}

.text span:nth-child(2){
    color: var(--title-color);
    max-width: 32rem;
}

.text a{
    text-decoration: none;
    color: black;
    font-weight: 550;
    cursor: pointer;
    transition: 0.5s all ease-in-out;
}

.text a:hover{
    transform: translateX(10px);
}

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

.avatar div{
    height: 20rem;
    aspect-ratio: 1/1;
    border: 2px solid black;
    border-radius: 28px;
    background-image: url('public/avatar.svg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

@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;
    }

    .aboutMe{
        padding: 8rem 8rem;
    }
}

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

    .introduce{
        padding: 7rem 6rem;
    }

    .project-images {
        flex-direction: column;
        align-items: center;
    }

    .footer{
        padding: 4rem 6rem;
    }

    .footer__content_1{
        gap: 4rem;
    }

    .content_1{
        padding: 7rem 6rem 3rem 6rem;
    }
    
    .project{
        padding: 0 6rem;
    }

    .aboutMe{
        padding: 8rem 6rem;
    }
}

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

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

    .f1{
        gap: 0rem;
    }

    .layout{
        padding: 0 4rem;
    }

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

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

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

    .content_1 span {
        font-size: 1.5rem;
    }

    .content_1{
        padding: 4rem;
    }

    .content_1 .icons {
        grid-template-columns: 1fr 1fr;
    }

    .text-wrapper span {
        font-size: 1rem;
    }

    .project{
        flex-direction: column;
        gap: 4rem;
        margin: 4rem 0;
    }

    .project_content{
        order: 1;
    }

    .image_container{
        order: 2;
    }

    .project{
        padding: 0 4rem;
    }

    .animation_appear_left{
        animation-range: entry 0 cover 30%;
    }

    .animation_appear_right{
        animation-range: entry 0 cover 30%;
    }

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

    .aboutMe{
        padding: 6rem 4rem;
    }

    .avatar div{
        height: 18rem;
    }

    .avatar{
        justify-content: start;
    }

    .aboutMe{
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .footer{
        padding: 4rem 2rem;
    }
    .layout{
        padding: 0 2rem;
    }
    .header__name{
        font-size: 1rem;
    }

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

    .title .title__name{
        font-size: 3rem;
    }

    .title .subtitle__name{
        max-width: 23rem;
    }

    .content_1 span {
        margin: 0;
    }

    .content_1{
        padding: 2rem 2rem;
        animation: none;
        animation-timeline: none;
        animation-range: none;
    }

    .content_1 .icons {
        grid-template-columns: 1fr;
    }

    .content_1 .icon{
        animation: appear linear;
        animation-timeline: view();
        animation-range: entry 0 cover 40%;
    }

    .project{
        padding: 0 2rem;
    }

    .project_content .wrapper h5{
        font-size: 0.9rem;
    }
    
    .project_content .wrapper h2{
        font-size: 1.5rem;
    }

    .tag{
        padding: 2px 8px;
        font-size: 0.7rem;
    }
    
    .project__description {
        font-size: 0.9rem;
    }

    .img_insta, .img_music{
        flex: 1
    }

    .sq_music, .sq_insta{
        display: none;
    }

    .animation_appear_left{
        animation-range: entry 0 cover 25%;
    }

    .animation_appear_right{
        animation-range: entry 0 cover 25%;
    }

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

    .avatar{
        display: none;
    }

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

@media(max-width: 400px){
    .title .title__name{
        font-size: 2rem;
    }

    .title .subtitle__name{
        max-width: 22rem;
        font-size: 0.875rem;
    }

    .text span:first-child{
        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;
}