/* ============================================
   TIDYBOT ARMY — HEX GALLERY TIMELINE
   Autonomous Agent Activity Log
   EVA Neon Genesis Evangelion inspired
   ============================================ */

:root {
    /* Colors - EVA Neon Genesis Evangelion inspired */
    --color-bg: #161620;
    --color-bg-secondary: #12121a;
    --color-card: #1a1a24;
    --color-card-hover: #222230;

    /* EVA Orange/Amber - Warning colors */
    --color-warning: #ff6b00;
    --color-warning-bright: #ff8c00;
    --color-warning-dim: #cc5500;

    /* EVA Purple - Unit 01 */
    --color-purple: #7b2cbf;
    --color-purple-bright: #9d4edd;
    --color-purple-dim: #5a189a;

    /* EVA Green - Unit 01 eyes */
    --color-green: #39ff14;
    --color-green-dim: #2eb810;

    /* Text */
    --color-text: #ffffff;
    --color-text-soft: #a0a0b0;
    --color-gray: #6b6b7b;
    --color-muted: #2a2a3a;
    --color-border: #3a3a4a;

    /* Type colors - EVA palette */
    --color-setup: #9d4edd;
    --color-feature: #39ff14;
    --color-fix: #ff3366;
    --color-refactor: #ff6b00;
    --color-test: #00d4ff;
    --color-docs: #6b6b7b;
    --color-deploy: #ff6b00;

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --gap: 1rem;
    --container-padding: clamp(1rem, 5vw, 4rem);

    /* Animation */
    --ease-smooth: cubic-bezier(0.65, 0.05, 0, 1);
    --duration: 0.75s;
    --duration-fast: 0.4s;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: initial;
    font-size: 16px;
    overscroll-behavior-x: none;
}

body {
    font-family: var(--font-display);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Honeycomb background - EVA style single layer */
.honeycomb-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.honeycomb-bg .hex-layer {
    position: absolute;
    top: -50px;
    left: -50px;
    opacity: 0.12;
}

.honeycomb-bg .hex-layer svg {
    overflow: visible;
}

.honeycomb-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, transparent 50%, var(--color-bg) 90%);
    pointer-events: none;
}

/* Scan line effect */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
    z-index: 1000;
    opacity: 0.4;
}

::selection {
    background-color: var(--color-warning);
    color: black;
}

::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* ============================================
   MARQUEE BANNER
   ============================================ */
.marquee-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: repeating-linear-gradient(
        -45deg,
        var(--color-warning) 0px,
        var(--color-warning) 10px,
        var(--color-bg) 10px,
        var(--color-bg) 20px
    );
    padding: 0.4rem 0;
    z-index: 1100;
    overflow: hidden;
    border-bottom: 2px solid var(--color-warning);
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.4);
}

.marquee-track {
    display: inline-flex;
    gap: 2rem;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-warning);
    background: var(--color-bg);
    padding: 0.3rem 2rem;
    text-shadow: 0 0 10px var(--color-warning);
    width: max-content;
}

.marquee-track .separator {
    color: var(--color-purple-bright);
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.marquee-banner:hover .marquee-track {
    animation-play-state: paused;
}

/* ============================================
   CONTAINER
   ============================================ */
.smooth-scroll-wrapper {
    padding-top: 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 4rem 0;
}

.hero-video {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    filter: grayscale(1);
    opacity: 0.35;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 5% 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,1) 50%, rgba(0,0,0,0.6) 85%, transparent 100%),
                        linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-composite: destination-in;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,1) 50%, rgba(0,0,0,0.6) 85%, transparent 100%),
                linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-composite: intersect;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-warning);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-warning);
    background: rgba(255, 107, 0, 0.1);
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    text-shadow: 0 0 10px var(--color-warning);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    padding-bottom: 0.1em;
}

.hero-title .line {
    display: block;
    overflow: visible;
}

.hero-title .word {
    display: inline-block;
    transform: translateY(100%);
    animation: wordReveal 1s var(--ease-smooth) forwards;
}

.hero-title .line:nth-child(1) .word { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) .word { animation-delay: 0.25s; }

@keyframes wordReveal {
    to { transform: translateY(0); }
}

.hero-title .line:nth-child(2) .word {
    color: var(--color-warning);
    text-shadow: 0 0 30px var(--color-warning);
}

.hero-subtitle {
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text-soft);
    letter-spacing: 0.05em;
}

.hero-subtitle::before {
    content: ">>> ";
    color: var(--color-green);
}

/* ============================================
   HERO TAGLINE ROTATOR
   ============================================ */
.hero-tagline-rotator {
    margin-top: 1.2rem;
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 2.5vw, 1.15rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-warning);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2em;
    text-shadow: 0 0 15px rgba(255, 107, 0, 0.4);
}

.tagline-prefix {
    color: var(--color-green);
    font-weight: 700;
    text-shadow: 0 0 10px var(--color-green);
}

.tagline-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.4s ease;
}

.tagline-text.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tagline-cursor {
    color: var(--color-warning);
    animation: cursorBlink 0.7s step-end infinite;
    font-weight: 400;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--color-warning);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-warning), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--color-warning);
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; height: 60px; }
    50% { opacity: 1; height: 80px; }
}

/* ============================================
   INTRO SECTION
   ============================================ */
.intro-section {
    padding: 1.5rem 0 3rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.intro-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-soft);
    letter-spacing: 0.03em;
    line-height: 1.8;
}

.intro-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-warning);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: color var(--duration-fast) var(--ease-smooth);
}

.intro-link:hover {
    color: var(--color-warning-bright);
    text-shadow: 0 0 10px var(--color-warning);
}

.intro-link svg {
    transition: transform var(--duration-fast) var(--ease-smooth);
}

.intro-link:hover svg {
    transform: translate(2px, -2px);
}

