/* ============================================================
   CODEAMBLE 2026 — HERO REVAMP
   Full robot mascot system + particle canvas + glitch title
   ============================================================ */

/* ── Particle canvas ── */
.ca-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

/* ── Scanlines ── */
.ca-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.04) 3px,
        rgba(0,0,0,0.04) 4px
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0.45;
}

/* ── Hero layout override ── */
.blog-hero.codeamble-landing,
.codeamble-landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 128px 16px 72px;
    text-align: center;
    position: relative;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%,  rgba(108,92,231,0.18), transparent 65%),
        radial-gradient(circle at 8%  55%, rgba(0,206,201,0.12),   transparent 38%),
        radial-gradient(circle at 92% 55%, rgba(232,67,147,0.12),   transparent 38%);
}

/* ── Shell grid ── */
.codeamble-hero-shell {
    position: relative;
    z-index: 10;
    width: min(1340px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 480px;
}

/* ── Center content ── */
.codeamble-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 32px;
}

/* ── Title ── */
.ca-hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0 0 22px;
    line-height: 0.88;
    letter-spacing: -1px;
}

.ca-title-main {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.8rem, 6.5vw, 5.8rem);
    font-weight: 900;
    white-space: nowrap;
    background: linear-gradient(135deg, #fff 0%, #a29bfe 35%, #00cec9 70%, #e84393 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
}

/* Glitch effect */
.ca-title-main::before,
.ca-title-main::after {
    content: attr(data-glitch);
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #fff 0%, #a29bfe 35%, #00cec9 70%, #e84393 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    pointer-events: none;
}

.ca-title-main.ca-glitch-active::before {
    opacity: 0.8;
    transform: translate(-3px, 1px) skewX(-4deg);
    filter: hue-rotate(90deg);
    animation: caGlitchFlash 0.09s steps(2) forwards;
}
.ca-title-main.ca-glitch-active::after {
    opacity: 0.6;
    transform: translate(3px, -1px) skewX(4deg);
    filter: hue-rotate(-90deg);
    animation: caGlitchFlash 0.14s steps(2) 0.04s forwards;
}

@keyframes caGlitchFlash {
    0%   { clip-path: inset(0 0 80% 0); }
    33%  { clip-path: inset(40% 0 30% 0); }
    66%  { clip-path: inset(70% 0 0 0); }
    100% { opacity: 0; }
}

.ca-title-year {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3.6rem, 9vw, 7.6rem);
    font-weight: 900;
    line-height: 0.82;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 2px rgba(0,206,201,0.55);
    letter-spacing: 8px;
    position: relative;
}

.ca-title-year::after {
    content: '2026';
    position: absolute;
    inset: 0;
    -webkit-text-stroke: 0;
    color: transparent;
    background: linear-gradient(90deg, rgba(0,206,201,0.18), rgba(108,92,231,0.18), rgba(232,67,147,0.18));
    -webkit-background-clip: text;
    background-clip: text;
    filter: blur(18px);
    z-index: -1;
}

/* signal strip — 4 columns */
.codeamble-signal-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(540px, 100%);
}

/* ============================================================
   ROBOT MASCOT SYSTEM
   ============================================================ */

/* ── Wrapper ── */
.ca-mascot {
    position: absolute;
    bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.15s ease-out, opacity 0.3s ease;
    will-change: transform;
    z-index: 5;
}

.ca-mascot--left { left: 20px; }
.ca-mascot--right { right: 20px; }

/* ── Speech bubble ── */
.ca-bubble {
    position: absolute;
    top: -12px;
    background: rgba(12,14,30,0.92);
    border: 1px solid rgba(0,206,201,0.35);
    border-radius: 18px;
    padding: 10px 14px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 0 18px rgba(0,206,201,0.15), 0 8px 24px rgba(0,0,0,0.4);
    animation: caBubbleBob 4s ease-in-out infinite;
    z-index: 20;
    pointer-events: none;
    text-align: left;
}

.ca-bubble--left  { left: 110%;  transform-origin: left bottom; }
.ca-bubble--right { right: 110%; transform-origin: right bottom; }

