:root {
    --tech-blue: #0055FF;
    --grid-color: #E0E0E0;
    --white: #ffffff;
    --black: #111111;
    --light-grey: #f5f5f5;
    
    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--white);
    color: var(--black);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Background Grid */
.grid-overlay {
    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;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.container-fluid { width: 100%; padding: 0 40px; }
.section-padding { padding: 100px 0; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Header */
.lab-header { border-bottom: 2px solid var(--black); background: rgba(255,255,255,0.9); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(5px); }
.header-grid { display: flex; justify-content: space-between; align-items: stretch; height: 70px; }

.brand-cell { display: flex; align-items: center; border-right: 1px solid var(--grid-color); padding-right: 40px; }
.logo { font-family: var(--font-mono); font-weight: 700; font-size: 1.5rem; letter-spacing: -1px; }
.blink { animation: blink 1s infinite; color: var(--tech-blue); }
@keyframes blink { 50% { opacity: 0; } }

.nav-cell { display: flex; align-items: center; gap: 30px; }
.nav-cell a { font-family: var(--font-mono); font-size: 0.9rem; font-weight: bold; color: #555; }
.nav-cell a:hover, .nav-cell a.active { color: var(--tech-blue); text-decoration: underline; }

.btn-tech { background: var(--tech-blue); color: var(--white) !important; padding: 8px 15px; font-family: var(--font-mono); text-decoration: none !important; }
.btn-tech:hover { background: var(--black); }

/* Mobile Menu */
.menu-toggle { display: none; align-items: center; font-family: var(--font-mono); font-weight: bold; cursor: pointer; color: var(--tech-blue); }
.mobile-menu { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: var(--white); border-left: 5px solid var(--tech-blue); z-index: 2000; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: 0.4s; }
.mobile-menu.active { right: 0; }
.close-menu { position: absolute; top: 20px; right: 20px; background: none; border: 2px solid var(--black); padding: 5px 10px; font-family: var(--font-mono); cursor: pointer; font-weight: bold; }
.mobile-menu nav a { font-family: var(--font-mono); font-size: 2rem; margin: 15px 0; display: block; font-weight: bold; }

/* Hero */
.hero-tech { padding: 120px 0 60px; border-bottom: 2px solid var(--black); }
.meta-tag { font-family: var(--font-mono); color: var(--tech-blue); font-size: 0.8rem; display: block; margin-bottom: 20px; }
.hero-content h1 { font-family: var(--font-sans); font-size: 5rem; line-height: 0.9; letter-spacing: -2px; margin-bottom: 30px; font-weight: 300; }
.hero-desc { font-family: var(--font-mono); max-width: 600px; font-size: 1.1rem; border-left: 3px solid var(--tech-blue); padding-left: 20px; }

/* Projects */
.project-section { padding: 0; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 2px solid var(--black); }
.project-card { border-right: 1px solid var(--black); position: relative; }
.project-card:last-child { border-right: none; }

.p-image { position: relative; height: 400px; overflow: hidden; border-bottom: 1px solid var(--black); }
.p-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; filter: grayscale(100%); }
.p-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 85, 255, 0.8); display: flex; align-items: center; justify-content: center; color: var(--white); font-family: var(--font-mono); font-weight: bold; opacity: 0; transition: 0.3s; }
.project-card:hover .p-image img { filter: grayscale(0%); }
.project-card:hover .p-overlay { opacity: 1; }

.p-info { padding: 30px; background: var(--white); }
.p-info h3 { font-family: var(--font-mono); font-size: 1.2rem; margin-bottom: 10px; }
.p-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: #666; font-family: var(--font-mono); }

/* Blueprint Layout (About) */
.blueprint-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid var(--black); background: var(--white); }
.text-spec { padding: 60px; border-right: 2px solid var(--black); }
.text-spec h1 { font-family: var(--font-sans); font-size: 3rem; margin-bottom: 20px; letter-spacing: -1px; }
.blue-line { width: 50px; height: 5px; background: var(--tech-blue); margin-bottom: 30px; }
.mono { font-family: var(--font-mono); color: var(--tech-blue); font-weight: bold; margin-top: 30px; margin-bottom: 10px; }
.visual-spec { padding: 20px; display: flex; flex-direction: column; justify-content: center; background: var(--light-grey); }
.visual-spec img { width: 100%; border: 1px solid var(--black); }
.caption { font-family: var(--font-mono); font-size: 0.7rem; margin-top: 10px; text-align: right; }

