@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

body {
  margin: 0;
  background: #050510;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  
  /* IMPORTANT: Ensure no transforms on body to break fixed elements */
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  
  overflow-x: hidden;
  /* Allow standard scrolling */
  overflow-y: auto; 
}

html {
    scroll-behavior: smooth;
    transform: none !important;
    overflow-x: hidden;
}

/* Debug GUI - hidden for previews */
.lil-gui {
    /* display: none !important; */
    z-index: 1000 !important;
}

/* Fixed Background Canvas */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh; /* Fixed height, parallax is now shader-based */
  z-index: -1;
  pointer-events: auto; /* Allow mouse interaction for the brush */
}

/* CRT Overlay - Fixed on top of everything */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* Vignette Overlay */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle, transparent 60%, black 100%);
    z-index: 998; /* Below CRT (999) but above content */
}

/* --- NAVIGATION --- */
.main-nav {
    /* Fixed placement */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    
    /* Visuals */
    padding: 1.5rem 0;
    background: rgba(5, 5, 16, 0.95); /* Solid semi-transparent background */
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    
    /* Performance & Rendering Fixes */
    /* transform: translateZ(0); Removed to prevent potential fixed-pos stacking issues */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.main-nav a {
    color: #3ba2ce;
    text-decoration: none;
    font-size: 1.1rem;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
}

.main-nav a:hover {
    color: #fff;
    text-shadow: 0 0 10px #00ffff;
    border-color: rgba(0, 255, 255, 0.3);
    background: rgba(0, 255, 255, 0.05);
}

/* --- HERO SECTION --- */
.section-hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 12vw; /* Massive viewport-based size */
    margin: 0;
    line-height: 0.9;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: center;
    gap: 2vw;
    font-weight: 900;
    text-transform: uppercase;
    width: 100%;
    
    /* Lift above CRT overlay (z-index 999) */
    position: relative;
    z-index: 1002;
}

/* Scanline Text Effect */
:root {
    --scan-thickness: 6.66px;
    --scan-gap: 0px;
    --title-glow: 13.6px;
    --devs-glow-1: 4px;
    --devs-glow-2: 8px;
    --devs-glow-3: 12px;
}

.text-scanline {
    background-image: repeating-linear-gradient(
        to bottom,
        var(--scan-color) 0px,
        var(--scan-color) var(--scan-thickness),
        transparent var(--scan-thickness),
        transparent calc(var(--scan-thickness) + var(--scan-gap))
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    filter: drop-shadow(0 0 var(--title-glow) var(--scan-color));
}

.title-white {
    --scan-color: #e0e0e0;
    color: #e0e0e0;
    filter: drop-shadow(0 0 15px rgba(224, 224, 224, 0.8));
    position: relative;
    z-index: 1002;
}

.title-cyan {
    --scan-color: #00ffff;
    color: #00ffff;
    filter: drop-shadow(0 0 15px rgba(0,255,255,0.8));
    position: relative;
    z-index: 1002;
}

.title-orange {
    --scan-color: #ffaa00;
    color: #ffaa00;
    filter: drop-shadow(0 0 15px rgba(255, 170, 0, 0.8));
    position: relative;
    z-index: 1002;
}

.hero-subtitle {
    margin-top: 20px;
    font-family: 'Share Tech Mono', monospace;
    color: #b300ff; /* Purple */
    font-size: 1.2rem;
    letter-spacing: 4px;
    text-shadow: 0 0 10px #b300ff;
}

.hero-tagline {
    margin-top: 40px;
    color: #aaa;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    letter-spacing: 1px;
}

.hero-quote {
    color: #ffaa00; /* Yellow/Orange */
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: 10px;
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.6);
}

.hero-btn, .hero-btn:visited, .hero-btn:active {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Share Tech Mono', monospace;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    background: rgba(0, 255, 255, 0.15);
    border: 2px solid #00ffff;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 3px;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4), inset 0 0 10px rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1002;
}

.hero-btn:hover {
    background: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8), inset 0 0 20px rgba(0, 255, 255, 0.5);
    color: #fff;
    text-shadow: 0 0 15px #fff;
    transform: translateY(-2px);
}



/* Cursor Marker Logic - A-Move command feedback */
.amove-marker {
  position: fixed; /* Fixed for viewport-relative click coordinates */
  width: 50px;
  height: 50px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.amove-marker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border: 2px solid #00ffff;
  border-radius: 50%;
  animation: ringPulse 0.5s ease-out forwards;
}

