/* --- FONT OPTIMIZATION --- */
@font-face {
    font-family: 'Montserrat';
    font-display: swap;
}
@font-face {
    font-family: 'Roboto';
    font-display: swap;
}

/* --- PERFORMANCE OPTIMIZATIONS --- */
img, video {
    decoding: async;
    display: block;
}

/* Reduce Cumulative Layout Shift (CLS) */
img, video, iframe {
    overflow-clip-margin: unset;
}

/* --- 1. CORE VARIABLES & RESET --- */
:root {
    --primary-color: #00e5ff; /* Cyan/Electric Blue */
    --secondary-color: #ff0055; /* Accent for Reels */
    --bg-dark: #0a0a0a;
    --bg-alt: #0f0f0f;
    --bg-card: #161616;
    --text-light: #ffffff;
    --text-gray: #b3b3b3;
    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --container-max: 1400px;
    --container-padding: 40px;
    --section-padding: 100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #16213e 100%);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--font-head); }
img { width: 100%; display: block; }

/* --- ANIMATIONS & KEYFRAMES --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    /* Preserve centering transform while animating vertical offset so Edge keeps translate offsets */
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-12px); }
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    }
    50% { 
        box-shadow: 0 0 25px rgba(0, 229, 255, 0.8), 0 0 40px rgba(0, 229, 255, 0.4);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes bounceIn {
    0% { 
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-fade { animation: fadeIn 0.8s ease-out; }
.animate-slide-up { animation: slideUp 0.8s ease-out; }
.animate-slide-left { animation: slideInLeft 0.8s ease-out; }
.animate-slide-right { animation: slideInRight 0.8s ease-out; }
.animate-scale { animation: scaleIn 0.8s ease-out; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-bounce { animation: bounceIn 0.8s ease-out; }

/* --- REUSABLE CONTAINER --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* --- 2. NAVIGATION --- */
nav {
    background: rgba(10, 10, 10, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1001;
    border-bottom: 1px solid #333;
}

.nav-wrapper {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: 1px; }
.logo span { color: var(--primary-color); }

.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-color); }
.menu-toggle { display: none; font-size: 2.2rem; cursor: pointer; color: #fff; transition: all 0.3s ease; z-index: 1002; padding: 10px 15px; }

/* --- 3. HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 var(--container-padding);
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,10,50,0.7) 0%, rgba(26,10,46,0.6) 50%, rgba(0,10,50,0.7) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,229,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    z-index: 3;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    animation: fadeIn 1s ease;
    font-weight: 800;
    letter-spacing: 2px;
    position: relative;
    z-index: 3;
}
.hero h1 span { color: var(--primary-color); }

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    font-weight: 300;
    max-width: 800px;
    position: relative;
    z-index: 3;
}

.hero > div {
    position: relative;
    z-index: 3;
}

.btn {
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary { background-color: var(--primary-color); color: #000; }
.btn-primary:hover { background-color: #fff; box-shadow: 0 0 20px var(--primary-color); transform: translateY(-2px); }
.btn-outline { border-color: var(--text-light); color: var(--text-light); }
.btn-outline:hover { background-color: var(--text-light); color: #000; transform: translateY(-2px); }

/* --- 4. SECTION STYLING --- */
.section { 
    padding: var(--section-padding) 0;
    position: relative;
}

.section:nth-child(odd) {
    background: linear-gradient(135deg, rgba(10,10,10,0.5) 0%, rgba(26,10,46,0.3) 50%, rgba(10,10,10,0.5) 100%);
}

.section:nth-child(even) {
    background: linear-gradient(135deg, rgba(15,15,15,0.5) 0%, rgba(22,33,62,0.2) 50%, rgba(15,15,15,0.5) 100%);
}

.section-wrapper {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-title { 
    text-align: center; 
    font-size: 2.8rem; 
    margin-bottom: 60px; 
    position: relative;
    font-weight: 800;
    letter-spacing: 1px;
    animation: slideUp 0.8s ease-out;
}
.section-title::after { 
    content: ''; 
    width: 80px; 
    height: 4px; 
    background: var(--primary-color); 
    display: block; 
    margin: 15px auto 0;
    border-radius: 2px;
    animation: scaleIn 0.8s ease-out 0.3s both;
}

/* --- 5. SERVICES GRID --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: linear-gradient(135deg, rgba(22,33,62,0.4) 0%, rgba(26,10,46,0.2) 100%);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 229, 255, 0.2);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,229,255,0.1), transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:hover { 
    transform: translateY(-12px); 
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1) 0%, rgba(26,10,46,0.3) 100%);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15), 0 0 30px rgba(0, 229, 255, 0.05);
}
.service-card i { 
    font-size: 3rem; 
    color: var(--primary-color); 
    margin-top: 15px;
    margin-left: 15px;
    margin-bottom: 20px;
    display: block;
    animation: float 3s ease-in-out infinite;
}
.service-card h3 { 
    margin-bottom: 12px; 
    font-size: 1.3rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--primary-color);
}
.service-card p { 
    color: var(--text-gray); 
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- TECHNICAL SKILLS --- */
.technical-skills {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 229, 255, 0.2);
}

.skills-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.skill-category {
    padding: 18px 15px;
    background: linear-gradient(135deg, rgba(22,33,62,0.4) 0%, rgba(26,10,46,0.2) 100%);
    border-radius: 8px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: slideUp 0.6s ease-out backwards;
    position: relative;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.skill-category:hover::before {
    left: 100%;
}

.skill-category:hover {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1) 0%, rgba(26,10,46,0.3) 100%);
    border-color: var(--primary-color);
    transform: translateY(-12px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.15), 0 0 30px rgba(0, 229, 255, 0.05);
}

.skill-category h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    color: var(--text-gray);
    padding: 5px 0 5px 15px;
    font-size: 0.85rem;
    position: relative;
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease-out backwards;
}

.skill-category li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.skill-category:hover li::before {
    opacity: 1;
    transform: translateX(3px);
}

.skill-category li:hover {
    color: var(--primary-color);
    padding-left: 20px;
    transform: translateX(2px);
}

/* Stagger animation for skill categories */
.skill-category:nth-child(1) { animation-delay: 0.1s; }
.skill-category:nth-child(2) { animation-delay: 0.15s; }
.skill-category:nth-child(3) { animation-delay: 0.2s; }
.skill-category:nth-child(4) { animation-delay: 0.25s; }
.skill-category:nth-child(5) { animation-delay: 0.3s; }
.skill-category:nth-child(6) { animation-delay: 0.35s; }

/* Stagger animation for list items */
.skill-category li:nth-child(1) { animation-delay: 0.2s; }
.skill-category li:nth-child(2) { animation-delay: 0.25s; }
.skill-category li:nth-child(3) { animation-delay: 0.3s; }

/* --- 6. MASONRY PORTFOLIO --- */
.portfolio-controls { 
    text-align: center; 
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-btn {
    background: none; 
    border: 2px solid var(--text-gray); 
    color: var(--text-light);
    padding: 10px 24px; 
    cursor: pointer; 
    border-radius: 25px; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    font-size: 0.9rem;
    animation: slideUp 0.6s ease-out backwards;
}

.filter-btn:nth-child(1) { animation-delay: 0s; }
.filter-btn:nth-child(2) { animation-delay: 0.1s; }
.filter-btn:nth-child(3) { animation-delay: 0.2s; }
.filter-btn:nth-child(4) { animation-delay: 0.3s; }
.filter-btn:nth-child(5) { animation-delay: 0.4s; }
.filter-btn:nth-child(6) { animation-delay: 0.5s; }

.filter-btn.active, .filter-btn:hover { 
    background: var(--primary-color); 
    color: #000; 
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.3);
}

/* Masonry Layout for Mixed Sizes */
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    /* prevent intrinsic min-height from creating overlap in grid */
    grid-auto-rows: minmax(0, auto);
    align-items: start; /* ensure items align to top and don't overlap */
    align-content: start;
}

/* Reel Videos - Narrow Vertical Layout */
.portfolio-item.reels {
    grid-column: span 1;
    min-width: 180px;
    max-width: 200px;
    justify-self: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(30, 10, 50, 0.6) 100%);
    border: 2px solid var(--secondary-color);
}

