:root {
    --eh-bg: #050711;
    --eh-bg-alt: #0b0f1e;
    --eh-accent: #ff3277;
    --eh-accent-soft: rgba(255, 50, 119, 0.3);
    --eh-accent-2: #3cf2ff;
    --eh-text: #f4f4ff;
    --eh-muted: #8a8ea3;
    --eh-border-soft: rgba(255,255,255,0.08);
    --eh-radius-lg: 20px;
    --eh-radius-md: 14px;
    --eh-radius-sm: 8px;
    --eh-shadow-soft: 0 0 40px rgba(0, 0, 0, 0.7);
    --eh-shadow-glow: 0 0 40px rgba(255, 50, 119, 0.3);
    --eh-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --eh-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body.eh-body {
    margin: 0;
    font-family: var(--eh-font-sans);
    background: radial-gradient(circle at top left, #141a33 0, #050711 40%, #000 100%);
    color: var(--eh-text);
    position: relative;
    overflow-x: hidden;
}

/* Noise overlay */
.eh-noise {
    pointer-events: none;
    position: fixed;
    inset: 0;
    opacity: 0.1;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1600 900' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* NAVBAR */
.eh-navbar {
    background: rgba(3, 6, 20, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--eh-border-soft);
    z-index: 10;
}

.eh-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.eh-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--eh-accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.2), transparent);
    box-shadow: 0 0 15px rgba(255, 50, 119, 0.4);
}

.eh-brand-text {
    font-size: 0.9rem;
    color: var(--eh-muted);
}

.nav-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.15rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--eh-accent), var(--eh-accent-2));
    transition: width 0.2s ease-out;
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
    width: 100%;
}

/* HERO */
.eh-hero {
    min-height: 100vh;
    padding-top: 96px;
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
}

.eh-kicker {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--eh-muted);
    font-size: 0.75rem;
}

.eh-hero-title {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    line-height: 1;
}

.eh-hero-sub {
    color: var(--eh-muted);
    max-width: 32rem;
    font-size: 0.95rem;
}

.eh-btn-primary {
    background: linear-gradient(135deg, var(--eh-accent), var(--eh-accent-2));
    border: none;
    border-radius: 999px;
    padding-inline: 1.6rem;
    box-shadow: var(--eh-shadow-glow);
}

.eh-btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 0 30px rgba(60, 242, 255, 0.35);
}

.eh-btn-ghost {
    border-radius: 999px;
    border-color: var(--eh-border-soft);
    color: var(--eh-muted);
}

.eh-btn-ghost:hover {
    border-color: var(--eh-accent-soft);
    color: var(--eh-text);
}

/* Glitch text */
.eh-glitch {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.eh-glitch::before,
.eh-glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    overflow: hidden;
    clip-path: inset(0 0 50% 0);
    opacity: 0.8;
    mix-blend-mode: screen;
}

.eh-glitch::before {
    transform: translate3d(-2px, -1px, 0);
    text-shadow: -2px 0 var(--eh-accent);
}

.eh-glitch::after {
    transform: translate3d(2px, 1px, 0);
    text-shadow: 2px 0 var(--eh-accent-2);
}

.eh-glitch {
    animation: eh-glitch 2.2s infinite;
}

@keyframes eh-glitch {
    0%, 10%, 100% { transform: none; }
    2% { transform: translate3d(2px, 0, 0); }
    3% { transform: translate3d(-1px, 0, 0); }
    5% { transform: translate3d(3px, 0, 0); }
    6% { transform: translate3d(-1px, 0, 0); }
}

/* HERO PANEL */
.eh-hero-panel {
    background: radial-gradient(circle at 0 0, rgba(60, 242, 255, 0.1), transparent 55%),
                linear-gradient(145deg, #040714, #050711);
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border-soft);
    padding: 1.8rem;
    box-shadow: var(--eh-shadow-soft);
    position: relative;
}

.eh-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.eh-hero-card {
    border-radius: var(--eh-radius-md);
    border: 1px solid var(--eh-border-soft);
    padding: 0.8rem 0.9rem;
    background: radial-gradient(circle at top left, rgba(255, 50, 119, 0.16), transparent 55%);
    font-size: 0.8rem;
}

.eh-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--eh-muted);
    font-size: 0.65rem;
}

.eh-value {
    font-weight: 600;
    margin-top: 0.15rem;
    margin-bottom: 0.1rem;
}

.eh-sub {
    color: var(--eh-muted);
    font-size: 0.75rem;
}

