@import url('https://fonts.googleapis.com/css2?family=poppins:wght@300;400;500;600;700;800;900&display=swap');

/* --- Global Reset & Variables --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'poppins', sans-serif;
}

:root{
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --text-color:#fff;
    --main-color:#0ef;
}

html{
    font-size: 62.5%;
    overflow-x: hidden;
}

body{
    background: var(--bg-color);
    color: var(--text-color);
}

/* --- NEW: Dynamic Tech Background --- */
body::before {
    content: '';
    position: fixed; /* Fixes it to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* --- UPDATE THIS PATH to your image --- */
    background-image: url('../image/tech.jpg'); 
    background-repeat: repeat; /* Tiles the image */
    
    opacity: 0.1; /* Adjust 0.05 (5%) to 0.2 (20%) as needed */
    z-index: -1; /* Puts it behind all other content */

    /* Animation: 90s, linear (constant speed), infinite loop */
    animation: scrollBackground 90s linear infinite;
}
/* --- END OF NEW BLOCK --- */


/* --- Section Animation Initial State --- */
section{
    min-height: 100vh;
    padding: 10rem 9% 2rem;
    opacity: 0;
    transform: translateY(50px);
    animation: sectionFadeIn 1s ease forwards;
}

/* DELAYED ANIMATIONS FOR EACH SECTION (Staggered Load) */
.home { animation-delay: 0.1s; }
.featured-project { animation-delay: 0.3s; }
.about { animation-delay: 0.5s; }
.experience { animation-delay: 0.8s; }
.portfolio { animation-delay: 1.1s; }
.contact { animation-delay: 1.4s; }

/* =======================================
   UNIFIED SECTION BACKGROUNDS
   Consistent, cohesive styling across all sections
   ======================================= */

/* Base styles for all sections */
.home,
.featured-project,
.about,
.experience,
.portfolio,
.contact {
    background: transparent;
    position: relative;
}

/* Subtle depth overlay for visual separation - very subtle */
.featured-project,
.experience,
.contact {
    background: linear-gradient(
        180deg,
        rgba(50, 57, 70, 0.25) 0%,
        rgba(50, 57, 70, 0.35) 50%,
        rgba(50, 57, 70, 0.25) 100%
    );
}



/* --- Header & Navigation --- */
.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}
.header.sticky{
    border-bottom: .1rem solid rgba(0,0,0,.2);
}

.logo{
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}
/* Animation for the custom logo spans */
.logo span {
    color: var(--main-color);
    display: inline-block;
    animation: logoWiggle 1s ease-in-out infinite alternate;
}
.logo span:nth-child(2) { animation-delay: 0.1s; }
.logo span:nth-child(4) { animation-delay: 0.2s; }
.logo span:nth-child(6) { animation-delay: 0.3s; }
.logo span:nth-child(8) { animation-delay: 0.4s; }


.navbar a{
    font-size: 1.7rem;
    color: var(--text-color);
    margin: 4rem;
    transition: .3s;
}
.navbar a:hover,
.navbar a.active{
    color: var(--main-color);
}

#menu-icon{
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

/* =======================================
   HOME SECTION - PROFESSIONAL REDESIGN
   ======================================= */
.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6rem;
    padding-top: 12rem;
}

/* --- Home Content --- */
.home-content {
    flex: 1;
    max-width: 65rem;
}

/* Greeting Badge */
.home-intro {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: slideInLeft 0.8s ease 0.3s forwards;
}

.greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 238, 255, 0.1);
    border: 1px solid rgba(0, 238, 255, 0.25);
    padding: 0.8rem 1.8rem;
    border-radius: 3rem;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--main-color);
}

.greeting-badge i {
    font-size: 1.8rem;
    color: var(--main-color);
}

/* Name Styling - Letter by letter feel */
.home-content h1 {
    font-size: 6.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-color);
    opacity: 0;
    animation: revealText 0.8s ease 0.5s forwards;
}

