:root {
    --bg-color: #0c0c0e;
    --text-color: #f0f0f0;
    --accent-color: #ffffff;
    --dim-color: #444444;
    --grid-color: rgba(255, 255, 255, 0.05);
    --neon-blink: #00ffcc;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    /* Noise Texture Overlay */
    background-image: url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
}

/* BIM Grid Overlay */
.bim-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, rgba(0,0,0,0.8) 100%);
    z-index: -1;
    pointer-events: none;
}

/* AI Data Stream */
.ai-stream {
    background: #000;
    height: 30px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 2px solid var(--dim-color);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--dim-color);
}

.stream-track {
    display: flex;
    white-space: nowrap;
    animation: stream-scroll 30s linear infinite;
}

.stream-track span {
    margin-right: 50px;
}

@keyframes stream-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(12, 12, 14, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dim-color);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    border: 3px solid var(--accent-color);
    padding: 5px 15px;
}

nav a {
    color: var(--dim-color);
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    margin-left: 30px;
    transition: color 0.3s;
    position: relative;
}

nav a:hover, nav a.active {
    color: var(--accent-color);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-blink);
}

/* Hero Section */
.hero {
    height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    border-bottom: 1px solid var(--dim-color);
    overflow: hidden;
}

#three-canvas-container {
    position: absolute;
    right: 5%; /* Shifted a bit back to the left from the edge */
    top: 50%;
    transform: translateY(-50%);
    width: 700px;
    height: 700px;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    z-index: 1;
    text-align: left; /* Explicit left alignment */
}

.tagline {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--dim-color);
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -4px;
    margin-bottom: 20px;
}

.sub-headline {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 30px;
}

.blink {
    color: var(--neon-blink);
    animation: blink 1s step-end infinite;
}

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

.description {
    font-size: 1.25rem;
    color: var(--dim-color);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* CTA Buttons */
.cta-group {
    display: flex;
    gap: 20px;
}

button {
    padding: 20px 40px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    border: none;
}

.btn-primary:hover {
    background: var(--neon-blink);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* Services */
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--dim-color);
}

.service-card {
    padding: 60px 40px;
    border-right: 1px solid var(--dim-color);
    position: relative;
    transition: background 0.5s;
}

.service-card:hover {
    background: rgba(255,255,255,0.03);
}

.card-id {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--dim-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px #000;
}

.service-card p {
    color: var(--dim-color);
    line-height: 1.8;
}

/* Sections Content */
section {
    padding: 100px 40px;
    min-height: 80vh;
    border-bottom: 1px solid var(--dim-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    margin-bottom: 60px;
}

.section-header .id {
    font-family: 'Space Mono', monospace;
    color: var(--dim-color);
    font-size: 1rem;
}

.section-header h2 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -2px;
    text-transform: uppercase;
}

/* AI SQUAD Grid */
.squad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.squad-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--dim-color);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.squad-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-blink);
}

.squad-card .role {
    font-family: 'Space Mono', monospace;
    color: var(--neon-blink);
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: block;
}

.squad-card h4 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.squad-card .status {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff00;
}

/* Protocol Overlay */
#protocol-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Space Mono', monospace;
}

.protocol-log {
    width: 80%;
    max-width: 800px;
    height: 400px;
    overflow-y: hidden;
    color: var(--neon-blink);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Terminal Input Expansion */
.terminal-input-line {
    display: flex;
    gap: 10px;
    width: 100%;
}

.terminal-input {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    flex-grow: 1;
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container { padding: 20px; }
    nav a { margin-left: 15px; font-size: 0.8rem; }

    h1 { font-size: clamp(3rem, 15vw, 5rem); letter-spacing: -2px; }
    .sub-headline { font-size: 1.5rem; margin-bottom: 20px; }
    .description { font-size: 1.05rem; }

    .cta-group { flex-direction: column; width: 100%; gap: 15px; }
    button { width: 100%; padding: 15px 30px; }

    #three-canvas-container {
        opacity: 0.25; /* Lower opacity for mobile readability */
        width: 500px;
        height: 500px;
        right: -100px; /* Shift to background */
        top: 50%;
    }

    section { padding: 60px 20px; }
    .section-header h2 { font-size: 2.5rem; }
    .services, .squad-grid { grid-template-columns: 1fr; }
    
    .squad-card { padding: 30px; }
    .squad-card h4 { font-size: 1.5rem; }
}
