
:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --glow-color: #00ffcc;
    --glow-color-hover: #00e6b8;
    --glass-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: transparent;
    /* Render clear so z-index -1, -2, -3 layers can show through */
    overflow-x: hidden;
}

/* Background Image Container */
.site-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    /* Kept as fallback bedrock */
    z-index: -3;
}

.background-mask {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    max-width: none;
    object-fit: cover;
    opacity: 0.8;
    z-index: -1;
    pointer-events: none;
    animation: opacity-flicker 4s infinite linear alternate-reverse;
    transition: filter 0.1s ease-out;
}

@keyframes opacity-flicker {

    0%,
    100% {
        opacity: 0.6;
    }

    5% {
        opacity: 1;
    }

    10% {
        opacity: 0.6;
    }

    15% {
        opacity: 0.9;
    }

    20% {
        opacity: 0.75;
    }
}

/* removed .site-overlay */

/* Glassmorphism Container Utility */
.glass-panel {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    z-index: 1000;
    border-radius: 50px;
    animation: slideDown 0.8s ease-out forwards;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.main-nav.nav-hidden {
    transform: translate(-50%, -150%) !important;
    opacity: 0 !important;
    pointer-events: none;
}

.nav-logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transition: transform 0.3s ease;
}

.nav-logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--glow-color);
    text-shadow: 0 0 8px var(--glow-color);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--glow-color);
    transition: all 0.3s ease;
    box-shadow: 0 0 8px var(--glow-color);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
    left: 0;
}

/* Main Layout Wrapper */
.main-content {
    margin-top: 120px;
    /* Space for fixed nav */
    min-height: calc(100vh - 120px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Buttons */
.cyber-btn {
    background: transparent;
    color: var(--glow-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    padding: 0.8rem 2rem;
    border: 1px solid var(--glow-color);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2), inset 0 0 10px rgba(0, 255, 204, 0.1);
}

.cyber-btn:hover {
    background: rgba(0, 255, 204, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4), inset 0 0 15px rgba(0, 255, 204, 0.2);
    text-shadow: 0 0 5px var(--glow-color);
}

.cyber-btn:active {
    transform: translateY(2px);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -50px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Start of Animations */

@keyframes glitch-anim {
    0% {
        text-shadow: 2px 2px var(--glow-color), -2px -2px #ff00ff;
    }

    25% {
        text-shadow: -2px 2px var(--glow-color), 2px -2px #ff00ff;
    }

    50% {
        text-shadow: 2px -2px var(--glow-color), -2px 2px #ff00ff;
    }

    75% {
        text-shadow: -2px -2px var(--glow-color), 2px 2px #ff00ff;
    }

    100% {
        text-shadow: 2px 2px var(--glow-color), -2px -2px #ff00ff;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links li a {
        font-size: 0.8rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .main-nav {
        top: auto;
        bottom: 20px;
        flex-direction: row;
        gap: 0;
        padding: 0.8rem 1rem;
        border-radius: 30px;
        width: 95%;
        background: rgba(20, 20, 20, 0.85);
        animation: slideUp 0.8s ease-out forwards;
    }

    .main-nav.nav-hidden {
        transform: translate(-50%, 150%) !important;
    }

    .nav-logo {
        display: none;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 1.2rem;
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }

    .nav-links li {
        flex: 0 0 auto;
    }

    .nav-links li a {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .main-content {
        margin-top: 20px;
        padding-bottom: 100px;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 50px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* --- Scroll Animations & About Section --- */

/* Slide Wrappers */
.slide-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass through by default */
    z-index: 2;
}

.slide-section>.glass-panel {
    pointer-events: auto;
    /* Re-enable clicks */
    will-change: transform, opacity;
}

/* About Section */
.about-container {
    max-width: 1200px;
    width: 100%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: left;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 204, 0.3);
    box-shadow: 0 0 40px rgba(0, 255, 204, 0.1), inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.about-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--glow-color);
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .about-container {
        padding: clamp(1rem, 4vw, 1.5rem);
        gap: clamp(0.5rem, 3vh, 1.5rem);
        max-height: 80vh;
        overflow: hidden;
    }

    .about-header h2 {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .about-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(0.5rem, 3vh, 1.5rem);
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .about-image {
        width: clamp(80px, 30vw, 130px);
        max-width: 130px;
        flex-shrink: 1;
        /* allow image to shrink on tiny screens */
        margin: 0 auto;
    }

    .about-text {
        height: 100%;
        overflow-y: auto;
        padding-right: 10px;
        /* Custom scrollbar for webkit */
        scrollbar-width: thin;
        scrollbar-color: var(--glow-color) transparent;
    }

    .about-text::-webkit-scrollbar {
        width: 4px;
    }

    .about-text::-webkit-scrollbar-track {
        background: transparent;
    }

    .about-text::-webkit-scrollbar-thumb {
        background-color: var(--glow-color);
        border-radius: 4px;
    }

    .about-text p {
        font-size: clamp(0.8rem, 3.5vw, 0.85rem);
        line-height: 1.5;
        margin-top: 0;
        margin-bottom: 0.8rem;
        text-align: center;
    }
}

/* --- Services Section --- */
.services-container {
    max-width: 1200px;
    width: 100%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.services-header {
    text-align: center;
    margin-bottom: 1rem;
}

.services-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--glow-color);
    font-size: 2.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.service-item {
    display: flex;
    gap: 3rem;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services-container a {
    text-decoration: none !important;
}

a.service-link {
    text-decoration: none !important;
    display: block;
    color: inherit;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.15), inset 0 0 20px rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 255, 204, 0.5);
    cursor: pointer;
}

.service-item.reverse {
    flex-direction: row-reverse;
}

.service-image {
    width: 40%;
    aspect-ratio: 16/9;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.service-image::after {
    content: 'IMAGE PLACEHOLDER';
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.service-text {
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-text h3 {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.service-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {

    .service-item,
    .service-item.reverse {
        flex-direction: column;
        gap: 1.5rem;
    }

    .service-image,
    .service-text {
        width: 100%;
    }

    .service-text {
        text-align: center;
        align-items: center;
    }
}