* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0px;
    padding: 0px;
    overflow-x: hidden; 
    background-color: #f9fafb;
    color: #333;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
}

.nav-toggle {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    cursor: pointer;
    background: none;
    font-size: 2rem;
    border: none;
}

.navbar {
    width: 100%;
    padding: 14px 0;
    background: linear-gradient(135deg, #ffffffcc, #f4efffcc);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.navbar.loaded {
    opacity: 1;
    transform: translateY(0);
}

.lang-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-switcher.desktop {
    display: flex;
}

.lang-switcher button {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    opacity: 0.6;
    padding: 0.2rem 0;
    transition: opacity 0.2s ease, border-bottom 0.2s ease;
}

.lang-switcher button:hover {
    opacity: 1;
    font-weight: 600;
    border-bottom: 2px solid currentColor;
}

.lang-switcher button.active {
    opacity: 1;
    border-bottom: 2px solid currentColor;
}

.lang-switcher.mobile {
    display: none;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
}

.navbar.shrink {
    padding: 10px 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.nav-container {
    width: min(1100px, 90%);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 600;
    color: #333;
    transition: 0.3s;
}

.nav-logo-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-logo span {
    background: linear-gradient(90deg, #6c63ff, #a394ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-bar.shrink .nav-logo {
    font-size: 22px;
    color: #6c63ff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    backdrop-filter: blur(8px);
}

.nav-links a {
    color: #4a4a4a;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    position: relative;
    text-decoration: none;
}

.nav-links a.active {
    color: #6c63ff;
    font-weight: 600;
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -4px;
    background-color: #6c63ff;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #6c63ff;
}

.navbar.shrink .nav-links a {
    font-size: 16px;
}


.hero {
    padding-top: 8rem;
    padding-bottom: 10rem;
    text-align: center;
    background: linear-gradient(135deg, #efebff, #ffffff);
    display: flex;
    justify-content: flex-start;
}

.hero-content {
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 1.6rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.hero-avatar {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero-avatar,
.hero-content h1,
.hero-subtitle,
.hero-buttons {
    opacity: 0;
    transform: translateY(20px);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin: 0;
    font-weight: 600;
}

.highlight {
    color: #6c63ff;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #555;
    max-width: 400px;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

.btn-primary {
    background: #6c63ff;
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.25s ease;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #554ee6;
}

.btn-secondary {
    border: 2px solid #6c63ff;
    color: #6c63ff;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.25s ease;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #f4f1ff;
}

#about {
    padding: 120px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    background: #f8f9fb;
}

.certificate {
    display: block;
    width: 340px;
    max-width: 90%;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.about-container {
    max-width: 850px;
    background: white;
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-title {
    margin-bottom: 10px;
    font-size: 40px;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    color: #6c63ff;
    text-align: center;
}

.about-text {
    line-height: 1.6;
    align-self: center;
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: #555;
    margin: 0;
}

.about-container,
.certificate {
    opacity: 0;
    transform: translateY(30px);
}

#skills {
    padding: 120px 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills-title {
    font-size: 40px;
    font-family: "Poppins", sans-serif;
    margin-bottom: 50px;
    color: #6c63ff;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    width: 70%;
    justify-items: center;
}

.skill-card {
    background: #f8f9fb;
    padding: 20px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    width: 200px;
    height: 210px;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    align-items: center;
}

.skill-card:hover {
    transform: scale(1.05);
}

.skill-card img {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    object-fit: contain;
}

.skill-card p {
    font-size: 16px;
    color: #6c63ff;
    font-weight: 500;
}

.skill-icon {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.skill-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#recent-projects {
    background: #f7f9fc;
    padding: 80px 0;
    flex-wrap: wrap;
    text-align: center;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.h2-projects {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: #0f172a;
    font-family: 'Poppins', sans-serif;
}

.p-projects {
   color: #4a4a4a;
   font-size: 1.2rem;
   margin-bottom: 40px;
}

.btn-projects {
    background-color: #253b6f;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1.1rem;
    display: inline-block;
    margin-bottom: 40px;
    font-family: 'Poppins', sans-serif;
}

.btn-projects:hover {
    background-color: #6c63ff;
    transition: 0.3s ease;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    padding: 0 40px;
    justify-items: center;
    flex-wrap: wrap;
}

.item {
    background: #f8f9fb;
    border-radius: 18px;
    padding: 20px;
    width: 260px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.item:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

.item img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 12px;
}

.item-title {
    font-size: 1.2rem;
    color: #0f172a;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 5px;
}

.item-desc {
    font-size: 0.9rem;
    color: #555;
}

#contact {
    padding: 160px 40px;
    background: #f4f7fb;
}

.contact-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contact-title {
    font-size: 2.7rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #6c63ff;
    font-family: 'Poppins', sans-serif;
}

.contact-subtitle {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 40px;
}

.contact-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-icon {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px 20px;
    width: 180px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.contact-icon img {
    margin-bottom: 10px;
    width: 110px;
    height: 110px;
}

.contact-icon p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-icon:hover {
    transform: translateY(-6px);
    box-shadow: 10px 20px 34px rgba(0.15, 0, 0, 0.15);
}

.contact-icon:hover img {
    transform: scale(1.1);
}

footer {
    text-align: center;
    padding: 25px 0;
    background: linear-gradient(90deg, #6c63ff, #a394ff);
    color: #444;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    margin-top: 40px;
}


.go-top-btn {
    position: fixed;
    bottom: 70px;
    right: 35px;
    border-radius: 50%;
    cursor: pointer;
    height: 70px;
    width: 70px;
    border-color: white;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.go-top-btn img {
    width: 60px;
    height: 60px;
}

#faq {
    padding-top: 8rem;
    padding-bottom: 6rem;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    display: flex;
    justify-content: center;
    color: #6c63ff;
    font-size: 2.2rem;
}

.faq-item {
    border-bottom: 1px solid #ddd;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    width: 100%;
    padding: 1.4rem;
    font-size: 1.1rem;
    text-align: left;
    cursor: pointer;
    font-weight: 500;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover,
.faq-question:focus-visible {
    background-color: rgba(124, 58, 237, 0.08);
    transform: translateX(4px);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
    opacity: 0.25s ease;
    transform: 0.25s ease;

    opacity: 0;
    transform: translateY(-4px);

    background: rgba(124, 58, 237, 0.03);
    border-left: 3px solid rgba(124, 58, 237, 0.4);
}

.faq-item.open {
    background-color: rgba(124, 58, 237, 0.04);
}

.faq-answer p {
    margin: 0;
    padding: 1.2rem 1.4rem 1.6rem;
    line-height: 1.6;
    color: #444;
    font-size: 1rem;
    max-width: 80ch;
}

.faq-item.open .faq-answer {
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s, 0.08s, 0.08s;
}

.faq-item.open .faq-question {
    background-color: rgba(124, 58, 237, 0.12);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-question:hover .faq-icon,
.faq-question:focus-visible .faq-icon {
    transform: scale(1.15);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

@media (hover: hover) {
    .faq-question:hover {
        transform: translateX(4px);
    }
}

@media (max-width: 480px) {

    .nav-logo-img {
        width: 30px;
        height: 30px;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rempx;
    }

    .nav-links a {
        font-size: 16px;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.25;
    }

    .hero-buttons {
        flex-direction: column;
        width: 80%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-avatar {
        width: 130px;
        height: 130px;
        font-size: 1rem;
    }

    .hero-content {
        gap: 1.8rem;
    }

    .skills-title,
    .about-title,
    .contact-title {
        font-size: 2.1rem;
    }

    .contact-icon {
        width: 160px;
        padding: 20px;
    }

    .contact-icon img {
        width: 80px;
        height: 80px;
    }

    .skill-card {
        height: 180px;
        padding: 15px;
        width: 150px;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        width: 100%;
        padding: 0 1rem;
        margin: 0 auto;
    }

    .h2-projects {
        font-size: 20px;
    }

    .p-projects {
        font-size: 13px;
    }

    .btn-projects {
        font-size: 12px;
    }

    .go-top-btn {
        width: 55px;
        height: 55px;
        bottom: 40px;
        right: 20px;
    }

    .go-top-btn img {
        width: 40px;
        height: 40px;
    }

    .lang-switcher.mobile {
        gap: 0.7rem;
    }

    .lang-switcher button {
        font-size: 0.85rem;
    }

    .menu-toggle {
        font-size: 1.5rem;
    }

    .nav-logo span {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 25px
    }

    .faq-answer {
        margin-left: 15px;
        margin-right: 15px;
        margin-bottom: 10px;
    }

}

@media (max-width: 600px) {

    .nav-toggle {
        display: block;
        position: static;
        justify-self: center;
        left: 50%;
        transform: none;
        font-size: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .lang-switcher {
        justify-self: end;
    }


    .nav-container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        padding: 1.2rem 0 1.5rem;
        display: none;
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .lang-switcher.mobile {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 0.8rem;
    }

    .lang-switcher.desktop {
        display: none;
    }

    .nav-logo span {
        font-size: 1rem;
    }

    .nav-logo-img {
        width: 28px;
    }

}

@media (min-width: 1200px) {
    .nav-container {
        max-width: 1200px;
        margin: 0 auto;
    }

    .nav-links {
        gap: 2.5rem;
    }

    .lang-switcher button {
        font-size: 0.95rem;
    }

    .nav-toggle {
        display: none;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        display: block;
    }

    .nav-container {
        padding: 0.8rem 1.2rem;
    }

    .lang-switcher button {
        font-size: 0.9rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-toggle {
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        padding: 1.2rem 0 1.5rem;
        display: none;
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
    }

    .lang-switcher.desktop {
        display: none;
    }

    .lang-switcher.mobile {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}
