@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* =========================
   ROOT VARIABLES (Dark Theme Default)
========================= */

:root{
    --bg:#0f172a;
    --card:rgba(255,255,255,0.05);
    --text:#ffffff;
    --muted:#94a3b8;
    --primary:#38bdf8;
}

/* Light Mode */

body.light{
    --bg:#f1f5f9;
    --card:#ffffff;
    --text:#0f172a;
    --muted:#334155;
    --primary:#0ea5e9;
}

/* =========================
   GLOBAL RESET
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    background:var(--bg);
    color:var(--text);
    overflow-x:hidden;
    opacity:0;
    transition:0.8s;
}

/* =========================
   PRELOADER
========================= */

#preloader{
    position:fixed;
    width:100%;
    height:100vh;
    background:#0f172a;
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.loader{
    width:60px;
    height:60px;
    border:5px solid #1e293b;
    border-top:5px solid var(--primary);
    border-radius:50%;
    animation:spin 1s linear infinite;
}

@keyframes spin{
    100%{ transform:rotate(360deg); }
}

/* =========================
   CURSOR GLOW
========================= */

.cursor-glow{
    position:fixed;
    width:250px;
    height:250px;
    background:rgba(56,189,248,0.15);
    border-radius:50%;
    filter:blur(90px);
    pointer-events:none;
    transform:translate(-50%,-50%);
    z-index:-1;
}

/* =========================
   HEADER
========================= */

header{
    position:fixed;
    top:0;
    width:100%;
    padding:18px 8%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:rgba(15,23,42,0.8);
    backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(255,255,255,0.08);
    z-index:1000;
}

.logo{
    font-size:26px;
    font-weight:700;
    color:var(--primary);
    text-decoration:none;
}

nav a{
    margin-left:20px;
    text-decoration:none;
    color:var(--text);
    font-weight:500;
    transition:0.3s;
}

nav a:hover,
nav a.active{
    color:var(--primary);
}

#theme-toggle{
    background:transparent;
    border:none;
    color:var(--text);
    font-size:18px;
    cursor:pointer;
}

/* =========================
   HERO
========================= */

.hero{
    min-height:100vh;
    display:flex;
    align-items:center;
    padding:120px 8% 80px;
}

.hero-content{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:50px;
}

.hero-text h3{
    color:var(--primary);
}

.hero-text h1{
    font-size:65px;
}

.hero-text h2{
    color:var(--muted);
    min-height:40px;
}

.hero-text p{
    color:var(--muted);
    line-height:1.8;
    max-width:600px;
}

.hero-buttons{
    margin-top:25px;
    display:flex;
    gap:15px;
}

.btn{
    padding:12px 25px;
    background:var(--primary);
    color:#000;
    text-decoration:none;
    border-radius:10px;
    font-weight:600;
    transition:0.3s;
}

.btn:hover{
    transform:translateY(-5px);
}

.btn-outline{
    background:transparent;
    border:2px solid var(--primary);
    color:var(--primary);
}

.hero-image img{
    width:340px;
    height:340px;
    border-radius:50%;
    object-fit:cover;
    border:5px solid var(--primary);
    box-shadow:0 0 30px rgba(56,189,248,0.4);
    animation:float 4s ease-in-out infinite;
}

@keyframes float{
    50%{
        transform:translateY(-15px);
    }
}

/* =========================
   SECTIONS
========================= */

section{
    padding:90px 8%;
}

.section-title{
    text-align:center;
    font-size:38px;
    margin-bottom:40px;
    color:var(--primary);
}

/* =========================
   GLASS CARD
========================= */

.glass-card{
    background:var(--card);
    backdrop-filter:blur(15px);
    border:1px solid rgba(255,255,255,0.08);
    padding:30px;
    border-radius:20px;
    max-width:900px;
    margin:auto;
    text-align:center;
    line-height:1.8;
}

/* =========================
   SKILLS
========================= */

.skills-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:20px;
}

.skill-card{
    background:var(--card);
    padding:20px;
    border-radius:15px;
    text-align:center;
    transition:0.3s;
    font-weight:600;
    border:1px solid rgba(255,255,255,0.08);
}

.skill-card:hover{
    transform:translateY(-8px);
    box-shadow:0 0 20px rgba(56,189,248,0.3);
}

/* =========================
   TIMELINE
========================= */

.timeline{
    position:relative;
    max-width:900px;
    margin:auto;
}

.timeline::before{
    content:'';
    position:absolute;
    left:20px;
    width:3px;
    height:100%;
    background:var(--primary);
}

.timeline-item{
    position:relative;
    padding-left:60px;
    margin-bottom:40px;
}

.timeline-item::before{
    content:'';
    position:absolute;
    left:10px;
    top:15px;
    width:15px;
    height:15px;
    background:var(--primary);
    border-radius:50%;
}

.timeline-content{
    background:var(--card);
    padding:25px;
    border-radius:15px;
    border:1px solid rgba(255,255,255,0.08);
}

/* =========================
   PROJECTS / CERTIFICATES
========================= */

.projects-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.project-card{
    background:var(--card);
    padding:25px;
    border-radius:15px;
    text-align:center;
    transition:0.3s;
    border:1px solid rgba(255,255,255,0.08);
}

.project-card:hover{
    transform:translateY(-8px);
    box-shadow:0 0 25px rgba(56,189,248,0.25);
}

.project-card i{
    font-size:40px;
    color:var(--primary);
    margin-bottom:15px;
}

/* =========================
   CONTACT
========================= */

.contact-icons{
    display:flex;
    justify-content:center;
    gap:25px;
    margin-bottom:25px;
}

.contact-icons a{
    width:60px;
    height:60px;
    display:flex;
    justify-content:center;
    align-items:center;
    border-radius:50%;
    background:var(--card);
    color:var(--text);
    font-size:22px;
    transition:0.3s;
}

.contact-icons a:hover{
    background:var(--primary);
    color:#000;
    transform:translateY(-5px);
}

.contact-details{
    text-align:center;
    color:var(--muted);
    line-height:2;
}

/* =========================
   FOOTER
========================= */

footer{
    text-align:center;
    padding:20px;
    background:rgba(0,0,0,0.2);
}

/* =========================
   REVEAL ANIMATION
========================= */

.reveal{
    opacity:0;
    transform:translateY(50px);
    transition:1s;
}

.reveal.active{
    opacity:1;
    transform:translateY(0);
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:992px){

    .hero-content{
        flex-direction:column-reverse;
        text-align:center;
    }

    .hero-text h1{
        font-size:45px;
    }

    .hero-buttons{
        justify-content:center;
    }
}

@media(max-width:768px){

    header{
        flex-direction:column;
        gap:10px;
    }

    nav a{
        margin:0 10px;
        font-size:14px;
    }

    .hero-image img{
        width:250px;
        height:250px;
    }

    .hero-text h1{
        font-size:35px;
    }
}
