:root {
    --primary: #11D452;
    --primary-dim: rgba(17, 212, 82, 0.2);
    --primary-glow: rgba(17, 212, 82, 0.5);
    --bg-black: #070912;
    --node-bg: rgba(15, 18, 28, 0.98);
    --border: rgba(255, 255, 255, 0.1);
    --text-mono: 'JetBrains Mono', monospace;
    --text-main: 'Space Grotesk', sans-serif;
}

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

body.engine-interface {
    background-color: var(--bg-black);
    color: #fff;
    font-family: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#data-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

.mono {
    font-family: var(--text-mono);
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.mono-dim {
    font-family: var(--text-mono);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
}

.mono-glow {
    font-family: var(--text-mono);
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Navigation */
.nav-system {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(20px);
    background: rgba(7, 9, 18, 0.85);
    border-bottom: 0.5px solid var(--border);
}

.nav-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.engine-logo {
    width: 22px;
    height: 22px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(17, 212, 82, 0.05);
    padding: 0.2rem 0.6rem;
    border: 0.5px solid var(--primary-dim);
    border-radius: 2px;
}

.pulse {
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}

.nav-terminal {
    display: flex;
    gap: 1.5rem;
}

.nav-terminal a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--text-mono);
    font-size: 0.7rem;
}

.cmd-btn {
    color: var(--primary) !important;
    border: 0.5px solid var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
}

/* Bento Matrix - Mobile First */
.bento-matrix {
    max-width: 1400px;
    margin: 100px auto 2rem;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Desktop Grid Upgrade */
@media (min-width: 1024px) {
    .bento-matrix {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        grid-auto-rows: minmax(140px, auto);
        gap: 1.5rem;
        padding: 0 2rem;
    }
}

.bento-item {
    background: var(--node-bg);
    border: 0.5px solid var(--border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: 0.3s;
}

@media (min-width: 1024px) {
    .hero-node {
        grid-column: span 8;
        grid-row: span 3;
    }

    .expertise-node {
        grid-column: span 4;
        grid-row: span 3;
    }

    .tech-node {
        grid-column: span 12;
    }

    .engine-node {
        grid-column: span 12;
        grid-row: span 4;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .contact-node {
        grid-column: span 12;
        grid-row: span 2;
    }
}

.node-header {
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 0.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.node-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

@media (min-width: 1024px) {
    .node-body {
        padding: 3rem;
    }
}

.badge-tech {
    color: var(--primary);
    font-family: var(--text-mono);
    font-size: 0.7rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Expertise */
.section-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.exp-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.exp-item {
    display: flex;
    gap: 1rem;
}

.exp-item i {
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

.exp-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: #fff;
}

.exp-item span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    display: block;
}

/* Tech Bar */
.stack-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1.5rem;
    padding: 1.5rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    font-family: var(--text-mono);
    font-size: 0.7rem;
}

/* Engine Nodes */
.engine-graphic {
    background: #000;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.engine-graphic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
}

.engine-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 1024px) {
    .engine-details {
        padding: 4rem;
    }
}

.engine-details h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.terminal-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 1.25rem;
    border-left: 2px solid var(--primary);
    margin-top: 1.5rem;
    font-family: var(--text-mono);
    font-size: 0.75rem;
}

.terminal-box .line {
    margin-bottom: 0.4rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Contact */
.contact-terminal {
    padding: 3rem 1rem;
    text-align: center;
}

.contact-terminal h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.email-link {
    color: var(--primary);
    font-size: clamp(0.9rem, 4vw, 1.4rem);
    font-family: var(--text-mono);
    text-decoration: none;
    border: 1px dashed var(--primary-dim);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
}

/* Footer */
.system-footer {
    padding: 2rem;
    border-top: 0.5px solid var(--border);
}

.footer-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.3;
    font-size: 0.7rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-wrap {
        flex-direction: row;
        justify-content: space-between;
    }
}

.social-links a {
    color: #fff;
    margin-left: 1rem;
    font-size: 1.1rem;
}

/* Utils */
.btn-matrix {
    background: var(--primary);
    color: #000;
    padding: 0.8rem 1.5rem;
    font-family: var(--text-mono);
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-block;
    margin-top: 1.5rem;
}

.glitch {
    position: relative;
}

.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 1px;
    top: 0;
    text-shadow: -1px 0 #f0f;
    color: #fff;
    background: var(--bg-black);
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
    animation: noise 2s infinite linear alternate-reverse;
}

@keyframes noise {
    0% {
        clip: rect(10px, 9999px, 12px, 0);
    }

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

/* Fix Nav for Mobile */
@media (max-width: 768px) {
    .nav-system .nav-terminal a:not(.cmd-btn) {
        display: none;
    }

    .brand span {
        font-size: 0.9rem;
    }
}