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

html {
    scroll-behavior: auto;
}

body {
    min-height: 100vh;
    background: #101010;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

nav {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 20px;
    transition: 0.3s;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.15);
}

#langToggle {
    position: fixed;
    top: 15px;
    right: 25px;
    padding: 13px 22px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

.section {
    width: min(1000px, calc(100% - 40px));
    margin: 0 auto;
    padding: 280px 0 180px;
    opacity: 0;
    transform: translateY(45px);
    filter: blur(8px);
    transition:
        opacity 0.9s ease,
        transform 0.9s ease,
        filter 0.9s ease;
}

.section.show {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

#home {
    min-height: 700px;
    padding-top: 260px;
    text-align: center;
}

#home h1 {
    font-size: 70px;
    margin-bottom: 55px;
}

#home p {
    max-width: 780px;
    margin: 0 auto;
    color: #cfcfcf;
    font-size: 20px;
    line-height: 1.8;
}

h2 {
    width: fit-content;
    margin: 0 auto 120px;
    font-size: 45px;
    position: relative;
}

h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -14px;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
}

.profile-card {
    margin-top: 120px;
    padding: 45px;
    min-height: 260px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 70px;
}

.profile-info {
    flex: 1;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 25px;
    object-fit: cover;
}

.profile-info h3 {
    font-size: 42px;
    margin-bottom: 30px;
}

.profile-info p {
    color: #cfcfcf;
    margin-bottom: 50px;
    line-height: 1.7;
}

.profile-panels {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 22px;
    align-items: stretch;
}

.profile-panel {
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-panel h4 {
    margin-bottom: 18px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.programs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.programs span,
.social-links a {
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    color: white;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.social-links a {
    display: block;
    text-decoration: none;
    text-align: center;
    transition: 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.projects {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 230px;
    margin-top: 170px;
    flex-wrap: wrap;
}

.project-box {
    width: 340px;
    text-align: center;
}

.project-box img {
    width: 320px;
    height: 250px;
    object-fit: contain;
    margin-bottom: 55px;
    transition: 0.3s;
}

.project-box img:hover {
    transform: scale(1.05);
}

.project-box p {
    width: 100%;
    padding: 18px 24px;
    border-radius: 18px;
    font-size: 20px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.box {
    margin-top: 130px;
    padding: 40px 55px;
    border-radius: 18px;
    text-align: center;
    color: #cfcfcf;
    font-size: 19px;
    line-height: 1.9;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-box {
    width: 320px;
    margin: 130px auto 0;
    padding: 18px 24px;
    border-radius: 18px;
    text-align: center;
    color: #ffffff;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 800px) {
    nav {
        width: calc(100% - 90px);
        overflow-x: auto;
        justify-content: flex-start;
    }

    #home h1 {
        font-size: 45px;
    }

    .section {
        padding: 180px 0 120px;
    }

    #home {
        min-height: 550px;
        padding-top: 220px;
    }

    h2 {
        margin-bottom: 80px;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        margin-top: 80px;
    }

    .profile-panels {
        grid-template-columns: 1fr;
    }

    .programs {
        justify-content: center;
    }

    .projects {
        gap: 100px;
        margin-top: 100px;
    }

    .project-box img {
        width: 85%;
    }

    .box {
        margin-top: 90px;
    }

    .contact-box {
        margin-top: 90px;
    }
}

body {
    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        filter 0.35s ease;
}

body.language-changing {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    filter: blur(3px);
}

body.language-changed {
    animation: langPop 0.45s ease forwards;
}

@keyframes langPop {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.985);
        filter: blur(3px);
    }

    60% {
        opacity: 1;
        transform: translateY(2px) scale(1.005);
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}