/* ==========================================================================
   ShareSpark Eccentric Industrial Hardware & Embedded Systems Architecture
   Aesthetic: Teenage Engineering / Keysight / FR4 Solder Mask & Silkscreen
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Light Mode Tokens (Default — Industrial Anodized Silver & Ceramic White)
   -------------------------------------------------------------------------- */
:root,
html[data-theme="light"],
html.light-theme {
    --hw-chassis: #e5e9f0;          /* Brushed Aluminum Chassis */
    --hw-surface: #ffffff;          /* Ceramic IC Package */
    --hw-module: #f1f5f9;           /* Recessed Bay */
    --hw-panel-dark: #0f172a;       /* High-Contrast OLED Readout */
    --hw-pcb-trace: rgba(15, 23, 42, 0.05);
    --hw-solder-pad: #94a3b8;
    --hw-silkscreen: #475569;
    --hw-border: #94a3b8;           /* Crisp Machined Seam */
    --hw-border-heavy: #0f172a;     /* Structural Frame Border */
    --hw-screw: #cbd5e1;

    /* High-Visibility Instrumentation Accents */
    --te-orange: #ff5500;           /* Teenage Engineering Field Orange */
    --led-green: #00b862;           /* Logic HIGH Green */
    --led-green-glow: rgba(0, 184, 98, 0.35);
    --led-amber: #f59e0b;           /* Clock / TX-RX Amber */
    --led-red: #e11d48;             /* Fault / Law Enforcement Red */
    --copper-gold: #d97706;         /* ENIG Gold-Plated Contacts */

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-mono: #0284c7;

    --bg-dark: var(--hw-chassis);
    --card-bg: var(--hw-surface);
    --border-color: var(--hw-border);
    --primary: var(--te-orange);
    --primary-glow: rgba(255, 85, 0, 0.25);
    --text-main: var(--text-primary);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --keycap-bg: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    --keycap-border: #0f172a;
    --keycap-shadow: 0 4px 0 #0f172a, 0 6px 10px rgba(0, 0, 0, 0.12);

    --keycap-primary-bg: linear-gradient(180deg, #ff661a 0%, #e64d00 100%);
    --keycap-primary-shadow: 0 4px 0 #802b00, 0 6px 12px rgba(255, 85, 0, 0.25);
}

/* --------------------------------------------------------------------------
   2. Dark Mode Tokens (Matte Black FR4 Stealth & Gold Immersion PCB)
   -------------------------------------------------------------------------- */
html[data-theme="dark"],
html.dark-theme {
    --hw-chassis: #070a0f;          /* Carbon Black FR4 Substrate */
    --hw-surface: #0e131d;          /* Matte IC Epoxy Body */
    --hw-module: #151d2b;           /* Shielded Logic Cavity */
    --hw-panel-dark: #05070b;
    --hw-pcb-trace: rgba(0, 255, 170, 0.04);
    --hw-solder-pad: #26334d;
    --hw-silkscreen: #64748b;
    --hw-border: #26354d;
    --hw-border-heavy: #00ffaa;
    --hw-screw: #1e293b;

    --te-orange: #ff5500;
    --led-green: #00ffaa;           /* Oscilloscope Phosphor Green */
    --led-green-glow: rgba(0, 255, 170, 0.4);
    --led-amber: #ffb703;
    --led-red: #ff2a5f;
    --copper-gold: #fbbf24;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-mono: #00ffaa;

    --bg-dark: var(--hw-chassis);
    --card-bg: var(--hw-surface);
    --border-color: var(--hw-border);
    --primary: var(--led-green);
    --primary-glow: var(--led-green-glow);
    --text-main: var(--text-primary);

    --keycap-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --keycap-border: #384b6b;
    --keycap-shadow: 0 4px 0 #05070b, 0 6px 12px rgba(0, 0, 0, 0.6);

    --keycap-primary-bg: linear-gradient(180deg, #00ffaa 0%, #00cc88 100%);
    --keycap-primary-shadow: 0 4px 0 #006644, 0 6px 14px rgba(0, 255, 170, 0.3);
}

/* --------------------------------------------------------------------------
   3. Global Reset & Hardware GPU-Accelerated Matrix Grid
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--hw-chassis) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.matrix-glow {
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(var(--hw-solder-pad) 1px, transparent 1px),
        linear-gradient(to right, var(--hw-pcb-trace) 1px, transparent 1px),
        linear-gradient(to bottom, var(--hw-pcb-trace) 1px, transparent 1px);
    background-size: 32px 32px, 128px 128px, 128px 128px;
    pointer-events: none;
    z-index: 0;
    transform: translateZ(0);
    will-change: transform;
}

.container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.highlight {
    color: var(--te-orange);
    border-bottom: 2px solid var(--te-orange);
}

html[data-theme="dark"] .highlight {
    color: var(--led-green);
    border-bottom-color: var(--led-green);
}

/* --------------------------------------------------------------------------
   4. Front-Panel Instrumentation Navbar (Single-Line High Density)
   -------------------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--hw-surface);
    border-bottom: 2px solid var(--hw-border-heavy);
    padding: 0.5rem 0;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    background: var(--hw-module);
    border: 2px solid var(--hw-border-heavy);
    padding: 4px 10px;
    box-shadow: 2px 2px 0 var(--hw-border-heavy);
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--led-green);
    box-shadow: 0 0 6px var(--led-green);
    animation: pulseOscillator 1.8s infinite steps(2);
}

@keyframes pulseOscillator {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 7px;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1.2;
}

.nav-links a:hover {
    background: var(--hw-module);
    border-color: var(--hw-border);
    color: var(--text-primary);
}

/* Active Latched Navigation State — Sleek Flush Pill */
.nav-links a.active {
    background: var(--hw-panel-dark) !important;
    color: #00ffaa !important;
    border: 1px solid var(--hw-border-heavy) !important;
    box-shadow: 2px 2px 0 var(--te-orange);
    padding: 4px 8px;
}

.nav-links a.active::before {
    content: '●';
    color: var(--led-green);
    font-size: 0.55rem;
    text-shadow: 0 0 4px var(--led-green);
}

/* Dev Parts Robotic Optical Targeting Pip */
.dev-parts-robot {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    color: var(--te-orange) !important;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.dev-parts-robot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--te-orange);
    box-shadow: 0 0 0 2px rgba(255, 85, 0, 0.2), 0 0 6px var(--te-orange);
    flex-shrink: 0;
    animation: robotEyeSweep 2.2s infinite ease-in-out;
}

@keyframes robotEyeSweep {
    0%, 100% {
        transform: scale(0.9);
        background: var(--te-orange);
        box-shadow: 0 0 0 2px rgba(255, 85, 0, 0.25), 0 0 6px var(--te-orange);
    }
    50% {
        transform: scale(1.2);
        background: #00ffaa;
        box-shadow: 0 0 0 3px rgba(0, 255, 170, 0.35), 0 0 10px #00ffaa;
    }
}

.dev-parts-robot:hover {
    color: #00ffaa !important;
}

.dev-parts-robot:hover::before {
    background: #00ffaa;
    box-shadow: 0 0 0 4px rgba(0, 255, 170, 0.4), 0 0 12px #00ffaa;
}

.partner-link {
    color: var(--led-red) !important;
    font-weight: 700;
    white-space: nowrap;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: var(--hw-module);
    border: 2px solid var(--hw-border-heavy);
    padding: 6px;
    cursor: pointer;
}

.mobile-menu-btn .bar {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
}

/* --------------------------------------------------------------------------
   5. Telemetry Streamer / Hardware News Ticker
   -------------------------------------------------------------------------- */
.telemetry-ticker-bar {
    background: var(--hw-panel-dark);
    border-bottom: 2px solid var(--hw-border-heavy);
    color: #f1f5f9;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    height: 32px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 999;
}

.ticker-lead-badge {
    background: var(--te-orange);
    color: #ffffff;
    font-weight: 700;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.06em;
    z-index: 3;
    box-shadow: 3px 0 6px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.ticker-pulse-pip {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px #ffffff;
    animation: pulseOscillator 1.2s infinite steps(2);
}

.ticker-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
}

.ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: tickerCrawl 36s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes tickerCrawl {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    color: #cbd5e1;
    text-decoration: none;
    white-space: nowrap;
}

.ticker-action-link {
    color: #00ffaa;
    text-decoration: none;
    font-weight: 700;
    margin-left: 4px;
    transition: color 0.12s ease;
}

.ticker-action-link:hover {
    color: var(--te-orange);
    text-decoration: underline;
}

.ticker-tag {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 2px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ticker-tag.youtube { background: #e11d48; color: #ffffff; }
.ticker-tag.firmware { background: #0284c7; color: #ffffff; }
.ticker-tag.blueprint { background: #059669; color: #ffffff; }
.ticker-tag.hardware { background: var(--te-orange); color: #ffffff; }

.ticker-divider {
    color: #475569;
    font-size: 0.65rem;
    user-select: none;
}

/* --------------------------------------------------------------------------
   6. Mechanical Keycap Push Buttons (Actuation Travel)
   -------------------------------------------------------------------------- */
.btn-primary, .btn-primary-sm {
    background: var(--keycap-primary-bg);
    color: #ffffff !important;
    border: 2px solid #0f172a;
    border-radius: 4px;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--keycap-primary-shadow);
    transition: transform 0.05s linear, box-shadow 0.05s linear;
    white-space: nowrap;
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-primary-sm {
    color: #05070b !important;
}

.btn-primary-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
}

.btn-primary:active, .btn-primary-sm:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #0f172a;
}

.btn-secondary {
    background: var(--keycap-bg);
    color: var(--text-primary) !important;
    border: 2px solid var(--keycap-border);
    border-radius: 4px;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--keycap-shadow);
    transition: transform 0.05s linear, box-shadow 0.05s linear;
    white-space: nowrap;
}

.btn-secondary:hover {
    border-color: var(--te-orange);
}

.btn-secondary:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--keycap-border);
}

/* --------------------------------------------------------------------------
   7. Dual Hardware Stepper Vote Controls (Upvote / Downvote)
   -------------------------------------------------------------------------- */
.vote-stepper {
    display: inline-flex;
    align-items: center;
    background: var(--hw-panel-dark);
    border: 1px solid var(--hw-border-heavy);
    box-shadow: 2px 2px 0 var(--hw-border-heavy);
}

.vote-btn {
    background: transparent;
    border: none;
    padding: 0.35rem 0.65rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.12s ease, color 0.12s ease;
}

.vote-btn.up {
    color: #00ffaa;
    border-right: 1px solid var(--hw-border);
}

.vote-btn.up:hover {
    background: var(--te-orange);
    color: #ffffff;
}

.vote-btn.down {
    color: #ff2a5f;
    border-left: 1px solid var(--hw-border);
}

.vote-btn.down:hover {
    background: #ff2a5f;
    color: #ffffff;
}

.vote-score-display {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    padding: 0 0.6rem;
    user-select: none;
}

/* --------------------------------------------------------------------------
   8. Hero & Limelight Units (Chamfered Cuts)
   -------------------------------------------------------------------------- */
.hero {
    margin: 2.25rem 0;
    padding: 3rem 2.5rem;
    background: var(--hw-surface);
    border: 2px solid var(--hw-border-heavy);
    box-shadow: 6px 6px 0 rgba(15, 23, 42, 0.12);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}

.hero::before {
    content: 'SYS_BENCH // CH_01 [READY]';
    position: absolute;
    top: 10px;
    right: 32px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--hw-silkscreen);
    letter-spacing: 0.08em;
}

