body {
    background-color: #050505; /* Black tinh khiết giúp hình ảnh/video nổi bật hơn */
    color: #e4e4e7;
    overflow-x: hidden;
}

/* ------------------------------------------------
   MOBILE MENU
------------------------------------------------- */
#mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(9,9,11,0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, visibility 0.6s;
    pointer-events: none;
}
#mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}
#mobile-menu a {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    color: #fff;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
    transition: all 0.4s ease;
}
#mobile-menu a:hover, #mobile-menu a.active-link {
    opacity: 1;
    letter-spacing: 0.3em;
    color: #E35B3B;
}
#mobile-menu-close {
    position: absolute;
    top: 32px;
    right: 32px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 10px;
    transition: all 0.3s;
}
#mobile-menu-close:hover { 
    opacity: 1; 
    transform: rotate(90deg);
}

/* Tăng cường diện tích bấm cho menu button trên mobile */
#menu-btn {
    position: relative;
    z-index: 70;
    transition: all 0.3s ease;
}
#menu-btn:active {
    transform: scale(0.9);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Typography Custom Classes */
.heading-primary {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
}
.subheading {
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 300;
}

/* Reveal Animation Khung Hình */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hiệu ứng Ken Burns (Zoom chậm nghệ thuật như video) */
.cinematic-bg {
    animation: slowZoom 25s ease-in-out infinite alternate;
}
@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* Fix: bg-fixed không hoạt động trên iOS/mobile */
@media (max-width: 768px) {
    .cinematic-bg {
        background-attachment: scroll !important;
    }
}

/* -------------------------------------
   ĐỒNG BỘ HIỆU ỨNG TRỎ CHUỘT
----------------------------------------*/

/* Đồng bộ Link Hover (Navigation & Text-Filters) */
.link-hover {
    position: relative;
    color: #d4d4d8; /* Chỉnh sáng màu chữ lên mã kẽm trắng để nổi luôn trên kính mờ */
    transition: color 0.4s ease;
    cursor: pointer;
}
.link-hover:hover {
    color: #ffffff;
}
.link-hover::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 1px;
    background: #ffffff;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-hover:hover::after, .link-hover.active::after {
    width: 100%;
}
.link-hover.active {
    color: #ffffff;
}

/* Đồng bộ Button (Nút bấm sang trọng Fill trắng trượt) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 1rem 2.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.75rem; /* text-xs */
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #ffffff;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}
.btn-primary:hover::before {
    left: 0;
}
.btn-primary:hover {
    color: #000000;
    border-color: #ffffff;
}
.btn-primary span, .btn-primary i {
    position: relative;
    z-index: 1;
}
.btn-primary i {
    transition: transform 0.4s ease;
}
.btn-primary:hover i.fa-play {
    transform: scale(1.1);
}
.btn-primary:hover i.fa-arrow-right {
    transform: translateX(6px);
}

/* Hover Hiệu Ứng Cho Thẻ Dự án (Card) */
.project-card {
    overflow: hidden;
    position: relative;
}
/* Đồng bộ ảnh mặc định hơi giảm màu, hover là bùng sáng với zoom */
.project-card img {
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
    filter: grayscale(100%) opacity(70%);
}
.project-card:hover img {
    transform: scale(1.08);
    filter: grayscale(0%) opacity(100%);
}
.project-card .overlay {
    background: linear-gradient(to top, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.4) 50%, transparent 100%);
    opacity: 0; /* Hiện rõ luôn hay làm mờ tùy ý */
    transition: opacity 0.7s ease;
}
.project-card:hover .overlay {
    opacity: 1;
}

/* Glassmorphism Navigation CHUẨN APPLE */
.nav-glass {
    background: rgba(12, 12, 14, 0.75); /* Tối hơn, đảm bảo che tốt nền phức tạp */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Kẻ viền dưới cực rõ lớp men */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Bóng đổ 3D nâng thanh Menu bồng lên */
}

/* Thanh Cuộn Siêu Mỏng Nghệ Thuật */
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: #050505; 
}
::-webkit-scrollbar-thumb {
    background: #27272a; 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #52525b; 
}

/* ------------------------------------------------
   MOBILE RESPONSIVE OVERRIDES
------------------------------------------------- */
@media (max-width: 767px) {
    /* Touch-friendly tap targets */
    a, button { min-height: 44px; min-width: 44px; }

    /* Giảm padding section trên mobile */
    section { scroll-margin-top: 70px; }

    /* Hero section: bỏ bg-fixed để tránh lỗi iOS */
    #home > div:first-child {
        background-attachment: scroll !important;
    }

    /* Video controls dễ dùng hơn trên mobile */
    video {
        -webkit-playsinline: true;
    }

    /* Lightbox trên mobile */
    #lightbox img {
        max-width: 95vw;
        max-height: 70vh;
    }
    #lightbox-prev, #lightbox-next {
        font-size: 1.2rem;
        padding: 15px;
    }

    /* Tối ưu typography cho mobile */
    h1 { font-size: 2.5rem !important; line-height: 1.2 !important; }
    h2 { font-size: 2rem !important; }
    
    /* Đảm bảo không có overflow ngang */
    .container, .max-w-7xl, .max-w-6xl, .max-w-5xl {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Navbar mobile tweaks */
    #navbar {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Đảm bảo hình ảnh mượt mà khi load */
img {
    font-style: italic;
    background-repeat: no-repeat;
    background-size: cover;
    shape-margin: 0.75rem;
}