.portfolio-item.reels::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 0, 85, 0.05) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Photos - Standard Grid */
.portfolio-item.fb,
.portfolio-item.photo {
    grid-column: span 1;
    min-width: 280px;
    background: linear-gradient(135deg, rgba(34,34,34,0.8) 0%, rgba(22,33,62,0.6) 100%);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.portfolio-item.fb::before,
.portfolio-item.photo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.03) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Graphics & 3D - Standard Grid */
.portfolio-item.graphic,
.portfolio-item.video,
.portfolio-item.3d {
    grid-column: span 1;
    min-width: 280px;
}

.portfolio-item {
    background: linear-gradient(135deg, rgba(34,34,34,0.8) 0%, rgba(22,33,62,0.6) 100%);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    aspect-ratio: 1;
    border: 1px solid rgba(0, 229, 255, 0.1);
    animation: scaleIn 0.6s ease-out backwards;
    transition: all 0.3s ease;
    align-self: start;
    z-index: 1;
    min-height: 0;
}

/* Reel Aspect Ratio - Vertical */
.portfolio-item.reels {
    aspect-ratio: 9 / 16;
    border: 3px solid var(--secondary-color);
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.15s; }
.portfolio-item:nth-child(3) { animation-delay: 0.2s; }
.portfolio-item:nth-child(4) { animation-delay: 0.25s; }
.portfolio-item:nth-child(5) { animation-delay: 0.3s; }
.portfolio-item:nth-child(6) { animation-delay: 0.35s; }

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
    position: relative;
    z-index: 1;
}