.hero h1 {
    font-family: var(--font-mono);
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1rem;
    max-width: 820px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 680px;
    margin-bottom: 1.75rem;
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--hw-panel-dark);
    color: #00ffaa;
    border: 1px solid var(--hw-border-heavy);
    margin-bottom: 1rem;
    white-space: nowrap;
}

.limelight-rack {
    background: var(--hw-surface);
    border: 2px solid var(--hw-border-heavy);
    border-left: 8px solid var(--te-orange);
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 6px 6px 0 rgba(15, 23, 42, 0.1);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.limelight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
    margin-top: 0.75rem;
}

.limelight-title {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    margin-bottom: 0.85rem;
    line-height: 1.25;
}

.limelight-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.limelight-title a:hover {
    color: var(--te-orange);
}

.limelight-img-box {
    height: 250px;
    overflow: hidden;
    border: 2px solid var(--hw-border-heavy);
    background: var(--hw-module);
}

.limelight-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   9. Logic Analyzer Search Bar
   -------------------------------------------------------------------------- */
.search-filter-bar {
    margin-bottom: 2.5rem;
    background: var(--hw-surface);
    border: 2px solid var(--hw-border-heavy);
    padding: 1.1rem;
    box-shadow: 4px 4px 0 rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-icon,
svg.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px !important;
    height: 18px !important;
    stroke: var(--te-orange);
    pointer-events: none;
    z-index: 2;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    background: var(--hw-module);
    border: 2px solid var(--hw-border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s ease;
}

.search-input-wrapper input:focus {
    border-color: var(--te-orange);
    background: var(--hw-surface);
}

.quick-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-chip {
    background: var(--hw-module);
    border: 1px solid var(--hw-border);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
    text-decoration: none;
    white-space: nowrap;
}

.tag-chip:hover {
    border-color: var(--hw-border-heavy);
    color: var(--text-primary);
}

.tag-chip.active {
    background: var(--hw-panel-dark);
    border-color: var(--hw-panel-dark);
    color: #00ffaa;
    box-shadow: 2px 2px 0 var(--te-orange);
}

/* --------------------------------------------------------------------------
   10. Breakout Blueprint Cards (With scroll-margin-top & contain)
   -------------------------------------------------------------------------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.project-card, .spec-card {
    background: var(--hw-surface);
    border: 2px solid var(--hw-border-heavy);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 5px 0 rgba(15, 23, 42, 0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
    contain: content;
}

.spec-card {
    padding: 1.5rem;
}

.project-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--te-orange);
}

.project-card::before {
    content: '⊕ PCB_MOD // 3.3V_LOGIC';
    display: block;
    background: var(--hw-panel-dark);
    color: #94a3b8;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-bottom: 1px solid var(--hw-border);
}

.card-img-wrapper {
    height: 180px;
    width: 100%;
    position: relative;
    background: var(--hw-module);
    border-bottom: 2px solid var(--hw-border-heavy);
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .card-img-wrapper img {
    transform: scale(1.03);
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.category-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--te-orange);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.category-tag::before {
    content: '[IC_U1] ';
    color: var(--hw-silkscreen);
}

.card-title {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--te-orange);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.card-footer {
    border-top: 2px solid var(--hw-border-heavy);
    padding: 0.75rem 1.25rem;
    background: var(--hw-module);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.card-footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    width: 80px;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--copper-gold),
        var(--copper-gold) 4px,
        transparent 4px,
        transparent 7px
    );
}

/* --------------------------------------------------------------------------
   11. Hardened Form Inputs & Industrial Tables
   -------------------------------------------------------------------------- */
.input-cyber {
    width: 100%;
    padding: 0.75rem 0.95rem;
    background: var(--hw-module);
    border: 2px solid var(--hw-border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.input-cyber:focus {
    border-color: var(--te-orange);
    background: var(--hw-surface);
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.tech-table th {
    text-align: left;
    padding: 0.75rem 0.9rem;
    background: var(--hw-panel-dark);
    color: #94a3b8;
    border-bottom: 2px solid var(--hw-border-heavy);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.tech-table td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid var(--hw-border);
    color: var(--text-primary);
}

.tech-table tr:hover td {
    background: var(--hw-module);
}

/* --------------------------------------------------------------------------
   12. Dual-Pole IoT Rocker Switch (Navbar)
   -------------------------------------------------------------------------- */
.iot-device-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--hw-module);
    border: 2px solid var(--hw-border-heavy);
    padding: 3px 8px;
    box-shadow: 2px 2px 0 var(--hw-border-heavy);
    margin-left: 0.4rem;
    flex-shrink: 0;
}

.iot-device-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-primary);
}