.home-content h1 span {
    background: linear-gradient(135deg, var(--main-color), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    display: inline-block;
    animation: glowReveal 1s ease 0.8s forwards;
}

/* Tagline */
.home-tagline {
    margin-bottom: 2rem;
    opacity: 0;
    animation: slideInLeft 0.8s ease 1s forwards;
}

.tagline-text {
    font-size: 2.4rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    display: inline-block;
}

.tagline-text::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--main-color), #6366f1, transparent);
    border-radius: 3px;
}

/* Description */
.home-description {
    font-size: 1.6rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2.5rem;
    max-width: 55rem;
    opacity: 0;
    animation: slideInLeft 0.8s ease 1.2s forwards;
}

/* Highlight Badges */
.home-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: slideInLeft 0.8s ease 1.4s forwards;
}

.highlight-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--second-bg-color), rgba(50, 57, 70, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.6rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.highlight-badge:hover {
    border-color: rgba(0, 238, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.highlight-badge i {
    font-size: 1.8rem;
    color: var(--main-color);
}

.highlight-badge span {
    font-size: 1.3rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* CTA Buttons */
.home-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: slideInLeft 0.8s ease 1.6s forwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--main-color), #00b8d4);
    color: var(--bg-color);
    padding: 1.2rem 2.8rem;
    border-radius: 4rem;
    font-size: 1.5rem;
    font-weight: 600;
    box-shadow: 0 5px 25px rgba(0, 238, 255, 0.35);
    transition: all 0.3s ease;
}

.btn-primary i {
    font-size: 1.8rem;
    color: var(--bg-color);
}

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

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: transparent;
    color: var(--main-color);
    padding: 1.2rem 2.8rem;
    border: 2px solid var(--main-color);
    border-radius: 4rem;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline i {
    font-size: 1.8rem;
    color: var(--main-color);
}

.btn-outline:hover {
    background: var(--main-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(0, 238, 255, 0.3);
}

.btn-outline:hover i {
    color: var(--bg-color);
}

/* Social Media Icons */
.social-media {
    opacity: 0;
    animation: slideInLeft 0.8s ease 1.8s forwards;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background: rgba(0, 238, 255, 0.08);
    border: 1px solid rgba(0, 238, 255, 0.2);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin-right: 1.2rem;
    transition: all 0.3s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    border-color: var(--main-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 238, 255, 0.4);
}

/* --- Home Image Section --- */
.home-image {
    position: relative;
    flex-shrink: 0;
    opacity: 0;
    animation: scaleIn 1s ease 0.5s forwards;
}

.home-image img {
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--main-color);
    box-shadow:
        0 0 30px rgba(0, 238, 255, 0.3),
        0 0 60px rgba(0, 238, 255, 0.1);
    position: relative;
    z-index: 2;
}

.home-image-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 115%;
    height: 115%;
    border: 2px dashed rgba(0, 238, 255, 0.3);
    border-radius: 50%;
    animation: rotate 25s linear infinite;
    z-index: 1;
}

.home-image-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    border: 3px dotted rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    animation: rotate 40s linear infinite reverse;
    z-index: 0;
}

/* Decorative glow behind image */
.home-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 238, 255, 0.15), transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

span {
    color: var(--main-color);
}

/* --- Reusable Button Style --- */
.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    margin-top: 2rem; 
}
/* Fix for buttons not on home page */
.about-content .btn,
.experience-box .btn,
.contact form .btn {
    animation: none;
    opacity: 1;
    transform: scale(1);
}

.btn:hover{
    box-shadow: none;
}

/* =======================================
   FEATURED FYP PROJECT SECTION
   ======================================= */
.featured-project {
    padding: 8rem 9%;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

/* Top accent line for featured section */
.featured-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--main-color), #6366f1, var(--main-color), transparent);
}

.featured-container {
    max-width: 130rem;
    margin: 0 auto;
    position: relative;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--main-color), #6366f1);
    color: var(--bg-color);
    padding: 0.8rem 2rem;
    border-radius: 3rem;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

.featured-badge i {
    font-size: 1.6rem;
}

.featured-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
}

