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

/* Standart rejim (Dark) */
:root {
    --bg-primary: #282a36;
    --bg-secondary: #081c27;
    --bg-tertiary: #212529;
    --text-primary: #ffffff;
    --text-secondary: #778290;
    --text-muted: #5a667a;
    --accent-primary: #5752b3;
    --bg-card: #161c25;
    --bg-section: #1c232f;
    --accent-danger: #ff494a;
    --bg-dark: #1f1f1f;
    --border-color: #2a2d3a;
    --success-color: #10b981;
}

/* Kunduzgi rejim (Light mode) */
[data-theme="light"] {
    /* Fondagi o'zgarishlar */
    --bg-primary: #f8fafc;       /* Juda och ko'k-kulrang (Slate 50) */
    --bg-secondary: #ffffff;     /* Elementlar uchun sof oq */
    --bg-tertiary: #f1f5f9;      /* Slate 100: bo'limlarni ajratish uchun */
    
    /* Matnlar (Kontrastni yaxshilash) */
    --text-primary: #0f172a;     /* Slate 900: mutloq qora emas, to'q kishi */
    --text-secondary: #475569;   /* Slate 600: o'qishga qulay kulrang */
    --text-muted: #94a3b8;       /* Slate 400: yordamchi matnlar */
    
    /* Aktsentlar */
    --accent-primary: #4f46e5;   /* Indigo 600: oq fonda yorqinroq ko'rinadi */
    --bg-card: #ffffff;
    --bg-section: #f1f5f9;
    
    /* Border va Soyalar */
    --border-color: #e2e8f0;     /* Slate 200: nozik chegaralar */
}

