/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --bg-dark: #0b0f17;
    --bg-surface: #161b26;
    --bg-input: #1f2636;
    --accent-neon: #39ff14;
    --accent-glow: rgba(57, 255, 20, 0.25);
    --accent-glow-intense: rgba(57, 255, 20, 0.45);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   2. PREMIUM NAVIGATION
   ========================================= */
nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between; /* Elementlarni uch tomonga teng tarqatadi */
    align-items: center;
    z-index: 2000;
}


.nav-logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    flex: 1; /* Chap tomonni egallaydi */
    
    background: linear-gradient(
        135deg, 
        #ffffff 0%, 
        rgba(57, 255, 20, 0.3) 40%, 
        #39ff14 60%, 
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(57, 255, 20, 0.2));
    
    animation: logoShine 5s linear infinite;
    transition: var(--transition-smooth);
}


.nav-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 15px rgba(57, 255, 20, 0.5));
}

.nav-links {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex: 2; /* Markazda ko'proq joy olishi va o'rtada muallaq turishi uchun */
}


.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-smooth);
    position: relative;
    white-space: nowrap; /* Linklar ikki qatorga tushib ketmasligi uchun */
}


.nav-links a:hover {
    color: var(--accent-neon);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-neon);
    transition: var(--transition-smooth);
    box-shadow: 0 0 8px var(--accent-neon);
}

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

.nav-filler {
    flex: 1; /* Logo bilan bir xil kenglik oladi, natijada menyu o'rtada qoladi */
    pointer-events: none;
    user-select: none;
}

@keyframes logoShine {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* Mobil qurilmalar uchun moslashtirish */
@media (max-width: 850px) {
    nav {
        padding: 1.5rem 2rem;
        flex-direction: column;
        gap: 1.2rem;
    }
    .nav-logo {
        text-align: center;
        flex: none;
    }
    .nav-links {
        gap: 1.5rem;
        flex: none;
    }
    .nav-filler {
        display: none; /* Mobilda kerak emas */
    }
}

html {
    scroll-behavior: smooth;
}

main {
    padding-top: 0; /* Navbardan qolgan sun'iy katta bo'shliqni butunlay yo'qotamiz */
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-smooth);
    position: relative;
}

nav a:hover {
    color: var(--accent-neon);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-neon);
    transition: var(--transition-smooth);
    box-shadow: 0 0 8px var(--accent-neon);
}

nav a:hover::after {
    width: 100%;
}

main {
    padding-top: 0;
}

/* =========================================
   3. INTERACTIVE HERO SECTION (HOME)
   ========================================= */
.me {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;        /* Barcha elementlarni vertikal o'q bo'yicha o'rtaga tekislaydi */
    justify-content: center;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem;         /* Ortiqcha tepa-past bo'shliqlarni butunlay tozalaymiz */
    min-height: calc(100vh - 40px); /* Ekran balandligiga mukammal o'tirishi uchun */
}

.me-text {
    display: flex;
    flex-direction: column;
    justify-content: center;    /* Matnlar o'z ichida ham vertikal markazda turadi */
    height: 100%;               /* Rasm balandligi bilan tenglashishi uchun */
}

.me-text h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-top: 0;
    margin-bottom: 0.5rem;
    
    /* Oq, yarim shaffof yashil va yorqin yashil ranglar uyg'unligi */
    background: linear-gradient(
        120deg, 
        #ffffff 0%, 
        rgba(57, 255, 20, 0.4) 30%, 
        #39ff14 50%, 
        rgba(57, 255, 20, 0.4) 70%, 
        #ffffff 100%
    );
    
    /* Gradientni matn ichiga joylashtirish va o'lchamini kattalashtirish (harakatlanishi uchun) */
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Matn orqasidan nafis neon nuri taralib turishi (transparency effekti uchun) */
    filter: drop-shadow(0 2px 10px rgba(57, 255, 20, 0.15));
    
    /* Animatsiyani ulash: 4 soniyada aylanadi, to'xtamaydi va silliq harakat qiladi */
    animation: shineGlow 4s linear infinite;
}