.featured-text h2 {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.featured-text h2 span {
    background: linear-gradient(135deg, var(--main-color), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-tagline {
    font-size: 2rem;
    font-weight: 600;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.featured-description {
    font-size: 1.6rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2rem;
}

.featured-domains {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.featured-domains span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 238, 255, 0.1);
    border: 1px solid rgba(0, 238, 255, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 3rem;
    font-size: 1.2rem;
    color: var(--main-color);
    transition: all 0.3s ease;
}

.featured-domains span:hover {
    background: var(--main-color);
    color: var(--bg-color);
}

.featured-domains span i {
    font-size: 1.4rem;
}

.featured-domains span:hover i {
    color: var(--bg-color);
}

.featured-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--main-color);
}

.featured-stat .stat-label {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
}

.featured-cta {
    display: flex;
    gap: 1.5rem;
}

.featured-cta .btn {
    margin-top: 0;
}

/* Featured Visual - Right Side */
.featured-visual {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pipeline-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--second-bg-color), rgba(50, 57, 70, 0.8));
    padding: 3rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 1.5rem;
    transition: all 0.3s ease;
}

.pipeline-step i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pipeline-step span {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
}

.pipeline-step.active i {
    color: var(--main-color);
    background: rgba(0, 238, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 238, 255, 0.3);
}

.pipeline-step.active span {
    color: var(--main-color);
    font-weight: 600;
}

.pipeline-arrow i {
    font-size: 2.5rem;
    color: rgba(0, 238, 255, 0.4);
}

.modules-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.module-mini {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem 1.5rem;
    border-radius: 1rem;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.module-mini i {
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.4);
}

.module-mini.highlight {
    background: rgba(0, 238, 255, 0.1);
    border-color: rgba(0, 238, 255, 0.3);
    color: var(--main-color);
}

.module-mini.highlight i {
    color: var(--main-color);
}

.module-mini:hover {
    background: rgba(0, 238, 255, 0.05);
    border-color: rgba(0, 238, 255, 0.2);
    transform: translateX(5px);
}

/* =======================================
     MODIFIED ABOUT SECTION STYLES
======================================== */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6rem;
}

/* Container for the image and its decoration */
.about-image{
    position: relative;
    width: 28vw;
    min-width: 280px;
    max-width: 400px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The image itself - modern blob/organic shape */
.about-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    z-index: 1;
    position: relative;
    border: 4px solid var(--main-color);
    box-shadow:
        0 0 25px rgba(0, 238, 255, 0.3),
        0 0 50px rgba(0, 238, 255, 0.1);
    animation: morphBorder 8s ease-in-out infinite;
}

/* Glowing ring decoration behind image */
.about-image .about-img-deco {
    position: absolute;
    width: 105%;
    height: 105%;
    border: 3px solid var(--main-color);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.4;
    animation: morphBorder 8s ease-in-out infinite reverse;
}

/* Second decorative ring */
.about-image::before {
    content: '';
    position: absolute;
    width: 112%;
    height: 112%;
    border: 2px dashed var(--main-color);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.2;
    animation: morphBorder 8s ease-in-out infinite, rotate 20s linear infinite;
}

.heading{
    text-align: center;
    font-size: 4.5rem;
}

/* Content on the left */
.about-content {
    flex: 1;
}

.about-content h2{
    text-align: left;
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* Title with icon */
.about-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, var(--main-color), #6366f1);
    border-radius: 1.2rem;
    flex-shrink: 0;
}

.title-icon i {
    font-size: 2.6rem;
    color: var(--bg-color);
}

.about-content h3{
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--text-color), var(--main-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Intro tagline */
.about-intro {
    font-size: 2rem;
    font-weight: 500;
    color: var(--main-color);
    font-style: italic;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 2rem;
}

.about-intro::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--main-color), #6366f1);
    border-radius: 4px;
}

/* Description text */
.about-description {
    font-size: 1.6rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
}

/* Highlights grid */
.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.5rem;
    background: rgba(0, 238, 255, 0.05);
    border: 1px solid rgba(0, 238, 255, 0.15);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.highlight-item:hover {
    background: rgba(0, 238, 255, 0.1);
    border-color: rgba(0, 238, 255, 0.3);
    transform: translateX(5px);
}

