/* Add these styles to the top of your file to override existing theme */

:root {
    --dark-bg: #121212;
    --primary-text: #EAEAEA;
    --secondary-text: #A0A0A0;
    --header-bg: #1A1A1A;
    --accent-color: #007BFF;
    --card-bg: #1E1E1E;
}

body {
    background-color: var(--dark-bg);
    color: var(--primary-text);
}

.main-header {
    padding: 15px 0; /* Reduced padding */
    background-color: var(--header-bg);
    border-bottom: 1px solid #333;
    transition: transform 0.3s ease-in-out;
}

.logo, .main-nav a {
    color: var(--primary-text);
}

.main-nav a.active, .main-nav a:hover {
    color: var(--accent-color);
}

/* ======== GLOBAL STYLES & RESET ======== */
:root {
    --bg-dark: #121212;
    --text-light: #e0e0e0;
    --text-lighter: #ffffff;
    --accent-blue: #007bff; /* Primary accent color */
    --accent-hover: #0056b3;
    --border-grey: #333333;
    --card-bg: #1a1a1a;
    --overlay-bg: rgba(0, 0, 0, 0.7);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; /* Inter for modern feel, system fonts for Helvetica-like fallback */
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll issues */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), /* Dark overlay for better blending */
        url('https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?auto=format&fit=crop&q=80&w=2670&ixlib=rb-4.0.3'); /* Video editing equipment background */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}

.container {
    max-width: 1280px; /* Slightly wider for premium feel */
    margin: 0 auto;
    padding: 0 30px; /* More padding */
}

a {
    color: var(--text-lighter);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-blue);
}

h1, h2, h3, .logo {
    color: var(--text-lighter);
    margin-bottom: 15px;
    font-weight: 700; /* Bold for impact */
}

h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 25px; }
h2.section-title { font-size: 2.8rem; text-align: center; margin-bottom: 60px; position: relative; }
h2.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-blue);
    margin: 20px auto 0 auto;
}
h3 { font-size: 1.8rem; }

/* ======== HEADER & NAVIGATION ======== */
.main-header {
    padding: 15px 0; /* Reduced padding */
    border-bottom: 1px solid var(--border-grey);
    background-color: rgba(18, 18, 18, 0.85); /* Slightly transparent background */
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px); /* Frosted glass effect */
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 35px; /* More spacing */
    position: relative; /* For dropdown */
}

.main-nav a {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 5px 0;
}

.main-nav a.active, .main-nav a:hover {
    color: var(--accent-blue);
    position: relative;
}
.main-nav a.active::after, .main-nav a:hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background-color: var(--accent-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.main-nav a.active::after { transform: scaleX(1); }
.main-nav a:hover::after { transform: scaleX(1); }

/* Dropdown specific styles */
.dropdown {
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.dropbtn {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 5px 0;
    line-height: 1.0; /* Match the line-height of other navigation items */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    left: -20px; /* Adjust position */
    padding: 10px 0;
    border-radius: 5px;
    border: 1px solid var(--border-grey);
}

.dropdown-content a {
    color: var(--text-light);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 1rem;
}

.dropdown-content a:hover {
    background-color: var(--bg-dark);
    color: var(--accent-blue);
}

.dropdown:hover .dropdown-content {
    display: block;
}


/* ======== HERO REEL SECTION ======== */
#hero-reel {
    position: relative; /* Needed for positioning the canvas */
    padding: 80px 0 60px;
    text-align: center;
    min-height: 85vh; /* Reduced from 100vh */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background-image: none;
    background-color: #121212; /* Slightly grey background */
}

.hero-content {
    position: relative;
    z-index: 2; /* Ensure text is above video if video has its own Z-index */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.hero-content h1 {
    font-size: 4.8rem;
    margin-bottom: 20px;
    color: var(--primary-text);
    text-shadow: none; /* Remove previous text shadow */
    min-height: 80px; /* Fixed height to prevent jumping */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Typing Effect Underline Fix --- */

/* Remove the old border-based underline */
.hero-content h1 .typing-effect {
    border-bottom: none; 
}

/* Create a new underline using a pseudo-element */
.hero-content h1 .typing-effect {
    position: relative;
    /* Add padding to make space for the underline */
    padding-bottom: 8px; 
}

.hero-content h1 .typing-effect::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; /* Match the width of the text */
    height: 4px; /* Thickness of the underline */
    background-color: var(--accent-color);
}

.tagline {
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto 50px auto;
    color: var(--secondary-text);
    text-shadow: 0 0 8px rgba(0,0,0,0.4);
}

.main-reel-wrapper {
    width: 100%;
    max-width: 400px; /* Fixed width */
    margin: 2rem auto;
    aspect-ratio: 9/16; /* Fixed 9:16 aspect ratio */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.main-reel-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* This will crop to fit the 9:16 container */
    border-radius: 12px;
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .hero-content h1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 2.5rem;
        min-height: 120px;
        text-align: center;
    }
    
    .hero-content h1 span {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .hero-content h1 .typing-effect {
        display: block;
        width: auto;
        margin: 0 auto;
        text-align: center;
    }
    
    .hero-content h1 .typing-effect::after {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }
    
    .main-reel-wrapper {
        width: 90%;
        max-width: 300px;
    }

    #hero-reel {
        min-height: 70vh; /* Further reduce height on mobile */
        padding: 60px 0 40px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ======== FEATURED PROJECTS GRID SECTION ======== */
#featured-projects {
    padding: 100px 0;
    background-color: rgba(26, 26, 26, 0.9); /* Slightly more opaque background */
    border-top: 1px solid var(--border-grey);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly larger min-width */
    gap: 40px; /* More spacing */
}

.project-card {
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-radius: 12px; /* Rounded corners */
    overflow: visible; /* Changed from hidden to visible to allow scaling */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: 1px solid rgba(255,255,255,0.05); /* Subtle inner border */
    position: relative;
    display: block; /* Make the whole card clickable */
    transform: scale(1); /* Explicit initial scale */
}

.project-card:hover {
    transform: scale(1.08) !important; /* More pronounced scaling */
    box-shadow: 0 15px 40px rgba(0,0,0,0.6) !important;
    z-index: 10 !important;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px; /* Add rounded corners to the image container */
}

.card-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    border-radius: 12px; /* Add rounded corners to the image itself */
}

.project-card:hover .card-image-wrapper img {
    transform: scale(1.1); /* Zoom effect on hover */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: center;
    padding: 20px;
}

.project-card:hover .overlay {
    opacity: 1;
}

.overlay h3 {
    margin-bottom: 10px;
    font-size: 1.6rem;
    color: var(--text-lighter);
}

.overlay p {
    font-size: 1rem;
    color: var(--text-light);
}

/* ======== CALL TO ACTION / QUOTE SECTION ======== */
#cta-quote {
    padding: 80px 0;
    text-align: center;
    background-color: #121212; /* Slightly grey background */
    position: relative; /* For starfield positioning */
    overflow: hidden; /* Contain the starfield */
}