@keyframes shineGlow {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

.sub-title-wrapper {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.dynamic-text {
    color: var(--accent-neon);
    margin-left: 10px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.cursor {
    color: var(--accent-neon);
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 520px;
    margin-bottom: 2.5rem;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Download CV Button */
.btn-primary {
    background-color: var(--accent-neon);
    color: #000000;
    padding: 0.9rem 2.2rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-smooth);
    box-shadow: 0 0 15px var(--accent-glow);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 25px var(--accent-glow-intense);
}

.social-icons {
    display: flex;
    gap: 1.2rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.social-icons a:hover {
    border-color: var(--accent-neon);
    color: var(--accent-neon);
    transform: translateY(-4px);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Profil Rasmi Atrofidagi Kuchli Interaktivlik */
.me-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-container {
    position: relative;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.glow-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-surface);
    position: relative;
    z-index: 5;
    transition: var(--transition-smooth);
}

/* Pulsatsiya qiluvchi neon aylanalar backgroundda */
.glow-container::before, .glow-container::after {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-neon), #00ffcc);
    z-index: 1;
    opacity: 0.5;
    transition: var(--transition-smooth);
}

.glow-container::after {
    filter: blur(15px);
    opacity: 0.6;
}

/* Sichqoncha rasmga kelgandagi interaktiv holat */
.glow-container:hover {
    transform: scale(1.04) rotate(2deg);
}

.glow-container:hover::before {
    transform: scale(1.05);
}

.glow-container:hover::after {
    filter: blur(25px);
    opacity: 0.9;
}

/* =========================================
   4. ABOUT SECTION
   ========================================= */
.about-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-card {
    background: var(--bg-surface);
    padding: 4rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.about-header h2, main h1 {
    font-size: 2.8rem;
    font-weight: 800;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--accent-neon);
    margin: 1rem 0 2rem 0;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 10px var(--accent-neon);
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.about-content span {
    color: var(--accent-neon);
    font-weight: 600;
}

.strengths {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(57, 255, 20, 0.05);
    border: 1px solid rgba(57, 255, 20, 0.2);
    color: var(--accent-neon);
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.tag:hover {
    background: var(--accent-neon);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-3px);
}

/* =========================================
   5. BARCHA ICHKI SAHIFALAR UCHUN UNIFIED GRID (Projects, Skills, Links)
   ========================================= */
main h1 {
    text-align: center;
    margin: 6rem 0 3rem 0;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 70%, var(--accent-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.projects-container, .skills-container, .links-container {
    display: grid;
    /* Kartalar o'ta kengayib ketmasligi uchun max 380px, min 300px cheklov qo'yamiz */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 6rem auto;
    padding: 0 2rem;
}


/* Universal Karta Dizayni */
.project-card, .skill-card, .link-card {
    background: linear-gradient(145deg, #161b26, #11151f);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 2rem;
    border-radius: 24px; /* Premium yumshoq burchaklar */
    display: flex;
    flex-direction: column;
    align-items: center;    /* Elementlarni markazga tekislaymiz (Xuddi asosiy sahifangizdek) */
    text-align: center;     /* Matnlar markazda juda chiroyli turadi */
    transition: var(--transition-smooth);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}


.project-card:hover, .skill-card:hover, .link-card:hover {
    transform: translateY(-6px);
    border-color: rgba(57, 255, 20, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(57, 255, 20, 0.05);
}


.project-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}


.project-card h3, .skill-card h3, .link-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}


.project-card p, .skill-card p, .link-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    max-width: 280px; /* Matn yon tomonga tarqalib ketmasligi uchun */
}

.skill-card img, .link-card img, .skill-card i, .link-card i {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1.2rem;
    display: inline-block;
    color: var(--accent-neon);
    font-size: 3.2rem;
    filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.2)); /* Ikonka atrofiga nafis nur */
}

/* Kartalar ichidagi tugmalar */
.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem;
    background: rgba(57, 255, 20, 0.03);
    color: var(--accent-neon);
    border: 1px solid rgba(57, 255, 20, 0.3);
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    transition: var(--transition-smooth);
    margin-top: auto; /* Agar kontent kam bo'lsa ham tugma har doim eng pastga tekislanadi */
}

.btn:hover {
    background: var(--accent-neon);
    color: #000000;
    border-color: var(--accent-neon);
    box-shadow: 0 0 15px var(--accent-glow);
    font-weight: 700;
}

/* =========================================
   6. MUKAMMAL CONTACT SECTION (PREMIUM DESIGN)
   ========================================= */
.contact-footer-section {
    max-width: 650px;
    margin: 8rem auto 6rem auto;
    padding: 3.5rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.contact-footer-section h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary) !important;
}

.contact-footer-section p {
    color: var(--text-secondary) !important;
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

/* Form elementlari joylashuvi */
.contact-footer-section form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-footer-section input, 
.contact-footer-section textarea {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 1.1rem 1.3rem !important;
    border-radius: var(--radius-md) !important;
    width: 100%;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.contact-footer-section input:focus, 
.contact-footer-section textarea:focus {
    border-color: var(--accent-neon) !important;
    background: var(--bg-surface) !important;
    outline: none;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.15);
}

.contact-footer-section textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-footer-section button {
    background: var(--accent-neon);
    color: #000000;
    border: none;
    padding: 1.1rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: var(--transition-smooth);
    box-shadow: 0 0 15px var(--accent-glow);
}

.contact-footer-section button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px var(--accent-glow-intense);
}

/* =========================================
   7. RESPONSIVE DESIGN (MOBILE ADAPTATION)
   ========================================= */
@media (max-width: 992px) {
    .me {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 3rem;
        gap: 4rem;
    }
    .me-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .me-text h1 {
        font-size: 3.2rem;
    }
    .sub-title-wrapper {
        font-size: 1.6rem;
    }
    .me-image {
        grid-row: 1; /* Mobil qurilmada rasm tepaga chiqadi */
    }
    .glow-container {
        width: 280px;
        height: 280px;
    }
    .action-buttons {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }
    .btn-primary {
        width: 100%;
        text-align: center;
    }
    .about-card, .contact-footer-section {
        padding: 2.2rem 1.5rem;
    }
}