.highlight-item i {
    font-size: 2.2rem;
    color: var(--main-color);
}

.highlight-item span {
    font-size: 1.4rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}
/* =======================================
     END OF MODIFIED SECTION
======================================== */


/* --- Experience Section --- */
.experience h2{
    margin-bottom: 5rem;
}
.experience-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}
.experience-container .experience-box{
    background: var(--second-bg-color);
    padding: 2.5rem 2.5rem 3rem;
    border-radius: 1.5rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all .4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Accent top border */
.experience-container .experience-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--main-color), transparent);
    opacity: 0.8;
}

.experience-container .experience-box:hover{
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(0, 238, 255, 0.1);
    border-color: rgba(0, 238, 255, 0.2);
}

/* Icon styling - smaller, contained in a circle */
.experience-box i {
    font-size: 2.4rem;
    color: var(--main-color);
    background: rgba(0, 238, 255, 0.1);
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    transition: all .3s ease;
}

.experience-box:hover i {
    background: var(--main-color);
    color: var(--bg-color);
    transform: scale(1.1);
}

.experience-box h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}
.experience-box p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    flex-grow: 1;
}
.experience-box .btn {
    width: fit-content;
    padding: 0.8rem 2rem;
    font-size: 1.4rem;
    margin-top: auto;
}

/* --- Portfolio Section --- */
.portfolio h2 {
    margin-bottom: 5rem;
}
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    gap: 3rem;
}
.portfolio-container .portfolio-box {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 320px;
    background: linear-gradient(135deg, var(--bg-color), rgba(31, 36, 45, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2rem;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(0, 238, 255, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 3;
}
.portfolio-box:hover::before {
    opacity: 1;
}
.portfolio-box:hover {
    transform: translateY(-10px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 238, 255, 0.1);
}

/* Category Tags */
.portfolio-tags {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    gap: 0.8rem;
    z-index: 2;
    flex-wrap: wrap;
}
.portfolio-tags span {
    background: rgba(0, 238, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--main-color);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    border: 1px solid rgba(0, 238, 255, 0.2);
    transition: all 0.3s ease;
}
.portfolio-box:hover .portfolio-tags span {
    background: rgba(0, 238, 255, 0.25);
    box-shadow: 0 0 15px rgba(0, 238, 255, 0.2);
}

.portfolio-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: brightness(0.85);
}
.portfolio-box:hover img {
    transform: scale(1.1);
    filter: brightness(0.6);
}

/* Glassmorphism Overlay */
.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(31, 36, 45, 0.98) 0%,
        rgba(31, 36, 45, 0.85) 40%,
        rgba(31, 36, 45, 0.4) 70%,
        transparent 100%
    );
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
    padding: 2.5rem;
    opacity: 0;
    transition: all 0.4s ease;
}
.portfolio-box:hover .portfolio-layer {
    opacity: 1;
}

.portfolio-layer h4 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}
.portfolio-box:hover .portfolio-layer h4 {
    transform: translateY(0);
}

.portfolio-layer p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.5rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.15s;
}
.portfolio-box:hover .portfolio-layer p {
    transform: translateY(0);
}

/* Dual Button Links */
.portfolio-links {
    display: flex;
    gap: 1rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.2s;
}
.portfolio-box:hover .portfolio-links {
    transform: translateY(0);
}

.portfolio-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    background: var(--main-color);
    color: var(--bg-color);
    border-radius: 3rem;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.portfolio-btn i {
    font-size: 1.5rem;
    color: var(--bg-color);
}
.portfolio-btn:hover {
    background: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

.portfolio-btn.outline {
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
}
.portfolio-btn.outline i {
    color: var(--main-color);
}
.portfolio-btn.outline:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 5px 20px rgba(0, 238, 255, 0.3);
}
.portfolio-btn.outline:hover i {
    color: var(--bg-color);
}

