html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(-45deg, #0d1117, #161b22, #1f2937, #0d1117);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;
    color: #f0f6fc;
    overflow-x: hidden;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 72px;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.6rem;
    margin: 0;
    color: #f0f6fc;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #aaa;
    margin-top: .5rem;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: .3s;
}

.section-divider {
    width: 80%;
    height: 3px;
    margin: 3rem auto;
    background: linear-gradient(90deg, #58a6ff, #ffffff, #58a6ff);
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
    border-radius: 2px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .8s ease, transform .8s ease;
}

.section-divider.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes gradientMove {
    0% { background-position: 0% 50% }
    100% { background-position: 150% 50% }
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem .6rem;
    z-index: 100;
    transition: transform .3s ease;
}

nav.hidden {
    transform: translateY(-100%);
}

nav h1 {
    font-size: 1.4rem;
    color: #58a6ff;
    margin: 0;
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    margin-right: 2rem;
}

.nav-links {
    display: none;
    gap: 1rem;
}

.nav-links a {
    color: #f0f6fc;
    text-decoration: none;
    font-weight: 600;
    opacity: .9;
}

.nav-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.nav-lang {
    display: none;
    padding: .35rem .5rem;
    border-radius: .4rem;
    border: none;
    color: #58a6ff;
}

.burger {
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    display: block !important;
}

.burger:hover {
    color: #ddd;
}

.burger-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100%;
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transition: right .3s ease;
    z-index: 200;
}

.burger-menu.open {
    right: 0;
}

.burger-menu a {
    color: #fff;
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.burger-menu a:hover {
    color: #aaa;
}

.burger-menu select {
    margin-top: auto;
    padding: .4rem;
    border-radius: .4rem;
    border: none;
}

.btn {
    display: inline-block;
    background: #58a6ff;
    color: #0d1117;
    border: none;
    padding: .6rem 1.4rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: .3s;
}

.btn:hover {
    background: #ffffff;
    color: #000000;
}

.intro-section {
    flex-direction: column;
    width: 100%;
}

.intro-content {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s ease forwards;
}

.intro-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.intro-content p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
}

.intro-btn {
    margin-top: 2.5rem;
}

.about-inner {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.about-text {
    font-size: 1.25rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-text p {
    margin-bottom: 2rem;
    color: #d1d5db;
}

.about-photos {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

.about-photo {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.about-photo.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-photo img {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(88, 166, 255, .25);
    transition: transform .4s ease, box-shadow .4s ease;
}

.about-photo img:hover {
    transform: translateY(-10px) scale(1.08);
    box-shadow: 0 16px 40px rgba(88, 166, 255, .35);
}

.about-text-full {
    font-size: 1.25rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto 3rem auto;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.about-text-full.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    justify-items: center;
    margin-top: 2rem;
}

.about-photo-grid {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.about-photo-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-photo-grid:nth-child(1) { transition-delay: 0.1s; }
.about-photo-grid:nth-child(2) { transition-delay: 0.2s; }
.about-photo-grid:nth-child(3) { transition-delay: 0.3s; }
.about-photo-grid:nth-child(4) { transition-delay: 0.4s; }

.about-photo-grid img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(88, 166, 255, .25);
    transition: transform .4s ease, box-shadow .4s ease;
}

.about-photo-grid img:hover {
    transform: translateY(-10px) scale(1.08);
    box-shadow: 0 16px 40px rgba(255, 255, 255, .35);
}

#home {
    position: relative;
    height: 100vh;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1s;
    opacity: 0;
    overflow: hidden;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 6s ease, filter .3s ease;
}

.carousel-slide.active img:hover {
    transform: scale(1.08);
    filter: brightness(1.15);
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.carousel-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: .3s;
}

.carousel-slide.active .carousel-content {
    opacity: 1;
    transform: translateY(0);
}

.arrow-btn {
    width: 50px;
    height: 50px;
    background: rgba(17, 17, 17, .6);
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: .3s;
    font-size: 1.2rem;
}

.arrow-btn:hover {
    background: rgba(17, 17, 17, .9);
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
    background: #444;
    cursor: pointer;
    transition: .3s;
}

.carousel-dot.active {
    background: #58a6ff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
}

.card {
    background: #161b22;
    padding: 1rem;
    opacity: 0;
    transform: translateY(30px);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    text-align: center;
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.2);
}

.card::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(88, 166, 255, 0.5), transparent 70%);
    filter: blur(12px);
    opacity: 0.6;
    border-radius: 50%;
    transition: opacity .4s ease, transform .4s ease;
    pointer-events: none;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.5);
}

.card:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
}

.card-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform .4s ease, filter .3s ease;
}

.card:hover .card-img {
    transform: scale(1.05);
    filter: brightness(1.2);
}

#contact .contact-inner {
    text-align: center;
    width: 100%;
}

.socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    font-size: 2rem;
    color: #58a6ff;
    transition: .3s;
    margin: 0 .25rem;
}

.social-icon:hover {
    color: #ffffff;
    transform: translateY(-5px);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    width: 3px;
    background: #58a6ff;
    top: 0;
    bottom: 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.timeline-year {
    font-weight: bold;
    color: #58a6ff;
    width: 80px;
    text-align: right;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #58a6ff;
    flex-shrink: 0;
}

.timeline-text {
    flex: 1;
    padding: .5rem 1rem;
    background: #161b22;
    border-radius: 6px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-card {
    background: #161b22;
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(88, 166, 255, .2);
    transition: transform .3s ease, box-shadow .3s ease;
}

.skill-card i {
    font-size: 2rem;
    margin-bottom: .5rem;
    color: #58a6ff;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(255, 255, 255, .3);
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.hobby-card {
    background: #161b22;
    padding: 1.2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform .3s ease, box-shadow .4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(88, 166, 255, 0.25);
}

.hobby-card::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(88, 166, 255, 0.6), transparent 70%);
    filter: blur(12px);
    opacity: 0.6;
    border-radius: 50%;
    transition: opacity .4s ease, transform .4s ease, background .4s ease;
    pointer-events: none;
}

.hobby-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.5);
}

.hobby-card:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.6), transparent 70%);
}

.hobby-card i {
    font-size: 2rem;
    margin-bottom: .5rem;
    color: #58a6ff;
}

@keyframes gradientBG {
    0% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 50% }
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0) }
}

@media (max-width: 991px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-text {
        text-align: center;
    }
    .about-photos {
        flex-direction: column;
    }
    .about-photos-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .nav-links {
        display: flex;
    }
    .nav-lang {
        display: inline-block;
    }
}