/* Tail */
.ca-bubble--left::before {
    content: '';
    position: absolute;
    bottom: 14px;
    left: -8px;
    width: 0; height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 8px solid rgba(0,206,201,0.35);
}
.ca-bubble--right::before {
    content: '';
    position: absolute;
    bottom: 14px;
    right: -8px;
    width: 0; height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 8px solid rgba(0,206,201,0.35);
}

@keyframes caBubbleBob {
    0%,100% { transform: translateY(0) rotate(-1deg); }
    50%      { transform: translateY(-8px) rotate(1deg); }
}

/* ── The whole bot floats ── */
.ca-bot {
    position: relative;
    width: 160px;
    animation: caBotFloat 5s ease-in-out infinite;
    transform-style: preserve-3d;
}
.ca-bot--variant { animation-delay: -2.1s; }

@keyframes caBotFloat {
    0%,100% { transform: translateY(0) rotateZ(-1deg); }
    50%      { transform: translateY(-18px) rotateZ(1deg); }
}

/* ── Ambient glow ── */
.ca-bot__glow {
    position: absolute;
    inset: 10% 5% -20% 5%;
    background: radial-gradient(ellipse, rgba(0,206,201,0.3), transparent 70%);
    filter: blur(30px);
    z-index: 0;
}
.ca-bot__glow--pink {
    background: radial-gradient(ellipse, rgba(232,67,147,0.3), transparent 70%);
}

/* ── HEAD ── */
.ca-bot__head {
    position: relative;
    width: 90px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(160deg, rgba(30,35,70,0.98), rgba(12,14,30,0.99));
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 22px 22px 18px 18px;
    box-shadow:
        inset -10px -12px 20px rgba(0,0,0,0.4),
        inset 6px 8px 14px rgba(255,255,255,0.04),
        0 0 28px rgba(0,206,201,0.12);
    z-index: 5;
}

/* ── Antenna ── */
.ca-bot__antenna {
    position: absolute;
    left: 50%;
    top: -28px;
    width: 3px;
    height: 30px;
    background: linear-gradient(to top, rgba(0,206,201,0.8), transparent);
    transform: translateX(-50%);
}
.ca-bot__antenna-tip {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 14px var(--secondary), 0 0 28px rgba(0,206,201,0.6);
    animation: caLedPulse 1.8s ease-in-out infinite;
}
.ca-bot__antenna-tip--pink {
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent), 0 0 28px rgba(232,67,147,0.6);
}

.ca-bot__antenna--double::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 2px;
    width: 3px;
    height: 22px;
    background: linear-gradient(to top, rgba(232,67,147,0.6), transparent);
    transform: rotate(-12deg);
}

/* ── Ears ── */
.ca-bot__ear {
    position: absolute;
    top: 22px;
    width: 10px;
    height: 22px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
}
.ca-bot__ear--l { left: -11px; }
.ca-bot__ear--r { right: -11px; }