.eh-hero-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.3rem;
    font-size: 0.75rem;
    color: var(--eh-muted);
}

.eh-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #19ff93;
    box-shadow: 0 0 15px rgba(25, 255, 147, 0.7);
    position: relative;
}

.eh-status-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 1px solid rgba(25, 255, 147, 0.5);
    animation: eh-pulse 1.6s infinite;
}

@keyframes eh-pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* SECTIONS */
.eh-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.eh-section-accent {
    background: radial-gradient(circle at top right, rgba(255, 50, 119, 0.12), transparent 55%),
                radial-gradient(circle at bottom left, rgba(60, 242, 255, 0.12), transparent 55%),
                #050711;
}

.eh-section-last {
    padding-bottom: 100px;
}

.eh-section-title {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.eh-section-lead {
    color: var(--eh-muted);
    font-size: 0.95rem;
    max-width: 32rem;
}

/* TIMELINE */
.eh-timeline {
    border-left: 1px solid var(--eh-border-soft);
    padding-left: 1.5rem;
    position: relative;
}

.eh-timeline::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--eh-accent), transparent);
    opacity: 0.6;
}

.eh-timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.eh-timeline-dot {
    position: absolute;
    left: -1.8rem;
    top: 0.25rem;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--eh-accent);
    box-shadow: var(--eh-shadow-glow);
}

.eh-timeline-body h5 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.eh-timeline-body p {
    font-size: 0.85rem;
    color: var(--eh-muted);
}

/* EVIL INDUSTRIES LOGO CARD */
.eh-logo-card {
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border-soft);
    padding: 1.7rem 1.6rem;
    background: radial-gradient(circle at 20% 0, rgba(60, 242, 255, 0.16), transparent 60%),
                linear-gradient(145deg, #050814, #050711);
    box-shadow: var(--eh-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.eh-logo-mark {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    border: 1px solid var(--eh-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.1), transparent 60%);
    box-shadow: 0 0 25px rgba(255, 50, 119, 0.35);
}

/* Stylized E (three tines) */
.eh-logo-e {
    position: relative;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eh-logo-e span {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--eh-accent), var(--eh-accent-2));
}

.eh-logo-e .e-top { top: 6px; }
.eh-logo-e .e-mid { top: 14px; width: 70%; }
.eh-logo-e .e-bot { top: 22px; width: 45%; }

.eh-logo-text {
    display: flex;
    flex-direction: column;
}

.eh-logo-main {
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.eh-logo-sub {
    font-size: 0.8rem;
    color: var(--eh-muted);
}

/* Feature cards */
.eh-feature-card {
    border-radius: var(--eh-radius-md);
    border: 1px solid var(--eh-border-soft);
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(0,0,0,0.5));
    font-size: 0.85rem;
}

.eh-feature-card h5 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Projects grid */
.eh-tagline {
    font-size: 0.85rem;
    color: var(--eh-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.eh-project-card {
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border-soft);
    padding: 1.3rem 1.4rem;
    background: linear-gradient(155deg, rgba(12, 18, 44, 0.9), rgba(4, 6, 20, 0.96));
    box-shadow: var(--eh-shadow-soft);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s ease-out;
}

.eh-project-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 20% 0, rgba(255, 50, 119, 0.12), transparent 55%),
        radial-gradient(circle at 80% 100%, rgba(60, 242, 255, 0.12), transparent 55%);
    opacity: 0;
    transition: opacity 0.15s ease-out;
    pointer-events: none;
}

.eh-project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--eh-shadow-glow);
    border-color: rgba(255, 50, 119, 0.55);
}

.eh-project-card:hover::before {
    opacity: 1;
}

.eh-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.eh-pill {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--eh-border-soft);
    color: var(--eh-muted);
}

.eh-project-status {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.eh-project-status.eh-online {
    color: #19ff93;
}

.eh-project-status.eh-wip {
    color: #ffdd57;
}

.eh-project-status.eh-idle {
    color: var(--eh-muted);
}

.eh-project-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.eh-project-card p {
    font-size: 0.85rem;
    color: var(--eh-muted);
    margin-bottom: 0.7rem;
}

.eh-metadata {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
    color: var(--eh-muted);
}

.eh-metadata li::before {
    content: "• ";
    color: var(--eh-accent-2);
}

.eh-project-card-ghost {
    border-style: dashed;
    opacity: 0.85;
}

/* Lab status panel */
.eh-status-panel {
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border-soft);
    background: linear-gradient(145deg, #050814, #050711);
    padding: 1.5rem 1.6rem;
    font-size: 0.85rem;
    box-shadow: var(--eh-shadow-soft);
}

.eh-status-row {
    display: grid;
    grid-template-columns: 1.1fr 2fr auto;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.eh-status-bar {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--eh-border-soft);
    height: 10px;
    position: relative;
}

.eh-status-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--eh-accent), var(--eh-accent-2));
    box-shadow: 0 0 12px rgba(60, 242, 255, 0.5);
}

