/* main.css – Premium Modern Tech Theme & Dynamic Features */
:root {
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --color-bg: #0f172a;
    /* Deep slate/navy background */
    --color-bg-alt: #1e293b;
    /* Slightly lighter for cards/sections */
    --color-surface: rgba(255, 255, 255, 0.03);
    /* Glass effect base */
    --color-primary: #ec4899;
    /* Vibrant Pink/Magenta pop */
    --color-primary-dark: #be185d;
    --color-accent: #8b5cf6;
    /* Violet accent for gradients */
    --color-text: #f8fafc;
    /* Off-white for readability */
    --color-text-muted: #94a3b8;
    --radius: 12px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 20px rgba(236, 72, 153, 0.3);
}

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

html,
body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

/* --- 1. Smart Navbar --- */
header {
    position: sticky;
    top: 0;
    transition: all 0.4s ease;
    background: rgba(15, 23, 42, 0);
    /* Start transparent */
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo a,
.logo img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    display: block;
    text-decoration: none;
}

.logo img {
    height: 60px;
    vertical-align: bottom;
}

.mobile-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 0.5rem;
    z-index: 1002;
}

.mobile-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: var(--transition);
}

.menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.menu a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.menu>a:hover,
.dropdown:hover>.dropdown-toggle {
    color: var(--color-primary);
}

/* Dropdown styling */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.6em;
    transition: transform 0.3s;
    opacity: 0.7;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 260px;
    border-radius: var(--radius);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0);
}

/* SCREEN-CENTERED MEGA MENUS (Fix for Layout Cutoffs) */
/* 1. Remove relative positioning from the parent link so menu allows centering */
.menu>.dropdown:nth-child(2),
.menu>.dropdown:nth-child(3) {
    position: static;
}

/* 2. Center the menu on the screen (95% of viewport width) */
.menu>.dropdown:nth-child(2) .dropdown-menu,
.menu>.dropdown:nth-child(3) .dropdown-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 95vw;
    /* Takes 95% of screen width */
    max-width: 1100px;
    /* Maximum limit */
    top: 70px;
    /* Distance from top of header */
    right: auto;
    /* Reset right align */
}

/* 3. Hover state */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.menu>.dropdown:nth-child(2):hover .dropdown-menu,
.menu>.dropdown:nth-child(3):hover .dropdown-menu {
    /* No translation needed on Y, just keep X centered */
    transform: translateX(-50%);
}

.dropdown-menu-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    min-width: 800px;
    /* Mega menu width */
}

.dropdown-column h4 {
    color: var(--color-text);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu a {
    color: var(--color-text-muted);
    display: block;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.dropdown-menu a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white !important;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.6);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-text);
}


/* --- 2. Kinetic Hero Container --- */
.hero {
    position: relative;
    height: 100vh;
    /* Full viewport height */
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    overflow: hidden;
    padding: 0;
    margin-top: -80px;
    /* Offset fixed header */
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed */
    max-width: 1100px;
    padding: 80px 1rem 0;
}

.hero-content>* {
    pointer-events: auto;
    /* Re-enable clicks on text/buttons */
}

.hero h1 {
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.typewriter-text {
    background: linear-gradient(to right, #60a5fa, #c084fc, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}


/* --- 3. Infinite Logo Marquee --- */
.marquee-container {
    background: #020617;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-container::before,
.marquee-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #020617, transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #020617, transparent);
}

.marquee-track {
    display: inline-block;
    animation: scroll 40s linear infinite;
}

.marquee-item {
    display: inline-block;
    padding: 0 3rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Feature/Card Sections */
section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* --- 4. Interactive Tabs ("Tech Deck") --- */
.tech-tabs-section {
    padding: 8rem 2rem;
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    max-width: 100% !important;
    /* Override section max-width */
}

/* Constrain internal content width */
.tech-tabs-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.tab-btn:hover {
    border-color: var(--color-primary);
    color: white;
}

.tab-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.tab-text h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.tab-text ul {
    list-style: none;
}

.tab-text li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: #cbd5e1;
}

.tab-text li::before {
    content: "✓";
    color: var(--color-accent);
    font-weight: bold;
}

.tab-visual {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    height: 400px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* IMAGE FIXES HERE */
.tab-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tab-visual:hover img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

/* --- 5. Parallax Section --- */
.parallax-section {
    height: 60vh;
    min-height: 500px;
    background-image: url('../assets/images/bg_parallax.png');
    /* UPDATED IMAGE */
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
}

.parallax-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

/* Footer */
footer {
    background: #020617;
    padding: 4rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    text-align: center;
}

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

footer a:hover {
    color: var(--color-primary);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .dropdown-menu-columns {
        grid-template-columns: repeat(2, 1fr);
        min-width: 500px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 6rem;
    }

    .mobile-toggle {
        display: flex;
    }

    .menu {
        display: none;
        /* Hide standard menu */
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--color-bg);
        padding: 2rem;
        height: calc(100vh - 80px);
        overflow-y: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu.active {
        display: flex;
    }

    /* JavaScript toggles this */

    .menu a {
        font-size: 1.2rem;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 1rem;
    }

    /* Reset mega menu absolute positioning for mobile */
    .menu > .dropdown:nth-child(2) .dropdown-menu,
    .menu > .dropdown:nth-child(3) .dropdown-menu {
        position: static;
        width: 100%;
        max-width: none;
        left: auto;
        top: auto;
        transform: none;
    }

    .dropdown-menu-columns {
        grid-template-columns: 1fr;
        min-width: auto;
        gap: 1rem;
    }

    .tab-content.active {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tab-visual {
        height: 250px;
    }

    .marquee-item {
        font-size: 1.2rem;
        padding: 0 1.5rem;
    }

    .parallax-section {
        background-attachment: scroll;
        /* Disable parallax on mobile for performance */
    }
}