.iot-rocker {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 24px;
    cursor: pointer;
}

.iot-rocker input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.iot-switch-track {
    position: absolute;
    inset: 0;
    background: #090d16;
    border: 1px solid var(--hw-border-heavy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.iot-circuit-pin {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: #94a3b8;
    user-select: none;
}

.iot-status-led {
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--led-green);
    box-shadow: 0 0 6px var(--led-green);
    transition: left 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
    z-index: 2;
}

.iot-rocker input:checked + .iot-switch-track .iot-status-led {
    background: var(--te-orange);
    box-shadow: 0 0 8px var(--te-orange);
    left: calc(100% - 11px);
}

.iot-knob {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 22px;
    height: 18px;
    background: linear-gradient(180deg, #475569 0%, #1e293b 100%);
    border: 1px solid #94a3b8;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
}

.iot-rocker input:checked + .iot-switch-track .iot-knob {
    transform: translateX(24px);
    background: linear-gradient(180deg, #ff661a 0%, #cc4400 100%);
    border-color: #ffffff;
}

/* --------------------------------------------------------------------------
   13. Code Lab Studio, Simulator & Real-Time AI Mentor Panes
   -------------------------------------------------------------------------- */
.codelab-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 86px);
    padding: 0.5rem 1.25rem 0.6rem;
    box-sizing: border-box;
    max-width: 1560px;
    margin: 0 auto;
    width: 100%;
}

.codelab-control-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.codelab-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.codelab-heading {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}

.codelab-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.select-pill {
    display: inline-flex;
    align-items: center;
    background: var(--hw-module);
    border: 2px solid var(--hw-border-heavy);
    padding: 2px 6px;
    position: relative;
}

.selector-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}

