* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    border: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #0f1117;
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
}

#scroll-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background:
        radial-gradient(circle at 18% 18%, rgba(27, 108, 230, 0.28), transparent 30%),
        radial-gradient(circle at 82% 12%, rgba(21, 184, 139, 0.2), transparent 28%),
        linear-gradient(160deg, #101219 0%, #1b1d24 48%, #24272d 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(15, 17, 23, 0.1), rgba(15, 17, 23, 0.74));
}

.nav {
    position: sticky;
    top: 14px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 14px auto 10px;
    padding: 12px 16px;
    gap: 1rem;
    background: rgba(15, 17, 23, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(20px);
    transition: padding 0.25s ease, background 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.nav.scrolled {
    padding: 9px 14px;
    background: rgba(10, 12, 18, 0.86);
    border-color: rgba(127, 176, 255, 0.22);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(27, 108, 230, 0.28));
}

ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

li {
    list-style: none;
    padding: 5px 12px;
}

.nav-items ul li a {
    display: flex;
    text-decoration: none;
    position: relative;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 4px;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.link a::after {
    content: "";
    position: absolute;
    inset: auto 14px 6px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg, #1B6CE6, #15b88b);
    transition: transform 0.3s ease;
}

.link a:hover::after,
.link a.active::after {
    transform: scaleX(1);
}

.link a.active {
    color: #fff;
}

.btn,
.btn-link {
    padding: 1rem 2rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    background-color: #1B6CE6;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border 0.25s ease;
}

.btn:hover,
.btn-link:hover {
    background-color: transparent;
    border: 2px solid #1B6CE6;
    color: #7fb0ff;
    transform: translateY(-2px);
}

.ghost-btn {
    padding: 1rem 2rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.ghost-btn:hover {
    transform: translateY(-2px);
    border-color: #15b88b;
    background: rgba(21, 184, 139, 0.12);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: background 0.25s ease, border 0.25s ease;
}

.menu-toggle:hover {
    background: rgba(127, 176, 255, 0.14);
    border-color: rgba(127, 176, 255, 0.3);
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: #fff;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

main {
    position: relative;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(80px, 15vh, 160px) 24px 60px;
    text-align: center;
}

.container h1 {
    font-size: clamp(2.4rem, 6vw, 5rem);
    color: #fff;
    line-height: 1.12;
    font-weight: 600;
    margin-bottom: 24px;
}

.container p {
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto;
}

.container h1 span {
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px white;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.about,
.skills,
.projects,
.contact {
    max-width: 1200px;
    margin: 0 auto;
    padding: 84px 24px;
}

.about {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 42px;
    align-items: center;
}

.eyebrow {
    color: #7fb0ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.about h2,
.skills h2,
.projects h2,
.contact h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 18px;
}

.about-copy p:last-child,
.contact p {
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
    max-width: 640px;
}

.stats {
    display: grid;
    gap: 16px;
}

.stats div,
.skill-grid span {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.stats div {
    padding: 24px;
}

.stats strong {
    display: block;
    font-size: 2.2rem;
    color: #15b88b;
}

.stats span {
    color: rgba(255, 255, 255, 0.78);
}

.skills {
    text-align: center;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 760px;
    margin: 30px auto 0;
}

.skill-grid span {
    padding: 18px;
    color: rgba(255, 255, 255, 0.86);
}

.projects {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 34px 0 28px;
}

.project-grid article {
    overflow: hidden;
    text-align: left;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.project-grid img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.project-grid div {
    padding: 22px;
}

.project-grid h3 {
    margin-bottom: 8px;
}

.project-grid p {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

.contact {
    text-align: center;
    padding-bottom: 100px;
}

.contact p {
    margin: 0 auto 28px;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.foot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    padding: 24px;
    background: #111218;
}

.foot p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

@media (max-width: 880px) {
    .menu-toggle {
        display: flex;
    }

    .nav {
        flex-wrap: wrap;
        top: 10px;
        margin: 10px 12px;
    }

    .nav-items {
        display: block;
        width: 100%;
        order: 3;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.25s ease;
    }

    .nav-items.open {
        max-height: 260px;
        opacity: 1;
    }

    .nav-items ul {
        flex-direction: column;
        gap: 4px;
        padding: 12px 0 4px;
    }

    li {
        padding: 0;
    }

    .nav-items ul li a {
        margin: 0;
        padding: 12px 14px;
        justify-content: center;
    }

    .nav .btn {
        display: none;
    }

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

    .skill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 560px) {
    .container {
        padding-top: 64px;
    }

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

    .hero-actions,
    .btn,
    .btn-link,
    .ghost-btn {
        width: 100%;
    }
}