* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
    overflow: hidden;                 /* prevent page scroll */
    display: flex;
    flex-direction: column;
}

.background-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.background-animation::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(
        transparent,
        rgba(0, 255, 204, 0.08),
        transparent 30%
    );
    animation: rotate 22s linear infinite;
}

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

/* ========== HEADER ========== */
header {
    flex-shrink: 0;
    background: rgba(13, 27, 42, 0.94);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 3px 14px rgba(0, 255, 204, 0.15);
    backdrop-filter: blur(6px);
}

.logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle, #00ffcc 12%, transparent 68%);
    box-shadow: 0 0 16px #00ffcc88;
    animation: pulse 2.5s infinite ease-in-out;
    cursor: pointer;
    transition: transform 0.25s;
}

.logo:hover { transform: scale(1.1); }

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 22px;
}

nav a {
    color: #00ffcc;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
}

nav a:hover,
nav a.active {
    color: white;
    text-shadow: 0 0 8px #00ffcc;
}

/* ========== MAIN ========== */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 16px;
}

section {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    padding: 10px 0;
}

h2 {
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
    font-size: 1.9rem;
    margin: 0 0 18px 0;
    letter-spacing: 1px;
}

/* ========== HOME (HERO) ========== */
#hero h1 {
    font-size: 3.2rem;
    color: #00ffcc;
    text-shadow: 0 0 14px #00ffcc;
    animation: typing 3.5s steps(34, end), blink-caret 0.9s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
    border-right: 4px solid #00ffcc;
    margin: 0 0 1rem 0;
    display: inline-block;
}

#hero p {
    font-size: 1.25rem;
    color: #c0c0c0;
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ========== SERVICES ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.service-card {
    background: rgba(27, 38, 59, 0.85);
    padding: 14px 12px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0, 255, 204, 0.2);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.35;
}

.service-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 10px 24px rgba(0, 255, 204, 0.3);
    border: 1px solid rgba(0, 255, 204, 0.35);
}

.service-card h3 {
    color: #00ffcc;
    margin: 0 0 6px 0;
    font-size: 1.05rem;
}

.service-card p {
    margin: 0;
    color: #c8c8c8;
}

/* ========== ABOUT ========== */
#about p {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========== CONTACT ========== */
#contact .contact-info {
    font-size: 1.05rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

#contact .contact-info a {
    color: #00ffcc;
    text-decoration: none;
}

#contact .contact-info a:hover {
    text-shadow: 0 0 8px #00ffcc;
}

#contact form {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#contact input,
#contact textarea {
    padding: 11px 14px;
    background: #1b263b;
    border: 1px solid #00ffcc44;
    color: #e0e0e0;
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.95rem;
}

#contact input:focus,
#contact textarea:focus {
    outline: none;
    border-color: #00ffcc;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.3);
}

#contact textarea {
    resize: none;
    height: 90px;
}

#contact button {
    padding: 12px;
    background: #00ffcc;
    color: #0d1b2a;
    border: none;
    cursor: pointer;
    border-radius: 7px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

#contact button:hover {
    background: #ffffff;
    color: #00ffcc;
    transform: translateY(-3px);
    box-shadow: 0 0 18px rgba(0, 255, 204, 0.55);
}

#contact .note {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #80a0a0;
}

/* ========== FOOTER ========== */
footer {
    flex-shrink: 0;
    background: #0d1b2a;
    padding: 14px 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #80a0a0;
    position: relative;
    border-top: 1px solid rgba(0, 255, 204, 0.12);
}

footer p {
    margin: 0;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

#hidden-square {
    position: absolute;
    bottom: 12px;
    right: 14px;
    width: 22px;
    height: 22px;
    background: transparent;
    cursor: pointer;
    z-index: 9999;
    border-radius: 3px;
    transition: all 0.3s ease;
}

#hidden-square:hover {
    background: rgba(0, 255, 204, 0.25);
    border: 1px dashed #00ffcc;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.7);
}


/* ========== ANIMATIONS ========== */
@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 16px #00ffcc; }
    50%      { transform: scale(1.08); box-shadow: 0 0 26px #00ffcc; }
}

@keyframes typing {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50%      { border-color: #00ffcc; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;           /* allow scroll only on very small screens */
    }

    header {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    nav ul {
        gap: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }

    #hero h1 {
        font-size: 2rem;
        white-space: normal;
        border-right: none;
        animation: none;
    }

    #hero p {
        font-size: 1.05rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .service-card {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .service-card h3 {
        font-size: 0.95rem;
    }

    #contact form {
        max-width: 100%;
    }

    #hidden-square {
        width: 20px;
        height: 20px;
        bottom: 10px;
        right: 10px;
    }
}


@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
