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

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins', sans-serif;
}

:root{
    --bg:#f5f7fb;
    --card:#ffffff;
    --text:#222;
    --primary:#4f46e5;
    --shadow:0 10px 30px rgba(0,0,0,0.08);
}

body.dark{
    --bg:#0f172a;
    --card:#1e293b;
    --text:#f8fafc;
    --primary:#818cf8;
    --shadow:0 10px 30px rgba(0,0,0,0.4);
}

body{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    background:var(--bg);
    color:var(--text);
    transition:.3s ease;
}
main{
    flex:1;
}


/*NAVBAR */

header{
    width:100%;
    position:sticky;
    top:0;
    z-index:1000;
    background:var(--card);
    box-shadow:var(--shadow);
}

.nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 40px;
    background:var(--card);
    box-shadow:var(--shadow);
    position:sticky;
    top:0;
    z-index:1000;
}

.logo{
    color:var(--primary);
    font-size:28px;
    font-weight:700;
}

.nav-links{
    display:flex;
    align-items:center;
    gap:25px;
}

.nav-links a{
    text-decoration:none;
    color:var(--text);
    font-weight:500;
    transition:.3s;
}

.nav-links a:hover,
.nav-links a.active{
    color:var(--primary);
}
/* Space between links and theme button */
.theme-btn{
    margin-left:20px;
}

.theme-btn{
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    background:linear-gradient(135deg,#4f46e5,#7c3aed);
    color:#fff;
    font-size:20px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all .35s ease;
    box-shadow:0 8px 20px rgba(79,70,229,.35);
}

.theme-btn:hover{
    transform:rotate(180deg) scale(1.1);
    box-shadow:0 12px 28px rgba(79,70,229,.5);
}

.theme-btn:active{
    transform:scale(.9);
}

/* Hero */
.hero{
    text-align:center;
    padding:80px 20px;
    background:linear-gradient(135deg,#4f46e5,#7c3aed);
    color:white;
}

.hero h1{
    font-size:40px;
}

/* About */
.about{
    max-width:1000px;
    margin:60px auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
    padding:0 20px;
}

.box{
    background:var(--card);
    color:var(--text);
    padding:25px;
    border-radius:15px;
    box-shadow:var(--shadow);
    transition:.3s;
}

.box:hover{
    transform:translateY(-5px);
}

/* Footer */
footer{
    text-align:center;
    padding:20px;
    background:#111827;
    color:white;
    margin-top:50px;
}

body.dark .box{
    border:1px solid #334155;
}

body.dark .hero{
    background:linear-gradient(135deg,#4338ca,#312e81);
}

/* Hide menu button on desktop */
.menu-btn{
    display:none;
}

/* Tablet */
@media (max-width:992px){

    .nav{
        padding:15px 25px;
    }

    .logo{
        font-size:24px;
    }
}

/* Mobile */
@media (max-width:768px){

    .nav{
        padding:15px 20px;
        position:relative;
    }

    .logo{
        font-size:22px;
    }

    .theme-btn{
        width:42px;
        height:42px;
        margin-left:auto;
        margin-right:15px;
    }

    .menu-btn{
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:24px;
        cursor:pointer;
        color:var(--text);
    }

    .nav-links{
        display:none;
    }

    .nav-links.open{
        display:flex;
        flex-direction:column;
        align-items:center;
        position:absolute;
        top:75px;
        left:0;
        width:100%;
        background:var(--card);
        padding:20px;
        gap:18px;
        box-shadow:0 10px 25px rgba(0,0,0,.15);
        z-index:999;
    }
}