/* Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* O'zgaruvchilar (Variables) - Ranglar palitrasi */
:root {
    --background-color: #F9FAFB; /* Orqa fon uchun oqish rang */
    --text-color: #111827; /* Matn uchun to'q kulrang */
    --primary-color: #10B981; /* Asosiy yashil rang */
    --primary-hover-color: #0F9D6E; /* Yashil rangning to'qroq varianti */
    --card-background: #FFFFFF; /* Kartochkalar uchun oq rang */
    --border-color: #E5E7EB; /* Chegaralar uchun och kulrang */
    --footer-bg: #111827; /* Footer uchun fon */
}

/* Umumiy stillarni tozalash va sozlash */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth; /* Silliq o'tish uchun */
    cursor: none; /* Oddiy kursorni yashirish */
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3 {
    color: var(--text-color);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover-color);
}

ul {
    list-style: none;
}

section {
    padding: 100px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
}

/* Header va Navigatsiya stillari */
header {
    background-color: var(--card-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 0 40px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px; /* Logonig balandligini moslashtirish */
    width: auto;
}

.navbar .nav-links {
    display: flex;
    gap: 30px;
}

.navbar .nav-links a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 16px;
    padding: 5px 0;
    position: relative;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

.burger-menu {
    display: none; /* Katta ekranlarda yashirish */
    cursor: pointer;
    font-size: 24px;
}

/* Hero Section */
#home {
    position: relative; /* Particles uchun kerak */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding-top: 70px;
    overflow: hidden; /* Sectiondan chiqib ketmaslik uchun */
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1; /* Orqa fonga o'tkazish */
    background-color: #f9fafb; /* Rangni o'zgartirishingiz mumkin */
}

.hero-content {
    position: relative;
    z-index: 2; /* Animatsiyaning ustiga chiqarish */
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.hero-content .highlight {
    color: var(--primary-color);
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.hero-content p {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Tugmalar uchun umumiy stillar */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
    color: #fff;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-3px);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 15px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skills-list span {
    background-color: var(--border-color);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Achievements Section */
#achievements {
    background-color: var(--card-background);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.achievement-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.achievement-card .counter, .achievement-card span {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    display: inline-block;
}

.achievement-card p {
    font-size: 1rem;
    color: #6B7280; /* Och kulrang matn */
    margin-top: 5px;
}

/* Projects Section (Swiper) */
.swiper-container {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 50px;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    height: auto; /* Balandlikni avtomatik sozlash */
}

.project-card {
    width: 350px;
    background-color: var(--card-background);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* Elementlarni vertikal joylashtirish */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Bo'sh joyni egallash */
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project-info p {
    margin-bottom: 20px;
    flex-grow: 1; /* Matn qismini cho'zish */
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    background-color: var(--primary-color);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    justify-content: flex-end;
    margin-top: auto; /* Tugmani pastga yopishtirish */
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color) !important;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.social-links h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.social-links a i {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-social {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-social a {
    color: #fff;
    font-size: 1.8rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor.grow {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    opacity: 0.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    border-radius: 15px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#modal-title {
    margin-bottom: 15px;
    color: var(--primary-color);
}

#modal-link {
    display: inline-block;
    margin-bottom: 20px;
}

.modal-body {
    width: 100%;
    height: 60vh;
    margin-top: 20px;
}


/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    section {
        padding: 80px 20px;
    }
    .about-content, .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-image {
        text-align: center;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content h2 {
        font-size: 2rem;
    }
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 0 20px;
    }
    .navbar {
        position: absolute;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: var(--card-background);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
    }
    .navbar.active {
        left: 0;
    }
    .navbar .nav-links {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
    }
    .burger-menu {
        display: block;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content h2 {
        font-size: 1.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .custom-cursor {
        display: none; /* Sensor ekranlarda kursorni yashirish */
    }
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 576px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}
