:root {
    /* Palette: Soft Professional Dark Mode (Default) */
    --bg-base: #0B0C0E;       
    --bg-module: #0F1012;     
    --bg-hover: #16181C;      
    
    --border-color: #1F2126;  
    
    --text-primary: #ECECEC;  
    --text-secondary: #949aa5; 
    --text-muted: #5c6068;    
    
    --accent: #6366F1;        
    --accent-glow: rgba(99, 102, 241, 0.15);
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --spacing-unit: 2.5rem;
}

/* Light Mode Override */
body.light-mode {
    --bg-base: #F2F4F7;       /* Soft Light Grey */
    --bg-module: #FFFFFF;     /* Pure White */
    --bg-hover: #F9FAFB;      /* Very Light Grey */
    
    --border-color: #E5E7EB;  /* Light Border */
    
    --text-primary: #111827;  /* Dark Charcoal */
    --text-secondary: #4B5563; /* Medium Grey */
    --text-muted: #9CA3AF;    /* Light Grey */
    
    --accent: #4F46E5;        /* Slightly darker Indigo for contrast on white */
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* We maintain the square aesthetic but make it look intentional, not broken */
    border-radius: 0; 
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul { list-style: none; }

/* Layout Wrapper */
.layout-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-top: none;
    transition: border-color 0.4s ease;
}

/* System Ticker */
.system-ticker {
    background: var(--bg-base);
    border-bottom: 1px solid var(--border-color);
    height: 36px;
    display: flex;
    justify-content: space-between; /* Split ticker and button */
    align-items: center;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

.ticker-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-track {
    white-space: nowrap;
    animation: marquee 80s linear infinite; /* Slowed down from 30s to 80s */
    padding-left: 100%;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    border-left: 1px solid var(--border-color);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0 1.5rem;
    height: 100%;
    cursor: pointer;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.4s ease;
    z-index: 10;
}

.theme-toggle:hover {
    background-color: var(--accent);
    color: #FFFFFF; /* Always white text on hover */
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: var(--border-color); /* Creates the grid lines */
    gap: 1px; /* The gap shows the border color */
    transition: background-color 0.4s ease;
}

/* Generic Grid Module */
.grid-module {
    background-color: var(--bg-module);
    position: relative;
    transition: background-color 0.4s ease;
}

.module-content {
    padding: var(--spacing-unit);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Grid Spans */
.span-full { grid-column: 1 / -1; }
.span-third { grid-column: span 1; }

/* Typography Utility */
.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    display: block;
}

/* Hero Section */
.hero__inner {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.brand-logo {
    width: 120px;
    height: auto;
    display: block;
    margin-bottom: 2rem;
}

.hero__title {
    font-weight: 800; /* Extra Bold for a solid, friendly feel */
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em; /* Slightly tighter for block aesthetic */
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.hero__subtitle {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.hero__desc {
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Minimal Button */
.btn-minimal {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    width: fit-content;
    transition: all 0.3s ease;
}

.btn-minimal:hover {
    color: var(--accent);
    border-color: var(--accent);
    padding-right: 1rem; /* Subtle animation */
}

.btn-icon { font-size: 1.1em; transition: transform 0.3s ease; }
.btn-minimal:hover .btn-icon { transform: translateX(5px); }

/* Mission */
.mission__statement {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.5;
    max-width: 900px;
    opacity: 0.9;
}

/* Pillars */
.pillar {
    min-height: 350px;
    border-right: 0; /* Handled by grid gap */
}

/* Soft Hover Effect for Pillars */
.pillar:hover {
    background-color: var(--bg-hover);
}

.pillar:hover .pillar__title {
    color: var(--accent);
}

.pillar__title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.pillar__desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Lab Section */
.lab__layout {
    flex-direction: row;
    align-items: flex-start;
}

.lab__intro {
    width: 35%;
}

.lab__intro h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.lab__specs {
    width: 65%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
}

.spec-item {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.spec-item:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.spec-marker { color: var(--accent); margin-right: 8px; }

/* Social Aside - Subgrid simulation */
.social-grid {
    display: contents; /* Allows children to participate in main grid */
}

.social-card {
    height: 180px;
    cursor: pointer;
}

.social-card:hover {
    background-color: var(--bg-hover);
}

.social-card:hover .social-name {
    color: var(--accent);
    transform: translateY(-2px);
}

.social-card:hover .icon-arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}

.flex-center {
    align-items: center;
    justify-content: center;
    position: relative;
}

.social-name {
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.icon-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

/* Footer & Newsletter */
.footer {
    border-top: 1px solid var(--border-color);
}

.footer__layout {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
}

.newsletter {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
}

.newsletter input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter input:focus {
    border-color: var(--accent);
}

.newsletter input::placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.newsletter__submit {
    position: absolute;
    right: 0;
    bottom: 1rem;
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.newsletter__submit:hover { opacity: 1; }

.copyright {
    margin-top: 3rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

.domain-link {
    color: var(--text-primary);
    border-bottom: 1px solid transparent;
}

.domain-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .span-third { grid-column: span 1; }
    
    .lab__layout {
        flex-direction: column;
    }
    .lab__intro, .lab__specs { width: 100%; }
    .lab__intro { margin-bottom: 2rem; }
    
    .lab__specs { grid-template-columns: 1fr; }
    
    .social-grid { display: block; } /* Fallback from contents */
    .social-card { height: 120px; border-bottom: 1px solid var(--border-color); }
    
    .hero__title { font-size: 2.8rem; }
    
    .ticker-content { font-size: 0.65rem; }
}