.portfolio-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
    display: block;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

/* Ensure media don't cause unexpected overflow */
.portfolio-item img, .portfolio-item video {
    display: block;
    max-width: 100%;
    height: auto;
}

.portfolio-item:hover img { 
    transform: scale(1.08); 
    opacity: 0.3;
}

.portfolio-item.reels:hover video {
    transform: scale(1.08);
    opacity: 1;
}

/* Hover Info */
.portfolio-info {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    text-align: center; 
    opacity: 0; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    width: 90%; 
    pointer-events: none;
    z-index: 2;
}
.portfolio-item:hover .portfolio-info { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}
.portfolio-info h3 { 
    font-size: 1.2rem; 
    margin-bottom: 5px;
    font-weight: 700;
    animation: slideUp 0.4s ease-out;
}
.portfolio-info p {
    color: var(--text-gray);
    font-size: 0.9rem;
    animation: slideUp 0.4s ease-out 0.1s backwards;
}

/* SPECIFIC: REELS (Vertical Video) Styling */
.portfolio-item.reel {
    border: none;
    aspect-ratio: 9/16;
}

.portfolio-item.reel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    animation: none;
    pointer-events: none;
}

.portfolio-item.reel img { 
    object-fit: cover;
}
.play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    font-size: 2.2rem;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 12px rgba(0,0,0,0.8);
    z-index: 2;
    animation: float 2s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.18s ease;
    border-radius: 50%;
    pointer-events: auto;
}

.portfolio-item.reels:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.2);
    color: var(--primary-color);
    text-shadow: 0 0 25px rgba(255, 0, 85, 0.8);
}

/* Reel-specific hover effect */
.portfolio-item.reels:hover {
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.4), inset 0 0 20px rgba(255, 0, 85, 0.1);
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Photo-specific hover effect */
.portfolio-item.fb:hover,
.portfolio-item.photo:hover {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* --- PORTFOLIO SHOW MORE --- */
.portfolio-item.hidden {
    display: none;
}

.see-more-btn {
    grid-column: 1 / -1;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary-color), #00a8cc);
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.see-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.3);
}

.see-more-btn:active {
    transform: translateY(-1px);
}

/* --- 6A. VIDEO PLAYLIST GALLERY --- */
.playlist-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    animation: slideUp 0.6s ease-out backwards;
}

