/* theLAB shared design system - excludes the ADI app landing page */
:root {
    --bg-deep: #020617;
    --bg-main: #070d18;
    --bg-elevated: #0f1726;
    --bg-card: rgba(12, 18, 31, 0.78);
    --bg-card-solid: #0c1322;
    --cyan: #06b6d4;
    --cyan-bright: #22d3ee;
    --cyan-glow: rgba(6, 182, 212, 0.18);
    --green: #10b981;
    --green-bright: #34d399;
    --amber: #f59e0b;
    --text: #f1f5f9;
    --text-secondary: #a8b4c7;
    --text-muted: #738198;
    --border: rgba(148, 163, 184, 0.13);
    --border-glow: rgba(6, 182, 212, 0.2);
    --shadow-card-hover: 0 18px 44px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(6, 182, 212, 0.14);
    --radius-card: 18px;
    --radius-control: 12px;
}

html { scroll-padding-top: 96px; }

body {
    line-height: 1.65;
    background:
        radial-gradient(900px 540px at 12% 0%, rgba(6, 182, 212, 0.08), transparent 60%),
        radial-gradient(700px 480px at 88% 18%, rgba(16, 185, 129, 0.055), transparent 62%),
        linear-gradient(180deg, #020617 0%, #050b16 44%, #020617 100%) !important;
}

#neural-canvas { opacity: 0.24 !important; }

.scanlines {
    opacity: 0.34;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 5px,
        rgba(255, 255, 255, 0.012) 5px,
        rgba(255, 255, 255, 0.012) 6px
    ) !important;
}

::-webkit-scrollbar-thumb {
    background: #1f8ea3 !important;
    border: 2px solid var(--bg-deep) !important;
}

::-webkit-scrollbar-thumb:hover { background: var(--cyan) !important; }

* { scrollbar-color: #1f8ea3 var(--bg-deep) !important; }

header,
header.site {
    padding: 0.9rem 2rem !important;
}

header.scrolled,
header.site.scrolled {
    background: rgba(2, 6, 23, 0.86) !important;
    border-bottom-color: rgba(148, 163, 184, 0.12) !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: var(--text) !important;
    text-decoration: none !important;
}

.logo-mark {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(16, 185, 129, 0.86)) !important;
    box-shadow: none !important;
}

.logo-mark::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 10px;
    background: var(--bg-deep);
}

.logo-mark img,
.logo-mark svg {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: contain !important;
}

.logo-text,
.terminal-title,
.terminal-body,
.code-body,
.code-filename,
.hero-subtitle,
.hero-badge,
.section-label,
.eyebrow,
.tag,
.project-tag,
.card-tag,
.project-card-status,
.project-card-category,
.card-status,
.card-meta,
.filter-btn,
.back-link {
    font-family: 'JetBrains Mono', monospace !important;
}

h1,
h2,
h3,
.section-title,
.featured-title,
.project-card-title,
.card-title {
    font-family: 'Inter', sans-serif !important;
    letter-spacing: -0.035em;
}

.nav-menu,
.filter-bar,
.back-link {
    background: rgba(12, 18, 31, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
    box-shadow: none !important;
}

nav.site .nav-menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    padding: 6px;
    border-radius: 999px;
}

nav.site .nav-menu a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
}

nav.site .nav-menu svg {
    width: 15px;
    height: 15px;
}

.nav-menu a,
.mobile-nav a,
.back-link {
    color: var(--text-secondary) !important;
}

.nav-menu a:hover,
.mobile-nav a:hover,
.back-link:hover {
    color: var(--text) !important;
    background: rgba(148, 163, 184, 0.08) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}

.nav-menu a.active,
.mobile-nav a.active,
.filter-btn.active {
    background: var(--cyan) !important;
    color: var(--bg-deep) !important;
}

.btn {
    border-radius: var(--radius-control) !important;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--green)) !important;
    box-shadow: 0 14px 34px rgba(6, 182, 212, 0.18) !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 18px 46px rgba(6, 182, 212, 0.24) !important;
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.045) !important;
    color: var(--text-secondary) !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
    box-shadow: none !important;
}

.btn-secondary:hover {
    color: var(--text) !important;
    border-color: rgba(6, 182, 212, 0.28) !important;
    background: rgba(6, 182, 212, 0.08) !important;
    box-shadow: none !important;
}

section { padding-block: clamp(72px, 9vw, 128px) !important; }

.section-header {
    max-width: 760px;
    margin-inline: auto;
    margin-bottom: clamp(3rem, 6vw, 5.5rem) !important;
}

.section-label,
.eyebrow {
    color: var(--cyan) !important;
    letter-spacing: 0.16em !important;
}

.section-label::before,
.section-label::after {
    background: rgba(148, 163, 184, 0.22) !important;
}

.section-title {
    font-weight: 800 !important;
}

.section-desc,
.lede,
.hero-description,
.featured-desc,
.card-desc,
.project-card-desc,
.footer-desc {
    color: var(--text-secondary) !important;
}

.research-card,
.project-card,
.domain-card,
.video-card,
.featured-card,
.error-terminal {
    background: linear-gradient(180deg, rgba(15, 23, 38, 0.86), rgba(8, 13, 24, 0.9)) !important;
    border-color: rgba(148, 163, 184, 0.13) !important;
    box-shadow: none !important;
}

.research-card:hover,
.project-card:hover,
.domain-card:hover,
.video-card:hover {
    border-color: rgba(6, 182, 212, 0.26) !important;
    box-shadow: var(--shadow-card-hover) !important;
}

.card-icon,
.project-card-icon,
.domain-icon {
    background: rgba(6, 182, 212, 0.065) !important;
    border-color: rgba(6, 182, 212, 0.16) !important;
}

.tag,
.project-tag,
.card-tag,
.tech-tag,
.video-tag {
    font-size: 0.65rem !important;
    padding: 3px 8px !important;
    background: rgba(148, 163, 184, 0.06) !important;
    border-color: rgba(148, 163, 184, 0.12) !important;
    color: var(--text-muted) !important;
}

.project-card-status,
.card-status {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.22) !important;
}

footer.site-footer {
    background: linear-gradient(180deg, rgba(7, 13, 24, 0.96), #020617) !important;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
    #neural-canvas { opacity: 0.16 !important; }
    .scanlines { display: none !important; }
}

@media (max-width: 768px) {
    header,
    header.site { padding: 0.85rem 1rem !important; }
    section { padding-inline: 1rem !important; }
    nav.site .nav-menu { display: none !important; }
}