.eh-lvl-1 { width: 18%; }
.eh-lvl-2 { width: 40%; }
.eh-lvl-3 { width: 63%; }
.eh-lvl-4 { width: 88%; }

.eh-status-val {
    color: var(--eh-muted);
    font-size: 0.75rem;
}

.eh-status-footer {
    margin-top: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--eh-muted);
    font-size: 0.8rem;
}

/* Contact */
.eh-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.eh-contact-list li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.eh-contact-label {
    min-width: 120px;
    color: var(--eh-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.eh-code-block {
    background: #05040a;
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border-soft);
    padding: 1.2rem 1.3rem;
    font-family: var(--eh-font-mono);
    font-size: 0.8rem;
    color: #f1f1ff;
    position: relative;
    box-shadow: var(--eh-shadow-soft);
}

.eh-code-block::before {
    content: "evilhouse://access-policy.js";
    position: absolute;
    left: 1.3rem;
    top: 0.7rem;
    font-size: 0.7rem;
    color: var(--eh-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eh-code-block pre {
    margin: 1.3rem 0 0;
}

/* Footer */
.eh-footer {
    border-top: 1px solid var(--eh-border-soft);
    background: rgba(0, 0, 0, 0.8);
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
}

.eh-footer-note {
    color: var(--eh-muted);
}

/* Scrollbar (desktop only) */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #02030a;
    }
    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--eh-accent), var(--eh-accent-2));
        border-radius: 999px;
    }
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
    .eh-hero {
        padding-top: 90px;
    }
    .eh-hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .eh-hero-panel {
        padding: 1.3rem;
    }
    .eh-project-card {
        padding: 1.1rem 1.1rem;
    }
    .eh-status-row {
        grid-template-columns: 0.9fr 1.8fr auto;
    }
}

/* Timeline note */
.eh-timeline-note {
    font-size: 0.8rem;
    color: var(--eh-muted);
    margin-bottom: 0.9rem;
}

/* Coffee section */
.eh-coffee-card {
    border-radius: var(--eh-radius-lg);
    border: 1px solid var(--eh-border-soft);
    padding: 1.4rem 1.5rem;
    background: linear-gradient(145deg, #050814, #050711);
    box-shadow: var(--eh-shadow-soft);
    font-size: 0.85rem;
}

.eh-coffee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
}

.eh-coffee-body {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.eh-coffee-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.eh-coffee-row span:last-child {
    color: var(--eh-muted);
}

.eh-coffee-footer {
    font-family: var(--eh-font-mono);
    font-size: 0.75rem;
    color: var(--eh-muted);
}

.eh-coffee-meta li::before {
    content: "• ";
    color: var(--eh-accent);
}

/* Project status – shelved */
.eh-project-status.eh-shelved {
    color: var(--eh-accent);
    opacity: 0.9;
}

/* People / staff / residents */
.eh-staff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.eh-staff-card,
.eh-resident-card {
    border-radius: var(--eh-radius-md);
    border: 1px solid var(--eh-border-soft);
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(0,0,0,0.6));
    font-size: 0.85rem;
}

.eh-staff-name,
.eh-resident-name {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.eh-staff-role,
.eh-resident-role {
    font-size: 0.8rem;
    color: var(--eh-muted);
    margin: 0;
}

.eh-residents-grid {
    display: grid;
    gap: 0.9rem;
}

@media (max-width: 767.98px) {
    .eh-staff-grid {
        grid-template-columns: 1fr;
    }
}


/* MeshCore Map layout */

#meshcore-map-shell {
    position: relative;
    height: 60vh;                  /* Big, dominant map area */
    min-height: 480px;             /* Keep it tall enough on short screens */
    border-radius: var(--eh-radius-lg);
    overflow: hidden;
}

/* Leaflet canvas lives inside the shell */
#meshcore-map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* On very small screens, don't let the map eat everything */
@media (max-width: 575.98px) {
    #meshcore-map-shell {
        height: 50vh;
        min-height: 320px;
    }
}
