/* ====================================================
    ENHANCED HERO SECTION WITH CENTERED ICONS
    ==================================================== */

.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: white;
    padding: 90px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    isolation: isolate;
}

/* Code Background Container - Enhanced */
.code-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.15;
    pointer-events: none;
}

/* Center Focus Area for Icons */
.icon-center-zone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(96, 165, 250, 0.08) 0%,
        rgba(96, 165, 250, 0.04) 30%,
        rgba(96, 165, 250, 0.01) 60%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Floating Code Icons - Centered Layout */
.floating-code-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Circular Grid Layout for Icons */
.code-icon-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    place-items: center;
}

.code-icon {
    width: 56px;
    height: 56px;
    background: rgba(96, 165, 250, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(96, 165, 250, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: floatIcon 6s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.5s);
}

/* Specific positions for the 3x3 grid */
.code-icon:nth-child(1) { grid-column: 2; grid-row: 1; --i: 0; } /* Top Center */
.code-icon:nth-child(2) { grid-column: 3; grid-row: 2; --i: 1; } /* Right Center */
.code-icon:nth-child(3) { grid-column: 2; grid-row: 3; --i: 2; } /* Bottom Center */
.code-icon:nth-child(4) { grid-column: 1; grid-row: 2; --i: 3; } /* Left Center */
.code-icon:nth-child(5) { grid-column: 1; grid-row: 1; --i: 4; } /* Top Left */
.code-icon:nth-child(6) { grid-column: 3; grid-row: 1; --i: 5; } /* Top Right */

.code-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.code-icon:hover {
    transform: translateY(-8px) scale(1.1);
    background: rgba(96, 165, 250, 0.25);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 
        0 8px 32px rgba(96, 165, 250, 0.3),
        0 0 0 1px rgba(96, 165, 250, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.code-icon:hover::before {
    left: 100%;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-12px) scale(1.05);
    }
}

/* Enhanced Code Lines Animation */
.code-lines-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 60%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    overflow: hidden;
}

.code-line {
    opacity: 0;
    animation: codeTyping 15s linear infinite;
    animation-delay: var(--delay);
    margin-bottom: 8px;
    text-align: left;
    white-space: nowrap;
    padding-left: 20px;
    position: relative;
}

.code-line::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #60a5fa;
    opacity: 0.6;
    font-weight: bold;
}

/* Circuit Connections to Icons */
.circuit-connector {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.15), transparent);
    height: 1px;
    animation: connectorPulse 3s ease-in-out infinite;
    transform-origin: left center;
}

@keyframes connectorPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Hero Content - Enhanced */
.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* Enhanced Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(20px);
    padding: 14px 28px;
    border-radius: 60px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badge-icon-container {
    position: relative;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center; /* strongest clean centering */
}

.badge-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}



.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(96, 165, 250, 0.4);
}


@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.6);
        opacity: 0;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Enhanced Typing Animation */
.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 25px;
    font-weight: 700;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(45deg, #ffffff 30%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typewriter-text {
    position: relative;
    display: inline-block;
    color: #60a5fa;
}

.typewriter-text::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.2em;
    background: #60a5fa;
    animation: cursorBlink 1s infinite;
    border-radius: 2px;
}

/* Enhanced CTA Buttons */
.btn-primary {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: transform 0.6s ease;
}

.btn-primary:hover::after {
    transform: rotate(30deg) translate(20%, 20%);
}

/* Tech Stack - Centered under CTA */
.tech-stack-indicator {
    margin-top: 50px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tech-icons {
    display: flex;
    gap: 25px;
}

.tech-icons i {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    position: relative;
}

.tech-icons i:hover {
    color: #60a5fa;
    transform: translateY(-5px) scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .icon-center-zone {
        width: 300px;
        height: 300px;
    }
    
    .code-icon-grid {
        width: 250px;
        height: 250px;
    }
    
    .code-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .code-lines-container {
        font-size: 11px;
        width: 95%;
    }
    
    .tech-stack-indicator {
        flex-direction: column;
        gap: 15px;
        padding: 15px 25px;
    }
    
    .tech-icons {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        padding: 12px 20px;
    }
    
    .code-icon-grid {
        width: 200px;
        height: 200px;
        gap: 10px;
    }
    
    .code-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}