*{margin:0; padding:0; box-sizing:border-box;}

html{scroll-behavior:smooth;}

body{background:#05070d; color:#fff; font-family:Inter,sans-serif; overflow-x:hidden;}

/* Background */
body::before{content:""; position:fixed; inset:0; background: radial-gradient(circle at top,#0d5eff22,transparent 40%), radial-gradient(circle at bottom,#7300ff22,transparent 45%); z-index:-2;}
.grid{position:fixed; bottom:-20%; width:100%; height:60vh; background-image: linear-gradient(#6420ff55 1px,transparent 1px), linear-gradient(90deg,#6420ff55 1px,transparent 1px); background-size:70px 70px; transform: perspective(500px) rotateX(75deg); z-index:-1;}

/* Header */
header{padding:25px 10%; display:flex; justify-content:space-between; align-items:center;}
nav a{color:#ddd; text-decoration:none; margin-left:35px; transition:.3s;}
nav a:hover{color:#37c8ff;}

/* Hero */
.hero{min-height:85vh; display:flex; align-items:center; justify-content:center; padding:40px;}
.hero-inner{max-width:1200px; display:grid; grid-template-columns:1fr 1fr; gap:70px; align-items:center;}
.logo{width:100%; max-width:650px; filter: drop-shadow(0 0 25px #00aaff88);}
h1{font-family:Orbitron; font-size:58px; line-height:1.1;}
h1 span{color:#32c7ff;}
p{margin:30px 0; font-size:19px; color:#d4d4d4; line-height:1.8;}
.buttons{display:flex; gap:20px;}

.btn{
    padding:16px 32px;
    border-radius:50px;
    text-decoration:none;
    transition:.3s;
    font-weight:600;
}

.primary{
    background:#21b8ff;
    color:#fff;
    box-shadow:0 0 25px #21b8ff66;
}

.primary:hover{
    transform:translateY(-3px);
}

.secondary{
    border:2px solid #21b8ff;
    color:#21b8ff;
}

.secondary:hover{
    background:#21b8ff;
    color:white;
}

/* Services */
.services{
    padding:90px 10%;
}

.section-title{
    text-align:center;
    font-family:Orbitron;
    font-size:42px;
    margin-bottom:60px;
}

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

.card{
    background:#0d1220;
    border:1px solid #24355a;
    border-radius:18px;
    padding:35px;
    transition:.3s;
}

.card:hover{
    transform:translateY(-8px);
    border-color:#22baff;
    box-shadow:0 0 25px #22baff22;
}

.card h3{
    color:#29c5ff;
    margin-bottom:15px;
    font-family:Orbitron;
}

/* Footer */
footer{
    padding:40px;
    text-align:center;
    color:#888;
}

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

.buttons{
    justify-content:center;
}

h1{
    font-size:42px;
}
}

/* ==========================
   Responsive Header
========================== */

.site-header {
    position: relative;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 24px 10%;
}

.site-name {
    color: #33c8ff;
    font-family: "Orbitron", sans-serif;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.08em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.main-nav a {
    color: #d8e0ed;
    text-decoration: none;
    font-weight: 500;
    transition:
        color 0.25s ease,
        text-shadow 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: #37c8ff;
    text-shadow: 0 0 12px rgba(55, 200, 255, 0.65);
}

/* Hamburger button */

.menu-toggle {
    display: none;

    width: 46px;
    height: 42px;
    padding: 9px;

    background: rgba(13, 18, 32, 0.85);
    border: 1px solid #28416a;
    border-radius: 10px;

    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    margin: 5px 0;

    background: #31c9ff;
    border-radius: 3px;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

/* Mobile navigation */

@media (max-width: 768px) {

    .site-header {
        padding: 18px 20px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 20px;
        right: 20px;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        padding: 10px;

        background: rgba(8, 12, 24, 0.97);
        border: 1px solid rgba(42, 199, 255, 0.3);
        border-radius: 15px;

        box-shadow:
            0 18px 45px rgba(0, 0, 0, 0.45),
            0 0 25px rgba(42, 199, 255, 0.12);

        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);

        transition:
            opacity 0.25s ease,
            visibility 0.25s ease,
            transform 0.25s ease;
    }

    .main-nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav a {
        display: block;
        padding: 15px 16px;
        border-radius: 9px;
    }

    .main-nav a:hover,
    .main-nav a:focus-visible {
        background: rgba(42, 199, 255, 0.1);
    }

    /* Animate hamburger into an X */

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

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

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

/* ==========================
   Animated Terminal
========================== */

.terminal {
    width: 100%;
    max-width: 620px;
    margin: 32px 0;

    overflow: hidden;

    background: rgba(5, 9, 18, 0.94);
    border: 1px solid rgba(45, 199, 255, 0.35);
    border-radius: 14px;

    box-shadow:
        0 0 28px rgba(0, 170, 255, 0.16),
        inset 0 0 30px rgba(17, 43, 85, 0.16);

    font-family:
        "Courier New",
        Courier,
        monospace;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 42px;
    padding: 0 14px;

    background: linear-gradient(
        180deg,
        rgba(24, 34, 57, 0.98),
        rgba(12, 18, 33, 0.98)
    );

    border-bottom: 1px solid rgba(45, 199, 255, 0.18);
}

.terminal-dot {
    display: inline-block;

    width: 11px;
    height: 11px;

    border-radius: 50%;
    background: #29c8ff;

    box-shadow: 0 0 8px rgba(41, 200, 255, 0.65);
}

.terminal-dot:nth-child(2) {
    background: #7657ff;

    box-shadow: 0 0 8px rgba(118, 87, 255, 0.65);
}

.terminal-dot:nth-child(3) {
    background: #35e2bc;

    box-shadow: 0 0 8px rgba(53, 226, 188, 0.65);
}

.terminal-title {
    margin-left: 8px;

    color: #8296b6;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.terminal-screen {
    display: flex;
    align-items: center;

    min-height: 92px;
    padding: 25px;

    color: #50dcff;
    font-size: 18px;
    line-height: 1.5;

    text-shadow: 0 0 10px rgba(80, 220, 255, 0.55);
}

.terminal-prompt {
    margin-right: 12px;

    color: #a854ff;
    font-weight: 700;
}

.terminal-cursor {
    display: inline-block;

    width: 10px;
    height: 22px;
    margin-left: 4px;

    background: #50dcff;

    box-shadow: 0 0 10px rgba(80, 220, 255, 0.8);

    animation: terminalBlink 0.8s steps(1) infinite;
}

@keyframes terminalBlink {
    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .terminal {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 600px) {
    .terminal-screen {
        min-height: 84px;
        padding: 20px;
        font-size: 15px;
    }

    .terminal-title {
        font-size: 11px;
    }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    .terminal-cursor {
        animation: none;
    }
}

/* ==========================
   Interactive Neon Background
========================== */

:root {
    --mouse-x: 0;
    --mouse-y: 0;
    --grid-x: 0px;
    --grid-y: 0px;
}

body {
    position: relative;
    min-height: 100vh;

    background: #05070d;
    overflow-x: hidden;
}

.neon-background {
    position: fixed;
    inset: 0;

    z-index: -10;
    overflow: hidden;

    pointer-events: none;
    perspective: 700px;
}

/* Background glow layers */

.neon-glow {
    position: absolute;

    width: 700px;
    height: 700px;

    border-radius: 50%;
    filter: blur(90px);

    opacity: 0.3;

    will-change: transform;
    transition: transform 0.15s ease-out;
}

.neon-glow-blue {
    top: -280px;
    left: 18%;

    background: rgba(0, 153, 255, 0.48);

    transform: translate3d(
        calc(var(--grid-x) * -0.35),
        calc(var(--grid-y) * -0.35),
        0
    );
}

.neon-glow-purple {
    right: -230px;
    bottom: -280px;

    background: rgba(111, 37, 255, 0.42);

    transform: translate3d(
        calc(var(--grid-x) * 0.25),
        calc(var(--grid-y) * 0.25),
        0
    );
}

/* Perspective grid */

.neon-grid {
    position: absolute;

    left: -25%;
    right: -25%;
    bottom: -46vh;

    height: 95vh;

    background-image:
        linear-gradient(
            rgba(111, 48, 255, 0.5) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(40, 182, 255, 0.45) 1px,
            transparent 1px
        );

    background-size: 72px 72px;

    transform-origin: center top;

    transform:
        translate3d(
            var(--grid-x),
            var(--grid-y),
            0
        )
        rotateX(67deg)
        scale(1.15);

    mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.2) 12%,
            #000 55%,
            #000 100%
        );

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.2) 12%,
            #000 55%,
            #000 100%
        );

    filter:
        drop-shadow(0 0 4px rgba(70, 94, 255, 0.5));

    will-change: transform;
}

/* Horizon glow */

.neon-grid::before {
    content: "";

    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #7650ff,
            #2ccaff,
            #7650ff,
            transparent
        );

    box-shadow:
        0 0 14px rgba(53, 195, 255, 0.8),
        0 0 32px rgba(108, 60, 255, 0.7);
}

/* Dark overlay keeps text readable */

.neon-background::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(5, 7, 13, 0.18),
            rgba(5, 7, 13, 0.38) 58%,
            rgba(5, 7, 13, 0.08)
        );
}

/* Mobile */

@media (max-width: 768px) {

    .neon-grid {
        left: -65%;
        right: -65%;
        bottom: -40vh;

        height: 82vh;
        background-size: 56px 56px;
    }

    .neon-glow {
        width: 480px;
        height: 480px;
        filter: blur(75px);
    }

}

/* Disable motion for accessibility */

@media (prefers-reduced-motion: reduce) {

    :root {
        --grid-x: 0px;
        --grid-y: 0px;
    }

    .neon-grid,
    .neon-glow {
        transition: none;
    }

}