:root {
    --primary-color: #ffffff;
    --bg-color: #050505;
    --accent-color: #ff3366;
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--primary-color);
    overflow-x: hidden;
}

/* Video Background */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05); /* Slight scale to avoid edges during parallax */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(5,5,5,0.8) 100%);
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem 4rem;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.8) 0%, rgba(5, 5, 5, 0.1) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.navbar.scrolled {
    padding: 1.2rem 4rem;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 110;
}

.navbar-logo img {
    height: 48px;
    width: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.navbar-logo:hover img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 8px rgba(255, 51, 102, 0.3));
}

.menu-toggle {
    display: none;
}

.contact-links {
    display: flex;
    flex-direction: row;
    gap: 2.2rem;
    align-items: center;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.contact-link:hover {
    opacity: 1;
    transform: translateY(-3px);
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

.contact-link:hover::after {
    width: 100%;
}

/* Main Content */
.content {
    position: relative;
    z-index: 1;
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 0 0 6rem 0;
}

.hero-title {
    font-family: 'Protest Riot', sans-serif;
    font-size: 8rem;
    font-weight: 400;
    letter-spacing: 12px;
    margin-bottom: 1rem;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8), 0 15px 40px rgba(0,0,0,0.6);
    background: linear-gradient(135deg, #ffffff 0%, #dddddd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards 0.8s;
}

.scroll-down {
    margin-top: 4rem;
    padding: 1rem 2.5rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 40px;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    transition: all 0.4s ease;
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards 1.1s;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.05);
}

.scroll-down:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Portfolio Section */
.portfolio-section {
    padding: 8rem 8%;
    background-color: var(--bg-color);
    min-height: 100vh;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 5rem;
    text-align: center;
    letter-spacing: 2px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

.gallery-item {
    aspect-ratio: 4/5;
    background-color: #111;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
}

.gallery-item::after {
    content: 'View Project';
    position: absolute;
    bottom: 30px;
    left: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 3;
}

.gallery-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Gradients for placeholders */
.placeholder-1 { background: linear-gradient(135deg, #ff3366, #ff9933); }
.placeholder-2 { background: linear-gradient(135deg, #33ccff, #3366ff); }
.placeholder-3 { background: linear-gradient(135deg, #cc33ff, #ff33cc); }
.placeholder-4 { background: linear-gradient(135deg, #33ff99, #33ccff); }
.placeholder-5 { background: linear-gradient(135deg, #ff3333, #990033); }
.placeholder-6 { background: linear-gradient(135deg, #ffcc00, #ff6600); }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .hero-title { font-size: 5rem; }
    .hero-subtitle { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    /* Prevent scroll when mobile menu is open */
    body.no-scroll {
        overflow: hidden;
    }

    .navbar {
        padding: 1.2rem 2rem;
    }
    .navbar.scrolled {
        padding: 0.9rem 2rem;
    }
    .navbar-logo {
        z-index: 110;
    }
    .navbar-logo img {
        height: 38px;
    }

    /* Menu Toggle Button */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 110;
    }

    .menu-toggle .bar {
        height: 3px;
        width: 100%;
        background-color: var(--primary-color);
        border-radius: 2px;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    /* Animate Hamburger to X */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Slide-out Mobile Menu Drawer */
    .contact-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: right 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 105;
        padding: 2rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .contact-links.active {
        right: 0;
    }

    .contact-link {
        font-size: 1.4rem;
        gap: 1.2rem;
        opacity: 0.9;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    /* Stagger fade in effect for menu links when active */
    .contact-links.active .contact-link {
        opacity: 1;
        transform: translateY(0);
    }

    .contact-links.active .contact-link:nth-child(1) { transition-delay: 0.1s; }
    .contact-links.active .contact-link:nth-child(2) { transition-delay: 0.2s; }
    .contact-links.active .contact-link:nth-child(3) { transition-delay: 0.3s; }
    .contact-links.active .contact-link:nth-child(4) { transition-delay: 0.4s; }

    .contact-link span {
        display: inline; /* Keep span visible in drawer menu */
    }

    .contact-link::after {
        bottom: -6px;
        height: 3px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 0 0 4rem 0;
        align-items: center;
        text-align: center;
    }
    .hero-subtitle { font-size: 1.1rem; letter-spacing: 3px; }
    .gallery { grid-template-columns: 1fr; }
    .portfolio-section { padding: 4rem 5%; }
}