.selector-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--led-green);
    box-shadow: 0 0 5px var(--led-green);
}

.compact-dropdown {
    background: transparent;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    padding-right: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.select-chevron {
    position: absolute;
    right: 8px;
    font-size: 0.55rem;
    color: var(--text-muted);
    pointer-events: none;
}

.codelab-workspace {
    display: grid;
    grid-template-columns: 1.35fr 1.1fr 1fr;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
}

.workspace-pane {
    background: var(--hw-panel-dark);
    border: 2px solid var(--hw-border-heavy);
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-shadow: 3px 3px 0 rgba(15, 23, 42, 0.12);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.pane-header {
    background: #090d16;
    padding: 0.45rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--hw-border-heavy);
    flex-shrink: 0;
}

.pane-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.04em;
}

.pane-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--te-orange);
}

.pane-clear-btn {
    background: transparent;
    border: 1px solid var(--hw-border);
    color: #94a3b8;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    cursor: pointer;
}

.pane-clear-btn:hover {
    color: #ffffff;
    border-color: var(--te-orange);
}

#monaco-editor-container {
    flex: 1;
    width: 100%;
    min-height: 0;
}

.simulator-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #05070b;
    position: relative;
}

.terminal-body {
    flex: 1;
    margin: 0;
    padding: 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.5;
    color: #00ffaa;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.html-preview {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

.chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #070a0f;
}

