:root {
    /* Psicologia das Cores:
       Fundo (Dark Navy): Autoridade, estabilidade, premium.
       Texto (White/Off-white): Clareza, leitura fácil.
       Action/CTA (Vibrant Orange): Energia, estímulo de decisão, clique.
       Brand/Accent (Electric Blue): Confiança, tecnologia, inteligência.
    */
    --bg-color: #050a14;
    --text-color: #f0f4f8;
    --brand-color: #3b82f6;
    /* Azul Tecnológico - Confiança */
    --action-color: #ff6b00;
    /* Laranja Vibrante - Conversão/Ação */
    --action-hover: #ff8533;

    --glass-bg: rgba(10, 25, 45, 0.7);
    --glass-border: rgba(59, 130, 246, 0.2);
    --card-bg: rgba(255, 255, 255, 0.03);

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mobile-menu-btn {
    display: none;
}

/* Header */
.header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo .dot {
    color: var(--action-color);
    font-size: 2rem;
    line-height: 1;
    vertical-align: baseline;
    position: relative;
    top: 0.1rem;
    /* Pushing down to sit on baseline like a period */
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--brand-color);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--action-color), #ff4500);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.4);
}

.btn-secondary {
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-color);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: var(--glass-bg);
}

/* Hero Section */
/* Hero Section */
.hero {
    min-height: 100vh;
    /* Changed from fixed height to min-height */
    height: auto;
    /* Allow growth if content overflows */
    padding: 100px 0;
    /* Add top/bottom padding for safe zone */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Keep to clip particles, but now safe since container grows */
    background: radial-gradient(circle at 50% 50%, #0a192f 0%, var(--bg-color) 100%);
}

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

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center horizontally */
    position: relative;
    z-index: 2;
    text-align: center;
    /* Center text content */
    width: 100%;
    /* Ensure full width */
    /* Removed height: 100% to let it shrink/grow with content */
}

.hero-text {
    max-width: 900px;
    /* Wider text block for centered layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* Reduced gap from 15px */
}

/* Removed .hero-visual column styles as it's gone from HTML */

.hero-big-logo {
    font-family: var(--font-heading);
    font-size: 7rem;
    /* Huge Brand Name */
    font-weight: 800;
    line-height: 1;
    color: var(--text-color);
    /* Solid Color (Restored) */
    letter-spacing: -3px;
    margin-bottom: 5px;
    /* Reduced from 20px */
    position: relative;
    z-index: 1;
}

.hero-big-logo .dot {
    color: var(--action-color);
    font-size: 7rem;
    -webkit-text-stroke: 0;
    opacity: 1;
    position: relative;
    top: -0.2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    /* Reduced from 4.5rem to be "Secondary" */
    line-height: 1.2;
    margin-bottom: 10px;
    /* Reduced from 20px for tighter feel */
    font-weight: 700;
    color: #cbd5e1;
    /* Slightly softer white */
}

