*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:Poppins,sans-serif;
    background:#f5f7fa;
    color:#333;
    line-height:1.8;
}

.container{
    width:90%;
    max-width:1100px;
    margin:auto;
}

/* --- Navbar --- */
#navbar{
    position:sticky;
    top:0;
    z-index:1000;
    background:rgba(30,58,138,0.95);
    backdrop-filter:blur(8px);
    padding:14px 0;
    box-shadow:0 2px 12px rgba(0,0,0,0.2);
    transition:padding .3s ease, background .3s ease, box-shadow .3s ease;
}

#navbar.scrolled{
    padding:8px 0;
    background:rgba(15,30,80,0.98);
    box-shadow:0 4px 24px rgba(0,0,0,0.35);
}

.nav-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.nav-brand{
    color:white;
    font-weight:600;
    font-size:1rem;
    white-space:nowrap;
}

.nav-links{
    list-style:none;
    display:flex;
    gap:24px;
    margin:0;
}

.nav-links a{
    color:rgba(255,255,255,0.85);
    text-decoration:none;
    font-size:.9rem;
    font-weight:500;
    transition:color .2s;
}

.nav-links a:hover,
.nav-links a.active{
    color:white;
    border-bottom:2px solid white;
    padding-bottom:2px;
}

.nav-actions{
    display:flex;
    align-items:center;
    gap:8px;
}

.nav-toggle{
    display:none;
    background:none;
    border:none;
    color:white;
    font-size:1.4rem;
    cursor:pointer;
}

.dark-toggle{
    background:rgba(255,255,255,0.15);
    border:1px solid rgba(255,255,255,0.3);
    color:white;
    font-size:1.1rem;
    width:36px;
    height:36px;
    border-radius:50%;
    cursor:pointer;
    transition:background .3s, transform .3s;
    flex-shrink:0;
}

.dark-toggle:hover{
    background:rgba(255,255,255,0.25);
    transform:rotate(20deg);
}

@media(max-width:768px){
    .nav-toggle{ display:block; }
    .nav-links{
        display:none;
        flex-direction:column;
        gap:12px;
        background:rgba(30,58,138,0.97);
        position:absolute;
        top:100%;
        left:0;
        width:100%;
        padding:16px 5%;
    }
    .nav-links.open{ display:flex; }
    .nav-actions{ gap:6px; }
}

header{
    background:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 30px,
            rgba(255,255,255,0.03) 30px,
            rgba(255,255,255,0.03) 31px
        ),
        linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    color:white;
    text-align:center;
    padding:70px 20px;
    position:relative;
}

/* --- Keyframes --- */
@keyframes fadeDown{
    from{opacity:0;transform:translateY(-30px)}
    to{opacity:1;transform:translateY(0)}
}
@keyframes fadeUp{
    from{opacity:0;transform:translateY(30px)}
    to{opacity:1;transform:translateY(0)}
}
@keyframes zoomIn{
    from{opacity:0;transform:scale(0.7)}
    to{opacity:1;transform:scale(1)}
}
@keyframes float{
    0%,100%{transform:translateY(0)}
    50%{transform:translateY(-8px)}
}
@keyframes shimmer{
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
}

header{
    animation:shimmer 8s ease infinite;
    background-size:200% 200%;
}

.photo{
    width:170px;
    height:170px;
    border-radius:50%;
    object-fit:cover;
    border:4px solid white;
    animation:zoomIn .7s ease both, float 4s ease-in-out 1s infinite;
    box-shadow:0 0 0 8px rgba(255,255,255,0.15);
}

header h1{
    animation:fadeDown .7s ease .3s both;
}

.job{
    margin:15px 0 30px;
    animation:fadeDown .7s ease .5s both;
}

.buttons{
    animation:fadeUp .7s ease .7s both;
}

.buttons a{
    display:inline-block;
    padding:12px 22px;
    margin:8px;
    background:white;
    color:#2563eb;
    text-decoration:none;
    border-radius:8px;
    font-weight:bold;
    transition:transform .2s, box-shadow .2s;
}

.buttons a:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 20px rgba(0,0,0,0.2);
}

section{
    padding:35px 0;
    opacity:0;
    transform:translateY(40px);
    transition:opacity .6s ease, transform .6s ease;
}

section.visible{
    opacity:1;
    transform:translateY(0);
}

h2{
    margin-bottom:30px;
    color:#2563eb;
}

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.card{
    background:white;
    padding:25px;
    border-radius:12px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease;
    border:2px solid transparent;
    cursor:default;
}

.card:hover{
    transform:translateY(-6px);
    box-shadow:0 16px 36px rgba(37,99,235,0.18);
    border-color:#2563eb;
}

.timeline .item{
    background:white;
    margin-bottom:20px;
    padding:20px;
    border-left:5px solid #2563eb;
    border-radius:0 8px 8px 0;
    transition:transform .3s ease, box-shadow .3s ease, border-left-width .3s ease, background .3s ease;
}

.timeline .item:hover{
    transform:translateX(8px);
    box-shadow:0 10px 28px rgba(37,99,235,0.18);
    border-left-width:8px;
    background:#eff6ff;
}

.timeline .item:hover h3{
    color:#2563eb;
}

.contact{
    list-style:none;
}

footer{
    text-align:center;
    background:#222;
    color:white;
    padding:30px;
}

/* --- Dark Mode --- */
body.dark{
    background:#0f172a;
    color:#e2e8f0;
}

body.dark h2{
    color:#60a5fa;
}

body.dark .card{
    background:#1e293b;
    box-shadow:0 8px 20px rgba(0,0,0,0.3);
    color:#e2e8f0;
}

body.dark .card:hover{
    background:#1e3a5f;
    box-shadow:0 16px 36px rgba(96,165,250,0.2);
    border-color:#60a5fa;
}

body.dark .timeline .item{
    background:#1e293b;
    border-left-color:#60a5fa;
    color:#e2e8f0;
}

body.dark .timeline .item:hover{
    background:#1e3a5f;
    box-shadow:0 10px 28px rgba(96,165,250,0.18);
    border-left-color:#93c5fd;
}

body.dark .timeline .item:hover h3{
    color:#93c5fd;
}

body.dark footer{
    background:#020617;
}

body.dark .buttons a{
    background:rgba(255,255,255,0.1);
    color:#e2e8f0;
    border:1px solid rgba(255,255,255,0.2);
}

body.dark .buttons a:hover{
    background:rgba(255,255,255,0.2);
    box-shadow:0 8px 20px rgba(96,165,250,0.25);
}

body.dark #navbar{
    background:rgba(15,23,42,0.97);
}

body.dark #navbar.scrolled{
    background:rgba(2,6,23,0.99);
}

body.dark .nav-links a:hover,
body.dark .nav-links a.active{
    color:#93c5fd;
    border-bottom-color:#93c5fd;
}

body.dark .dark-toggle{
    background:rgba(147,197,253,0.15);
    border-color:rgba(147,197,253,0.35);
    color:#93c5fd;
}

body.dark .dark-toggle:hover{
    background:rgba(147,197,253,0.28);
    box-shadow:0 0 10px rgba(147,197,253,0.3);
}

@media(max-width:768px){

    header{
        padding:50px 20px;
    }

    .photo{
        width:130px;
        height:130px;
    }

}