.amove-marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ffff;
  animation: dotFade 0.4s ease-out forwards;
}

.arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid #00ffff;
  top: 50%;
  left: 50%;
  transform-origin: center 150%;
  opacity: 0;
  filter: drop-shadow(0 0 5px #00ffff);
  animation: converge 0.4s ease-out forwards;
}

.arrow:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateY(-25px); }
.arrow:nth-child(2) { transform: translate(-50%, -50%) rotate(90deg) translateY(-25px); }
.arrow:nth-child(3) { transform: translate(-50%, -50%) rotate(180deg) translateY(-25px); }
.arrow:nth-child(4) { transform: translate(-50%, -50%) rotate(270deg) translateY(-25px); }

@keyframes ringPulse { 0% { width: 10px; height: 10px; opacity: 1; border-width: 3px; } 100% { width: 50px; height: 50px; opacity: 0; border-width: 1px; } }
@keyframes dotFade { 0% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } }
@keyframes converge { 0% { opacity: 0; margin-top: -15px; } 30% { opacity: 1; } 100% { opacity: 0; margin-top: 5px; transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0px) scale(0.3); } }

.dev-stats-mobile {
  display: none;
}

/* --- SELECTION BOX --- */

/* --- SELECTION BOX --- */
.selection-box {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
    /* Background and border are set dynamically via JS, but defaults are good practice */
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid #00ffff;
}

/* --- UNIT TOOLTIP --- */
.dev-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 300px;
    background: rgba(5, 20, 31, 0.9);
    border: 1px solid #00ffff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1000;
    pointer-events: none; /* Ignore mouse, managed by JS position */
    transform: translate(-5px, calc(-100% - 20px)); /* Offset from cursor */
    opacity: 1;
    transition: opacity 0.2s;
}

.dev-tooltip.hidden {
    opacity: 0;
}

#tooltip-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    border-bottom: 2px solid #3e78b6;
}

.tooltip-content h3 {
    margin: 0;
    color: #e0e0e0;
    font-size: 1.4rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tooltip-content p {
    margin: 5px 0 0;
    color: #3ba2ce;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    text-align: center;
}

/* --- DEVS SECTION --- */
.section-devs {
    min-height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.section-devs h2 {
    font-size: 6rem;
    letter-spacing: 8px;
    text-align: center;
    text-shadow:
        0 0 var(--devs-glow-1) rgba(0, 255, 255, 0.8),
        0 0 var(--devs-glow-2) rgba(0, 255, 255, 0.5),
        0 0 var(--devs-glow-3) rgba(0, 255, 255, 0.3);
}

.section-marionette {
    min-height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.section-marionette h2 {
    font-size: 6rem;
    letter-spacing: 8px;
    text-align: center;
    text-shadow:
        0 0 var(--devs-glow-1) rgba(0, 255, 255, 0.8),
        0 0 var(--devs-glow-2) rgba(0, 255, 255, 0.5),
        0 0 var(--devs-glow-3) rgba(0, 255, 255, 0.3);
}


.section-devs {
    flex-direction: column;
    gap: 2rem;
}

/* --- GOALS SECTION --- */
.section-goals {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    gap: 2rem;
}

.section-goals h2 {
    font-size: 4rem;
    letter-spacing: 6px;
    text-align: center;
     text-shadow:
        0 0 var(--devs-glow-1) rgba(255, 170, 0, 0.8),
        0 0 var(--devs-glow-2) rgba(255, 170, 0, 0.5),
        0 0 var(--devs-glow-3) rgba(255, 170, 0, 0.3);
}

/* --- CONTENT PLACEHOLDER --- */
.content-placeholder {
    width: 60%;
    min-width: 300px;
    height: 300px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.content-placeholder:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.5);
}

.placeholder-text {
    font-family: 'Share Tech Mono', monospace;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.section-devs .content-placeholder {
    width: 90%;
    max-width: 1400px;
    height: 70vh;
    min-height: 600px;
}

/* --- CONTACT SECTION --- */
.section-contact {
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 2rem 4rem 2rem;
    gap: 2rem;
}

.section-contact h2 {
    font-size: 3rem;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
}

.contact-link {
    color: #3ba2ce;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    text-decoration: none;
    letter-spacing: 2px;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    color: #888;
    border-color: #666;
    box-shadow: none;
    background: transparent;
    transform: none;
}

.contact-coming-soon {
    position: relative;
}

.contact-coming-soon:hover {
    color: transparent;
}

.contact-coming-soon:hover::after {
    content: attr(data-text);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #888;
    white-space: nowrap;
}

/* --- ETHOS GRID --- */
.ethos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 90%;
    max-width: 1200px;
    margin-top: 2rem;
}

.ethos-card {
    background: rgba(5, 5, 16, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px; /* Slightly rounded */
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    
    /* Tech corners using simple border-image or box-shadow trickery? 
       Let's use a subtle clip-path or just borders for cleaner code 
    */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

/* Corner Accents */
.ethos-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid #ffaa00;
    border-left: 2px solid #ffaa00;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.ethos-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid #00ffff;
    border-right: 2px solid #00ffff;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.ethos-card:hover {
    transform: translateY(-5px);
    background: rgba(5, 5, 16, 0.8);
}

.ethos-card[data-index="01"]:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 170, 0, 0.3); border-color: rgba(255, 170, 0, 0.5); }
.ethos-card[data-index="01"]:hover::before, .ethos-card[data-index="01"]:hover::after { border-color: #ffaa00; width: 100%; height: 100%; opacity: 1; }

.ethos-card[data-index="02"]:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 255, 0.3); border-color: rgba(0, 255, 255, 0.5); }
.ethos-card[data-index="02"]:hover::before, .ethos-card[data-index="02"]:hover::after { border-color: #00ffff; width: 100%; height: 100%; opacity: 1; }

.ethos-card[data-index="03"]:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 0, 85, 0.3); border-color: rgba(255, 0, 85, 0.5); }
.ethos-card[data-index="03"]:hover::before, .ethos-card[data-index="03"]:hover::after { border-color: #ff0055; width: 100%; height: 100%; opacity: 1; }

.ethos-card[data-index="04"]:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 102, 0.3); border-color: rgba(0, 255, 102, 0.5); }
.ethos-card[data-index="04"]:hover::before, .ethos-card[data-index="04"]:hover::after { border-color: #00ff66; width: 100%; height: 100%; opacity: 1; }

.ethos-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
}

