/* Base Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --light: #f8fafc;
    --gray: #94a3b8;
    --dark-gray: #64748b;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

p {
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

a {
    text-decoration: none;
    color: var(--primary);
}

img {
    max-width: 100%;
    display: block;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary);
    cursor: pointer;
    text-align: center;
}

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    margin-left: 15px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    padding: 15px 0;
    transition: var(--transition);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
}

.logo span {
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 600;
    color: var(--secondary);
    transition: var(--transition);
    position: relative;
}

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

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: url(../img/Tulupov_Free.jpg);
    background-size: cover;
    /* background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); */
    position: relative;
    overflow: hidden;
}

/* Header is NOT fixed by default — starts in normal flow */
header {
    position: relative; /* was fixed */
    top: auto;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: none;
    padding: 15px 0;
    transition: var(--transition);
    z-index: 1000;
}

/* When scrolled, make header fixed at top */
body.scrolled header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: var(--shadow);
    padding: 10px 0;
}

/* Prevent content jump when header becomes fixed */
.scrolled .hero {
    height: calc(100vh - 70px); /* Adjust based on header height */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.hero h1 {
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--dark-gray);
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    max-width: 600px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

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

.skill {
    background: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
}

/* Portfolio Section */
.portfolio {
    background-color: #f1f5f9;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 8px 20px;
    background: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.portfolio-img {
    height: 220px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.1);
}

.portfolio-info {
    padding: 20px;
}

.portfolio-info h3 {
    margin-bottom: 10px;
}

.portfolio-info p {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.portfolio-links {
    display: flex;
    gap: 15px;
}

.portfolio-links a {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--primary);
    margin-right: 15px;
    min-width: 24px;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

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

/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding: 40px 0 20px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

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

.copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero-image {
        width: 40%;
    }
    
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-outline {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        margin-left: auto;
        z-index: 100;
    }
    
    nav ul {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: var(--transition);
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .hero {
        text-align: center;
        padding-top: 80px;
    }
    
    .hero-content {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .hero-image {
        display: none;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.3rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .hero-btns {
        flex-direction: column;
    }
}