/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B0000;
    /* To'q qizil */
    --secondary-color: #DC143C;
    /* Yorqinroq qizil */
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --shadow: rgba(139, 0, 0, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--shadow);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 20px 50px;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.1;
    top: -200px;
    right: -200px;
    animation: pulse 4s infinite;
    z-index: 0;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.hero-content {
    flex: 1;
    z-index: 10;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {

    0%,
    90%,
    100% {
        text-shadow: 0 0 10px var(--primary-color);
    }

    95% {
        text-shadow: 3px 0 var(--primary-color), -3px 0 var(--secondary-color);
    }
}

.hero-description {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 0 20px var(--shadow);
}

.btn-primary:hover {
    background: var(--secondary-color);
    box-shadow: 0 0 30px var(--shadow);
    transform: translateY(-3px);
}

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

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

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 200px;
    z-index: 10;
    position: relative;
}

.profile-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 0 50px var(--shadow);
    animation: float 3s ease-in-out infinite;
    position: relative;
    overflow: visible;
}

.profile-img {
    position: absolute;
    width: 320px;
    height: 450px;
    object-fit: cover;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
}

/* Dumaloq pastki qismini yopish uchun mask */




@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Section Styles */
section {
    padding: 80px 20px;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-light);
    position: relative;
}

.section-title::after {
    content: none;
}

/* About Section */
.about {
    background: var(--bg-darker);
    padding-top: 40px;
    padding-bottom: 40px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--bg-dark);
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s;
}

.stat:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-gray);
}

/* Skills Section - Carousel */
.skills-carousel {
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    width: 100%;
}

.skills-carousel::before,
.skills-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.skills-carousel::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-dark) 0%, transparent 100%);
}

.skills-carousel::after {
    right: 0;
    background: linear-gradient(90deg, transparent 0%, var(--bg-dark) 100%);
}

.skills-track {
    display: flex;
    gap: 2rem;
    animation: scrollSkills 30s linear infinite;
    width: fit-content;
}

.skills-track:hover {
    animation-play-state: paused;
}

@keyframes scrollSkills {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.skill-item {
    background: var(--bg-darker);
    padding: 2rem 3rem;
    border-radius: 15px;
    border: 2px solid var(--primary-color);
    text-align: center;
    min-width: 180px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.skill-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--secondary-color);
}

.skill-item .skill-icon {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.skill-item:hover .skill-icon {
    transform: scale(1.2);
    filter: brightness(1.3) drop-shadow(0 0 20px var(--primary-color));
}

.skill-item h3 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin: 0;
}

/* Old skills-grid (backup) */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-card {
    background: var(--bg-darker);
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    text-align: center;
    transition: all 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow);
}

.skill-icon {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
}

.skill-bar {
    background: var(--bg-dark);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin: 1rem 0;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px var(--primary-color);
}

.skill-percent {
    color: var(--primary-color);
    font-weight: bold;
}