.playlist-tab-btn {
    padding: 12px 28px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.playlist-tab-btn:nth-child(1) { animation-delay: 0.1s; }
.playlist-tab-btn:nth-child(2) { animation-delay: 0.15s; }
.playlist-tab-btn:nth-child(3) { animation-delay: 0.2s; }

.playlist-tab-btn:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.playlist-tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #00a8cc);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.3);
    transform: scale(1.05);
}

.video-playlist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.playlist-item {
    position: relative;
    cursor: pointer;
    aspect-ratio: 9 / 16;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--secondary-color);
    background: #000;
    animation: scaleIn 0.6s ease-out backwards;
    transition: all 0.3s ease;
}

.playlist-item:nth-child(1) { animation-delay: 0.1s; }
.playlist-item:nth-child(2) { animation-delay: 0.15s; }
.playlist-item:nth-child(3) { animation-delay: 0.2s; }
.playlist-item:nth-child(4) { animation-delay: 0.25s; }
.playlist-item:nth-child(5) { animation-delay: 0.3s; }
.playlist-item:nth-child(6) { animation-delay: 0.35s; }
.playlist-item:nth-child(7) { animation-delay: 0.4s; }
.playlist-item:nth-child(8) { animation-delay: 0.45s; }

.playlist-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #1a1a1a;
}

.playlist-item video.loading {
    background-image: linear-gradient(45deg, #2a2a2a 25%, #1a1a1a 25%, #1a1a1a 50%, #2a2a2a 50%, #2a2a2a 75%, #1a1a1a 75%, #1a1a1a);
    background-size: 40px 40px;
    animation: shimmer 2s infinite ease-in-out;
}

/* Show placeholder while video loads */
.playlist-item video::-webkit-media-controls {
    display: none;
}

/* Lazy load video playlists */
.video-playlist {
    loading: lazy;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 0, 85, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    z-index: 3;
    transition: all 0.3s ease;
}

.playlist-item:hover .play-overlay {
    background: var(--secondary-color);
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.6);
}

.playlist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(255, 0, 85, 0.3);
    border-color: var(--primary-color);
}

/* Highlight grid videos use widescreen (16:9) aspect ratio */
#highlight-grid .playlist-item {
    aspect-ratio: 16 / 9;
}

/* Make Highlight grid bigger */
#highlight-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
}

/* Make Reel grid bigger - 5 videos per row */
#reel-grid {
    grid-template-columns: repeat(5, 1fr) !important;
}

/* --- 6B. IMAGE GALLERY --- */
.gallery-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    animation: slideUp 0.6s ease-out backwards;
}

.gallery-tab-btn {
    padding: 10px 24px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-tab-btn:nth-child(1) { animation-delay: 0.1s; }
.gallery-tab-btn:nth-child(2) { animation-delay: 0.15s; }

.gallery-tab-btn:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.gallery-tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #00a8cc);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.3);
    transform: scale(1.05);
}

/* --- 6B. IMAGE GALLERY --- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.2);
    background: linear-gradient(135deg, rgba(34,34,34,0.8) 0%, rgba(22,33,62,0.6) 100%);
    animation: scaleIn 0.6s ease-out backwards;
    transition: all 0.3s ease;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.4s ease;
    decoding: async;
}

/* Make all gallery grid items uniform squares */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: start;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    loading: lazy;
}

/* Gallery image hover/transition consistent with page */
.gallery-grid img {
    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
}
.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

/* Hide images beyond 15th initially */
.gallery-grid img:nth-child(n+16) {
    display: none;
}
.gallery-grid.expanded img {
    display: block;
}

/* Show More Button */
.show-more-gallery-btn {
    grid-column: 1 / -1;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--primary-color), #00a8cc);
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    justify-self: center;
    width: fit-content;
    display: block;
}
.show-more-gallery-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.3);
}

/* Hide videos beyond 10th initially in playlists */
.video-playlist .playlist-item:nth-child(n+11) {
    display: none;
}
.video-playlist.expanded .playlist-item {
    display: block;
}