.chat-msg {
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    font-size: 0.78rem;
    line-height: 1.45;
}

.chat-msg.ai {
    background: #0e1522;
    border-left: 3px solid var(--te-orange);
    color: #cbd5e1;
}

.chat-msg.user {
    background: #151d2b;
    border-left: 3px solid var(--led-green);
    color: #ffffff;
    align-self: flex-end;
    width: 90%;
}

.chat-sender {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #00ffaa;
}

.chat-msg.ai .chat-sender {
    color: var(--te-orange);
}

.chat-input-row {
    display: flex;
    gap: 5px;
    padding: 0.5rem;
    background: #090d16;
    border-top: 1px solid var(--hw-border-heavy);
}

/* --------------------------------------------------------------------------
   14. Precision Benchtop Footer & Telemetry
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--hw-surface);
    border-top: 3px solid var(--hw-border-heavy);
    font-size: 0.84rem;
    margin-top: auto;
    color: var(--text-secondary);
    position: relative;
}

.pcb-busbar {
    height: 6px;
    width: 100%;
    background: repeating-linear-gradient(
        -45deg,
        var(--hw-border-heavy),
        var(--hw-border-heavy) 8px,
        var(--te-orange) 8px,
        var(--te-orange) 16px
    );
}

.footer-main {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1.1fr 1.5fr;
    gap: 2.25rem;
    padding: 3rem 0 2rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.silkscreen-rev {
    font-size: 0.72rem;
    color: var(--te-orange);
}

.brand-desc, .newsletter-desc {
    font-size: 0.82rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.footer-heading {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.9rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--hw-border);
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav a {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.12s ease, transform 0.12s ease;
    display: inline-block;
    white-space: nowrap;
}

.footer-nav a:hover {
    color: var(--te-orange);
    transform: translateX(3px);
}

.subscribe-input-group {
    display: flex;
    gap: 6px;
    margin-bottom: 0.85rem;
}

.subscribe-input {
    flex: 1;
    padding: 0.55rem 0.75rem;
    background: var(--hw-module);
    border: 2px solid var(--hw-border);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    outline: none;
}

.subscribe-btn {
    padding: 0.55rem 0.95rem;
    background: var(--hw-panel-dark);
    color: #00ffaa;
    border: 2px solid var(--hw-border-heavy);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.subscribe-btn:hover {
    background: var(--te-orange);
    color: #ffffff;
}

.statutory-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    border-left: 2px solid var(--hw-border);
    padding-left: 0.5rem;
}

.telemetry-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.65rem;
    background: var(--hw-panel-dark);
    border: 1px solid var(--hw-border-heavy);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #00ffaa;
    white-space: nowrap;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ffaa;
    box-shadow: 0 0 6px #00ffaa;
}

.beating-heart {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    margin-left: 3px;
    filter: drop-shadow(0 0 6px rgba(225, 29, 72, 0.6));
    animation: cardiacPulse 1.15s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes cardiacPulse {
    0%   { transform: scale(1); }
    14%  { transform: scale(1.32); }
    28%  { transform: scale(0.95); }
    42%  { transform: scale(1.22); }
    70%  { transform: scale(1); }
    100% { transform: scale(1); }
}

.footer-bottom {
    border-top: 2px solid var(--hw-border-heavy);
    padding: 1.1rem 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: var(--hw-module);
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   Cool Hardware Era Badge (2018 — 2026)
   -------------------------------------------------------------------------- */