/* Projects Section - Slider */
/* Remove underline from project links */
.projects-track a,
.projects-track a:visited,
.projects-track a:active,
.projects-track a:focus,
.projects-track a:hover {
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: none !important;
}
    .project-card {
        min-width: 140px;
        max-width: 95vw;
        margin: 0 auto;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        border: none;
        padding: 0.7rem 0.5rem;
    }
    .project-content h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    .project-content p {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    .project-tags span {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    .project-card {
        min-width: 110px;
        max-width: 99vw;
        margin: 0 auto;
        font-size: 0.8rem;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
        border: none;
        padding: 0.5rem 0.3rem;
    }
    .project-content h3 {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }
    .project-content p {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
    }
    .project-tags span {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
.projects {
    background: var(--bg-darker);
}

.projects-slider-container {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.projects-slider {
    overflow: hidden;
    border-radius: 15px;
    width: 100%;
}

.projects-track {
    display: flex;
    flex-direction: row;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    gap: 1.5rem;
}

/* Slider buttons olib tashlandi - faqat dots va auto-play */

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.slider-dot:hover {
    background: var(--secondary-color);
    transform: scale(1.2);
}

.slider-dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px var(--primary-color);
}

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

.project-card {
    background: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    transition: all 0.3s;
    width: 350px;
    flex-shrink: 0;
    height: 380px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    flex-shrink: 0;
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.project-content p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.project-tags span {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-darker);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    color: var(--text-light);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 10px var(--shadow);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    background: var(--bg-darker);
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-gray);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

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

/* Footer */
.footer {
    background: var(--bg-darker);
    text-align: center;
    padding: 2rem;
    border-top: 2px solid var(--primary-color);
    color: var(--text-gray);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-top: 2px solid var(--primary-color);
    }

    .nav-menu.active {
        left: 0;
    }

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

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.2rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .profile-circle {
        width: 200px;
        height: 200px;
        margin-top: 2rem;
    }

    .section-title {
        font-size: 1.3rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    .projects-slider-container {
        padding: 0 5px;
    }
    .projects-track {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    .project-card {
        min-width: 180px;
        max-width: 98vw;
        margin: 0 auto;
        box-shadow: 0 2px 8px rgba(0,0,0,0.07);
        border: none;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.2rem;
    }
    .section-title {
        font-size: 1rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .projects-slider-container {
        padding: 0 2px;
    }
    .projects-track {
        flex-direction: column;
        gap: 0.7rem;
        align-items: center;
    }
    .project-card {
        min-width: 140px;
        max-width: 99vw;
        margin: 0 auto;
        font-size: 0.9rem;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        border: none;
    }

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

/* ========== TAKOMILLASHTIRILGAN ANIMATSIYALAR ========== */

/* Fade in animatsiya */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale animatsiya */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate animatsiya */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Glow pulse animatsiya */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--shadow);
    }
    50% {
        box-shadow: 0 0 40px var(--shadow), 0 0 60px var(--shadow);
    }
}

/* Bounce animatsiya */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Shake animatsiya */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Gradient animatsiya */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Text glow animatsiya */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    }
    50% {
        text-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color), 0 0 40px var(--secondary-color);
    }
}

/* Animatsiyalarni elementlarga qo'llash */
.hero-content h1 {
    animation: fadeInLeft 1s ease-out;
}

.hero-description {
    animation: fadeInLeft 1s ease-out 0.2s backwards;
}

.hero-buttons {
    animation: fadeInLeft 1s ease-out 0.4s backwards;
}

.hero-image {
    animation: fadeInRight 1s ease-out 0.3s backwards;
}

.profile-circle {
    animation: float 3s ease-in-out infinite, scaleIn 0.8s ease-out;
}

.logo {
    animation: textGlow 3s ease-in-out infinite;
    transition: all 0.3s;
}

.logo:hover {
    transform: scale(1.1);
    animation: shake 0.5s ease-in-out;
}

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.95);
}

.section-title {
    animation: fadeInUp 0.8s ease-out;
}

.section-title::after {
    animation: scaleIn 0.8s ease-out 0.3s backwards;
}

.skill-card {
    transition: all 0.3s ease;
}

.skill-card:hover {
    animation: glowPulse 1.5s ease-in-out infinite;
    transform: translateY(-10px) scale(1.02);
}

.skill-icon {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.project-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    animation: glowPulse 2s ease-in-out infinite;
}

.project-image {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.stat {
    transition: all 0.3s ease;
}

.stat:hover h3 {
    animation: bounce 0.6s ease;
}

.contact-form input,
.contact-form textarea {
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--shadow);
}

.social-link {
    position: relative;
    overflow: hidden;
}

.social-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.social-link:hover::after {
    left: 100%;
}

/* Scroll animatsiya indikatori */
.hero::after {
    content: '↓';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--primary-color);
    animation: bounce 2s infinite;
    z-index: 10;
}

/* Nav link animatsiya */
.nav-menu a {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-menu a:hover {
    transform: translateY(-3px);
}

/* Profile image animatsiya */
.profile-img {
    transition: all 0.5s ease;
    filter: grayscale(0%);
}

.profile-img:hover {
    transform: translate(-50%, -50%) scale(1.05);
    filter: grayscale(0%) brightness(1.1);
}

/* Hamburger animatsiya */
.hamburger span {
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Loading animatsiya */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Particle animatsiya background uchun */
.hero::before {
    animation: pulse 4s infinite, spin 20s linear infinite;
}
