:root {
    --background: #08090d;
    --surface: #101218;
    --text: #f5f7fb;
    --text-muted: #9ba1b2;
    --border: rgba(255,255,255,0.09);
    --cyan: #22d3ee;
    --green: #86efac;
    --pink: #f472b6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

.container {
    width: min(1120px, calc(100% - 56px));
    margin: 0 auto;
}

.background-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .3;

    background-image:
        linear-gradient(
            rgba(255,255,255,.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.025) 1px,
            transparent 1px
        );

    background-size: 64px 64px;
}

.navbar {
    height: 82px;
    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(8,9,13,.75);
    backdrop-filter: blur(15px);
}

.nav-container {
    height: 100%;

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

.logo {
    font-family: "Space Grotesk", sans-serif;
    font-size: 23px;
    font-weight: 700;
}

.logo span {
    color: var(--cyan);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-muted);
    font-size: 14px;
    transition: .2s;
}

.nav-menu a:hover {
    color: white;
}

.nav-github {
    border: 1px solid var(--border);
    border-radius: 8px;

    padding: 9px 14px;

    font-size: 13px;

    transition: .2s;
}

.nav-github:hover {
    border-color: #606676;
}

.mobile-menu-button {
    display: none;

    background: none;
    border: none;

    color: white;
    font-size: 24px;

    cursor: pointer;
}

/* HERO */

.hero {
    min-height: 700px;

    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;

    grid-template-columns: 1.1fr .9fr;

    gap: 70px;

    align-items: center;
}

.status {
    color: var(--cyan);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2px;
}

.status-dot {
    display: inline-block;

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #4ade80;

    margin-right: 8px;

    box-shadow: 0 0 15px #4ade80;
}

.hero h1 {
    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(50px, 7vw, 82px);

    line-height: .98;

    letter-spacing: -4px;

    margin: 22px 0;
}

.hero h1 span {
    color: transparent;

    -webkit-text-stroke: 1px #7c8291;
}

.hero h2 {
    font-size: 18px;

    font-weight: 500;

    color: #d9dce4;
}

.hero h2 span {
    color: var(--cyan);

    padding: 0 8px;
}

.hero-description {
    max-width: 580px;

    margin: 22px 0 30px;

    color: var(--text-muted);

    font-size: 16px;
}

/* TERMINAL */

.terminal {
    background: rgba(16,18,24,.9);

    border: 1px solid var(--border);

    border-radius: 16px;

    overflow: hidden;

    box-shadow: 0 30px 100px rgba(0,0,0,.45);

    transform: rotate(2deg);

    transition: .3s;
}

.terminal:hover {
    transform: rotate(0deg) translateY(-5px);
}

.terminal-header {
    height: 44px;

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 0 16px;

    border-bottom: 1px solid var(--border);
}

.terminal-header span {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #414653;
}

.terminal-content {
    padding: 28px;

    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;

    font-size: 13px;

    line-height: 2;

    color: #c6cad5;
}

.indent {
    padding-left: 25px;
}

.double-indent {
    padding-left: 50px;
}

.keyword {
    color: var(--pink);
}

.string {
    color: var(--green);
}

.cursor {
    color: var(--cyan);

    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* STATS */

.stats {
    margin-bottom: 80px;
}

.stats-container {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    padding: 24px;

    border-right: 1px solid var(--border);
}

.stat:last-child {
    border-right: none;
}

.stat strong {
    display: block;

    font-family: "Space Grotesk", sans-serif;

    font-size: 26px;
}

.stat span {
    color: var(--text-muted);

    font-size: 12px;
}
/* ================= CONTACT CHATBOT ================= */
.contact-chat {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 1000;
    font-family: "Inter", sans-serif;
}

.contact-chat-toggle {
    position: relative;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34, 211, 238, .35);
    border-radius: 50%;
    background: rgba(16, 18, 24, .96);
    color: var(--cyan);
    box-shadow: 0 14px 45px rgba(0, 0, 0, .5), 0 0 28px rgba(34, 211, 238, .12);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.contact-chat-toggle:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: rgba(34, 211, 238, .75);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 32px rgba(34, 211, 238, .2);
}

.contact-chat-icon {
    font-size: 23px;
    line-height: 1;
}

.contact-chat-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, .8);
}

.contact-chat-window {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: min(390px, calc(100vw - 32px));
    height: 520px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(16, 18, 24, .97);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.97);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.contact-chat.is-open .contact-chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.contact-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.contact-chat-header strong {
    display: block;
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
}

.contact-chat-header span {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 11px;
}

.contact-chat-header i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, .7);
}

.contact-chat-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: .2s;
}

.contact-chat-close:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, .2);
}

.contact-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #303540 transparent;
}

.contact-message {
    width: fit-content;
    max-width: 88%;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 13px 13px 13px 4px;
    color: #dfe3eb;
    background: #1b1e26;
    font-size: 13px;
    line-height: 1.55;
}

.contact-message.user-message {
    margin-left: auto;
    border-color: rgba(34, 211, 238, .2);
    border-radius: 13px 13px 4px 13px;
    color: #061216;
    background: var(--cyan);
}

.contact-chat-form {
    padding: 14px;
    border-top: 1px solid var(--border);
    background: rgba(8, 9, 13, .45);
}

.contact-chat-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.contact-chat-fields input,
.contact-chat-input-row textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: #0d0f14;
    color: var(--text);
    font-family: "Inter", sans-serif;
    font-size: 12px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-chat-fields input {
    min-width: 0;
    padding: 10px 11px;
}

.contact-chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.contact-chat-input-row textarea {
    min-height: 44px;
    max-height: 110px;
    resize: none;
    padding: 12px;
    line-height: 1.4;
}

.contact-chat-fields input::placeholder,
.contact-chat-input-row textarea::placeholder {
    color: #6f7685;
}

.contact-chat-fields input:focus,
.contact-chat-input-row textarea:focus {
    border-color: rgba(34, 211, 238, .55);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .07);
}

.contact-chat-input-row button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: var(--cyan);
    color: #061216;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.contact-chat-input-row button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.contact-chat-input-row button:disabled {
    opacity: .55;
    cursor: wait;
}

.contact-chat-feedback {
    min-height: 15px;
    margin: 7px 2px 0;
    color: var(--text-muted);
    font-size: 11px;
}

.contact-chat-feedback.success {
    color: #86efac;
}

.contact-chat-feedback.error {
    color: #fda4af;
}

@media (max-width: 600px) {
    .contact-chat {
        right: 16px;
        bottom: 16px;
    }

    .contact-chat-toggle {
        width: 58px;
        height: 58px;
    }

    .contact-chat-window {
        right: 0;
        bottom: 70px;
        width: min(390px, calc(100vw - 24px));
        height: min(560px, calc(100vh - 100px));
    }

    .contact-chat-fields {
        grid-template-columns: 1fr;
    }
}