:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --primary-color: #00ff41;
    /* Cyber Green */
    --secondary-color: #008dd2;
    /* Cyber Blue */
    --accent-color: #ff003c;
    /* Cyber Red/Pink for alerts */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Roboto Mono', monospace;
    --font-body: 'Inter', 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;
}

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

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

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

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-img {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0, 255, 65, 0.3));
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 5%;
    background: #000;
    /* Fallback */
    overflow: hidden;
}

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

/* Accordion Styles */
.accordion-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1.5rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    font-family: var(--font-heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s, color 0.3s;
}

.accordion-header:hover,
.accordion-header.active {
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary-color);
}

.accordion-header i {
    transition: transform 0.3s ease;
}

.accordion-header.active i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.accordion-content ul {
    list-style: none;
    padding: 1.5rem;
}

.accordion-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    border-left: 2px solid var(--secondary-color);
    padding-left: 1rem;
}

.accordion-content li:last-child {
    margin-bottom: 0;
}


.hero-content {
    z-index: 2;
    max-width: 800px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff;
}

.highlight {
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

#hero p {
    font-size: 1.25rem;
    opacity: 0.8;
    margin-bottom: 2.5rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-family: var(--font-heading);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: #fff;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    5% {
        clip: rect(80px, 9999px, 90px, 0);
    }

    10% {
        clip: rect(60px, 9999px, 20px, 0);
    }

    15% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    20% {
        clip: rect(0, 9999px, 0, 0);
    }

    100% {
        clip: rect(0, 9999px, 0, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(60px, 9999px, 80px, 0);
    }

    5% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    10% {
        clip: rect(90px, 9999px, 100px, 0);
    }

    15% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    20% {
        clip: rect(0, 9999px, 0, 0);
    }

    100% {
        clip: rect(0, 9999px, 0, 0);
    }
}

/* Services */
#services {
    padding: 6rem 5%;
}

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

h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

/* Feature Highlight */
.feature-highlight {
    margin-top: 6rem;
    padding: 3rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.05) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.feature-content {
    position: relative;
    z-index: 1;
}

.video-container {
    margin-top: 2rem;
    position: relative;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
}

.video-placeholder {
    color: #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    height: 100%;
    justify-content: center;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 1px,
            rgba(0, 255, 65, 0.05) 2px,
            rgba(0, 255, 65, 0.05) 3px);
}

.video-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    animation: scan 3s linear infinite;
    opacity: 0.5;
}

@keyframes scan {
    0% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}

.video-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--primary-color));
    z-index: 2;
}

.video-container:hover .video-placeholder i {
    transform: scale(1.1);
}

.video-container:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 50px rgba(0, 255, 65, 0.2);
}

/* Open Source */
#opensource {
    padding: 6rem 5%;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?auto=format&fit=crop&q=80');
    /* Hacker bg */
    background-size: cover;
    background-attachment: fixed;
    text-align: center;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat .number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-heading);
}



/* Contact */
#contact {
    padding: 6rem 5%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

input,
textarea {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
}

button {
    padding: 1rem;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #007bb5;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Cursor Glow */
#cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* Terminal Window Styles */
.terminal-window {
    max-width: 600px;
    margin: 4rem auto 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Roboto Mono', monospace;
    text-align: left;
}

.terminal-header {
    background: #1a1a1a;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
    border-radius: 6px 6px 0 0;
}

.buttons {
    display: flex;
    gap: 8px;
    margin-right: 1rem;
}

.buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.close {
    background: #ff5f56;
}

.minimize {
    background: #ffbd2e;
}

.maximize {
    background: #27c93f;
}

.title {
    color: #999;
    font-size: 0.8rem;
    flex-grow: 1;
    text-align: center;
}

.terminal-body {
    padding: 1.5rem;
    color: #00ff41;
    font-size: 0.9rem;
    min-height: 150px;
    white-space: pre-wrap;
    line-height: 1.4;
}

.typing-cursor::after {
    content: '▋';
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .stats {
        flex-direction: column;
        gap: 2rem;
    }

    #cursor-glow {
        display: none;
        /* Disable cursor glow on touch devices */
    }

    nav ul {
        display: none;
        /* Simplify nav for mobile in this phase */
        /* Ideally would add hamburger menu but keeping it simple as per initial scope focus on visual impact */
    }
}