/* --- Contact Section --- */
.contact h2{
    margin-bottom: 3rem;
}
.contact form{
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}
.contact form .input-box{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.contact form .input-box input,
.contact form textarea{
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}

.contact form .input-box input{
    width: 49%;
}
.contact form textarea{
    resize: none;
}
.contact form .btn{
    margin-top: 2rem;
    cursor: pointer;
}

/* --- Footer --- */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--second-bg-color);
}
.footer-text p{
    font-size: 1.6rem;
}
.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}
.footer-iconTop a:hover{
    box-shadow: 0 0 1rem var(--main-color);
}
.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}

/* --- Media Queries --- */
@media(max-width:1200px){
    html{
        font-size: 55%;
    }
}
@media(max-width:991px){
    .header {
        padding: 2rem 3%;
    }
    section{
        padding: 10rem 3% 2rem;
    }
    .footer{
        padding: 2rem 3%;
    }
    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Featured FYP Mobile */
    .featured-project {
        padding: 6rem 3%;
    }
    .featured-content {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .featured-text {
        text-align: center;
    }
    .featured-text h2 {
        font-size: 5rem;
    }
    .featured-domains {
        justify-content: center;
    }
    .featured-stats {
        justify-content: center;
    }
    .featured-cta {
        justify-content: center;
    }
    .pipeline-visual {
        flex-direction: column;
        padding: 2rem;
    }
    .pipeline-arrow i {
        transform: rotate(90deg);
    }
}
@media(max-width:768px){
    #menu-icon{
        display: block;
    }
    .navbar{
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0,0,0,.2);
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.2);
        display: none;
    }
    .navbar.active{
        display: block;
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }
    /* Home Section Mobile */
    .home {
        flex-direction: column-reverse;
        gap: 4rem;
        text-align: center;
        padding-top: 10rem;
    }
    .home-content {
        max-width: 100%;
    }
    .home-intro {
        display: flex;
        justify-content: center;
    }
    .home-content h1 {
        font-size: 4.5rem;
    }
    .home-tagline {
        display: flex;
        justify-content: center;
    }
    .tagline-text {
        font-size: 1.8rem;
    }
    .home-description {
        text-align: center;
        font-size: 1.5rem;
    }
    .home-highlights {
        justify-content: center;
    }
    .home-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
    .btn-primary,
    .btn-outline {
        padding: 1rem 2rem;
        font-size: 1.4rem;
    }
    .social-media {
        display: flex;
        justify-content: center;
    }
    .social-media a {
        margin: 0 0.6rem;
    }
    .home-image img {
        width: 22rem;
        height: 22rem;
    }
    .home-image-ring {
        width: 120%;
        height: 120%;
    }
    .home-image-dots {
        width: 135%;
        height: 135%;
    }

    /* Featured FYP Mobile 768px */
    .featured-text h2 {
        font-size: 4rem;
    }
    .featured-tagline {
        font-size: 1.6rem;
    }
    .featured-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }
    .featured-cta {
        flex-direction: column;
        align-items: center;
    }
    .modules-preview {
        grid-template-columns: 1fr;
    }

    /* MODIFIED: About media query */
    .about{
        flex-direction: column;
    }
    .about-image {
        width: 60vw;
        min-width: 250px;
        max-width: 350px;
        margin-top: 4rem;
    }
    .about-content h2 {
        text-align: center;
    }
    .about-title {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .about-intro {
        text-align: center;
        padding-left: 0;
    }
    .about-intro::before {
        display: none;
    }
    .about-description {
        text-align: center;
    }
    .about-highlights {
        grid-template-columns: 1fr;
    }
    .highlight-item {
        justify-content: center;
    }
    .about-content .btn {
        display: block;
        width: fit-content;
        margin: 0 auto;
    }

    /* Experience cards on mobile */
    .experience-container {
        grid-template-columns: 1fr;
    }
    .experience-box {
        text-align: center;
    }
    .experience-box i {
        margin: 0 auto 1.5rem auto;
    }
    .experience-box .btn {
        margin: auto auto 0 auto;
    }

    /* Portfolio Mobile Styles - ALWAYS SHOW OVERLAY ON TOUCH DEVICES */
    .portfolio-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .portfolio-box {
        height: auto;
        min-height: 320px;
    }
    .portfolio-tags {
        top: 1.2rem;
        left: 1.2rem;
        gap: 0.6rem;
    }
    .portfolio-tags span {
        font-size: 1rem;
        padding: 0.3rem 0.8rem;
    }

    /* Make portfolio layer always visible on mobile */
    .portfolio-box .portfolio-layer {
        opacity: 1;
        padding: 2rem;
    }
    .portfolio-box img {
        filter: brightness(0.5);
    }
    .portfolio-layer h4 {
        font-size: 2rem;
        transform: translateY(0);
    }
    .portfolio-layer p {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
        transform: translateY(0);
    }
    .portfolio-links {
        gap: 0.8rem;
        transform: translateY(0);
    }
    .portfolio-btn {
        padding: 0.7rem 1.4rem;
        font-size: 1.2rem;
    }
    .portfolio-btn i {
        font-size: 1.3rem;
    }

    .contact form .input-box input{
        width: 100%;
    }
}