/* ============================================
   AGENTS SECTION (hex + blurb, no timeline)
   ============================================ */
.agents-section {
    padding: 3rem 0;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.agents-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 1rem 0;
}

.agent-item {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.agent-item:nth-child(even) {
    flex-direction: row-reverse;
}

.agent-item:nth-child(even) .agent-blurb {
    text-align: right;
}

.agent-hex {
    flex-shrink: 0;
}

.agent-blurb {
    flex: 1;
    min-width: 0;
}

.agent-blurb-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.6rem;
}

.agent-blurb-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--color-text-soft);
    line-height: 1.7;
    letter-spacing: 0.02em;
    margin-bottom: 0.8rem;
}

@media (max-width: 600px) {
    .agent-item,
    .agent-item:nth-child(even) {
        flex-direction: column;
        text-align: center;
    }

    .agent-item:nth-child(even) .agent-blurb {
        text-align: center;
    }

    .agent-hex {
        transform: scale(0.8);
    }
}

/* ============================================
   AGENT IMAGE THUMBNAILS
   ============================================ */
.agent-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.agent-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    cursor: pointer;
    opacity: 0.75;
    transition: opacity var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.agent-thumb:hover {
    opacity: 1;
    border-color: var(--color-warning);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.35);
}

/* ============================================
   LIGHTBOX OVERLAY
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-smooth), visibility 0.3s;
}

.lightbox-overlay.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-close {
    position: absolute;
    top: -2rem;
    right: -1rem;
    background: none;
    border: 1px solid var(--color-gray);
    color: var(--color-gray);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    transition: all var(--duration-fast);
    z-index: 10;
}

.lightbox-close:hover {
    border-color: var(--color-warning);
    color: var(--color-warning);
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.4);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-soft);
    letter-spacing: 0.04em;
    text-align: center;
}

/* ============================================
   DEMO VIDEO SECTION
   ============================================ */
.demo-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-border);
}

.demo-video-wrapper {
    position: relative;
    z-index: 1001;
    width: 65%;
    margin: 0 auto;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.demo-video-wrapper video {
    display: block;
    width: 100%;
}

@media (max-width: 600px) {
    .demo-video-wrapper {
        width: 100%;
    }
}

/* ============================================
   HEX GALLERY TIMELINE
   ============================================ */
.gallery-section {
    padding: 3rem 0;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.gallery-section:last-of-type {
    border-bottom: none;
}

.gallery-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-label {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-warning);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
}

.gallery-repo {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-warning);
    letter-spacing: 0.1em;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--color-warning-dim);
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    text-decoration: none;
    transition: color var(--duration-fast), border-color var(--duration-fast);
}

.gallery-repo:hover {
    color: var(--color-warning-bright);
    border-color: var(--color-warning);
    text-shadow: 0 0 10px var(--color-warning);
}

.gallery-wishlist {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-green);
    letter-spacing: 0.1em;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--color-green-dim);
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    text-decoration: none;
    transition: color var(--duration-fast), border-color var(--duration-fast);
}

.gallery-wishlist:hover {
    color: var(--color-green);
    border-color: var(--color-green);
    text-shadow: 0 0 10px var(--color-green);
    animation: none;
}

button.gallery-wishlist {
    cursor: pointer;
    background: none;
    animation: wishlistBlink 2s ease-in-out infinite;
}

@keyframes wishlistBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.gallery-count {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-gray);
    letter-spacing: 0.08em;
    margin-left: auto;
}

.gallery-blurb {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-soft);
    letter-spacing: 0.03em;
    line-height: 1.7;
    margin-top: -0.75rem;
    margin-bottom: 1.5rem;
    max-width: 640px;
    opacity: 0.85;
}

/* ============================================
   GALLERY VIEWPORT & TRACK
   ============================================ */
.gallery-viewport {
    position: relative;
    height: 700px;
    overflow: hidden;
    cursor: grab;
    margin: 0 calc(var(--container-padding) * -1);
    user-select: none;
    -webkit-user-select: none;
}

.gallery-viewport:active {
    cursor: grabbing;
}

.gallery-track {
    position: relative;
    height: 100%;
    will-change: transform;
}

/* ============================================
   HORIZONTAL TIMELINE LINE
   ============================================ */
.gallery-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-purple-dim) 3%,
        var(--color-gray) 15%,
        var(--color-gray) 85%,
        var(--color-purple-dim) 97%,
        transparent 100%
    );
    z-index: 3;
}

.gallery-line::after {
    content: '';
    position: absolute;
    inset: -3px 0;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-warning) 15%,
        var(--color-warning) 85%,
        transparent 100%
    );
    opacity: 0.15;
    filter: blur(6px);
    animation: linePulse 4s ease-in-out infinite;
}

@keyframes linePulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.25; }
}

/* ============================================
   HEX CONNECTORS
   ============================================ */
.hex-connector {
    position: absolute;
    width: 1px;
    background: var(--color-purple-dim);
    opacity: 0.35;
    transform: translateX(-50%);
    transition: opacity var(--duration-fast), background var(--duration-fast), box-shadow var(--duration-fast);
    z-index: 2;
}

.hex-connector::before,
.hex-connector::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-purple-dim);
}

.hex-connector::before { top: -2px; }
.hex-connector::after { bottom: -2px; }

.hex-connector.active {
    opacity: 1;
    background: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning);
    width: 2px;
}

.hex-connector.active::before,
.hex-connector.active::after {
    background: var(--color-warning);
    box-shadow: 0 0 6px var(--color-warning);
}

/* ============================================
   HEX DOTS
   ============================================ */
.hex-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: var(--color-bg);
    border: 1.5px solid var(--color-purple-dim);
    transition: all var(--duration-fast) var(--ease-smooth);
    z-index: 5;
    cursor: pointer;
}

