/* ===================== GLOBAL RESET ======================= */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Poppins;
}


/* ===================== BODY =============================== */
body{
    background:#0f172a;
    color:white;
}


/* ===================== LOADER ============================= */
#loader{
    position:fixed;
    width:100%;
    height:100vh;
    background:#020617;
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
    font-size:24px;
    letter-spacing:2px;
}


/* ===================== HEADER ============================= */
header{
    position:sticky;
    top:0;
    backdrop-filter: blur(12px);
    background:rgba(2,6,23,0.6);
    z-index:1000;
    display:flex;
    justify-content:space-between;
    padding:20px 80px;
    border-bottom:1px solid rgba(255,255,255,0.1);
}

#theme-toggle{
    cursor:pointer;
    font-size:20px;
}

/* ===================== NAVBAR ============================= */
nav a{
    margin-left:20px;
    color:white;
    text-decoration:none;
    position:relative;
}

nav a.active{
    color:#38bdf8;
}

nav a::after{
    content:"";
    position:absolute;
    width:0%;
    height:2px;
    background:#38bdf8;
    left:0;
    bottom:-5px;
}

nav a:hover::after{
    width:100%;
}

/* ===================== LIGHT MODE ========================= */
body.light{
    background:#f1f5f9;
    color:#0f172a;
}

/* Header */
body.light header{
    background:rgba(255,255,255,0.7);
    border-bottom:1px solid rgba(0,0,0,0.1);
}

