/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #87CEEB;
    --secondary-color: #1E90FF;
    --background-dark: #0a0a0a;
    --text-light: #fff;
    --text-muted: #ccc;

    /* Surface Colors with Alpha */
    --surface-alpha-05: rgba(255, 255, 255, 0.05);
    --surface-alpha-08: rgba(255, 255, 255, 0.08);
    --surface-alpha-10: rgba(255, 255, 255, 0.1);
    --surface-alpha-15: rgba(255, 255, 255, 0.15);

    /* Border Colors */
    --border-color-light: rgba(135, 206, 235, 0.2);
    --border-color-medium: rgba(135, 206, 235, 0.3);
    --border-color-strong: rgba(135, 206, 235, 0.6);

    /* Shadow Colors */
    --shadow-color-medium: rgba(135, 206, 235, 0.2);
    --shadow-color-strong: rgba(135, 206, 235, 0.3);
    --shadow-color-hover: rgba(135, 206, 235, 0.5);

    /* Gradients */
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-shimmer: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--primary-color));
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-dark);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
}

/* ===== BACKGROUND CANVAS ===== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
}

#bg-canvas::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(10, 10, 10, 0.4) 100%);
    pointer-events: none;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 60px;
    text-align: center;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 1)) drop-shadow(0 0 8px rgba(0, 0, 0, 1)) drop-shadow(0 0 12px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 20px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 30px rgba(0, 0, 0, 0.6));
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.5);
    position: relative;
}

.cta-button {
    padding: 15px 40px;
    font-size: 1.1rem;
    background: var(--gradient);
    border: none;
    border-radius: 50px;
    color: var(--background-dark);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px var(--shadow-color-strong);
    position: relative;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: inline-block;
    margin: 0 auto;
    text-decoration: none;
    /* Touch-friendly minimum size */
    min-height: 44px;
    min-width: 44px;
    /* GPU acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.cta-button:hover {
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 15px 40px var(--shadow-color-hover);
}

.cta-button:not(:hover):not(:active) {
    will-change: auto;
}

.cta-button:hover,
.cta-button:active {
    will-change: transform, box-shadow;
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .cta-button:active {
        transform: scale(0.98) translateZ(0);
    }
}

/* ===== NAVIGATION BAR ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
    /* GPU acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

nav.scrolled {
    padding: 15px 0;
    box-shadow: 0 5px 30px var(--shadow-color-medium);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 0 3rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
    text-decoration: none;
}

.logo .logo-icon {
    width: 40px;
    height: 40px;
    display: block;
    border-radius: 6px;
    position: relative;
    top: 3px;
}

.logo span {
    display: inline-block;
    line-height: 1;
}

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

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    /* GPU acceleration */
    transform: translateZ(0);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
    /* GPU acceleration */
    transform: translateZ(0);
}

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

.nav-links a:hover::after {
    will-change: width;
}

.nav-links a:not(:hover)::after {
    will-change: auto;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    /* Touch-friendly size */
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    /* GPU acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.menu-toggle.active span {
    will-change: transform, opacity;
}

.menu-toggle:not(.active) span {
    will-change: auto;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 1);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color-light);
    box-shadow: 0 -5px 30px var(--shadow-color-medium);
}
.footer-credits {
    margin-top: 1rem;
    text-align: center;
}

.footer-credits p {
    color: #666;
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.8;
}

.footer-credits a {
    color: #888;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-credits a:hover {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== COMMON ANIMATIONS ===== */
@keyframes shimmer {

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

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

/* Section fade-in animation */
section {
    min-height: 100vh;
    padding: 120px 20px 80px;
    position: relative;
    opacity: 0;
    transform: translateY(50px) rotateX(10deg) translateZ(0);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    /* GPU acceleration */
    backface-visibility: hidden;
    perspective: 1000px;
}

section:not(.visible) {
    will-change: opacity, transform;
}

section.visible {
    opacity: 1;
    transform: translateY(0) rotateX(0) translateZ(0);
    will-change: auto;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-content {
        padding: 0 1rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 40px;
        width: 100%;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        transition: right 0.3s ease;
        gap: 20px;
        box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    }

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

    .nav-links a {
        font-size: 1.2rem;
        padding: 12px 0;
        /* Touch-friendly tap target */
        min-height: 44px;
        display: inline-block;
    }

    .menu-toggle {
        display: flex;
    }

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

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

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

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: clamp(1.8rem, 6vw, 3rem);
        margin-bottom: 40px;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
        display: block;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 0.75rem;
    }

    .logo {
        font-size: 1.5rem;
        align-items: center;
    }

    .logo .logo-icon {
        width: 35px;
        height: 35px;
        top: 0;
    }

    .logo span {
        line-height: 35px;
    }

    .nav-links {
        padding: 30px 20px;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
        max-width: 280px;
        width: 100%;
        display: block;
    }
}