:root {
    --primary-color: #f0f0f0;
    --bg-color: #1c1c1c;
    --accent-color: #20dd00;
    --card-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);

    --green-tower-light: #20dd00;
    --green-tower-medium: #20bd00;
    --green-tower-dark: #205e00;
    --green-tower-alt-light: #2e7d32;
    --green-tower-alt-medium: #1b5e20;
    --green-tower-alt-dark: #0d3d0f;

    --sphere-blue-1: #0033aa;
    --sphere-blue-2: #0033ab;
    --sphere-blue-3: #0033ac;
    --sphere-blue-4: #0033ad;
    --sphere-blue-5: #0044ad;
    --sphere-blue-6: #0055ad;

    --card-accent: #0033aa;
    --card-gradient-end: rgba(33, 150, 243, 0.1);

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 4rem;

    --border-radius-sm: 0px;
    --border-width-thin: 1px;
    --border-width-medium: 2px;
    --border-width-thick: 4px;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.3s ease;
    --blur-amount: 10px;
    --glow-height: 3px;

    --shadow-subtle: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-sphere: -10px 0 30px rgba(0, 0, 0, 0.3);

    --z-background: -1;
    --z-base: 0;
    --z-overlay: 10;
    --z-sphere: 100;

    --opacity-subtle: 0.05;
    --opacity-light: 0.3;
    --opacity-medium: 0.4;
    --opacity-strong: 0.7;
}

body {
    font-family: "Montserrat", sans-serif;
    line-height: 1.8;
    color: var(--primary-color);
    margin: 0;
    padding: var(--spacing-xxl);
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: 2rem;
}

h3 {
    text-align: center;
    color: var(--primary-color);
    margin: var(--spacing-md) 0;
    font-size: 1.8rem;
}

h4 {
    text-align: center;
    color: var(--primary-color);
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 1.4rem;
}

p {
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    text-align: justify;
    text-align-last: center;
}

.content-container {
    max-width: 38vw;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    box-sizing: border-box;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    transition: var(--transition-smooth);
}

.logo {
    height: 80px;
    margin-right: var(--spacing-md);
    transition: var(--transition-smooth);
    filter: drop-shadow(var(--shadow-subtle));
}

.ribbon {
    position: fixed;
    left: 5%;
    top: 75%;
    width: 10%;
    height: 0;
    transform-origin: bottom left;
    transform: rotate(30deg) skewY(-30deg);
    z-index: var(--z-background);
    opacity: var(--opacity-strong);
}

.ribbon::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300vh;
    background: linear-gradient(
        180deg,
        var(--green-tower-light) 0%,
        var(--green-tower-medium) 50%,
        var(--green-tower-dark) 100%
    );
    box-shadow: var(--shadow-sphere);
}

.ribbon::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 300vh;
    background: linear-gradient(
        180deg,
        var(--green-tower-alt-light) 0%,
        var(--green-tower-alt-medium) 50%,
        var(--green-tower-alt-dark) 100%
    );
    transform: skewX(60deg);
    transform-origin: bottom right;
}

.sphere {
    position: absolute;
    top: 5vh;
    right: 30vw;
    width: 50px;
    height: 50px;
    z-index: var(--z-sphere);
    animation: rotate 20s linear infinite;
}

.sphere::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        var(--sphere-blue-1) 0%,
        var(--sphere-blue-2) 15%,
        var(--sphere-blue-3) 30%,
        var(--sphere-blue-4) 50%,
        var(--sphere-blue-5) 70%,
        var(--sphere-blue-6) 100%
    );
    box-shadow:
        0 0 15px rgba(107, 182, 214, 0.4),
        0 0 30px rgba(61, 163, 204, 0.3),
        0 0 45px rgba(25, 118, 210, 0.2),
        inset -5px -5px 15px rgba(0, 0, 0, 0.4),
        inset 5px 5px 8px rgba(255, 255, 255, 0.4);
}

.sphere::after {
    content: "";
    position: absolute;
    top: 10%;
    left: 20%;
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0.2) 60%,
        transparent 100%
    );
    filter: blur(1px);
}

.dither-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 20%;
    height: 100vh;
    pointer-events: none;
    z-index: var(--z-overlay);
    mix-blend-mode: multiply;
    border-left: 10px solid #ececec;
}

.glitch-lines-container {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 20%);
    height: 20vh;
    pointer-events: none;
    z-index: var(--z-base);
    opacity: var(--opacity-subtle);
}

.glitch-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, rgba(32, 221, 0, 0.6));
    width: 100%;
}

.glitch-line:nth-child(1) {
    top: 8px;
    height: 1px;
}
.glitch-line:nth-child(2) {
    top: 19px;
    height: 2px;
}
.glitch-line:nth-child(3) {
    top: 32px;
    height: 1px;
}
.glitch-line:nth-child(4) {
    top: 43px;
    height: 1px;
}
.glitch-line:nth-child(5) {
    top: 51px;
    height: 2px;
}
.glitch-line:nth-child(6) {
    top: 62px;
    height: 1px;
}
.glitch-line:nth-child(7) {
    top: 71px;
    height: 1px;
}
.glitch-line:nth-child(8) {
    top: 79px;
    height: 2px;
}