.hex-dot:hover {
    border-color: var(--color-warning);
    box-shadow: 0 0 10px var(--color-warning);
    transform: translate(-50%, -50%) rotate(45deg) scale(1.3);
}

.hex-dot.active {
    background: var(--color-warning);
    border-color: var(--color-warning);
    box-shadow: 0 0 15px var(--color-warning);
    width: 10px;
    height: 10px;
}

/* ============================================
   HEX CARDS
   ============================================ */
.hex-card {
    position: absolute;
    cursor: pointer;
    z-index: 6;
    opacity: 0;
    transform: scale(0.6) translateY(20px);
    transition: opacity 0.5s var(--ease-smooth),
                transform 0.5s var(--ease-smooth),
                filter var(--duration-fast) var(--ease-smooth);
}

.hex-card.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.hex-card.visible:hover {
    transform: scale(1.1) translateY(-4px);
    filter: drop-shadow(0 0 20px rgba(255, 107, 0, 0.4));
    z-index: 20;
}

.hex-card.visible.active {
    transform: scale(1.08);
    filter: drop-shadow(0 0 30px rgba(255, 107, 0, 0.6));
    z-index: 15;
}

.hex-border {
    width: 100%;
    height: 100%;
    clip-path: url(#hex-clip-rounded);
    background: var(--color-purple-dim);
    padding: 2px;
    transition: background var(--duration-fast) var(--ease-smooth);
    animation: hexFloat 5s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

@keyframes hexFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hex-card:hover .hex-border,
.hex-card.active .hex-border {
    animation-play-state: paused;
}

.hex-card:hover .hex-border,
.hex-card.active .hex-border {
    background: var(--color-warning);
}

.hex-inner {
    width: 100%;
    height: 100%;
    clip-path: url(#hex-clip-rounded);
    background: var(--color-card);
    overflow: hidden;
    position: relative;
    transition: background var(--duration-fast);
}

.hex-card:hover .hex-inner {
    background: var(--color-card-hover);
}

/* ---- Hex background image / placeholder ---- */
.hex-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    transition: opacity var(--duration-fast);
    z-index: 1;
}

.hex-card:hover .hex-bg { opacity: 0.28; }
.hex-card.active .hex-bg { opacity: 0.25; }

/* Placeholder patterns (rotate through 4) */
.hex-bg.pattern-0 {
    background:
        radial-gradient(circle at 30% 20%, var(--type-color) 0%, transparent 55%),
        repeating-linear-gradient(
            45deg, transparent, transparent 7px,
            rgba(255,255,255,0.04) 7px, rgba(255,255,255,0.04) 8px
        );
}

.hex-bg.pattern-1 {
    background:
        radial-gradient(circle at 70% 80%, var(--type-color) 0%, transparent 55%),
        repeating-linear-gradient(
            -45deg, transparent, transparent 5px,
            rgba(255,255,255,0.04) 5px, rgba(255,255,255,0.04) 6px
        );
}

.hex-bg.pattern-2 {
    background:
        linear-gradient(180deg, var(--type-color) 0%, transparent 45%),
        repeating-linear-gradient(
            0deg, transparent, transparent 10px,
            rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 11px
        ),
        repeating-linear-gradient(
            90deg, transparent, transparent 10px,
            rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 11px
        );
}

.hex-bg.pattern-3 {
    background:
        radial-gradient(circle at 50% 50%, var(--type-color) 0%, transparent 60%),
        radial-gradient(circle at 20% 40%, rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(circle at 60% 30%, rgba(255,255,255,0.04) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 100% 100%, 12px 12px, 12px 12px, 12px 12px;
}

/* Real image background */
.hex-bg.has-image {
    background-size: cover !important;
    background-position: center !important;
    opacity: 0.35;
}

.hex-card:hover .hex-bg.has-image { opacity: 0.45; }

/* ---- Hex content overlay ---- */
.hex-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 25% 12% 25%;
    text-align: center;
}

/* Radial glow inside hex on hover */
.hex-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 107, 0, 0.1) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity var(--duration-fast);
    pointer-events: none;
}

.hex-card:hover .hex-content::after,
.hex-card.active .hex-content::after {
    opacity: 1;
}

/* ---- Hex text (base sizes for medium) ---- */
.hex-type {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.35rem;
    padding: 0.15rem 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.hex-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.hex-date {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--color-gray);
    letter-spacing: 0.05em;
}

.hex-repo {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    color: var(--color-purple-bright);
    letter-spacing: 0.05em;
    margin-top: 0.15rem;
    opacity: 0.7;
}

.hex-rate {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-green);
    letter-spacing: 0.02em;
    margin-top: 0.2rem;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

/* ---- Size variants ---- */
.hex-lg .hex-type {
    font-size: 0.6rem;
    padding: 0.2rem 0.5rem;
}

.hex-lg .hex-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 3;
}

.hex-lg .hex-date {
    font-size: 0.55rem;
}

.hex-lg .hex-repo {
    font-size: 0.5rem;
}

.hex-lg .hex-rate {
    font-size: 0.75rem;
}

.hex-sm .hex-type {
    font-size: 0.48rem;
    padding: 0.1rem 0.3rem;
    margin-bottom: 0.2rem;
}

.hex-sm .hex-title {
    font-size: 0.65rem;
    -webkit-line-clamp: 1;
    margin-bottom: 0.2rem;
}

.hex-sm .hex-date {
    font-size: 0.45rem;
}

.hex-sm .hex-repo {
    display: none;
}

.hex-sm .hex-rate {
    font-size: 0.55rem;
}

.hex-xl .hex-type {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
}

.hex-xl .hex-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
}

.hex-xl .hex-date {
    font-size: 0.6rem;
}

.hex-xl .hex-repo {
    font-size: 0.55rem;
}

.hex-xl .hex-rate {
    font-size: 0.85rem;
}

.hex-xs .hex-type {
    font-size: 0.42rem;
    padding: 0.08rem 0.25rem;
    margin-bottom: 0.15rem;
}