.highlight {
    color: transparent;
    -webkit-text-stroke: 1px var(--brand-color);
    position: relative;
    background: linear-gradient(90deg, var(--brand-color) 0%, #ffffff 50%, var(--brand-color) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #94a3b8;
    margin-bottom: 30px;
    /* Reduced from 40px */
    max-width: 600px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
        justify-content: center;
    }

    .hero-text,
    .hero-cta {
        align-items: center;
        justify-content: center;
    }

    .hero-big-logo {
        font-size: 13vw;
        /* Responsive scaling suitable for tablets */
    }

    .hero-big-logo .dot {
        font-size: 13vw;
    }

    .hero-image-wrapper {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .hero-big-logo {
        font-size: 13vw;
        /* Increased from 11vw to 13vw */
        white-space: nowrap;
        /* Prevent wrap */
    }

    .hero-big-logo .dot {
        font-size: 13vw;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-text {
        padding: 30px 20px;
    }
}

.hero-cta {
    display: flex;
    gap: 20px;
}

/* Updated About Visuals */
.tech-stack-visual {
    position: relative;
    width: 340px;
    height: 340px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Coin Effect with Photo */
.coin-wrapper {
    width: 340px;
    height: 340px;
    perspective: 1000px;
    z-index: 2;
    cursor: pointer;
}

.coin {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1.5s ease-out;
    transform-style: preserve-3d;
}

.coin-wrapper:hover .coin {
    transform: rotateY(1080deg);
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
    /* Border removed to let the photo's white circle define the edge */
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.coin-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.15);
    /* Zoom to crop to the white circle */
}

.coin-back {
    transform: rotateY(180deg);
}

.tech-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--brand-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.floating-1 {
    top: 0;
    right: 20%;
    animation: float 6s infinite ease-in-out;
}

.floating-2 {
    bottom: 20%;
    right: 0;
    animation: float 8s infinite ease-in-out 1s;
}

.floating-3 {
    bottom: 0;
    left: 20%;
    animation: float 7s infinite ease-in-out 2s;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .nav-links {
        display: none;
        /* Mobile menu to be implemented */
    }
}

/* Portfolio Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--brand-color);
}

.project-image-container {
    height: 220px;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: var(--bg-color);
}

.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image-container img {
    transform: scale(1.1);
}

.project-info {
    padding: 30px;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-info p {
    color: #a0aec0;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.btn-text {
    color: var(--brand-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Social Media Section */
.social-section {
    background: rgba(255, 255, 255, 0.02);
}

.social-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.social-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    width: 250px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.social-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.social-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.social-card span {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 700;
}

.social-card small {
    color: #718096;
    font-size: 0.85rem;
}

.social-card.instagram:hover i {
    color: #E1306C;
}

.social-card.github:hover i {
    color: #fff;
}

.social-card.linkedin:hover i {
    color: #0077b5;
}

/* About Section */
.about-content {
    display: flex;
    /* Changed from grid to flex for better control */
    flex-wrap: wrap;
    gap: 60px;
    align-items: flex-start;
    /* Changed from center to align top for better text flow */
    justify-content: center;
}

.about-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    /* Restored for centering */
    justify-content: center;
}

/* --- Hero Visual (Logo) --- */
/* --- Removed old Hero Visual block to fix duplicate transparency styles --- */

/* --- About Image (Former Hero Coin) --- */
.about-image .hero-image-wrapper {
    /* Restore Hero-style Gradient Border */
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;

    /* Animated Gradient Border (From Hero) */
    background: linear-gradient(var(--bg-color), var(--bg-color)) padding-box,
        linear-gradient(90deg, var(--brand-color) 0%, #ffffff 50%, var(--brand-color) 100%) border-box;
    border: 4px solid transparent;
    background-size: 200% auto;

    box-shadow: 0 0 50px rgba(59, 130, 246, 0.5);

    /* Keep Floating Animation + Border Gradient Animation */
    animation: float 6s infinite ease-in-out, borderGradient 3s linear infinite;

    /* Interactive Hover */
    transition: transform 0.5s ease;
}

.about-image .hero-image-wrapper img {
    /* Specific styles for the About image (which was formerly the Hero visual) */
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    /* Focus on face */
    transform: scale(1.40);
    /* Increased zoom to hide source image white borders */
}

.about-image .hero-image-wrapper:hover {
    transform: scale(1.05);
    cursor: pointer;
    /* No spin requested for this new "Hero-style" look in About, just standard hover */
}

.about-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    /* Restrict width for readability */
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 25px;
    line-height: 1.3;
}

.about-description {
    color: #cbd5e0;
    margin-bottom: 35px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.stat-item {
    text-align: center;
    flex: 1;
    /* Distribute space evenly */
    min-width: 80px;
}

.stat-item h4 {
    font-size: 1.8rem;
    color: var(--action-color);
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--action-color), #ff4500);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item p {
    font-size: 0.75rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin: 0;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        align-items: center;
        /* Center items horizontally */
        text-align: center;
        /* Center text */
        gap: 40px;
    }

    .about-text {
        width: 100%;
        padding: 0 10px;
        /* Prevent edge touching */
    }

    .about-text h2 {
        font-size: 1.8rem;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}


/* Sections Common */
section {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
}

.section-title span {
    color: var(--brand-color);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: 20px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--brand-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
    color: var(--action-color);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.service-card p {
    color: #a0aec0;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.service-link {
    color: var(--brand-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.service-link:hover {
    gap: 10px;
    color: var(--text-color);
}

/* Marketplace Mastery Section */
.marketplace-section {
    position: relative;
    padding: 40px 0;
    /* Reduced from 60px */
    overflow: hidden;
    background: radial-gradient(circle at 80% 20%, rgba(255, 107, 0, 0.05) 0%, transparent 50%);
}

.marketplace-content {
    display: flex;
    flex-wrap: wrap-reverse;
    /* Put image on top on mobile, but respecting desktop layout via order if needed, or row-reverse */
    flex-direction: row;
    /* Default */
    gap: 60px;
    align-items: center;
    justify-content: space-between;
}

.marketplace-text {
    flex: 1;
    min-width: 320px;
}

.marketplace-visual {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.title-large {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.2;
    margin: 20px 0;
}

.marketplace-desc {
    font-size: 1.1rem;
    color: #cbd5e0;
    margin-bottom: 30px;
}

.marketplace-logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

/* ... existing styles ... */

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
        justify-content: center;
        padding-top: 80px;
        /* Reduced from 120px to move content up while keeping header safe */
        /* Increased padding to prevent header overlap */
    }

    /* ... */
}

@media (max-width: 768px) {

    /* ... */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 10, 20, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        /* Ensure flex is explicit */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1005;
        /* Higher than header (1000) and btn (1001) */
        padding-bottom: 50px;
    }

    /* ... */
}

.mp-logo {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mp-logo:hover {
    background: rgba(255, 107, 0, 0.1);
    border-color: var(--action-color);
    transform: translateY(-3px);
}

.space-top {
    margin-top: 40px;
}

/* Dashboard Screenshot Styles */
.dashboard-preview {
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Wider for desktop screenshot */
    perspective: 1500px;
    z-index: 2;
}

.dashboard-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
    opacity: 0.95;
    /* Slight blend */
}

.dashboard-preview:hover .dashboard-img {
    transform: rotateY(0deg) rotateX(0deg);
    opacity: 1;
}

.floating-badge {
    position: absolute;
    bottom: -20px;
    right: -10px;
    background: rgba(10, 25, 45, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #22c55e;
    /* Green for success */
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: float 6s infinite ease-in-out;
    z-index: 3;
}

.floating-badge i {
    color: #22c55e;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .marketplace-content {
        grid-template-columns: 1fr;
    }

    .title-large {
        font-size: 2.5rem;
    }

    .phone-mockup {
        width: 260px;
        height: 500px;
        margin: 0 auto;
    }
}

/* Portfolio Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--brand-color);
}

.project-image-placeholder {
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.p1 {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}

.p2 {
    background: linear-gradient(135deg, #3730a3, #818cf8);
}

.p3 {
    background: linear-gradient(135deg, #065f46, #10b981);
}

.project-info {
    padding: 30px;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-info p {
    color: #a0aec0;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.btn-text {
    color: var(--brand-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Social Media Section */
.social-section {
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.social-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.social-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    width: 250px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.social-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.social-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.social-card span {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 700;
}

.social-card small {
    color: #718096;
    font-size: 0.85rem;
}

.social-card.instagram:hover i {
    color: #E1306C;
}

.social-card.github:hover i {
    color: #fff;
}

.social-card.linkedin:hover i {
    color: #0077b5;
}

/* Modal System */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(5, 10, 20, 0.9);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background: rgba(10, 25, 45, 0.95);
    border: 1px solid var(--brand-color);
    width: 90%;
    height: 90%;
    max-width: 1400px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0;
}

.modal-controls {
    display: flex;
    gap: 15px;
}

.modal-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    text-decoration: none;
}

.modal-btn:hover {
    background: var(--brand-color);
    color: white;
    transform: scale(1.1);
}

.close-modal:hover {
    background: #ef4444;
    /* Red for close */
}

.modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #000;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

#project-frame {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 2;
    background: transparent;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--brand-color);
    z-index: 1;
}