/* Show More Button for Video Playlists */
.show-more-video-btn {
    grid-column: 1 / -1;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--secondary-color), rgba(255, 0, 85, 0.8));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    justify-self: center;
    width: fit-content;
    display: block;
}
.show-more-video-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 0, 85, 0.3);
}

/* Lightbox: fade+scale with contained image (prevents stretching) */
#work-lightbox {
    display: flex;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    background: rgba(0,0,0,0);
    transition: opacity 0.35s ease, background-color 0.35s ease;
}
#work-lightbox.open {
    opacity: 1;
    pointer-events: auto;
    background: rgba(0,0,0,0.85);
}

#lightbox-img {
    max-width: 92%;
    max-height: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    border-radius: 8px;
}
#work-lightbox.open #lightbox-img {
    transform: scale(1);
    opacity: 1;
}

/* Lightbox video styling + transitions */
#lightbox-video {
    max-width: 92%;
    max-height: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    border-radius: 8px;
    display: none;
    z-index: 2000;
    background: #000;
}
#work-lightbox.open #lightbox-video {
    transform: scale(1);
    opacity: 1;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.08);
    opacity: 0.85;
}

.gallery-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.2);
}

/* --- 7. LIGHTBOX (ZOOM) --- */
.lightbox {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0);
    justify-content: center; 
    align-items: center;
    backdrop-filter: none;
    overflow: hidden;
}
.lightbox-content { 
    max-width: 90vw; 
    max-height: 90vh; 
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    position: relative;
    z-index: 2000;
}

#lightbox-video {
    background: #000;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: none;
    opacity: 1;
    animation: none !important;
    position: relative;
    z-index: 2000;
}

#lightbox-img {
    opacity: 1;
    position: relative;
    z-index: 2000;
}

#lightbox-video::-webkit-media-controls {
    background-color: transparent;
}

#lightbox-video::-moz-media-controls-panel {
    background-color: transparent;
}

#lightbox-video::-webkit-media-controls-timeline {
    background-color: rgba(255, 255, 255, 0.3);
}
.close-lightbox { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    color: #fff; 
    font-size: 40px; 
    cursor: pointer;
    transition: 0.3s;
    pointer-events: auto;
    z-index: 2001;
}
.close-lightbox:hover { color: var(--primary-color); }

/* --- 8. ABOUT & SKILLS --- */
.about-container { 
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    gap: 60px;
}
.about-img { 
    flex: 1; 
    min-width: 300px;
    animation: slideInLeft 0.8s ease-out;
}
.about-img img { 
    border-radius: 12px; 
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.2);
    transition: transform 0.4s ease;
}

/* About image decorative background */
.about-graphic { position: relative; display: inline-block; max-width: 380px; width: 100%; }
.about-graphic .blob {
    position: absolute;
    left: -10%;
    top: -18%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 30% 30%, rgba(0,229,255,0.06), rgba(0,0,0,0.0) 45%), linear-gradient(135deg, rgba(0,16,24,0.6), rgba(10,10,12,0.35));
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
    filter: blur(12px);
    z-index: 0;
    pointer-events: none;
}
.about-graphic .dots {
    position: absolute;
    left: -6%;
    bottom: -8%;
    width: 160px;
    height: 160px;
    background-image: radial-gradient(#00ffd0 2px, transparent 2px);
    background-size: 16px 16px;
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}
.about-graphic img { position: relative; z-index: 1; display: block; border-radius: 12px; border: 3px solid rgba(0,0,0,0.25); }
@media (max-width: 768px) {
    .about-graphic .blob { left: -20%; top: -30%; width: 260px; height: 260px; filter: blur(8px); }
    .about-graphic .dots { left: -10%; bottom: -6%; width: 100px; height: 100px; background-size: 12px 12px; }
    .about-graphic { max-width: 280px; }
}
.about-img:hover img {
    transform: scale(1.05);
}
.about-text { 
    flex: 1; 
    min-width: 300px;
    animation: slideInRight 0.8s ease-out;
}
.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #ff0055);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-gray);
    animation: fadeIn 0.8s ease-out backwards;
}
.about-text p:nth-of-type(1) { animation-delay: 0.2s; }
.about-text p:nth-of-type(2) { animation-delay: 0.3s; }