.hex-xs .hex-title {
    font-size: 0.55rem;
    -webkit-line-clamp: 1;
    margin-bottom: 0.15rem;
}

.hex-xs .hex-date {
    font-size: 0.4rem;
}

.hex-xs .hex-repo {
    display: none;
}

.hex-xs .hex-rate {
    font-size: 0.5rem;
}

/* ============================================
   GALLERY ROBOTS (on the timeline line)
   ============================================ */
.gallery-robot {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -100%);
    pointer-events: none;
}

/* Purple robot (original) */
.gallery-robot.robot-purple {
    animation: robotPatrol 4s ease-in-out infinite;
}

@keyframes robotPatrol {
    0%   { transform: translate(-50%, -100%) translateX(0)   translateY(0); }
    25%  { transform: translate(-50%, -100%) translateX(-30px) translateY(-3px); }
    50%  { transform: translate(-50%, -100%) translateX(-50px) translateY(0); }
    75%  { transform: translate(-50%, -100%) translateX(-30px) translateY(-3px); }
    100% { transform: translate(-50%, -100%) translateX(0)   translateY(0); }
}

.robot-antenna {
    width: 2px;
    height: 6px;
    background: var(--color-purple);
    margin: 0 auto 1px;
    position: relative;
}

.robot-antenna::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: var(--color-warning);
    border-radius: 50%;
    animation: antennaBlink 1s ease-in-out infinite;
}

@keyframes antennaBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--color-warning); }
    50% { opacity: 0.5; box-shadow: 0 0 5px var(--color-warning); }
}

.robot-head {
    width: 18px;
    height: 12px;
    background: var(--color-purple);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding-top: 2px;
    position: relative;
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.5);
}

.robot-eye {
    width: 4px;
    height: 4px;
    background: var(--color-green);
    border-radius: 50%;
    animation: robotBlink 3s ease-in-out infinite;
    box-shadow: 0 0 8px var(--color-green);
}

.robot-eye.right {
    animation-delay: 0.1s;
}

@keyframes robotBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.robot-body {
    width: 14px;
    height: 8px;
    background: var(--color-purple-dim);
    margin: 1px auto 0;
    border-radius: 0 0 2px 2px;
    position: relative;
}

.robot-wheel {
    position: absolute;
    bottom: -3px;
    width: 6px;
    height: 6px;
    background: var(--color-warning-dim);
    border-radius: 50%;
    border: 1px solid var(--color-warning);
}

.robot-wheel.left {
    left: 0px;
    animation: wheelSpin 0.3s linear infinite;
}

.robot-wheel.right {
    right: 0px;
    animation: wheelSpin 0.3s linear infinite reverse;
}

@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Cyan robot (alt mech) */
.gallery-robot.robot-cyan {
    animation: robotCyanPatrol 5s ease-in-out infinite;
}

@keyframes robotCyanPatrol {
    0%   { transform: translate(-50%, -100%) translateX(0)   rotate(0deg); }
    20%  { transform: translate(-50%, -100%) translateX(-25px) rotate(-2deg); }
    50%  { transform: translate(-50%, -100%) translateX(-45px) rotate(0deg); }
    80%  { transform: translate(-50%, -100%) translateX(-25px) rotate(2deg); }
    100% { transform: translate(-50%, -100%) translateX(0)   rotate(0deg); }
}

.robot-alt-flag {
    width: 1px;
    height: 8px;
    background: var(--color-warning);
    margin: 0 auto 0;
    position: relative;
}

.robot-alt-flag::after {
    content: '';
    position: absolute;
    top: 0;
    left: 1px;
    width: 6px;
    height: 4px;
    background: #00d4ff;
    clip-path: polygon(0 0, 100% 25%, 0 100%);
    animation: flagWave 1s ease-in-out infinite;
}

@keyframes flagWave {
    0%, 100% { transform: skewY(0deg); }
    50% { transform: skewY(-5deg); }
}

.robot-alt-head {
    width: 14px;
    height: 10px;
    background: #1a1a2e;
    border: 1.5px solid #00d4ff;
    border-radius: 2px 2px 0 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    position: relative;
}

.robot-alt-visor {
    width: 10px;
    height: 3px;
    background: #00d4ff;
    border-radius: 1px;
    box-shadow: 0 0 8px #00d4ff;
    animation: visorScan 2s ease-in-out infinite;
}

@keyframes visorScan {
    0%, 100% { opacity: 1; width: 10px; }
    50% { opacity: 0.6; width: 6px; }
}

.robot-alt-body {
    width: 10px;
    height: 8px;
    background: #1a1a2e;
    border: 1.5px solid #00d4ff;
    border-top: none;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.robot-alt-chest {
    width: 4px;
    height: 4px;
    border: 1px solid #00d4ff;
    border-radius: 50%;
    opacity: 0.6;
    animation: chestPulse 1.5s ease-in-out infinite;
}

@keyframes chestPulse {
    0%, 100% { opacity: 0.4; box-shadow: none; }
    50% { opacity: 1; box-shadow: 0 0 5px #00d4ff; }
}

.robot-cyan .robot-wheel {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.3);
}

/* ============================================
   POPUP OVERLAY
   ============================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-smooth), visibility 0.35s;
}

.popup-overlay.open {
    opacity: 1;
    visibility: visible;
}

.popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.popup-card {
    position: relative;
    max-width: 560px;
    width: 92%;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--color-card);
    border: 1px solid var(--color-warning);
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
    padding: 2rem;
    box-shadow: 0 0 80px rgba(255, 107, 0, 0.2), inset 0 0 40px rgba(255, 107, 0, 0.03);
    transform: scale(0.88) translateY(30px);
    transition: transform 0.4s var(--ease-smooth);
}

.popup-overlay.open .popup-card {
    transform: scale(1) translateY(0);
}

/* Corner accents */
.popup-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent var(--color-warning) transparent transparent;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 2rem;
    background: none;
    border: 1px solid var(--color-gray);
    color: var(--color-gray);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    transition: all var(--duration-fast);
    z-index: 10;
}