.open-modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.open-modal-btn:hover i {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 80%;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Modal System */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(5, 10, 20, 0.9);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background: rgba(10, 25, 45, 0.95);
    border: 1px solid var(--brand-color);
    width: 90%;
    height: 90%;
    max-width: 1400px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0;
}

.modal-controls {
    display: flex;
    gap: 15px;
}

.modal-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    text-decoration: none;
}

.modal-btn:hover {
    background: var(--brand-color);
    color: white;
    transform: scale(1.1);
}

.close-modal:hover {
    background: #ef4444;
    /* Red for close */
}

.modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #000;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

#project-frame {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 2;
    background: transparent;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--brand-color);
    z-index: 1;
}

.open-modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.open-modal-btn:hover i {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 80%;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    /* Mobile Menu Styles */
    .mobile-menu-btn {
        display: block;
        font-size: 1.8rem;
        color: var(--text-color);
        cursor: pointer;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 10, 20, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1000;
        padding-bottom: 50px;
        /* Space for bottom stuff */
    }

    .nav-links.active {
        right: 0;
        /* Slide in */
    }

    .nav-links li {
        margin: 20px 0;
        opacity: 0;
        /* Fade in effect handled by JS later or simple transition */
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.4s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.5s;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
}

/* Layout Fixes */
/* Layout Fixes */
.site-footer {
    width: 100%;
    padding: 40px 0;
    margin-top: 50px;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.site-footer p {
    text-align: center;
    color: #a0aec0;
    font-size: 0.9rem;
    margin: 0;
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-link {
    margin-top: auto;
}

/* CTA Section Alignment */
.cta-section {
    width: 100%;
    padding: 60px 0;
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-section .container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.cta-box {
    text-align: center;
    max-width: 800px;
    width: 100%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--glass-border);
    padding: 50px 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

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

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

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Stagger delays for grids */
.services-grid .service-card:nth-child(2) {
    transition-delay: 0.2s;
}

.services-grid .service-card:nth-child(3) {
    transition-delay: 0.4s;
}

.projects-grid .project-card:nth-child(2) {
    transition-delay: 0.2s;
}

.projects-grid .project-card:nth-child(3) {
    transition-delay: 0.4s;
}

.stats-grid .stat-item:nth-child(2) {
    transition-delay: 0.1s;
}

.stats-grid .stat-item:nth-child(3) {
    transition-delay: 0.2s;
}

.stats-grid .stat-item:nth-child(4) {
    transition-delay: 0.3s;
}

@keyframes borderGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- Mobile Responsiveness Overrides --- */
.mobile-preview {
    display: none;
    /* Hidden by default on desktop */
}

@media (max-width: 992px) {
    .mobile-preview {
        display: block;
        /* Show on mobile interleaved */
        margin: 30px 0;
    }

    .desktop-visual {
        display: none;
        /* Hide original visual on mobile */
    }

    .hero {
        height: auto;
        min-height: 100vh;
        align-items: flex-start;
        /* Start from top to avoid cutting off content when centered */
    }

    .hero-container {
        padding-top: 40px !important;
        /* Reduces top gap from 80px/50px to 40px */
        gap: 30px;
        /* Tighter gap between elements */
    }

    .hero {
        padding-top: 60px;
        /* Reduced section padding on mobile to pull everything up */
    }
}

@media (max-width: 768px) {
    .nav-links {
        z-index: 2000 !important;
        /* Ensure it's above EVERYTHING */
        display: flex !important;
    }

    .mobile-menu-btn {
        z-index: 2001 !important;
        /* Button stays above menu */
    }

    /* Marketplace Mobile Centering */
    .marketplace-content {
        flex-direction: column-reverse;
        /* Stack image on top (or reverse logic) */
        text-align: center;
        gap: 30px;
    }

    .marketplace-text {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .marketplace-logos {
        justify-content: center;
    }
}