/*code by: Arif billah */
:root {
    --neon-blue: #00f3ff;
    --neon-purple: #d100ff;
    --neon-pink: #ff00ff;
    --neon-green: #00ff9d;
    --neon-yellow: #ffed00;
    --dark-bg: #0a0a1a;
    --darker-bg: #050510;
    --card-bg: rgba(15, 15, 35, 0.9);
    --text-color: #e6e6ff;
}

/* About Section - All selectors prefixed with #about to scope them */
#about.about {
    position: relative;
    padding: 60px 0;
}

/* Cyber Grid Background - Scoped to about section only */
#about.about::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
}

/* Animated Background Particles - Scoped to about section only */
#about-particles.about-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}

#about-particles .about-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--neon-blue);
    opacity: 0.3;
    animation: floatParticle 15s infinite linear;
}

#about-particles .particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.45;
    animation: aboutParticleRise 32s infinite linear;
    opacity: 0.7 !important;
    filter: drop-shadow(0 0 5px currentColor);
    animation-fill-mode: both;
    will-change: transform, opacity;
}

@keyframes aboutParticleRise {
    0% {
        transform: translate3d(0, 30vh, 0);
    }
    100% {
        transform: translate3d(55px, -80vh, 0);
    }
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-100vh) translateX(100vw);
        opacity: 0;
    }
}

#about.about::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 243, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(209, 0, 255, 0.15) 0%, transparent 40%);
    z-index: -1;
}

#about .section-title {
    font-size: 3.2rem;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 2px;
    font-weight: 800;
    text-shadow: 0 0 15px rgba(209, 0, 255, 0.5);
}

#about .section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-blue);
}

#about .about-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 0 30px rgba(0, 243, 255, 0.2),
        0 0 60px rgba(209, 0, 255, 0.1),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 243, 255, 0.1);
    position: relative;
    overflow: hidden;
}

#about .about-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 243, 255, 0.05), rgba(209, 0, 255, 0.05), transparent);
    transform: rotate(45deg);
    animation: shine 8s infinite;
    z-index: 0;
}

@keyframes shine {
    0% { left: -50%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

#about .about-img {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

#about .about-img img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 
        0 0 20px rgba(0, 243, 255, 0.3),
        0 0 40px rgba(209, 0, 255, 0.2);
    border: 1px solid var(--neon-blue);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    z-index: 2;
}

#about .about-img img:hover {
    transform: scale(1.02);
    box-shadow: 
        0 0 30px rgba(0, 243, 255, 0.4),
        0 0 60px rgba(209, 0, 255, 0.3);
}

#about .about-img::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid var(--neon-blue);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.5;
    transition: all 0.5s ease;
}

#about .about-img:hover::before {
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    opacity: 0.7;
}

/* Cyber Orb */
#about .cyber-orb {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--neon-blue), transparent 40%);
    box-shadow: 
        0 0 60px var(--neon-blue),
        0 0 100px var(--neon-blue);
    filter: blur(10px);
    opacity: 0.2;
    bottom: -50px;
    right: -50px;
    z-index: 0;
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.1); }
}

/* Enhanced Floating Icons */
#about .floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#about .floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    color: var(--neon-blue);
    font-size: 24px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    border: 2px solid rgba(0, 243, 255, 0.5);
    animation: floating 6s infinite ease-in-out;
    backdrop-filter: blur(2px);
    z-index: 10;
    transition: all 0.5s ease;
}

#about .floating-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--neon-blue);
    animation: spin 3s linear infinite;
}

#about .floating-icon::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    border: 1px dashed rgba(0, 243, 255, 0.3);
    animation: spinReverse 8s linear infinite;
}

#about .floating-icon i {
    filter: drop-shadow(0 0 5px var(--neon-blue));
    z-index: 2;
}

#about .floating-icon:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
    color: var(--neon-blue);
}