.popup-close:hover {
    border-color: var(--color-warning);
    color: var(--color-warning);
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.4);
}

.popup-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    padding-right: 2.5rem;
}

.popup-number {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

.popup-type {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--type-color, var(--color-warning));
    padding: 0.3rem 0.6rem;
    background: color-mix(in srgb, var(--type-color, var(--color-warning)) 15%, transparent);
    border: 1px solid var(--type-color, var(--color-warning));
}

.popup-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-green);
    margin-left: auto;
    padding: 0.25rem 0.6rem;
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid var(--color-green-dim);
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.popup-image {
    max-height: 160px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.popup-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

/* ============================================
   TRIAL PHOTO GALLERY (in popup)
   ============================================ */
.popup-trial-gallery {
    padding-top: 0.5rem;
}

.trial-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    margin-top: 0.4rem;
}

.trial-hero-img {
    width: 100%;
    display: block;
    transition: opacity 0.25s ease;
}

.trial-counter {
    position: absolute;
    bottom: 0.4rem;
    right: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-text);
    background: rgba(10, 10, 12, 0.75);
    padding: 0.15rem 0.4rem;
    letter-spacing: 0.08em;
    border: 1px solid var(--color-border);
}

.trial-row-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
}

.trial-strip {
    display: flex;
    gap: 0.4rem;
}

.trial-thumb {
    flex: 1;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
    opacity: 0.6;
}

.trial-thumb:hover {
    opacity: 0.9;
    border-color: var(--color-warning-dim);
}

.trial-thumb.active {
    opacity: 1;
    border-color: var(--color-warning);
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.4);
}

.popup-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}

.popup-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--color-text-soft);
}

.popup-files {
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.popup-files-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.popup-files-label::before {
    content: "◈ ";
    color: var(--color-purple);
}

.popup-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.popup-file {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-green);
    background: rgba(57, 255, 20, 0.05);
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--color-muted);
}

.popup-repo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid #00d4ff;
    color: #00d4ff;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    margin-top: 0.5rem;
    width: fit-content;
}

.popup-repo-link:hover {
    background: #00d4ff;
    color: var(--color-bg);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.popup-stats {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--color-border);
}

.popup-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.popup-stat-value {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.popup-stat-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   VIEW TOGGLE BUTTONS
   ============================================ */
.gallery-view-toggle {
    display: flex;
    gap: 0;
}

.view-toggle-btn {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gray);
    background: none;
    border: 1px solid var(--color-border);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.view-toggle-btn:first-child {
    clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    padding-right: 0.8rem;
}

.view-toggle-btn:last-child {
    clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%);
    padding-left: 0.8rem;
    margin-left: -1px;
}

.view-toggle-btn:hover {
    color: var(--color-text-soft);
    border-color: var(--color-gray);
}

.view-toggle-btn.active {
    color: var(--color-warning);
    border-color: var(--color-warning-dim);
    background: rgba(255, 107, 0, 0.08);
}

/* ============================================
   DEPENDENCY TREE VIEW
   ============================================ */
.tree-viewport {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    padding: 2rem 0 3rem;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.tree-viewport:active {
    cursor: grabbing;
}

.tree-nodes {
    position: relative;
}

.tree-edges {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.tree-edge-path {
    fill: none;
    stroke: var(--color-purple-dim);
    stroke-width: 2;
    opacity: 0.5;
    transition: stroke var(--duration-fast), opacity var(--duration-fast), filter var(--duration-fast);
}

.tree-edge-path:hover {
    stroke: var(--color-warning);
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--color-warning));
}

.tree-layer-label {
    position: absolute;
    left: 0;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-gray);
    opacity: 0.6;
    transform: translateY(-50%);
}

.tree-hex-card {
    position: absolute;
    cursor: pointer;
    z-index: 6;
    opacity: 0;
    transform: scale(0.6) translateY(20px);
    transition: opacity 0.5s var(--ease-smooth),
                transform 0.5s var(--ease-smooth),
                filter var(--duration-fast) var(--ease-smooth);
}

.tree-hex-card.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.tree-hex-card.visible:hover {
    transform: scale(1.1) translateY(-4px);
    filter: drop-shadow(0 0 20px rgba(255, 107, 0, 0.4));
    z-index: 20;
}

/* Child dependency highlight (green) */
.tree-hex-card.highlight-child .hex-border {
    background: var(--color-green);
}

.tree-hex-card.highlight-child {
    filter: drop-shadow(0 0 15px rgba(57, 255, 20, 0.4));
}

/* Parent (depended-on-by) highlight (cyan) */
.tree-hex-card.highlight-parent .hex-border {
    background: #00d4ff;
}

.tree-hex-card.highlight-parent {
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
}

/* Edge highlights */
.tree-edge-path.highlight-child {
    stroke: var(--color-green);
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--color-green));
}