/* Testimonials & Legal */
.section-head h2 { font-family: var(--font-mono); font-size: 2rem; border-bottom: 2px solid var(--black); padding-bottom: 10px; display: inline-block; }
.log-grid { display: flex; flex-direction: column; gap: 20px; max-width: 800px; margin: 40px auto 0; }
.log-entry { border: 1px solid var(--black); padding: 20px; background: var(--white); box-shadow: 5px 5px 0 var(--grid-color); }
.log-entry.active-log { border-color: var(--tech-blue); box-shadow: 5px 5px 0 var(--tech-blue); }
.log-header { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.8rem; margin-bottom: 15px; border-bottom: 1px dashed #ccc; padding-bottom: 5px; }
.log-text { font-style: italic; margin-bottom: 15px; }
.log-author { font-family: var(--font-mono); font-weight: bold; text-align: right; }

.legal-protocol { max-width: 800px; margin: 0 auto; border: 2px solid var(--black); padding: 50px; background: var(--white); }
.legal-protocol h1 { font-family: var(--font-mono); font-size: 1.5rem; }
.legal-protocol article { margin-bottom: 30px; }
.legal-protocol h3 { font-family: var(--font-mono); color: var(--tech-blue); margin-bottom: 10px; font-size: 1rem; }

/* Contact */
.contact-terminal { max-width: 700px; margin: 0 auto; border: 2px solid var(--black); background: var(--black); color: var(--white); font-family: var(--font-mono); }
.terminal-header { background: var(--tech-blue); color: var(--white); padding: 10px; font-weight: bold; font-size: 0.9rem; }
.terminal-body { padding: 40px; }
.contact-info { margin-bottom: 30px; border-bottom: 1px dashed #555; padding-bottom: 20px; }
.tech-form label { display: block; color: var(--tech-blue); margin-bottom: 5px; font-size: 0.8rem; }
.tech-form input, .tech-form select, .tech-form textarea { width: 100%; background: #222; border: 1px solid #444; color: var(--white); padding: 10px; font-family: var(--font-mono); margin-bottom: 20px; }
.tech-form input:focus, .tech-form textarea:focus { border-color: var(--tech-blue); outline: none; }
.btn-execute { background: var(--white); color: var(--black); border: none; padding: 10px 20px; font-family: var(--font-mono); font-weight: bold; cursor: pointer; width: 100%; }
.btn-execute:hover { background: var(--tech-blue); color: var(--white); }

/* Footer */
.lab-footer { margin-top: 100px; border-top: 2px solid var(--black); background: var(--white); }
.footer-content { padding: 50px 0; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.8rem; }
.f-col.right { text-align: right; }
.f-col.right a { display: block; margin-bottom: 5px; }
.f-col.right a:hover { color: var(--tech-blue); }
.ticker-bar { background: var(--black); color: var(--white); padding: 5px 0; overflow: hidden; white-space: nowrap; font-family: var(--font-mono); font-size: 0.8rem; }

/* Cookie */
.cookie-tech { position: fixed; bottom: 20px; left: 20px; background: var(--black); color: var(--tech-blue); padding: 20px; border: 2px solid var(--tech-blue); font-family: var(--font-mono); z-index: 9999; display: none; }
.cookie-tech.active { display: block; }
.cookie-tech p { margin-bottom: 15px; }
.cookie-tech button { background: var(--tech-blue); color: var(--white); border: none; padding: 5px 10px; cursor: pointer; font-family: var(--font-mono); }

@media (max-width: 900px) {
    .nav-cell { display: none; }
    .menu-toggle { display: flex; }
    .project-grid, .blueprint-layout { grid-template-columns: 1fr; }
    .project-card { border-right: none; border-bottom: 1px solid var(--black); }
    .hero-content h1 { font-size: 3rem; }
}