/* ── Visor ── */
.ca-bot__visor {
    position: absolute;
    left: 12%;
    top: 20%;
    width: 76%;
    height: 22%;
    background: linear-gradient(90deg, rgba(0,206,201,0.9), rgba(162,155,254,0.75));
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 0 20px rgba(0,206,201,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    overflow: hidden;
}
.ca-bot__visor::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40%;
    background: rgba(255,255,255,0.12);
}
.ca-bot__visor--pink {
    background: linear-gradient(90deg, rgba(232,67,147,0.85), rgba(253,121,168,0.7));
    box-shadow: 0 0 20px rgba(232,67,147,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* ── Eyes ── */
.ca-bot__eye {
    position: absolute;
    top: 50%;
    width: 10px; height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff;
    transform: translateY(-50%);
    animation: caBlink 4s ease-in-out infinite;
}
.ca-bot__eye--l { left: 20%; }
.ca-bot__eye--r { right: 20%; }
.ca-bot__eye--pink { background: #ffb3c6; box-shadow: 0 0 10px #ffb3c6; }

@keyframes caBlink {
    0%,90%,100% { transform: translateY(-50%) scaleY(1); }
    94%          { transform: translateY(-50%) scaleY(0.08); }
}

/* ── Mouth ── */
.ca-bot__mouth {
    position: absolute;
    left: 30%;
    bottom: 14%;
    width: 40%;
    height: 6px;
    border-bottom: 2px solid rgba(255,255,255,0.35);
    border-left: 2px solid rgba(255,255,255,0.35);
    border-right: 2px solid rgba(255,255,255,0.35);
    border-radius: 0 0 8px 8px;
}
.ca-bot__mouth--smile {
    border-radius: 0 0 12px 12px;
    border-bottom-color: rgba(0,206,201,0.7);
    border-left-color: rgba(0,206,201,0.7);
    border-right-color: rgba(0,206,201,0.7);
    box-shadow: 0 4px 8px rgba(0,206,201,0.3);
}

/* ── Neck ── */
.ca-bot__neck {
    width: 24px;
    height: 12px;
    margin: 0 auto;
    background: linear-gradient(to bottom, rgba(40,50,90,0.9), rgba(20,25,50,0.95));
    border-left: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 4;
}

/* ── Torso ── */
.ca-bot__torso {
    position: relative;
    width: 110px;
    height: 100px;
    margin: 0 auto;
    background: linear-gradient(160deg, rgba(28,34,68,0.98), rgba(10,12,26,0.99));
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 18px 18px 12px 12px;
    box-shadow:
        inset -12px -16px 24px rgba(0,0,0,0.5),
        inset 8px 10px 18px rgba(255,255,255,0.035),
        0 12px 32px rgba(0,0,0,0.5);
    z-index: 4;
}

/* ── Chest panel ── */
.ca-bot__chest-panel {
    position: absolute;
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
    width: 62%;
    height: 52%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,206,201,0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 6px 0;
}
.ca-bot__chest-panel--pink { border-color: rgba(232,67,147,0.2); }

/* ── LEDs ── */
.ca-bot__led {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 8px var(--secondary);
    animation: caLedPulse 2s ease-in-out infinite;
}
.ca-bot__led--1 { animation-delay: 0s; }
.ca-bot__led--2 { animation-delay: 0.3s; }
.ca-bot__led--3 { animation-delay: 0.6s; }
.ca-bot__led--pink { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

@keyframes caLedPulse {
    0%,100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.35); }
}

/* ── Arc reactor ── */
.ca-bot__arc-reactor {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,206,201,1) 20%, rgba(0,206,201,0.3) 60%, transparent 100%);
    box-shadow: 0 0 16px rgba(0,206,201,0.9), 0 0 32px rgba(0,206,201,0.5);
    animation: caReactorSpin 3s linear infinite;
}
.ca-bot__arc-reactor::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
}
.ca-bot__arc-reactor--pink {
    background: radial-gradient(circle, var(--accent) 20%, rgba(232,67,147,0.3) 60%, transparent 100%);
    box-shadow: 0 0 16px rgba(232,67,147,0.9), 0 0 32px rgba(232,67,147,0.5);
}

@keyframes caReactorSpin {
    0%   { box-shadow: 0 0 16px rgba(0,206,201,0.9), 4px 0 8px rgba(108,92,231,0.5); }
    50%  { box-shadow: 0 0 20px rgba(0,206,201,1),  -4px 0 8px rgba(232,67,147,0.5); }
    100% { box-shadow: 0 0 16px rgba(0,206,201,0.9),  4px 0 8px rgba(108,92,231,0.5); }
}

/* ── Arms ── */
.ca-bot__arm {
    position: absolute;
    top: 12px;
    width: 20px;
    height: 70px;
    background: linear-gradient(to bottom, rgba(35,42,80,0.95), rgba(20,25,50,0.98));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
}
.ca-bot__arm--l { left: -22px; transform-origin: top; transform: rotate(8deg); animation: caArmSwingL 3s ease-in-out infinite; }
.ca-bot__arm--r { right: -22px; transform-origin: top; transform: rotate(-8deg); animation: caArmSwingR 3s ease-in-out infinite; }

@keyframes caArmSwingL { 0%,100% { transform: rotate(8deg); }  50% { transform: rotate(20deg); } }
@keyframes caArmSwingR { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(-20deg); } }

.ca-bot__forearm {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 30px;
    background: rgba(0,206,201,0.12);
    border: 1px solid rgba(0,206,201,0.2);
    border-radius: 6px;
}