.tree-edge-path.highlight-parent {
    stroke: #00d4ff;
    opacity: 1;
    filter: drop-shadow(0 0 4px #00d4ff);
}

/* Dim non-highlighted nodes when something is hovered */
.tree-nodes.has-highlight .tree-hex-card:not(.highlight-child):not(.highlight-parent):not(:hover) {
    opacity: 0.4;
}

/* ============================================
   SDK MODULE BADGES (tree hex cards)
   ============================================ */
.hex-sdk-badges {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
}

.sdk-badge {
    font-family: var(--font-mono);
    font-size: 0.45rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.sdk-badge.sdk-arm {
    color: #fff;
    background: rgba(255, 107, 0, 0.35);
    border: 1px solid rgba(255, 107, 0, 0.6);
}

.sdk-badge.sdk-base {
    color: #fff;
    background: rgba(0, 212, 255, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.6);
}

.sdk-badge.sdk-gripper {
    color: #fff;
    background: rgba(255, 51, 102, 0.35);
    border: 1px solid rgba(255, 51, 102, 0.6);
}

.sdk-badge.sdk-sensors {
    color: #fff;
    background: rgba(255, 215, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.6);
}

.sdk-badge.sdk-yolo {
    color: #fff;
    background: rgba(57, 255, 20, 0.25);
    border: 1px solid rgba(57, 255, 20, 0.5);
}

.sdk-badge.sdk-display {
    color: #fff;
    background: rgba(157, 78, 221, 0.35);
    border: 1px solid rgba(157, 78, 221, 0.6);
}

.sdk-badge.sdk-rewind {
    color: #fff;
    background: rgba(255, 140, 0, 0.3);
    border: 1px solid rgba(255, 140, 0, 0.55);
}

/* ============================================
   GALLERY NAVIGATION / PROGRESS
   ============================================ */
.gallery-nav {
    margin-top: 1.5rem;
}

.gallery-progress {
    height: 3px;
    background: var(--color-muted);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.gallery-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-purple), var(--color-warning));
    width: 0%;
    border-radius: 2px;
    transition: width 0.15s;
    box-shadow: 0 0 10px var(--color-warning);
    position: relative;
}

.gallery-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 9px;
    height: 9px;
    background: var(--color-warning);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-warning);
}

.gallery-hint {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--color-gray);
    text-align: center;
    display: block;
    margin-top: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hint-icon {
    color: var(--color-purple-bright);
    margin-right: 0.3rem;
}

/* ============================================
   FOOTER
   ============================================ */
.timeline-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--color-purple-dim);
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-purple-bright);
}

.footer-contact {
    font-family: var(--font-mono);
    color: var(--color-gray);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact:hover {
    color: var(--color-purple-bright);
}

.footer-year {
    font-family: var(--font-mono);
    color: var(--color-gray);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .hero-video {
        width: 40%;
        opacity: 0.25;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }

    .gallery-viewport {
        height: 550px;
    }

    .popup-card {
        padding: 1.5rem;
        width: 95%;
    }
}

@media (max-width: 600px) {
    .marquee-banner {
        padding: 0.4rem 0;
    }

    .hero {
        min-height: 40vh;
    }

    .hero-video {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }

    .gallery-viewport {
        height: 480px;
    }

    .gallery-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* --- Mobile hex: only title + rate number --- */
    .hex-content {
        padding: 26% 14% 26%;
    }

    .hex-rate-label {
        display: none;
    }

    /* Hide type, date, repo — compound selectors to beat desktop specificity */
    .hex-card.hex-xl .hex-type,
    .hex-card.hex-lg .hex-type,
    .hex-card.hex-md .hex-type,
    .hex-card.hex-sm .hex-type,
    .hex-card.hex-xs .hex-type,
    .hex-card .hex-type { display: none; }

    .hex-card.hex-xl .hex-date,
    .hex-card.hex-lg .hex-date,
    .hex-card.hex-md .hex-date,
    .hex-card.hex-sm .hex-date,
    .hex-card.hex-xs .hex-date,
    .hex-card .hex-date { display: none; }

    .hex-card.hex-xl .hex-repo,
    .hex-card.hex-lg .hex-repo,
    .hex-card.hex-md .hex-repo,
    .hex-card.hex-sm .hex-repo,
    .hex-card.hex-xs .hex-repo,
    .hex-card .hex-repo { display: none; }

    /* Title + rate base */
    .hex-card .hex-title {
        font-size: 0.62rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.2rem;
    }

    .hex-card .hex-rate {
        font-size: 0.5rem;
    }

    /* XL on mobile */
    .hex-card.hex-xl .hex-title { font-size: 0.8rem; -webkit-line-clamp: 3; }
    .hex-card.hex-xl .hex-rate { font-size: 0.6rem; }

    /* LG on mobile */
    .hex-card.hex-lg .hex-title { font-size: 0.7rem; -webkit-line-clamp: 2; }
    .hex-card.hex-lg .hex-rate { font-size: 0.55rem; }

    /* MD on mobile */
    .hex-card.hex-md .hex-title { font-size: 0.62rem; -webkit-line-clamp: 2; }
    .hex-card.hex-md .hex-rate { font-size: 0.5rem; }

    /* SM on mobile */
    .hex-card.hex-sm .hex-title { font-size: 0.52rem; -webkit-line-clamp: 1; }
    .hex-card.hex-sm .hex-rate { font-size: 0.44rem; }

    /* XS on mobile */
    .hex-card.hex-xs .hex-title { font-size: 0.44rem; -webkit-line-clamp: 1; }
    .hex-card.hex-xs .hex-rate { font-size: 0.38rem; }

    .popup-card {
        padding: 1.25rem;
        max-height: 85vh;
    }

    .popup-title {
        font-size: 1.1rem;
    }

    .popup-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .popup-date {
        margin-left: 0;
    }
}

/* ============================================
   INLINE WISHLIST SECTION
   ============================================ */
.wishlist-section {
    border: 1px solid var(--color-border);
    background: rgba(26, 26, 36, 0.5);
    padding: 0;
    margin-top: 1.5rem;
}

.wishlist-sub-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.wishlist-sub-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-green);
    text-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
}

.wishlist-sub-header .wishlist-auth {
    margin-left: auto;
}


/* ============================================
   WISHLIST FORM POPUP (overlay)
   ============================================ */
.wishlist-overlay {
    position: fixed;
    inset: 0;
    z-index: 550;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-smooth), visibility 0.35s;
}

.wishlist-overlay.open {
    opacity: 1;
    visibility: visible;
}