/* Cards */
body.light .project-card,
body.light .featured-card,
body.light .skill,
body.light .why-grid div,
body.light .about,
body.light .skills,
body.light .projects,
body.light .contact{
    background:white;
    color:#0f172a;
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

/* Buttons */
body.light .btn{
    color:#ffffff;
}

body.light .btn-outline{
    border:1px solid #0ea5e9;
    color:#0ea5e9;
}

body.light .btn-outline:hover{
    background:#0ea5e9;
    color:#ffffff;
}

/* Project buttons */
body.light .project-buttons a:first-child{
    background:#e2e8f0;
    color:#0f172a;
}

body.light .project-buttons a:last-child{
    color:white;
}

/* Text */
body.light p{
    color:#334155;
}

/* Nav */
body.light nav a{
    color:#0f172a;
}

body.light nav a.active{
    color:#0ea5e9;
}

/* Cursor fix */
body.light .cursor-glow{
    background: radial-gradient(circle, rgba(14,165,233,0.35), transparent 70%);
    mix-blend-mode: multiply;
    filter: blur(50px);
}

/* Contact */
body.light .contact{
    background: linear-gradient(135deg,#ffffff,#f1f5f9);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

body.light .contact p{
    color:#475569;
}

/* Social */
body.light .social-links a{
    color:#0ea5e9;
}

body.light .social-links a:hover{
    color:#0284c7;
    transform: scale(1.2);
}

/* ===================== HERO =============================== */
.hero{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:120px 80px;
    gap:50px;
}

.hero-text{
    max-width:600px;
}

.hero h2{
    font-size:42px;
    margin-bottom:20px;
    color:#38bdf8;
}

/* ===================== PROFILE IMAGE ====================== */
.profile-pic{
    width:260px;
    height:260px;
    border-radius:50%;
    object-fit:cover;
    border:4px solid #38bdf8;
    box-shadow:0 0 25px rgba(56,189,248,0.6);
}

/* ===================== BUTTONS ============================ */
.buttons{
    margin-top:25px;
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

.btn{
    background:linear-gradient(45deg,#38bdf8,#0ea5e9);
    padding:12px 30px;
    border-radius:8px;
    color:#020617;
    font-weight:600;
    text-decoration:none;
    box-shadow:0 0 15px rgba(56,189,248,0.6);
}

.btn:hover{
    transform:scale(1.07);
    box-shadow:0 0 30px rgba(56,189,248,1);
}

.btn-outline{
    border:1px solid #38bdf8;
    padding:12px 30px;
    border-radius:8px;
    color:white;
    display:inline-flex;
    align-items:center;
    gap:8px;
    transition:0.3s;
}

.btn-outline:hover{
    background:#38bdf8;
    color:black;
    box-shadow:0 0 20px rgba(56,189,248,0.8);
}

/* Hire Button */
.hire-btn{
    background:#22c55e;
    color:white;
    box-shadow:0 0 12px rgba(34,197,94,0.6);
}

.hire-btn:hover{
    box-shadow:0 0 25px rgba(34,197,94,1);
}

/* ===================== FEATURED PROJECT =================== */
.featured{
    padding:90px 80px;
}

.featured-card{
    display:flex;
    max-width:1100px;
    margin:auto;
    gap:50px;
    align-items:center;
    background:rgba(30,41,59,0.6);
    padding:40px;
    border-radius:20px;
    backdrop-filter:blur(12px);
}

.featured-card img{
    width:380px;
    border-radius:15px;
    box-shadow:0 10px 30px rgba(0,0,0,0.5);
}

.featured-card h3{
    font-size:26px;
    margin-bottom:10px;
}

.featured-card p{
    opacity:0.8;
    margin-bottom:20px;
}

/* ===================== WHY ME ============================= */
.why-me{
    padding:80px;
    text-align:center;
}

.why-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:20px;
    margin-top:30px;
}

.why-grid div{
    background:#1e293b;
    padding:20px;
    border-radius:10px;
}

.why-grid div:hover{
    transform:translateY(-5px);
}

/* ===================== COMMON SECTIONS ==================== */
.about,
.skills,
.projects,
.contact{
    padding:60px 80px;
    background:rgba(255,255,255,0.02);
    border-radius:15px;
    margin:30px 20px;
}

/* ===================== SKILLS ============================= */
.skills-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:25px;
}

.skill{
    background:#1e293b;
    padding:20px;
    border-radius:10px;
    text-align:center;
}

.skill:hover{
    transform:translateY(-6px);
    background:#334155;
}

/* ===================== PROJECTS =========================== */
.project-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:30px;
    align-items:stretch;
}

.project-card{
    background: rgba(30,41,59,0.6);
    backdrop-filter: blur(10px);
    padding:20px;
    display: flex;
    flex-direction: column;
    border-radius:15px;
    position:relative;
    overflow:hidden;
    transition:0.4s;
    box-shadow: none;
}

.project-card:hover{
    transform:translateY(-10px) scale(1.02);
    box-shadow:0 20px 40px rgba(0,0,0,0.6);
}

.project-card img{
    width:100%;
    height:170px;
    object-fit:cover;
    border-radius:10px;
}

.project-card:hover img{
    transform:scale(1.08);
}


/* ===== PROJECT BUTTONS ===== */
.project-buttons{
    display:flex;
    gap:12px;
    margin-top:auto;
}

.project-buttons a{
    padding:10px 18px;
    border-radius:8px;
    text-decoration:none;
}

.project-buttons a:first-child{
    background:#020617;
    color:white;
    border:1px solid rgba(255,255,255,0.1);
    transition:0.3s;
}

.project-buttons a:first-child:hover{
    box-shadow:0 0 20px rgba(255,255,255,0.2);
    transform:scale(1.05);
}

.project-buttons a:last-child{
    background:linear-gradient(45deg,#38bdf8,#0ea5e9);
    color:black;
    box-shadow:0 0 12px rgba(56,189,248,0.6);
    transition:0.3s;
}

.project-buttons a:last-child:hover{
    box-shadow:0 0 25px rgba(56,189,248,1);
    transform:scale(1.05);
}

/* ===================== CONTACT ============================ */
.social-links a{
    font-size:28px;
    margin:12px;
    color:white;
}

.social-links a:hover{
    color:#38bdf8;
    transform:scale(1.2);
}

/* Prevent horizontal scroll */
body{
    overflow-x:hidden;
}

/* HEADER */
.contact-header{
    margin-bottom:20px;
}

/* ===================== GRID LAYOUT ======================== */
.contact-container{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
    align-items:start;
}

/* LEFT SIDE */
.contact-info{
    width:100%;
}

/* ===================== FORM =============================== */
.contact-form{
    width:100%;
    max-width:500px;
    justify-self:end;

    display:flex;
    flex-direction:column;
    gap:15px;

    background: rgba(30,41,59,0.6);
    padding:25px;
    border-radius:20px;
    backdrop-filter: blur(12px);

    box-shadow:0 15px 40px rgba(0,0,0,0.4);
    box-sizing:border-box;
    overflow:hidden;
}

/* INPUTS */
.contact-form input,
.contact-form textarea{
    width:100%;
    padding:14px;
    border-radius:10px;
    border:1px solid transparent;
    background:#020617;
    color:white;
    font-size:14px;
    transition:0.3s;
    box-sizing:border-box;
}

/* TEXTAREA FIX */
.contact-form textarea{
    min-height:130px;
    max-width:100%;
    resize:vertical;       /* controlled resize */
    overflow-y:auto;
}

/* FOCUS */
.contact-form input:focus,
.contact-form textarea:focus{
    border:1px solid #38bdf8;
    box-shadow:0 0 12px rgba(56,189,248,0.6);
}

/* BUTTON */
.contact-form button{
    width:100%;
    text-align:center;
}


/* ===================== FOOTER ============================= */
footer{
    text-align:center;
    padding:30px;
    background:#020617;
}

/* ===================== CURSOR ============================= */
.cursor-glow{
    position:fixed;
    width:220px;
    height:220px;
    background:radial-gradient(circle, rgba(56,189,248,0.25), transparent 70%);
    border-radius:50%;
    pointer-events:none;
    z-index:999;
    mix-blend-mode:screen;
    filter: blur(40px);
}

/* ===================== PROGRESS BAR ======================= */
#progress-bar{
    position:fixed;
    top:0;
    left:0;
    height:4px;
    background:#38bdf8;
    width:0%;
}

/* ===== POPUP BACKDROP ===== */
.popup{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100vh;
    background:rgba(0,0,0,0.6);
    display:flex;
    justify-content:center;
    align-items:center;
    opacity:0;
    pointer-events:none;
    transition:0.4s;
    z-index:9999;
}

/* SHOW */
.popup.show{
    opacity:1;
    pointer-events:auto;
}

/* CONTENT */
.popup-content{
    background:#020617;
    padding:30px 40px;
    border-radius:20px;
    text-align:center;
    transform:scale(0.7);
    transition:0.4s;
    box-shadow:0 20px 60px rgba(0,0,0,0.6);
}

/* ANIMATE IN */
.popup.show .popup-content{
    transform:scale(1);
}

/* CHECKMARK */
.checkmark{
    width:70px;
    height:70px;
    border-radius:50%;
    background:#22c55e;
    display:flex;
    justify-content:center;
    align-items:center;
    margin:auto;
    margin-bottom:15px;
    animation:pop 0.4s ease;
}

.checkmark span{
    color:white;
    font-size:30px;
    font-weight:bold;
}

/* TEXT */
.popup-content p{
    font-size:18px;
    color:white;
}

/* POP ANIMATION */
@keyframes pop{
    0%{transform:scale(0);}
    100%{transform:scale(1);}
}

/* ===== PREMIUM MOBILE RESPONSIVE ===== */
@media(max-width:768px){
    /* ===== BODY ===== */
    body{
        font-size:15px;
        line-height:1.6;
    }

    /* ===== HEADER ===== */
    header{
        padding:14px 18px;
        flex-direction:column;
        gap:10px;
        text-align:center;
    }

    nav{
        display:flex;
        flex-wrap:wrap;
        justify-content:center;
        gap:12px;
        margin-top: 10px;
    }

    nav a{
        margin:0;
        font-size:13px;
        opacity:0.9;
    }

    /* ===== HERO ===== */
    .hero{
        flex-direction:column;
        padding:70px 18px;
        text-align:center;
        gap:30px;
    }

    .hero h2{
        font-size:26px;
        line-height:1.5;
        font-weight:600;
    }

    .hero-text p{
        font-size:14px;
        opacity:0.8;
    }

    .profile-pic{
        width:160px;
        height:160px;
    }

    /* ===== BUTTONS ===== */
    .buttons{
        flex-direction:column;
        align-items:center;
        gap:12px;
        width:100%;
    }

    .btn,
    .btn-outline{
        width:100%;
        max-width:240px;
        text-align:center;
        border-radius:12px;
        font-size:14px;
        letter-spacing:0.3px;
    }

    /* ===== PARTICLES ===== */
    #particles-js{
        height:50%;
    }

    /* ===== FEATURED ===== */
    .featured{
        padding:50px 16px;
    }

    .featured-card{
        flex-direction:column;
        padding:22px;
        gap:20px;
        text-align:center;
        border-radius:18px;
    }

    .featured-card img{
        width:100%;
        max-width:280px;
        border-radius:12px;
    }

    /* ===== SECTIONS ===== */
    .about,
    .skills,
    .projects,
    .contact{
        padding:35px 16px;
        margin:18px 10px;
        border-radius:16px;
    }

    h2{
        font-size:24px;
        margin-bottom:16px;
        font-weight:600;
        letter-spacing:0.3px;
    }

    /* ===== SKILLS ===== */
    .skills-grid{
        grid-template-columns:repeat(2,1fr);
        gap:16px;
    }

    .skill{
        padding:16px;
        font-size:13px;
        border-radius:14px;
    }

    /* ===== PROJECTS ===== */
    .project-grid{
        grid-template-columns:1fr;
        gap:22px;
    }

    .project-card{
        padding:18px;
        border-radius:18px;
    }

    .project-card h3{
        font-size:18px;
        margin-top:10px;
    }

    .project-card p{
        font-size:13px;
        opacity:0.8;
    }

    .project-card img{
        height:160px;
        border-radius:12px;
    }

    /* ===== PROJECT BUTTONS ===== */
    .project-buttons{
        flex-direction:column;
        gap:10px;
        margin-top:12px;
    }

    .project-buttons a{
        width:100%;
        text-align:center;
        border-radius:10px;
        font-size:13px;
        padding:10px;
    }

    /* ===== WHY ME ===== */
    .why-me{
        padding:45px 16px;
    }

    .why-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .why-grid div{
        border-radius:14px;
        font-size:14px;
    }

    /* ===== SOCIAL ===== */
    .social-links{
        display:flex;
        justify-content:center;
        flex-wrap:wrap;
        gap:12px;
    }

    .social-links a{
        font-size:24px;
    }

    /* ===== CURSOR OFF ===== */
    .cursor-glow{
        display:none;
    }
    
    /* ===== CONTACT MOBILE FIX ===== */
.contact-container{
    grid-template-columns:1fr;
    gap:25px;
    text-align:center;
}

.contact-info{
    text-align:center;
}

.contact-form{
    justify-self:center;
    width:100%;
    max-width:100%;
    padding:20px;

    display:flex;               
    flex-direction:column;      
    align-items:center;         
}

.contact-form input,
.contact-form textarea{
    font-size:13px;
}

.contact-form button{
    font-size:14px;

    width:100%;                 
    max-width:260px;            
    margin-top:10px;            
}

}


/* ===================== TABLET (<=1000px) ================== */
@media(max-width:1000px){

    .contact-container{
        grid-template-columns:1fr;
        text-align:center;
    }

    .contact-info{
        text-align:center;
    }

    .contact-form{
        justify-self:center;
        max-width:450px;
    }
}

/* ===== EXTRA SMALL DEVICES (optional) ===== */
@media(max-width:600px){
    .contact-form{
        padding:18px;
    }
}