#about .floating-icon:nth-child(2) {
    top: 60%;
    left: 10%;
    animation-delay: 1s;
    color: var(--neon-purple);
    border-color: rgba(209, 0, 255, 0.5);
    box-shadow: 0 0 20px rgba(209, 0, 255, 0.5);
}

#about .floating-icon:nth-child(2)::before {
    border-top-color: var(--neon-purple);
}

#about .floating-icon:nth-child(3) {
    top: 30%;
    right: 15%;
    animation-delay: 2s;
    color: var(--neon-green);
    border-color: rgba(0, 255, 157, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.5);
}

#about .floating-icon:nth-child(3)::before {
    border-top-color: var(--neon-green);
}

#about .floating-icon:nth-child(4) {
    bottom: 20%;
    right: 20%;
    animation-delay: 3s;
    color: var(--neon-pink);
    border-color: rgba(255, 0, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

#about .floating-icon:nth-child(4)::before {
    border-top-color: var(--neon-pink);
}

@keyframes floating {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    20% { transform: translateY(-20px) rotate(8deg) scale(1.1); }
    40% { transform: translateY(10px) rotate(-6deg) scale(1.05); }
    60% { transform: translateY(-15px) rotate(5deg) scale(1.07); }
    80% { transform: translateY(5px) rotate(-3deg) scale(1.03); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

/* Enhanced Data Stream Effect */
#about .data-stream {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    pointer-events: none;
    z-index: 0;
}

#about .data-stream span {
    position: absolute;
    height: 40px;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--neon-blue), transparent);
    opacity: 0.7;
    animation: dataStream 4s linear infinite;
}

#about .data-stream span:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    height: 30px;
}

#about .data-stream span:nth-child(2) {
    left: 25%;
    animation-delay: 1s;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--neon-purple), transparent);
}

#about .data-stream span:nth-child(3) {
    right: 30%;
    animation-delay: 2.5s;
    height: 35px;
    background: linear-gradient(to bottom, transparent, var(--neon-green), transparent);
}

#about .data-stream span:nth-child(4) {
    right: 15%;
    animation-delay: 1.5s;
    height: 45px;
}

#about .data-stream span:nth-child(5) {
    left: 50%;
    animation-delay: 0.5s;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--neon-pink), transparent);
}

@keyframes dataStream {
    0% { top: -100%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 200%; opacity: 0; }
}

#about .about-text {
    flex: 1;
    min-width: 300px;
    z-index: 1;
}

#about .about-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--neon-purple);
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.3);
}

#about .about-text b {
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
}

#about .skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

#about .skill-pill {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.15), rgba(209, 0, 255, 0.15));
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 243, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

#about .skill-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

#about .skill-pill:hover::before {
    left: 100%;
}

#about .skill-pill:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 243, 255, 0.4);
    border-color: var(--neon-blue);
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.25), rgba(209, 0, 255, 0.25));
}

#about .skill-pill i {
    color: var(--neon-blue);
    font-size: 1.1rem;
}

/* Mobile & tablet fixes for screens up to 768px */
@media (max-width: 768px) {
    #about .about-content {
        flex-direction: column !important;
        align-items: center;
        justify-content: center;
        padding: 20px 15px !important;
        gap: 20px !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    #about .about-img,
    #about .about-text {
        min-width: auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #about .about-img {
        max-width: 320px !important;
        margin: 0 auto;
    }

    #about .about-text {
        text-align: center;
        padding: 0 10px;
    }

    #about .about-text p {
        text-align: justify;
        word-break: break-word;
        hyphens: auto;
        font-size: 1rem !important;
        line-height: 1.6;
        font-weight: 400;
        margin-bottom: 20px;
        color: var(--text-color);
    }

    #about .about-text b {
        font-weight: 600;
        color: var(--neon-blue);
    }

    /* Floating icons for tablets */
    #about .floating-icon {
        display: flex !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
        opacity: 0.8;
    }

    /* Adjust icon positions */
    #about .floating-icon:nth-child(1) { top: 8%; left: 10%; }
    #about .floating-icon:nth-child(2) { top: 65%; left: 15%; }
    #about .floating-icon:nth-child(3) { top: 25%; right: 15%; }
    #about .floating-icon:nth-child(4) { bottom: 10%; right: 18%; }

    /* Skills pills layout - 2 PER LINE */
    #about .skills-container {
        display: flex;
        flex-wrap: wrap !important;
        justify-content: center;
        gap: 8px !important;
        margin-top: 25px;
    }

    #about .skill-pill {
        flex: 0 0 calc(50% - 8px) !important; /* Fixed 2 per line */
        min-width: 140px !important;
        max-width: calc(50% - 8px) !important;
        text-align: center;
        font-size: 0.9rem !important;
        padding: 10px 8px !important;
        box-sizing: border-box;
        justify-content: center;
        margin: 0 !important;
    }

    /* Additional mobile optimizations */
    #about .section-title {
        font-size: 2.2rem !important;
        margin-bottom: 30px !important;
    }

    #about .cyber-orb {
        width: 120px !important;
        height: 120px !important;
        opacity: 0.2;
    }

    #about .container {
        padding: 0 15px !important;
    }
}