.wishlist-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.wishlist-form-card {
    position: relative;
    max-width: 480px;
    width: 92%;
    background: var(--color-card);
    border: 1px solid var(--color-green-dim);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    box-shadow: 0 0 60px rgba(57, 255, 20, 0.15), inset 0 0 30px rgba(57, 255, 20, 0.03);
    padding: 1.75rem 1.5rem;
    transform: scale(0.88) translateY(30px);
    transition: transform 0.4s var(--ease-smooth);
}

.wishlist-overlay.open .wishlist-form-card {
    transform: scale(1) translateY(0);
}

.wishlist-form-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent var(--color-green-dim) transparent transparent;
    pointer-events: none;
}

.wishlist-form-close {
    position: absolute;
    top: 0.75rem;
    right: 1.5rem;
    background: none;
    border: 1px solid var(--color-gray);
    color: var(--color-gray);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    transition: all var(--duration-fast);
}

.wishlist-form-close:hover {
    border-color: var(--color-green);
    color: var(--color-green);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.4);
}

.wishlist-form-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-green);
    text-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
    margin: 0 0 1rem;
}

/* ---- Auth ---- */
.wishlist-signin-btn {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-green);
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid var(--color-green-dim);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    transition: all var(--duration-fast);
    white-space: nowrap;
}

.wishlist-signin-btn:hover {
    background: rgba(57, 255, 20, 0.15);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.wishlist-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wishlist-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--color-green-dim);
}

.wishlist-user-name {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-text-soft);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wishlist-signout-btn {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--color-gray);
    background: none;
    border: 1px solid var(--color-border);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.wishlist-signout-btn:hover {
    color: var(--color-warning);
    border-color: var(--color-warning);
}

.wishlist-sort-buttons {
    display: flex;
    gap: 0.4rem;
}

.wishlist-sort-btn {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gray);
    background: none;
    border: 1px solid var(--color-border);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.wishlist-sort-btn:hover {
    color: var(--color-text-soft);
    border-color: var(--color-gray);
}

.wishlist-sort-btn.active {
    color: var(--color-green);
    border-color: var(--color-green-dim);
    background: rgba(57, 255, 20, 0.08);
}

.wishlist-suggest-btn {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-warning);
    background: rgba(255, 107, 0, 0.08);
    border: 1px solid var(--color-warning-dim);
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    transition: all var(--duration-fast);
}

.wishlist-suggest-btn:hover:not(:disabled) {
    background: rgba(255, 107, 0, 0.15);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.wishlist-suggest-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ---- Form ---- */
.wishlist-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.wishlist-input,
.wishlist-textarea,
.wishlist-select {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: 0.6rem 0.8rem;
    transition: border-color var(--duration-fast);
    outline: none;
    width: 100%;
}

.wishlist-input:focus,
.wishlist-textarea:focus,
.wishlist-select:focus {
    border-color: var(--color-green-dim);
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.15);
}

.wishlist-textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
}

.wishlist-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b6b7b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2rem;
}

.wishlist-select option {
    background: var(--color-bg-secondary);
    color: var(--color-text);
}

.wishlist-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.wishlist-submit-btn {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-bg);
    background: var(--color-green);
    border: none;
    padding: 0.4rem 1rem;
    cursor: pointer;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    transition: all var(--duration-fast);
}

.wishlist-submit-btn:hover {
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
}

.wishlist-cancel-btn {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-gray);
    background: none;
    border: 1px solid var(--color-border);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.wishlist-cancel-btn:hover {
    color: var(--color-text-soft);
    border-color: var(--color-gray);
}

/* ---- Items List ---- */
.wishlist-items {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.wishlist-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 3rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-gray);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wishlist-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-green);
    border-radius: 50%;
    animation: wishlistSpin 0.8s linear infinite;
}

@keyframes wishlistSpin {
    to { transform: rotate(360deg); }
}

.wishlist-empty {
    text-align: center;
    padding: 3rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-gray);
    letter-spacing: 0.05em;
}

/* ---- Single Item ---- */
.wishlist-item {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--color-border);
    transition: background var(--duration-fast);
}

.wishlist-item:last-child {
    border-bottom: none;
}

.wishlist-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Vote column */
.wishlist-vote-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 36px;
    padding-top: 0.2rem;
}