.ethos-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.ethos-title {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.ethos-desc {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    color: #d0d0e0;
    font-size: 1.15rem;
    line-height: 1.7;
    font-weight: 300;
}

/* Card Specific Theme Colors for variety */
.ethos-card[data-index="01"] .ethos-title { color: #ffaa00; text-shadow: 0 0 8px rgba(255, 170, 0, 0.6); } /* Efficiency - Orange */
.ethos-card[data-index="01"] .ethos-icon svg { color: #ffaa00; filter: drop-shadow(0 0 5px rgba(255, 170, 0, 0.6)); }

.ethos-card[data-index="02"] .ethos-title { color: #00ffff; text-shadow: 0 0 8px rgba(0, 255, 255, 0.6); } /* Expertise - Cyan */
.ethos-card[data-index="02"] .ethos-icon svg { color: #00ffff; filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.6)); }

.ethos-card[data-index="03"] .ethos-title { color: #ff0055; text-shadow: 0 0 8px rgba(255, 0, 85, 0.6); }   /* Focused - Red/Pink */
.ethos-card[data-index="03"] .ethos-icon svg { color: #ff0055; filter: drop-shadow(0 0 5px rgba(255, 0, 85, 0.6)); }

.ethos-card[data-index="04"] .ethos-title { color: #00ff66; text-shadow: 0 0 8px rgba(0, 255, 102, 0.6); } /* Integrity - Green */
.ethos-card[data-index="04"] .ethos-icon svg { color: #00ff66; filter: drop-shadow(0 0 5px rgba(0, 255, 102, 0.6)); }

/* Card Specific Theme Colors for variety */
.ethos-card[data-index="01"] .ethos-title { color: #ffaa00; text-shadow: 0 0 8px rgba(255, 170, 0, 0.6); } /* Efficiency - Orange */
.ethos-card[data-index="02"] .ethos-title { color: #00ffff; text-shadow: 0 0 8px rgba(0, 255, 255, 0.6); } /* Expertise - Cyan */
.ethos-card[data-index="03"] .ethos-title { color: #ff0055; text-shadow: 0 0 8px rgba(255, 0, 85, 0.6); }   /* Focused - Red/Pink */
.ethos-card[data-index="04"] .ethos-title { color: #00ff66; text-shadow: 0 0 8px rgba(0, 255, 102, 0.6); } /* Integrity - Green */

/* Hover Description Text Highlight */
.ethos-card:hover .ethos-desc {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .ethos-grid {
        grid-template-columns: 1fr;
    }
    
    .main-nav {
        padding: 1rem 0;
    }

    .main-nav ul {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .main-nav a {
        font-size: 0.9rem;
        padding: 0.3rem 0.5rem;
    }

    .section-marionette h2,
    .section-devs h2,
    .section-goals h2 {
        font-size: 10vw; /* Scale with viewport */
        letter-spacing: 4px; /* Reduce spacing */
    }

    .mobile-hint {
        display: block !important;
    }
    
    .desktop-hint {
        display: none !important;
    }
}

/* --- DEVS MAP CONTAINER --- */
.desktop-hint {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 255, 255, 0.7);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 50;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    animation: pulseHint 2.5s infinite ease-in-out;
}

@keyframes pulseHint {
    0% { opacity: 0.5; box-shadow: 0 0 5px rgba(0, 255, 255, 0.1); }
    50% { opacity: 1; box-shadow: 0 0 15px rgba(0, 255, 255, 0.4); border-color: rgba(0, 255, 255, 0.6); }
    100% { opacity: 0.5; box-shadow: 0 0 5px rgba(0, 255, 255, 0.1); }
}

.mobile-hint {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 255, 255, 0.7);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 50;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.devs-map-container {
    width: 90%;
    max-width: 1400px;
    height: 600px; /* Fixed height for the map window */
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    position: relative; /* For absolute children */
    z-index: 1002; /* Lift entire map above CRT overlay */
    overflow: hidden; /* Contain the canvas */
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    /* backdrop-filter: blur(5px); */ /* REMOVED: Creates stacking context that traps children below CRT overlay */
    margin: 0 auto; /* Center it */
    
    /* Disable selection and native UI on mobile */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none; /* Disables the long-press menu on iOS */
    touch-action: none; /* Prevents browser scrolling/zooming */
}

.devs-map-container canvas {
    display: block;
    outline: none;
}

/* --- DEV UNIT CARD --- */
/* --- DEV UNIT CARD --- */
.dev-card {
    position: absolute;
    bottom: 10px; /* Lower overall */
    left: 20px;
    min-width: 280px;
    
    display: flex;
    flex-direction: row; /* Side-by-side */
    align-items: flex-end; /* Align bottom */
    gap: 20px;
    
    /* Default hidden state */
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1002; /* Lift above CRT Overlay */
}

.dev-card.alt-pos {
    left: auto;
    right: 20px;
    transform: translateX(50px);
}

.dev-card.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- COMPACT CARD LAYOUT (Desktop) --- */
.dev-card-compact {
    /* REMOVED BACKGROUND/BORDER - Elements floating */
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    pointer-events: auto;

    display: flex;
    flex-direction: row; /* Text Next to Chart */
    align-items: center; 
    gap: 20px;
    width: auto;
    /* Push text/chart down relative to portrait */
    transform: translateY(15px); 
    margin-bottom: 0;
}

/* EXTERNAL PORTRAIT */
.dev-portrait-external {
    position: relative;
    z-index: 1002; /* Lift above CRT overlay */
    margin: 0; /* Reset margins */
    pointer-events: auto;
}

.dev-portrait-external .dev-img-container {
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    background: #000;
}

/* Compact Image */
.dev-card-compact .dev-img-container,
.dev-portrait-external .dev-img-container {
    width: 160px;
    height: 160px;
    border-width: 3px;
    border-radius: 12px;
}

/* Push text down to avoid portrait overlap (RESET) */
.dev-card-compact .dev-text {
    margin-top: 0;
    padding-left: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8); /* Add shadow for legibility */
}

.dev-card-compact .dev-text h3 {
    font-size: 1.2rem;
    margin: 0;
}

/* ... existing styles ... */

/* Radar Chart Container */
.radar-chart-container {
    width: 250px;
    height: 220px; /* Chart dictates height of the row */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
}

.radar-chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible; /* Allow labels to bleed slightly */
    pointer-events: visiblePainted;
}

/* Radar Points */
.radar-point {
    cursor: pointer;
    pointer-events: all; /* Force capture */
    transition: r 0.2s ease, stroke-width 0.2s ease;
}

.radar-point:hover {
    r: 8; /* Make it bigger to be obvious */
    stroke-width: 3;
}

.dev-card.multi-select .dev-stats {
    gap: 6px;
}

.dev-card.multi-select .stat-label {
    font-size: 0.7rem;
}

.dev-card.multi-select .stat-bar-bg {
    height: 5px;
}

/* --- MULTI-SELECT SIDEBAR --- */
.dev-selection-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-right: 10px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.selection-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sel-count {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}

.sel-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.selection-portraits {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.selection-portrait {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.selection-portrait:hover {
    transform: scale(1.15);
    border-color: #fff !important; /* Override inline style on hover */
}

.selection-portrait.active {
    transform: scale(1.1);
    border-width: 2px;
}

/* Ensure initials fit nicely */
.selection-portrait span {
    font-family: 'Share Tech Mono', monospace; 
    line-height: 1;
    margin-top: 2px; /* Visual center adjustment */
}

/* --- EXTERNAL DEV CARD PANEL --- */
.devs-mobile-card {
    display: none; /* Revert: Hidden by default on desktop */
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
}

/* Revert: Allow internal card to show */
.devs-map-container .dev-card {
    /* Display handled by JS toggling .visible class */
}

/* Ensure card inside external panel behaves like a block */
.devs-mobile-card .dev-card {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: flex;
    margin: 0;
}

/* Custom Radar Tooltip */
.dev-radar-tooltip {
    position: absolute;
    background: rgba(10, 15, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 2000;
    font-family: 'Share Tech Mono', monospace;
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    text-align: center;
    white-space: nowrap;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .section-devs {
        padding: 2rem 1rem;
        gap: 1rem;
    }

    /* Responsive map container */
    .devs-map-container {
        width: 100%;
        height: 50vh;
        min-height: 300px;
        max-height: 400px;
        border-radius: 8px;
    }
    
    /* Hide internal card on mobile */
    .devs-map-container .dev-card {
        display: none !important;
    }

    /* Show external mobile card panel */
    .devs-mobile-card {
        display: block;
        width: 100%;
    }



    /* Mobile: Adapt new external portrait structure */
    .devs-mobile-card .dev-card {
        align-items: center; /* Center portrait on mobile */
    }

    .devs-mobile-card .dev-portrait-external {
        margin-left: 0;
        margin-bottom: -20px; /* Overlap more on mobile */
    }

    .devs-mobile-card .dev-card-compact {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 25px; /* Make room for overlapping portrait */
    }

    .devs-mobile-card .dev-compact-header {
        flex-direction: column;
        gap: 10px;
    }

    /* .dev-img-container sizes handled by generic or specific rules above */
    
    .devs-mobile-card .dev-stats-grid {
        grid-template-columns: 1fr; /* Single column stats on mobile */
        width: 100%;
        text-align: left;
    }

    .devs-mobile-card .stat-item {
        justify-content: space-between;
        padding: 5px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    /* Mobile multi-select adjustments */
    .devs-mobile-card .dev-card.multi-select .dev-img-container {
        width: 100px;
        height: 100px;
    }

    /* --- MOBILE SPECIFIC STATS (Below Radar) --- */
    .dev-stats-mobile {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        margin-bottom: 20px;
        gap: 8px;
        padding: 0 10px;
    }

    .stat-row {
        display: flex; /* Row layout */
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        font-family: 'Share Tech Mono', monospace;
        font-size: 0.9rem;
    }

    .stat-label {
        color: #aaa;
        width: 35%; /* Fixed width for labels */
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-bar-container {
        flex-grow: 1; /* Take up remaining space */
        height: 6px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
        overflow: hidden;
    }

    .stat-bar-fill {
        height: 100%;
        border-radius: 3px;
        box-shadow: 0 0 5px currentColor;
    }

    .stat-value {
        width: 15%; /* Fixed width for value */
        text-align: left;
        font-weight: bold;
    }

    .devs-mobile-card .selection-portraits {
        gap: 6px;
    }

    .devs-mobile-card .selection-portrait {
        width: 36px;
        height: 36px;
    }

    /* Empty state styling */
    .devs-mobile-card-empty {
        padding: 20px;
        text-align: center;
        color: rgba(255, 255, 255, 0.4);
        font-family: 'Share Tech Mono', monospace;
        font-size: 0.85rem;
        letter-spacing: 1px;
        background: rgba(5, 10, 20, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
}
