/* =========================================
   1. Global & Reset Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0e0e0e;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   2. Header & Navigation (Shared)
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(19, 19, 19, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
 
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #00ffc8, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: #aaa;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ffc8, #7c3aed);
    transition: width 0.3s ease;
}

nav a:hover,
nav a.active {
    color: #00ffc8;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* =========================================
   3. Home Page Styles
   ========================================= */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    position: relative;
    overflow: hidden;
}

.home-img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img {
    max-width: 400px;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.4s ease;
}

.home-img img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 10px rgba(0, 255, 200, 0.3), 0 0 100px rgba(120, 0, 255, 0.2);
}

.home-content {
    flex: 1;
    padding-left: 3rem;
    animation: fadeInRight 1s ease-out;
}

.home-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.home-content h1 span {
    background: linear-gradient(135deg, #00ffc8, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

.typing-text {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.typing-text span {
    color: #00ffc8;
    border-right: 3px solid #00ffc8;
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

.home-content p {
    font-size: 1.1rem;
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 600px;
}

.social-icons {
    display: flex;
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.social-icons a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(24, 24, 24, 0.5);
    color: #00ffc8;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00ffc8, #7c3aedb6);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-icons a:hover {
    color: #111111f3;
    box-shadow: 0 0px 10px rgba(0, 255, 200, 0.26);
    transform: translateY(-3px);
}

.social-icons a:hover::before {
    opacity: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #00ffc8, #00c896);
    color: #0d0d1a;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px rgba(0, 255, 200, 0.3);
    position: relative;
    overflow: hidden;
}

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 200, 0.5);
}

.btn:hover::before {
    left: 100%;
}

.btn i {
    animation: rocketMove 2s ease-in-out infinite;
}

/* =========================================
   4. Projects Page Styles
   ========================================= */
.projects-hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10rem 5% 4rem;
    position: relative;
}

.projects-hero .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(0, 255, 200, 0.1);
    border: 1px solid rgba(0, 255, 200, 0.3);
    border-radius: 50px;
    color: #00ffc8;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease-out;
}

.projects-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.projects-hero h1 span {
    background: linear-gradient(135deg, #00ffc8, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.projects-hero p {
    font-size: 1.15rem;
    color: #aaa;
    max-width: 650px;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

.projects-stats {
    display: flex;
    gap: 3rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1.2s ease-out;
}

.stat-item { text-align: center; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00ffc8, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 0 5%;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 200, 0.2);
    color: #aaa;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #00ffc8, #7c3aed);
    color: #0d0d1a;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 200, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0 5% 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out backwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 200, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 255, 200, 0.1);
}

.project-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 4rem;
    background: linear-gradient(135deg, #00ffc8, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image i {
    transform: scale(1.15) rotate(-5deg);
}

.project-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.9rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 200, 0.3);
    border-radius: 50px;
    color: #00ffc8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.project-content {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.8rem;
}

.project-description {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 255, 200, 0.08);
    border: 1px solid rgba(0, 255, 200, 0.2);
    color: #00ffc8;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-actions {
    display: flex;
    gap: 0.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-link {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link-primary {
    background: linear-gradient(135deg, #00ffc8, #00c896);
    color: #0d0d1a;
}

.project-link-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 200, 0.3);
}

.project-link-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-link-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 255, 200, 0.3);
    color: #00ffc8;
}

.projects-cta {
    text-align: center;
    padding: 4rem 5% 6rem;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 200, 0.03));
}

.projects-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.projects-cta p {
    color: #aaa;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #00ffc8, #7c3aed);
    color: #0d0d1a;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px rgba(0, 255, 200, 0.3);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 200, 0.5);
}

/* =========================================
   5. 404 Error Page Styles
   ========================================= */
.error-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.error-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 255, 200, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(120, 0, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.error-content {
    max-width: 650px;
    animation: fadeInUp 0.8s ease-out;
}

.error-code {
    font-size: clamp(8rem, 20vw, 14rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #00ffc8, #7c3aed, #00ffc8);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
    margin-bottom: 0.5rem;
    user-select: none;
}

.error-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
    font-weight: 600;
}

.error-text {
    font-size: 1.05rem;
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.error-btn-primary {
    background: linear-gradient(135deg, #00ffc8, #00c896);
    color: #0d0d1a;
    box-shadow: 0 4px 20px rgba(0, 255, 200, 0.3);
}

.error-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 200, 0.5);
}

.error-btn-secondary {
    background: transparent;
    color: #00ffc8;
    border: 2px solid rgba(0, 255, 200, 0.4);
}

.error-btn-secondary:hover {
    background: rgba(0, 255, 200, 0.1);
    border-color: #00ffc8;
    transform: translateY(-3px);
}

.error-icon {
    font-size: 3rem;
    color: rgba(0, 255, 200, 0.3);
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.error-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.error-links a {
    color: #666;
    font-size: 1.3rem;
    transition: color 0.3s, transform 0.3s;
}

.error-links a:hover {
    color: #00ffc8;
    transform: translateY(-3px);
}

/* =========================================
   6. Animations (Keyframes)
   ========================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes blink {
    0%, 100% { border-color: #00ffc8; }
    50% { border-color: transparent; }
}

@keyframes rocketMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

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

/* =========================================
   7. Responsive Design (Mobile & Tablet)
   ========================================= */
@media (max-width: 968px) {
    .home {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 10rem;
    }

    .home-content {
        padding-left: 0;
        margin-bottom: 3rem;
    }

    .social-icons {
        justify-content: center;
    }

    .home-img img {
        max-width: 300px;
    }

    .projects-hero {
        padding: 8rem 5% 3rem;
        min-height: auto;
    }

    .projects-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem 3%;
    }

    .logo {
        font-size: 1.5rem;
    }

    nav {
        gap: 1rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    .home {
        padding: 8rem 3% 2rem;
    }

    .social-icons a {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .project-actions {
        flex-direction: column;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .error-btn {
        width: 100%;
        justify-content: center;
    }
}