.wishlist-vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    color: var(--color-gray);
    transition: all var(--duration-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-vote-btn:hover:not(:disabled) {
    color: var(--color-warning);
    transform: scale(1.2);
}

.wishlist-vote-btn.voted {
    color: var(--color-warning);
    text-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

.wishlist-vote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.wishlist-vote-btn svg {
    width: 18px;
    height: 18px;
}

.wishlist-vote-count {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

/* Content column */
.wishlist-item-content {
    flex: 1;
    min-width: 0;
}

.wishlist-item-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.wishlist-item-desc {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-soft);
    line-height: 1.5;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wishlist-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wishlist-category-tag {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
}

.wishlist-category-tag[data-cat="manipulation"] {
    color: #ff3366;
    background: rgba(255, 51, 102, 0.12);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.wishlist-category-tag[data-cat="navigation"] {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.wishlist-category-tag[data-cat="perception"] {
    color: #9d4edd;
    background: rgba(157, 78, 221, 0.12);
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.wishlist-category-tag[data-cat="social"] {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.wishlist-category-tag[data-cat="other"] {
    color: var(--color-gray);
    background: rgba(107, 107, 123, 0.12);
    border: 1px solid rgba(107, 107, 123, 0.3);
}

.wishlist-item-author {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--color-gray);
    letter-spacing: 0.03em;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .wishlist-sub-header {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    .wishlist-sub-title {
        width: 100%;
        margin-right: 0;
    }

    .wishlist-items {
        max-height: 300px;
    }

    .wishlist-item {
        padding: 0.8rem 0.75rem;
    }

    .wishlist-form-card {
        width: 98%;
        padding: 1.25rem 1rem;
    }

    .wishlist-item-title {
        font-size: 0.8rem;
    }

    .wishlist-item-desc {
        font-size: 0.65rem;
    }
}

/* ============================================
   LOCAL DEV THEME (warm amber/copper)
   Activated via body.theme-local
   ============================================ */

body.theme-local {
    --color-warning: #ffd700;
    --color-warning-bright: #ffed4a;
    --color-warning-dim: #ccaa00;
}

/* ---- In-development hex pulse ---- */
@keyframes devPulse {
    0%, 100% { filter: drop-shadow(0 0 0px transparent) brightness(1); }
    50% { filter: drop-shadow(0 0 15px var(--dev-glow-color, #ff8800)) brightness(1.3); }
}

@keyframes devBorderPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Active dev states — pulsing glow */
.hex-card.status-executing,
.hex-card.status-studying,
.hex-card.status-writing,
.hex-card.status-debugging,
.tree-hex-card.status-executing,
.tree-hex-card.status-studying,
.tree-hex-card.status-writing,
.tree-hex-card.status-debugging {
    animation: devPulse 2s ease-in-out infinite !important;
}

.status-executing { --dev-glow-color: #ff8800; }
.status-studying  { --dev-glow-color: #00d4ff; }
.status-writing   { --dev-glow-color: #9d4edd; }
.status-debugging { --dev-glow-color: #ff3366; }

.hex-card.status-executing .hex-border,
.hex-card.status-studying .hex-border,
.hex-card.status-writing .hex-border,
.hex-card.status-debugging .hex-border,
.tree-hex-card.status-executing .hex-border,
.tree-hex-card.status-studying .hex-border,
.tree-hex-card.status-writing .hex-border,
.tree-hex-card.status-debugging .hex-border {
    background: var(--dev-glow-color) !important;
    animation: hexFloat 5s ease-in-out infinite, devBorderPulse 2s ease-in-out infinite !important;
}

/* Failed state — red border, no pulse */
.status-failed .hex-border {
    background: #ff3366 !important;
}
.status-failed {
    filter: saturate(0.6);
}

/* Done state — green tinted border */
.status-done .hex-border {
    background: var(--color-green-dim) !important;
}
.status-done {
    opacity: 0.75;
}

/* ---- Agent status line inside hex ---- */
.hex-agent-status {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--color-text-soft);
    margin-top: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hex-agent-status .status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
}

.status-dot.studying   { background: #00d4ff; }
.status-dot.writing    { background: #9d4edd; }
.status-dot.executing  { background: #ff8800; }
.status-dot.debugging  { background: #ff3366; }
.status-dot.done       { background: #39ff14; }
.status-dot.failed     { background: #ff3366; }

/* ---- Inject input in popup ---- */
.inject-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--color-border);
}

.inject-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: 0.5rem 0.7rem;
    outline: none;
    transition: border-color var(--duration-fast);
}

.inject-input:focus {
    border-color: var(--color-warning);
    box-shadow: 0 0 8px rgba(255, 136, 0, 0.2);
}

.inject-send-btn, .inject-stop-btn, .inject-retry-btn {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.inject-send-btn {
    color: var(--color-bg);
    background: var(--color-warning);
}
.inject-send-btn:hover { box-shadow: 0 0 12px rgba(255, 136, 0, 0.5); }

.inject-stop-btn {
    color: #fff;
    background: #ff3366;
}
.inject-stop-btn:hover { box-shadow: 0 0 12px rgba(255, 51, 102, 0.5); }

.inject-retry-btn {
    color: var(--color-bg);
    background: var(--color-green);
}
.inject-retry-btn:hover { box-shadow: 0 0 12px rgba(57, 255, 20, 0.5); }

/* ---- Two-column popup for in-dev skills ---- */
.popup-wide {
    max-width: 960px !important;
}

.popup-two-col {
    display: flex;
    gap: 1.5rem;
    min-height: 400px;
}

.popup-col-info {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    max-height: 65vh;
}

.popup-col-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--color-border);
    padding-left: 1.5rem;
    min-width: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.chat-status-badge {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}

.chat-agent-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-soft);
    flex: 1;
}

.chat-log {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0;
    max-height: 50vh;
    min-height: 200px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.5;
}

.chat-msg-agent {
    background: rgba(255, 255, 255, 0.04);
    border-left: 2px solid var(--color-warning);
}

.chat-msg-experiment {
    background: rgba(0, 212, 255, 0.06);
    border-left: 2px solid #00d4ff;
}

.chat-msg-you {
    background: rgba(57, 255, 20, 0.06);
    border-left: 2px solid var(--color-green);
}

.chat-msg-role {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gray);
}

.chat-msg-text {
    color: var(--color-text-soft);
    word-break: break-word;
}

.chat-input-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.chat-input-row .inject-input {
    flex: 1;
}

@media (max-width: 768px) {
    .popup-two-col {
        flex-direction: column;
    }
    .popup-col-info {
        flex: none;
        max-height: none;
    }
    .popup-col-chat {
        border-left: none;
        border-top: 1px solid var(--color-border);
        padding-left: 0;
        padding-top: 1rem;
    }
}

/* ---- Local mode banner ---- */
.local-banner {
    background: linear-gradient(90deg, #ffd700, #ccaa00);
    color: #000;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    padding: 0.3rem 1rem;
}

.local-banner .ws-status {
    margin-left: 1rem;
    font-weight: 400;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .marquee-track {
        animation: none;
    }

    .hero-video {
        display: none;
    }

    .hex-card {
        opacity: 1 !important;
    }
}

:focus-visible {
    outline: 2px solid var(--color-warning);
    outline-offset: 2px;
}

/* Warning text animation */
.warning-text {
    animation: warningBlink 1s ease-in-out infinite;
}

@keyframes warningBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