.skills-category { 
    margin: 30px 0 15px; 
    font-weight: 700; 
    color: #fff; 
    text-transform: uppercase; 
    font-size: 0.9rem; 
    letter-spacing: 1.5px;
}
.skills-list { 
    display: flex; 
    gap: 12px; 
    flex-wrap: wrap;
}
.skill-tag { 
    background: rgba(0, 229, 255, 0.1);
    padding: 8px 16px; 
    border-radius: 6px; 
    font-size: 0.85rem; 
    color: var(--primary-color); 
    border: 1px solid rgba(0, 229, 255, 0.3);
    transition: all 0.3s;
    animation: slideUp 0.6s ease-out backwards;
}

.skill-tag:nth-child(1) { animation-delay: 0.4s; }
.skill-tag:nth-child(2) { animation-delay: 0.45s; }
.skill-tag:nth-child(3) { animation-delay: 0.5s; }
.skill-tag:nth-child(4) { animation-delay: 0.55s; }
.skill-tag:nth-child(5) { animation-delay: 0.6s; }
.skill-tag:nth-child(6) { animation-delay: 0.65s; }
.skill-tag:nth-child(7) { animation-delay: 0.7s; }
.skill-tag:nth-child(8) { animation-delay: 0.75s; }
.skill-tag:nth-child(9) { animation-delay: 0.8s; }
.skill-tag:nth-child(10) { animation-delay: 0.85s; }
.skill-tag:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--primary-color);
}

/* --- 9. CONTACT FORM --- */
.contact-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 50px;
}
.contact-info, .contact-form { 
    flex: 1; 
    min-width: 300px;
}

.contact-info {
    animation: slideInLeft 0.8s ease-out;
}

.contact-form {
    animation: slideInRight 0.8s ease-out;
}
.contact-item { 
    margin-bottom: 25px; 
    display: flex; 
    align-items: flex-start; 
    gap: 15px;
    animation: slideUp 0.6s ease-out backwards;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }

.contact-item i { 
    width: 50px; 
    height: 50px; 
    background: rgba(0, 229, 255, 0.1);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--primary-color);
    flex-shrink: 0;
    border: 1px solid rgba(0, 229, 255, 0.2);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.contact-item:hover i {
    background: rgba(0, 229, 255, 0.2);
    transform: scale(1.1);
}
.contact-item h4 {
    font-weight: 700;
    margin-bottom: 5px;
}
.contact-item p {
    color: var(--text-gray);
}

.contact-form { 
    background: linear-gradient(135deg, rgba(22,33,62,0.4) 0%, rgba(26,10,46,0.2) 100%);
    padding: 40px; 
    border-radius: 12px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    backdrop-filter: blur(10px);
}

.form-group { 
    margin-bottom: 20px;
    animation: slideUp 0.6s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.2s; }
.form-group:nth-child(2) { animation-delay: 0.25s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.35s; }
input, textarea, select { 
    width: 100%; 
    padding: 14px; 
    background: #0a0a0a; 
    border: 1px solid #333; 
    color: #fff; 
    border-radius: 6px; 
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

select option {
    background: #0a0a0a;
    color: #fff;
    padding: 10px;
}

select option:checked {
    background: linear-gradient(#0a0a0a, #0a0a0a);
    color: #fff;
}

input:focus, textarea:focus, select:focus { 
    border-color: var(--primary-color); 
    outline: none;
    background: rgba(0, 229, 255, 0.03);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.1), inset 0 0 10px rgba(0, 229, 255, 0.05);
    transform: translateY(-2px);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- FOOTER --- */
footer { 
    background: linear-gradient(135deg, #000 0%, rgba(26,10,46,0.3) 100%);
    padding: 50px var(--container-padding) 30px;
    text-align: center; 
    border-top: 1px solid rgba(0, 229, 255, 0.2);
}
footer p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 20px;
    animation: fadeIn 0.8s ease-out 0.3s backwards;
}
.social-icons { 
    margin-bottom: 20px;
}
.social-icons a { 
    display: inline-block; 
    width: 45px; 
    height: 45px; 
    line-height: 45px; 
    background: linear-gradient(135deg, #222 0%, rgba(22,33,62,0.5) 100%);
    color: #fff; 
    margin: 0 8px; 
    border-radius: 50%; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 229, 255, 0.2);
    animation: slideUp 0.6s ease-out backwards;
}

.social-icons a:nth-child(1) { animation-delay: 0.2s; }
.social-icons a:nth-child(2) { animation-delay: 0.25s; }
.social-icons a:nth-child(3) { animation-delay: 0.3s; }

.social-icons a:hover { 
    background: linear-gradient(135deg, var(--primary-color), rgba(0, 229, 255, 0.8));
    transform: translateY(-8px) scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.3);
}

/* Create backdrop overlay for mobile menu */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: none;
}

