/* ============================================
   MIRAX DIGITAL - Landing Page Styles
   Theme: IDE Dark Mode
   ============================================ */

/* ---- CSS Custom Properties (Variables) ---- */
:root {
    /* Core Colors - IDE Dark Theme */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #0d1117;
    --bg-card: rgba(15, 15, 20, 0.6);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Accent Colors - Syntax Highlighting */
    --accent-cyan: #00d9ff;
    --accent-violet: #a855f7;
    --accent-emerald: #10b981;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-yellow: #eab308;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 217, 255, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);

    /* Shadows */
    --shadow-glow: 0 0 40px rgba(0, 217, 255, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Animated Background Canvas ---- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ---- Container ---- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

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

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 20px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .section-description {
    margin: 0 auto;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.btn-primary.large {
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.btn-ghost {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1rem;
    text-decoration: none;
    transition: color var(--transition-base);
}

.btn-ghost:hover {
    color: var(--accent-cyan);
}

/* Glow Effect for CTA */
.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    filter: blur(15px);
    transition: opacity var(--transition-base);
}

.glow-effect:hover::after {
    opacity: 0.6;
}

/* ---- Navigation ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-base);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 0;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-bracket {
    color: var(--text-muted);
}

.logo-highlight {
    color: var(--accent-cyan);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition-base);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

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

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

.nav-cta {
    padding: 10px 20px;
    background: transparent;
    color: var(--accent-cyan);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--accent-cyan);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.nav-cta:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
}

/* ---- Hero Section ---- */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 140px 24px 80px;
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-cyan);
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat {
    text-align: left;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-light);
}

/* ---- Code Window (Hero Visual) ---- */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-window {
    width: 100%;
    max-width: 520px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card), 0 0 60px rgba(0, 217, 255, 0.05);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.window-title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.window-content {
    padding: 20px;
    overflow-x: auto;
}

.window-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
}

.window-content code {
    display: block;
}

.window-content .line {
    display: block;
    white-space: pre;
}

.window-content .line-number {
    display: inline-block;
    width: 30px;
    color: var(--text-muted);
    user-select: none;
    opacity: 0.5;
}

/* Syntax Highlighting */
.keyword { color: var(--accent-violet); }
.type { color: var(--accent-cyan); }
.property { color: var(--accent-emerald); }
.string { color: var(--accent-orange); }
.number { color: var(--accent-pink); }
.variable { color: #60a5fa; }
.function { color: var(--accent-yellow); }
.method { color: var(--accent-cyan); }
.parameter { color: var(--accent-orange); }

/* Typing Cursor */
.cursor {
    color: var(--accent-cyan);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---- About Section ---- */
.about {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.about-card {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.about-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--accent-violet);
}

.card-icon.cyan {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.2);
    color: var(--accent-cyan);
}

.card-icon.emerald {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--accent-emerald);
}

.card-icon.violet {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.2);
    color: var(--accent-violet);
}

.about-card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.about-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---- Services Section ---- */
.services {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    z-index: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Glassmorphism Card */
.service-card.glass {
    position: relative;
    padding: 36px 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    overflow: hidden;
}

.service-card.glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);
    pointer-events: none;
}

.service-card.glass:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card.featured {
    border-color: rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.03);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 4px 12px;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.service-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.service-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 14px;
    color: var(--accent-violet);
}

.service-icon.cyan {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-cyan);
}

.service-icon.emerald {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
}

.service-tag {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.service-features {
    list-style: none;
    margin-bottom: 28px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.service-features li:last-child {
    border-bottom: none;
}

.service-features .check {
    color: var(--accent-emerald);
    font-weight: 600;
}

.service-footer {
    padding-top: 4px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-cyan);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: gap var(--transition-base);
}

.service-link:hover {
    gap: 10px;
}

/* ---- Tech Stack Carousel ---- */
.tech-stack {
    padding: 80px 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.tech-header {
    text-align: center;
    margin-bottom: 48px;
}

.tech-carousel {
    position: relative;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

.tech-track {
    display: flex;
    gap: 32px;
    animation: scroll 30s linear infinite;
    width: max-content;
}

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

.tech-item {
    flex-shrink: 0;
    padding: 16px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition-base);
}

.tech-item:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ---- CTA Section ---- */
.cta-section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cta-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.decoration-circle {
    width: 500px;
    height: 500px;
    border: 1px solid rgba(0, 217, 255, 0.1);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: expand 8s ease-in-out infinite;
}

.decoration-circle.delay {
    animation-delay: 4s;
}

@keyframes expand {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

/* ---- Footer ---- */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-subtle);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-top: 16px;
    max-width: 280px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--transition-base);
}

.footer-column a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-tagline .heart {
    color: var(--accent-pink);
}

/* ---- Scroll Reveal Animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive Design ---- */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content {
        max-width: 100%;
    }

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

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

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

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

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

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

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .code-window {
        font-size: 0.75rem;
    }

    .window-content {
        padding: 16px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* ---- Mobile Navigation Menu ---- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        padding: 60px 40px;
        border-left: 1px solid var(--border-subtle);
        transition: right var(--transition-base);
    }

    .nav-links.active {
        display: flex;
        right: 0;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* ---- Selection Color ---- */
::selection {
    background: rgba(0, 217, 255, 0.3);
    color: var(--text-primary);
}

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