.ca-bot__hand {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 24px;
    background: rgba(40,50,90,0.9);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ca-bot__hand--wave { animation: caHandWave 1.4s ease-in-out infinite; }
@keyframes caHandWave {
    0%,100% { transform: translateX(-50%) rotate(0deg); }
    30%      { transform: translateX(-50%) rotate(20deg); }
    60%      { transform: translateX(-50%) rotate(-10deg); }
}

/* ── Hips ── */
.ca-bot__hips {
    width: 96px;
    height: 14px;
    margin: 0 auto -2px;
    background: linear-gradient(to bottom, rgba(25,30,60,0.98), rgba(18,22,44,0.99));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    position: relative;
    z-index: 3;
}

/* ── Legs ── */
.ca-bot__legs {
    display: flex;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 3;
}

.ca-bot__leg {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ca-bot__shin {
    width: 24px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(35,42,80,0.95), rgba(20,25,50,0.98));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px 8px 4px 4px;
}
.ca-bot__leg--l { animation: caLegL 3s ease-in-out infinite; transform-origin: top center; }
.ca-bot__leg--r { animation: caLegR 3s ease-in-out infinite; transform-origin: top center; }
@keyframes caLegL { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(5deg); } }
@keyframes caLegR { 0%,100% { transform: rotate(3deg);  } 50% { transform: rotate(-5deg); } }

.ca-bot__foot {
    width: 32px;
    height: 14px;
    background: rgba(0,206,201,0.18);
    border: 1px solid rgba(0,206,201,0.3);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,206,201,0.2);
    margin-top: 1px;
}

/* ── Floating chips ── */
.ca-bot__chip {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: rgba(8,10,24,0.92);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--secondary);
    font-size: 0.85rem;
    box-shadow: 0 0 14px rgba(0,206,201,0.2), 0 8px 18px rgba(0,0,0,0.35);
    animation: caChipFloat 4s ease-in-out infinite;
    z-index: 20;
}
.ca-bot__chip--a { top: 10%; right: -44px;  animation-delay: 0s; }
.ca-bot__chip--b { bottom: 24%; left: -44px; animation-delay: -2s; }

@keyframes caChipFloat {
    0%,100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(8deg); }
}

/* ── Signal strip override for 4 cols ── */
.codeamble-signal-strip {
    display: grid;
    width: min(560px, 100%);
    margin-top: 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
.ca-mascots-container {
    display: contents;
}

@media (max-width: 1240px) {
    .ca-mascot {
        transform: scale(0.85);
    }
    .ca-mascot--left { left: 10px; }
    .ca-mascot--right { right: 10px; }
}

@media (max-width: 1024px) {
    .ca-mascot {
        transform: scale(0.72);
    }
    .ca-mascot--left { left: -10px; }
    .ca-mascot--right { right: -10px; }
}

@media (max-width: 900px) {
    .codeamble-landing { padding: 120px 16px 60px; }
    
    .codeamble-hero-shell {
        flex-direction: column;
        align-items: center;
        min-height: auto;
    }
    
    .codeamble-hero-content {
        order: 1;
        width: 100%;
        max-width: 640px;
    }
    
    .ca-mascots-container {
        display: flex;
        justify-content: center;
        align-items: flex-end;
        gap: 30px;
        width: 100%;
        order: 2;
        margin-top: 35px;
    }
    
    .ca-mascot {
        position: relative;
        bottom: auto;
        left: auto !important;
        right: auto !important;
        transform: scale(0.85);
    }
    
    .ca-bubble {
        position: relative;
        top: auto;
        left: auto !important;
        right: auto !important;
        margin-bottom: 8px;
        white-space: normal;
        max-width: 200px;
        text-align: center;
    }
    .ca-bubble::before { display: none; }
    
    .codeamble-signal-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .ca-title-main { font-size: clamp(2.2rem, 12vw, 3.4rem); }
    .ca-title-year { font-size: clamp(3rem, 16vw, 5rem); letter-spacing: 4px; }
    
    .ca-mascots-container {
        gap: 15px;
    }
    
    .ca-mascot {
        transform: scale(0.68);
    }
    
    .ca-mascot--right {
        display: none !important;
    }
    
    .codeamble-hero-actions .btn-glow { min-width: unset; width: 100%; text-align: center; }
    .codeamble-signal-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .ca-bot, .ca-bubble { animation: none !important; }
    .ca-glitch-active::before, .ca-glitch-active::after { display: none; }
}
