:root{
    --bg:#080a09;
    --text:#e8eee9;
    --muted:#8c968f;
    --green:#187a40;
    --border:#202822;
}

*{box-sizing:border-box}

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font:16px/1.6 system-ui,sans-serif;
}

html.lang-ar body{
    font-family:'Tajawal',system-ui,sans-serif;
}

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

a:hover{color:var(--green)}

::selection{
    background:var(--green);
    color:#fff;
}

::-moz-selection{
    background:var(--green);
    color:#fff;
}

.container{
    width:min(720px,90%);
    margin:auto;
}

header{
    padding:32px 0;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.logo{font-weight:800}
.logo span{color:var(--green)}

nav{
    display:flex;
    align-items:center;
    gap:20px;
    color:var(--muted);
}

.lang-toggle{
    font:inherit;
    font-weight:700;
    font-size:.8rem;
    color:var(--muted);
    background:transparent;
    border:1px solid var(--border);
    border-radius:999px;
    padding:5px 12px;
    cursor:pointer;
}

.lang-toggle:hover{
    border-color:var(--green);
    color:var(--text);
}

.hero{padding:90px 0 70px}

.hero h1{
    margin:0 0 10px;
    font-size:clamp(2.8rem,8vw,5rem);
    line-height:1;
}

.hero p{
    color:var(--muted);
    font-size:1.1rem;
    margin:0;
}

section{padding:35px 0}

h2{
    font-size:1rem;
    color:var(--muted);
    font-weight:500;
    margin-bottom:18px;
}

.links{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}

.link{
    padding:14px 0;
    border-bottom:1px solid var(--border);
    display:flex;
    justify-content:space-between;
}

.link span{
    display:flex;
    align-items:center;
    gap:10px;
}

.link small{color:var(--muted)}

.site-logo{
    width:18px;
    height:18px;
    object-fit:contain;
    display:block;
    flex-shrink:0;
}

.games{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:16px;
}

.game{
    display:flex;
    align-items:center;
    gap:16px;
    padding:10px 0;
}

.game img{
    width:120px;
    aspect-ratio:630 / 500;
    object-fit:cover;
    border-radius:7px;
}

.game h3{margin:0}

.game p{
    margin:3px 0 0;
    color:var(--muted);
    font-size:.9rem;
}

.button{
    display:inline-block;
    margin-top:35px;
    padding:10px 18px;
    border:1px solid var(--border);
    border-radius:7px;
}

.button:hover{border-color:var(--green)}

.github-activity{
    margin-top:35px;
}

.gh-card{
    background:#0d110e;
    border:1px solid var(--border);
    border-radius:14px;
    padding:20px;
}

.gh-tabs{
    display:flex;
    gap:8px;
    margin-bottom:20px;
    flex-wrap:wrap;
}

.gh-tab{
    padding:6px 16px;
    border-radius:999px;
    border:1px solid var(--border);
    background:transparent;
    color:var(--muted);
    font-size:.85rem;
    font-weight:600;
    cursor:pointer;
    font-family:inherit;
}

.gh-tab.active{
    background:var(--green);
    border-color:var(--green);
    color:#fff;
}

.gh-scroll{
    width:100%;
}

.gh-months{
    display:grid;
    gap:3px;
    margin-bottom:6px;
    font-size:.7rem;
    color:var(--muted);
    width:100%;
}

.gh-grid{
    display:grid;
    grid-template-rows:repeat(7,1fr);
    grid-auto-flow:column;
    gap:3px;
    width:100%;
}

.gh-cell{
    width:100%;
    height:100%;
    border-radius:2px;
    background:var(--border);
}

.gh-cell.empty{
    background:transparent;
}

.gh-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:16px;
    font-size:.8rem;
    color:var(--muted);
    flex-wrap:wrap;
    gap:8px;
}

.gh-legend{
    display:flex;
    align-items:center;
    gap:4px;
}

.gh-box{
    width:11px;
    height:11px;
    border-radius:3px;
    display:inline-block;
}

.gh-error{
    color:var(--muted);
    font-size:.9rem;
    margin:0;
}

footer{
    margin-top:80px;
    padding:25px 0;
    border-top:1px solid var(--border);
    color:var(--muted);
    font-size:.85rem;
}

.page{display:none}
.page.active{display:block}

.certs{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.cert{
    border-bottom:1px solid var(--border);
    padding-bottom:20px;
}

.cert img{
    width:100%;
    border-radius:7px;
    display:block;
    margin-bottom:10px;
}

.cert h3{margin:0}

.cert p{
    color:var(--muted);
    margin:3px 0;
}

.cert-button{
    display:inline-block;
    margin-top:14px;
    padding:9px 16px;
    border:1px solid var(--border);
    border-radius:7px;
    font-size:.85rem;
}

.cert-button:hover{
    border-color:var(--green);
    color:var(--green);
}

@media(max-width:500px){

    header{align-items:flex-start}

    nav{
        gap:12px;
        font-size:.9rem;
    }

    .hero{
        padding:65px 0 45px;
    }

    .links{
        grid-template-columns:1fr;
    }

    .games{
        grid-template-columns:1fr;
    }

    .game img{
        width:100px;
        aspect-ratio:630 / 500;
    }


}