.footer-timeline-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--hw-panel-dark);
    border: 1px solid var(--hw-border-heavy);
    padding: 4px 10px;
    box-shadow: 2px 2px 0 var(--te-orange);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    white-space: nowrap;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.timeline-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--led-green);
    box-shadow: 0 0 6px var(--led-green);
    animation: pulseOscillator 1.8s infinite steps(2);
}

.timeline-label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.62rem;
}

.timeline-years {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.timeline-rev {
    background: var(--te-orange);
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 2px;
}

.copyright-text {
    flex: 1.5;
    color: var(--text-secondary);
    line-height: 1.4;
}

.footer-heart-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--hw-surface);
    padding: 4px 10px;
    border: 1px solid var(--hw-border);
    white-space: nowrap;
}

.legal-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
}

.legal-links a:hover {
    color: var(--te-orange);
}

/* --------------------------------------------------------------------------
   15. Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .nav-links a {
        padding: 4px 5px;
        font-size: 0.68rem;
    }
}

@media (max-width: 1100px) {
    .codelab-layout {
        height: auto;
        overflow: visible !important;
    }
    body {
        overflow: auto !important;
    }
    .codelab-workspace {
        grid-template-columns: 1fr;
        height: auto;
    }
    .workspace-pane {
        height: 480px;
    }
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 960px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .mobile-menu-btn { display: flex; }
    .projects-grid { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--hw-surface);
        border-bottom: 2px solid var(--hw-border-heavy);
        padding: 1rem;
        gap: 0.75rem;
    }
    .nav-links.active a {
        width: 100%;
        padding: 0.5rem 0.75rem;
    }
}