body {
    font-family: 'Courier New', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── NAVIGATION ── */
.navbar {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

/* Logo */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.brand-initials {
    background: transparent; /* Fonni olib tashlaymiz */
    border: 1.5px solid var(--text-primary); /* Faqat ingichka chegara */
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 4px; /* Biroq burchakliroq */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em; /* Harflar orasini ochish */
    margin-right: 10px;
}

.brand-name {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase; /* Hammasi katta harf bilan yanada jiddiyroq ko'rinadi */
}

.brand-initials:hover {
    background: #6366f1;
    transform: rotate(5deg);
}

/* Center nav links */
.navbar-nav .nav-link {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    margin: 0 1.2rem;
    transition: all 0.25s ease;
    position: relative;
    padding: 0.5rem 0;
    letter-spacing: 0.03em;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1.5px;
    background-color: var(--text-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

.navbar-nav .nav-link.active {
    color: var(--text-primary) !important;
}

/* Right icons */
.navbar-icons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.15rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.navbar-icon:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.navbar-toggler {
    border: none;
    color: var(--text-primary);
    background: none;
    padding: 0.4rem;
}

/* ── HERO SECTION ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
}

.hero-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--success-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
}

.hero-avatar img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center 15%;
    border-radius: 50%;
    margin-top: -20px;
}

.status-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--success-color);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero .location {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero .availability {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ── TECHNOLOGIES ── */
.technologies {
    padding: 4rem 0;
    text-align: center;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.tech-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.tech-item i {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.tech-item:hover i {
    color: var(--accent-primary);
}

/* ── ABOUT ── */
.about {
    padding: 6rem 0;
    background: var(--bg-section);
}

.about-content {
    max-width: 900px;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.highlight-text {
    color: var(--text-primary);
    font-weight: 500;
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── EXPERIENCE ── */
.experience {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.experience-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.experience-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.experience-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.experience-company {
    color: var(--success-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.experience-location {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.experience-period {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: right;
}

.experience-current {
    background: var(--success-color);
    color: var(--bg-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.experience-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Asosiy tech-tag uslubi */
.tech-tag {
    background: rgba(255, 255, 255, 0.05); /* Orqa fon biroz shaffof */
    padding: 0.3rem 0.8rem;
    border-radius: 4px; /* 1-rasmdagidek biroz burchakliroq */
    font-size: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

/* Purple loyihalar (E-commerce, Password Manager) */
.project-card.purple-card .tech-tag {
    color: #a78bfa; /* 1-rasmga yaqinroq och binafsha */
    border-color: rgba(167, 139, 250, 0.3);
}
.project-icon.purple { background: #a78bfa; }

/* Pink/Red loyihalar (Instagram Clone, Mini Portfolio) */
.project-card.pink-card .tech-tag {
    color: #f472b6; 
    border-color: rgba(244, 114, 182, 0.3);
}
.project-icon.pink { background: #f472b6; }

/* Blue loyihalar (Library API, Library Manager) */
.project-card.blue-card .tech-tag {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}
.project-icon.blue { background: #60a5fa; }

/* Green loyihalar (News Website, Contacts Manager) */
.project-card.green-card .tech-tag {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
}
.project-icon.green { background: #34d399; }

/* ── PROJECTS ── */
.projects {
    padding: 6rem 0;
    background: var(--bg-section);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
}

.project-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.project-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 1rem;
}

.project-icon.purple { background: var(--accent-primary); }
.project-icon.blue   { background: #3b82f6; }
.project-icon.green  { background: var(--success-color); }
.project-icon.pink   { background: #ec4899; }

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ── CTA ── */
.cta-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin: 4rem 0;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent-primary);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #6366f1;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* ── CONTACT SECTION ── */
.contact {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.contact-heading {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-link i {
    color: var(--accent-primary);
    width: 20px;
    text-align: center;
}

.contact-link:hover {
    color: var(--text-primary);
    padding-left: 5px; /* Kichik interaktiv effekt */
}

/* Form Card */
.contact-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
}

.input-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Input stylelar */
.contact input, 
.contact textarea {
    width: 100%;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    transition: all 0.3s ease !important;
    outline: none;
}

.contact input:focus, 
.contact textarea:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px rgba(87, 82, 179, 0.1) !important;
}

/* Yuborish tugmasi */
.btn-send {
    width: 100%;
    background: var(--accent-primary);
    background-color: var(--accent-primary);
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-send:hover {
    background-color: #6366f1; 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(87, 82, 179, 0.3);
}

.form-status-box {
    display: none;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Back to top button */
#backToTop {
    display: none; /* Skrol bo'lmaguncha yashirin turadi */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--accent-primary);
    color: white;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#backToTop:hover {
    background-color: #6366f1;
    transform: translateY(-5px);
}

/* ── FOOTER ── */
.footer {
    background: var(--bg-secondary); /* Fondan biroz to'qroq rang */
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-links h6 {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-links ul li a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.love-text {
    color: var(--accent-danger);
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Mobil qurilmalar uchun masofa */
@media (max-width: 991px) {
    .navbar-brand {
        margin-right: auto; /* Logoni chapga surish */
    }
    
    .navbar-toggler {
        margin-left: 15px;  /* Menu tugmasi bilan oraliq */
        border: none;
        color: var(--text-primary);
    }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }

    .navbar-icons {
        justify-content: center;
        padding: 0.5rem 0 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .experience-header {
        flex-direction: column;
    }

    .experience-period {
        text-align: left;
        margin-top: 0.5rem;
    }

    .tech-grid {
        gap: 0.8rem;
    }

    .tech-item {
        width: 70px;
        height: 70px;
    }

    .tech-item i {
        font-size: 1.5rem;
    }
}

/* Light modeda kartochkalar va navigatsiyani professional qilish */
[data-theme="light"] .project-card, 
[data-theme="light"] .contact-form-card,
[data-theme="light"] .navbar {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .experience-item {
    border-left: 2px solid var(--border-color);
}

[data-theme="light"] .experience-item::before {
    background: #ffffff;
    border: 2px solid var(--accent-primary);
}