:root {
    /* Palette */
    --bg-deep: #050505;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.1);
    --accent-primary: #7C3AED;
    /* Electric Violet */
    --accent-secondary: #06B6D4;
    /* Neon Cyan */
    --text-main: #ffffff;
    --text-muted: #888888;

    /* Typography */
    --font-headline: 'Syncopate', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Spacing */
    --container: 1400px;
    --section-pad: 120px;
}

/* Fix for mobile menu transparency override */
body.menu-open header {
    mix-blend-mode: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor */
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: white;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s;
}

body.hovering .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-secondary);
}

/* Layout Utilities */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.section-title {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header-spacer {
    height: 100px;
    /* Space for fixed header on non-hero pages */
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100;
    mix-blend-mode: exclusion;
    transition: background 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    /* Centers it vertically if needed */
    align-items: center;
}

.logo-img {
    height: 80px;
    /* Increased size based on user feedback */
    width: auto;
    object-fit: contain;
}


.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-secondary);
    transition: 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 200;
}

.bar {
    width: 30px;
    height: 2px;
    background-color: white;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-deep);
        /* Consistent theme background */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateY(-100%);
        transition: transform 0.5s ease-in-out;
        z-index: 150;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 2rem;
        font-family: var(--font-headline);
    }
}


/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.15) 0%, rgba(5, 5, 5, 1) 70%);
    z-index: -1;
}

/* Floating particles */
.particle {
    position: absolute;
    background: var(--accent-secondary);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(2px);
    animation: float-particle 10s infinite alternate;
}

@keyframes float-particle {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-headline);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    opacity: 0;
    /* Animated */
    transform: translateY(50px);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 3rem;
    opacity: 0;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid var(--border-glass);
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    opacity: 0;
}

.cta-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

/* Services Section (Zero Gravity) */
#services {
    padding: var(--section-pad) 0;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 3rem 2rem;
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    transition: transform 0.5s;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-number {
    font-family: var(--font-headline);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 10px;
    right: 20px;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-secondary);
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Services List (Cinematic Layout) */
.services-list {
    margin-top: 4rem;
    border-top: 1px solid var(--border-glass);
}

.service-row {
    display: grid;
    grid-template-columns: 0.5fr 2fr 1.5fr;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-glass);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.service-row:hover::before {
    transform: translateX(100%);
}

.service-row:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.3);
}

.service-row .service-id {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    font-size: 1.2rem;
    opacity: 0.5;
    transition: 0.3s;
}

.service-row .service-title {
    font-family: var(--font-headline);
    font-size: 2.5rem;
    color: white;
    transition: 0.3s;
    text-transform: uppercase;
}

.service-row .service-desc {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    transition: 0.3s;
}

.service-row:hover .service-title {
    color: var(--accent-primary);
    padding-left: 20px;
    /* Slight shift */
}

.service-row:hover .service-id {
    opacity: 1;
    color: white;
}

@media (max-width: 768px) {
    .service-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .service-row:hover .service-title {
        padding-left: 0;
    }
}

/* Portfolio (Masonry) */
#portfolio {
    padding: var(--section-pad) 0;
}

.masonry-grid {
    column-count: 3;
    column-gap: 2rem;
}

@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
}

.portfolio-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: auto;
    /* Maintains aspect ratio */
    display: block;
    filter: grayscale(100%);
    transition: filter 0.5s, transform 0.7s;
}

.portfolio-item:hover .portfolio-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    margin-top: auto;
    /* Push to bottom if content is short */
}

.socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.social-link {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: 0.3s;
}

.social-link:hover {
    color: var(--accent-primary);
}

/* Animation Classes */
.reveal-text span {
    display: inline-block;
}

/* Video Wrapper for IDs */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: auto;
    /* Ensure clickable */
}