.dither-overlay::before,
.dither-overlay::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.dither-overlay::before {
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.1) 0px,
            rgba(0, 0, 0, 0.3) 1px,
            transparent 2px,
            transparent 3px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.1) 0px,
            rgba(0, 0, 0, 0.3) 1px,
            transparent 2px,
            transparent 3px
        );
    background-size: 4px 4px;
}

.dither-overlay::after {
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0.15) 2px,
            transparent 3px,
            transparent 5px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0.15) 2px,
            transparent 3px,
            transparent 5px
        );
    background-size: 8px 8px;
}

/* grain / stars texture */
body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-background);
}

body::before {
    opacity: var(--opacity-medium);
    background-image:
        radial-gradient(
            circle at 25% 25%,
            rgba(255, 255, 255, 0.4) 0.5%,
            transparent 1%
        ),
        radial-gradient(
            circle at 75% 75%,
            rgba(255, 255, 255, 0.3) 0.3%,
            transparent 0.8%
        ),
        radial-gradient(
            circle at 50% 10%,
            rgba(255, 255, 255, 0.2) 0.4%,
            transparent 0.9%
        ),
        radial-gradient(
            circle at 10% 60%,
            rgba(255, 255, 255, 0.3) 0.6%,
            transparent 1.1%
        ),
        radial-gradient(
            circle at 90% 40%,
            rgba(255, 255, 255, 0.2) 0.5%,
            transparent 1%
        ),
        radial-gradient(
            circle at 40% 90%,
            rgba(255, 255, 255, 0.4) 0.3%,
            transparent 0.7%
        );
    background-size:
        180px 180px,
        220px 220px,
        160px 160px,
        200px 200px,
        190px 190px,
        210px 210px;
    background-position:
        0 0,
        40px 60px,
        80px 20px,
        120px 80px,
        160px 40px,
        200px 100px;
}

body::after {
    opacity: var(--opacity-light);
    background-image:
        radial-gradient(
            circle at 30% 70%,
            rgba(255, 255, 255, 0.3) 0.2%,
            transparent 0.5%
        ),
        radial-gradient(
            circle at 70% 30%,
            rgba(255, 255, 255, 0.2) 0.3%,
            transparent 0.6%
        ),
        radial-gradient(
            circle at 15% 45%,
            rgba(255, 255, 255, 0.25) 0.25%,
            transparent 0.55%
        ),
        radial-gradient(
            circle at 85% 55%,
            rgba(255, 255, 255, 0.35) 0.15%,
            transparent 0.45%
        ),
        radial-gradient(
            circle at 45% 15%,
            rgba(255, 255, 255, 0.2) 0.35%,
            transparent 0.65%
        ),
        radial-gradient(
            circle at 55% 85%,
            rgba(255, 255, 255, 0.3) 0.4%,
            transparent 0.7%
        );
    background-size:
        150px 150px,
        180px 180px,
        140px 140px,
        170px 170px,
        160px 160px,
        190px 190px;
    background-position:
        20px 20px,
        60px 80px,
        100px 40px,
        140px 100px,
        180px 60px,
        220px 120px;
}

.header-container:hover .logo {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(32, 221, 0, 0.4));
}

a {
    color: var(--accent-color);
    text-decoration: underline;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* responsive on mobile */
@media (max-width: 768px) {
    body {
        padding: var(--spacing-md);
    }

    .content-container {
        max-width: 85vw;
        margin: 0;
        padding-right: var(--spacing-md);
    }

    .dither-overlay {
        width: 10%;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        margin-right: 0;
        margin-bottom: var(--spacing-md);
    }

    h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .content-container {
        padding: var(--spacing-sm);
    }
}

.site-title {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: "Nova Flat", monospace;
}

/* Service card styles (only used in index.html) */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.service-card {
    background: linear-gradient(
        135deg,
        var(--card-bg),
        var(--card-gradient-end)
    );
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(var(--blur-amount));
    border: var(--border-width-thin) solid var(--border-color);
    border-top: var(--border-width-thick) solid var(--card-accent);
    border-left: var(--border-width-thick) solid var(--card-accent);
    border-bottom: var(--border-width-medium) dotted
        var(--accent-color);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    clip-path: polygon(
        0 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--glow-height);
    background: linear-gradient(
        90deg,
        var(--accent-color),
        var(--green-tower-dark)
    );
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.service-card p {
    text-align: left;
    text-align-last: left;
    position: relative;
    z-index: 1;
}

.service-card h4 {
    position: relative;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    background-color: rgba(255, 255, 255, 0.04);
}

.service-card:hover .card-glow {
    transform: scaleX(1);
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(32, 221, 0, 0.1),
        transparent 50%
    );
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

/* Additional responsive styles for service cards */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .service-card {
        padding: var(--spacing-lg);
    }
}

/* Contact text style (only used in index.html) */
.contact-text {
    font-size: 1rem;
    text-align: center;
}