/* Additional fixes for smaller tablets and large phones (481px-768px) */
@media (max-width: 768px) and (min-width: 481px) {
    #about .about-content {
        padding: 25px 20px !important;
        gap: 25px !important;
    }

    #about .about-text p {
        font-size: 1.05rem !important;
        line-height: 1.65;
    }

    #about .skill-pill {
        font-size: 0.95rem !important;
        padding: 11px 10px !important;
        min-width: 150px !important;
        max-width: calc(50% - 8px) !important;
    }

    #about .floating-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
}

/* Fix for very small tablets in portrait mode */
@media (max-width: 600px) and (orientation: portrait) {
    #about .about-text p {
        text-align: left;
        hyphens: none;
    }

    #about .skills-container {
        justify-content: space-between;
        gap: 6px !important;
    }

    #about .skill-pill {
        flex: 0 0 calc(50% - 6px) !important;
        min-width: 130px !important;
        max-width: calc(50% - 6px) !important;
        padding: 9px 6px !important;
        font-size: 0.85rem !important;
    }
}

/* Landscape mode fixes for tablets */
@media (max-width: 768px) and (orientation: landscape) {
    #about .about-content {
        flex-direction: row !important;
        gap: 20px !important;
        padding: 15px !important;
    }

    #about .about-img {
        max-width: 180px !important;
        flex: 0 0 auto;
    }

    #about .about-text {
        flex: 1;
        text-align: left;
        padding: 0;
    }

    #about .about-text p {
        text-align: left;
        font-size: 0.9rem !important;
    }

    #about .skills-container {
        justify-content: flex-start;
        gap: 6px !important;
    }

    #about .skill-pill {
        flex: 0 0 calc(33.333% - 6px) !important; /* 3 per line in landscape */
        min-width: 110px !important;
        max-width: calc(33.333% - 6px) !important;
        font-size: 0.8rem !important;
        padding: 8px 6px !important;
    }
}

/* Mobile fix: skills 2 per line (480px and below) */
@media (max-width: 480px) {
    #about .skills-container {
        display: flex;
        flex-wrap: wrap !important;
        flex-direction: row !important; /* Ensure horizontal layout */
        justify-content: space-between !important;
        gap: 8px !important;
    }

    #about .skill-pill {
        flex: 0 0 calc(50% - 8px) !important; /* Force 2 per line */
        min-width: calc(50% - 8px) !important;
        max-width: calc(50% - 8px) !important;
        text-align: center;
        justify-content: center;
        padding: 8px 6px !important;
        font-size: 0.82rem !important;
        margin: 0 !important;
    }
}

/* Extra small mobile devices - keep 2 per line */
@media (max-width: 380px) {
    #about .skills-container {
        gap: 6px !important;
    }

    #about .skill-pill {
        flex: 0 0 calc(50% - 6px) !important;
        min-width: calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
        font-size: 0.78rem !important;
        padding: 7px 4px !important;
    }
}