/* Extra small devices (phones, 480px and down) */
@media(max-width:480px){
    html {
        font-size: 50%;
    }

    .home-content h1 {
        font-size: 3.5rem;
    }

    .tagline-text {
        font-size: 1.5rem;
    }

    .greeting-badge {
        font-size: 1.2rem;
        padding: 0.6rem 1.4rem;
    }

    .highlight-badge {
        padding: 0.8rem 1.2rem;
    }

    .highlight-badge span {
        font-size: 1.1rem;
    }

    .home-image img {
        width: 18rem;
        height: 18rem;
    }

    .btn-primary,
    .btn-outline {
        padding: 0.9rem 1.8rem;
        font-size: 1.3rem;
    }

    .heading {
        font-size: 3.5rem;
    }

    .featured-text h2 {
        font-size: 3.2rem;
    }

    .featured-tagline {
        font-size: 1.4rem;
    }

    .featured-description {
        font-size: 1.4rem;
    }

    .stat-value {
        font-size: 2.4rem;
    }

    .featured-cta .btn {
        padding: 0.8rem 1.6rem;
        font-size: 1.3rem;
    }

    .about-title h3 {
        font-size: 2rem;
    }

    .about-intro {
        font-size: 1.6rem;
    }

    .experience-box h3 {
        font-size: 1.8rem;
    }

    .portfolio-box {
        min-height: 280px;
    }

    .portfolio-layer h4 {
        font-size: 1.8rem;
    }

    .footer-text p {
        font-size: 1.3rem;
    }
}


/* =======================================
   KEYFRAMES
   ======================================= */

/* 1. Global Section Fade-In */
@keyframes sectionFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. Home Content Slide-In */
@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 2b. Slide In from Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 2c. Text Reveal Animation */
@keyframes revealText {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* 2d. Glow Reveal for Name Highlight */
@keyframes glowReveal {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
        filter: blur(5px);
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
        text-shadow: 0 0 30px rgba(0, 238, 255, 0.5);
    }
}

/* 3. Typing Effect */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--main-color); }
}

/* 4. Social Media Fade Up */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5. Button/Image Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 6. Image Pulse Effect */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0rem rgba(0, 238, 255, 0.4); }
    100% { box-shadow: 0 0 0 1.5rem rgba(0, 238, 255, 0); }
}

/* 7. Logo Wiggle */
@keyframes logoWiggle {
    0% { color: var(--text-color); transform: translateY(0px); }
    100% { color: var(--main-color); transform: translateY(-2px); }
}

/* 8. Bounce on Hover */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* --- NEW: Background Scroll Animation --- */
/* 9. Dynamic Background Scroll */
@keyframes scrollBackground {
    from {
        background-position-y: 0;
    }
    to {
        background-position-y: 100vh; /* Scrolls the height of the screen */
    }
}

/* 10. Morphing border for About image */
@keyframes morphBorder {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
    }
    75% {
        border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
    }
}

/* 11. Rotate animation for decorative ring */
@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}