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

html,
body {
    height: 100%;
    font-family: 'Courier New', monospace;
    background: #0d0d0d;
    color: #00ffc3;
    overflow-x: hidden;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(4px);
}

/* Header */
header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.4);
}

.glitch {
    font-size: 2.5em;
    position: relative;
    color: #00ffc3;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
}

.glitch::before {
    animation: glitchTop 1s infinite linear alternate-reverse;
    color: #ff00c8;
}

.glitch::after {
    animation: glitchBottom 1s infinite linear alternate-reverse;
    color: #00fff7;
}

@keyframes glitchTop {
    0% {
        clip: rect(0, 9999px, 0, 0);
    }

    10% {
        clip: rect(0, 9999px, 10px, 0);
        transform: translate(-2px, -2px);
    }

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

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

@keyframes glitchBottom {
    0% {
        clip: rect(0, 9999px, 0, 0);
    }

    10% {
        clip: rect(20px, 9999px, 40px, 0);
        transform: translate(2px, 2px);
    }

    20% {
        clip: rect(10px, 9999px, 30px, 0);
        transform: translate(-2px, -1px);
    }

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

/* Navigation */
nav {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

nav a {
    color: #00ffc3;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #00ffc3;
    border-radius: 5px;
    background: rgba(0, 255, 195, 0.05);
    font-weight: bold;
    transition: 0.3s;
}

nav a:hover {
    background: #00ffc3;
    color: #0d0d0d;
}

/* Hero Section */
#hero {
    text-align: center;
    padding: 60px 20px 40px;
    font-size: 1.6em;
    text-shadow: 0 0 5px #00ffc3;
    animation: flicker 2s infinite;
}

@keyframes flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 40px 20px;
}

.service-card {
    background: rgba(0, 255, 195, 0.05);
    border: 1px solid #00ffc3;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(0, 255, 195, 0.2);
    transition: 0.3s;
}

.service-card:hover {
    background: #00ffc3;
    color: #0d0d0d;
    transform: scale(1.05);
}

/* Modal */
.modal-glitch {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    backdrop-filter: blur(6px);
}

.modal-glitch.open-glitch {
    display: flex;
    animation: screenPop 0.3s ease-in-out;
}

.modal-content-glitch {
    background: #0d0d0d;
    color: #00ffc3;
    border: 2px solid #00ffc3;
    border-radius: 10px;
    padding: 30px;
    max-width: 90%;
    text-align: left;
    box-shadow: 0 0 25px #00ffc3, 0 0 8px #00ffc3 inset;
    position: relative;
    font-family: 'Courier New', monospace;
    animation: flickerBox 0.6s infinite alternate;
}

.modal-content-glitch h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #00fff7;
    text-shadow: 0 0 8px #00fff7;
}

.glitch-text {
    font-size: 1em;
    line-height: 1.7;
    color: #ccc;
}

.glitch-text span {
    opacity: 0;
    animation: fadeInGlitch 0.5s forwards;
}

.fake-terminal {
    color: #0f0;
    margin-right: 6px;
}

.close-glitch {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.2em;
    cursor: pointer;
    color: #00ffc3;
    transition: color 0.2s;
}

.close-glitch:hover {
    color: #ff007c;
}

@keyframes fadeInGlitch {
    to {
        opacity: 1;
        text-shadow: 0 0 5px #0ff;
    }
}

@keyframes flickerBox {
    0% {
        box-shadow: 0 0 15px #00ffc3, 0 0 5px #00ffc3 inset;
    }

    100% {
        box-shadow: 0 0 30px #00ffc3, 0 0 12px #00ffc3 inset;
    }
}

@keyframes screenPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Footer */
.site-footer {
    margin-top: auto;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    color: #ccc;
}

.site-footer hr {
    border: none;
    border-top: 1px solid #00ffc3;
    margin-bottom: 10px;
}

.site-footer a {
    color: #00ffc3;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Responsive Tweaks */
@media (max-width: 600px) {
    .glitch {
        font-size: 2em;
    }

    nav a {
        padding: 6px 10px;
        font-size: 0.9em;
    }

    .modal-content-glitch {
        padding: 20px;
        font-size: 0.9em;
    }
}