/* --- Design Variables --- */
:root {
    /* Color Palette */
    --bg-dark: #070709;
    --bg-darker: #040405;
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;

    /* Brand Colors (Vibrant Neon Accent) */
    --accent-primary: #10b981;
    /* Emerald */
    --accent-secondary: #34d399;
    /* Light Green */
    --accent-tertiary: #a3e635;
    /* Lime */

    /* Layout */
    --nav-height: 80px;
    --container-width: 1200px;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);

    /* Shadows & Glows */
    --glow-primary: 0 0 40px rgba(16, 185, 129, 0.2);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* --- Global Utilities --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem;
    transition: transform var(--transition-smooth), border-color var(--transition-fast);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: var(--glow-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

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

/* --- Background Effects --- */
.bg-glow {
    position: fixed;
    top: -20vh;
    left: -10vw;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -2;
    border-radius: 50%;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--container-width);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 100;
    padding: 0 2rem;
    border-radius: 100px;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-links li a:hover {
    color: var(--text-primary);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-fast);
}

.nav-links li a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-fast);
}

/* Responsive Nav */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

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

    .navbar {
        top: 1rem;
        width: 95%;
        border-radius: 16px;
    }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.tagline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    /* Emerald */
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: inherit;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.hero-title {
    font-size: 4rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-cta-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Visual / Terminal Mockup */
.hero-visual {
    position: relative;
    perspective: 1000px;
}

.visual-card {
    position: relative;
    z-index: 2;
    transform: rotateY(-5deg) rotateX(5deg);
    padding: 0;
    overflow: hidden;
    background: rgba(10, 10, 11, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(16, 185, 129, 0.1);
}

.visual-card:hover {
    transform: rotateY(-2deg) rotateX(2deg) translateY(-10px);
}

.visual-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-right: 1.5rem;
}

.window-controls span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-controls span:nth-child(1) {
    background: #ff5f56;
}

.window-controls span:nth-child(2) {
    background: #ffbd2e;
}

.window-controls span:nth-child(3) {
    background: #27c93f;
}

.window-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: monospace;
}

.visual-body {
    padding: 2rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.05rem;
    line-height: 1.8;
}

.visual-body .keyword {
    color: #ec4899;
}

.visual-body .variable {
    color: #818cf8;
}

.visual-body .string {
    color: #34d399;
}

.visual-body .function {
    color: #60a5fa;
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1.25rem;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 3;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.badge-1 {
    top: 10%;
    right: -5%;
    background: rgba(10, 10, 11, 0.7);
    border-color: rgba(16, 185, 129, 0.3);
    color: #F88909;
    /* Kotlin Orange Accent */
}

.badge-2 {
    bottom: 10%;
    left: -10%;
    animation-delay: -3s;
    background: rgba(10, 10, 11, 0.7);
    border-color: rgba(16, 185, 129, 0.3);
    color: #3fcf8e;
    /* Supabase Green Accent */
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

    .hero-stats {
        justify-content: center;
    }

    .visual-card {
        transform: none !important;
    }
}

/* --- Section Global --- */
.section {
    padding: 6rem 0;
}

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

.text-center {
    text-align: center;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Products Showcase --- */
.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.product-info {
    padding-right: 2rem;
}

.product-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.product-logo h3 {
    font-size: 2rem;
    color: var(--text-primary);
}

.product-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.product-features {
    margin-bottom: 3rem;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.product-features li svg {
    color: var(--accent-secondary);
}

.product-cta {
    display: flex;
    gap: 1rem;
}

/* App Mockup UI */
.product-visual {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.app-mockup {
    width: 300px;
    background: #0f172a;
    /* Slate 900 */
    border-radius: 36px;
    border: 8px solid #1e293b;
    /* Slate 800 for Bezel */
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    margin: 2rem 0;
}

.app-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 25px;
    background: #1e293b;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}

.app-header {
    background: #0f172a;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: white;
    font-weight: 500;
}

.app-body {
    padding: 1.5rem;
    background: #0f172a;
    min-height: 400px;
}

.app-body h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.mock-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 100px;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.mock-chart .bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px 4px 0 0;
    transition: height 1s ease-out;
}

.mock-chart .highlight-bar {
    background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
}

.mock-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .product-showcase {
        grid-template-columns: 1fr;
    }

    .product-info {
        padding-right: 0;
        text-align: center;
    }

    .product-features li {
        justify-content: center;
    }

    .product-cta {
        justify-content: center;
    }
}

/* --- Portfolio Sector --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.portfolio-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-icon {
    font-size: 2.5rem;
}

.project-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.project-links a:hover {
    color: var(--accent-primary);
}

.portfolio-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.portfolio-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-stack span {
    font-size: 0.8rem;
    color: var(--accent-secondary);
    background: rgba(168, 85, 247, 0.1);
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 500;
}

/* Infinite Tech Marquee */
.tech-stack-marquee {
    overflow: hidden;
    display: flex;
    position: relative;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: scroll 20s linear infinite;
    min-width: 100%;
}

.marquee-content span {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.marquee-content span:nth-child(even) {
    color: var(--accent-primary);
}

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

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

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

/* --- Media Stats Grid --- */
.media-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.media-stat h4 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.media-stat span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-placeholder {
    transition: transform var(--transition-smooth), box-shadow var(--transition-fast);
}

.video-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(16, 185, 129, 0.2);
}

@media (max-width: 600px) {
    .media-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
}

/* --- Business Section --- */
.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.business-card {
    text-align: center;
    padding: 3rem 2rem;
}

.business-card .icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent-primary);
    border-color: rgba(16, 185, 129, 0.3);
}

.business-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.business-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-primary) !important;
}

@media (max-width: 900px) {
    .business-grid {
        grid-template-columns: 1fr;
    }
}