#quote-starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#cta-quote .container {
    position: relative;
    z-index: 1; /* Ensure content is above starfield */
}

blockquote {
    font-size: 2.2rem;
    font-style: italic;
    font-weight: 600; /* Made bolder - was default (400) */
    color: #b0b0b0;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    line-height: 1.4;
}
blockquote::before, blockquote::after {
    content: '"';
    font-size: 4rem;
    color: var(--accent-blue);
    position: absolute;
    opacity: 0.3;
}
blockquote::before { left: -40px; top: -20px; }
blockquote::after { right: -40px; bottom: -20px; }

/* ======== FINAL CTA SECTION ======== */
#final-cta {
    padding: 80px 0;
    text-align: center;
    background-color: #1a1a1a;
    border-top: 1px solid var(--border-grey);
}

#final-cta .container {
    position: relative;
    z-index: 1;
}

#final-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

#final-cta p {
    font-size: 1.2rem;
    color: var(--secondary-text);
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    background: #000000;
    color: var(--text-lighter);
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-grey);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: var(--left, -150%);
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 1s;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.05);
    color: var(--text-lighter);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ======== FOOTER ======== */
.main-footer {
    text-align: center;
    padding: 50px 0;
    border-top: 1px solid var(--border-grey);
    background-color: var(--bg-dark);
}

.main-footer p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #777;
}

.social-links a {
    margin: 0 15px;
    font-size: 1rem;
    color: #999;
}
.social-links a:hover {
    color: var(--accent-blue);
}

/* Auto-hide header classes */
.header-hidden {
    transform: translateY(-100%);
}

/* ======== RESPONSIVE DESIGN ======== */
@media (max-width: 992px) {
    h1 { font-size: 3.5rem; }
    h2.section-title { font-size: 2.2rem; }
    .tagline { font-size: 1.2rem; }
    .main-reel-wrapper { max-width: 90%; }
    blockquote { font-size: 1.8rem; }
}

@media (max-width: 1024px) {
    .hero-content h1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 3.5rem;
        min-height: 140px;
        text-align: center;
    }
    
    .hero-content h1 span {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .hero-content h1 .typing-effect {
        display: inline-block;
        position: relative;
        text-align: center;
    }
    
    .hero-content h1 .typing-effect::after {
        left: 0;
        transform: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 10px 0; /* Further reduce padding for mobile */
    }

    .main-header .container {
        flex-direction: column;
        gap: 0.75rem; /* Reduced gap */
    }

    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-content h1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 2.5rem;
        min-height: 120px;
        text-align: center;
    }
    
    .hero-content h1 span {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .hero-content h1 .typing-effect {
        display: block;
        width: auto;
        margin: 0 auto;
        text-align: center;
    }
    
    .hero-content h1 .typing-effect::after {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }
    
    .main-reel-wrapper {
        width: 90%;
        max-width: 300px;
    }

    #hero-reel {
        min-height: 70vh; /* Further reduce height on mobile */
        padding: 60px 0 40px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2.section-title { font-size: 1.8rem; }
    .main-nav ul li { margin: 0 10px 10px; }
    .logo { font-size: 1.8rem; }
    blockquote { font-size: 1.2rem; }
    blockquote::before, blockquote::after { font-size: 3rem; }
    blockquote::before { left: -20px; top: -10px; }
    blockquote::after { right: -20px; bottom: -10px; }
}


/* ======== FADE-IN ANIMATION ======== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.vertical-video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from 'cover' to 'contain' */
    display: block;
    border-radius: 12px;
}

#starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    z-index: 10;
}

.main-reel-wrapper video.is-loading {
    opacity: 0;
}