.nav-overlay.active {
    display: block;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    :root {
        --container-padding: 30px;
        --section-padding: 80px;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .portfolio-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .about-container {
        gap: 40px;
    }
    #reel-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    #highlight-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .show-more-gallery-btn,
    .show-more-video-btn {
        padding: 12px 35px;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 20px;
        --section-padding: 60px;
    }
    
    .nav-wrapper {
        padding: 15px var(--container-padding);
    }

    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    .section-title { 
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-container { 
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .portfolio-item {
        aspect-ratio: auto;
    }

    .portfolio-item.reels {
        min-width: 150px;
        max-width: 170px;
    }

    .portfolio-item.reel {
        aspect-ratio: 9/16;
    }

    .nav-links { 
        display: none; 
        position: fixed; 
        top: 60px; 
        left: 0;
        width: 100%; 
        background: linear-gradient(135deg, #0a0a0a 0%, rgba(26,10,46,0.9) 100%);
        flex-direction: column; 
        padding: 20px 0; 
        border-bottom: 1px solid rgba(0, 229, 255, 0.2);
        z-index: 1000;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        animation: slideDown 0.3s ease-out;
    }
    .nav-links li { padding: 12px var(--container-padding); border-bottom: 1px solid rgba(0, 229, 255, 0.1); }
    .nav-links li a { display: block; padding: 10px 0; color: #fff; transition: all 0.3s ease; }
    .nav-links li a:hover { color: var(--primary-color); padding-left: 10px; }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }

    .about-container {
        flex-direction: column;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-form {
        padding: 30px 20px;
    }

    #reel-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    #highlight-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    #motion3d-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .skills-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .skill-category {
        padding: 16px 14px;
    }

    .skill-category li {
        padding: 5px 0 5px 18px;
        font-size: 0.8rem;
    }

    .show-more-gallery-btn,
    .show-more-video-btn {
        padding: 12px 32px;
        font-size: 0.9rem;
        margin-top: 18px;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 15px;
    }

    .hero h1 { 
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    .hero p { 
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .btn {
        padding: 12px 25px;
        margin: 8px 5px;
        font-size: 0.8rem;
    }

    .section-title { 
        font-size: 1.5rem;
    }

    .service-card {
        padding: 25px 20px;
    }

    .portfolio-controls {
        gap: 8px;
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .contact-item {
        margin-bottom: 20px;
    }

    #reel-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    #highlight-grid {
        grid-template-columns: 1fr !important;
    }
    #motion3d-grid {
        grid-template-columns: 1fr !important;
    }
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }

    /* Mobile video playlist optimization */
    .video-playlist {
        gap: 8px;
    }

    .playlist-item video {
        min-height: 150px;
    }

    .skills-columns {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .skill-category {
        padding: 14px 12px;
    }

    .skill-category h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .skill-category li {
        padding: 4px 0 4px 16px;
        font-size: 0.75rem;
    }

    .show-more-gallery-btn,
    .show-more-video-btn {
        padding: 11px 28px;
        font-size: 0.85rem;
        margin-top: 16px;
        width: 100%;
        max-width: 280px;
    }
}

.contact-form {
    padding: 25px 15px;
}
