/* ===== CSS Variables ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #0f172a;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --dark-gray: #334155;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.text-primary {
    color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

/* ===== Navigation ===== */
.navbar {
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-toggler {
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    padding: 0.5rem;
    background: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.nav-link {
    font-weight: 500;
    color: var(--secondary-color) !important;
    margin: 0 0.75rem;
    position: relative;
    padding: 0.5rem 0 !important;
    transition: var(--transition);
}

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

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

/* ===== Hero Section ===== */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, #f6f7ff 0%, #edf2ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(45deg, transparent 70%, rgba(99, 102, 241, 0.1));
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-color);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-10deg);
    transition: var(--transition);
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(-5deg);
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.2), transparent);
    z-index: 1;
}

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

.hero-image:hover img {
    transform: scale(1.05);
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
}

.floating-element.element-1 {
    top: 20%;
    left: -25px;
    animation-delay: 0s;
}

.floating-element.element-2 {
    top: 60%;
    right: -25px;
    animation-delay: 2s;
}

.floating-element.element-3 {
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.company-badge {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.company-badge:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* ===== Buttons ===== */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

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

/* ===== About Section ===== */
.about-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

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

.experience-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    margin-bottom: 1rem;
}

.skill-badge {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    border: none;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1.5rem;
    width: 2px;
    height: calc(100% + 1rem);
    background: rgba(99, 102, 241, 0.2);
}

.timeline-item:last-child::after {
    display: none;
}

/* ===== Skills Section ===== */
.skill-category {
    margin-bottom: 3rem;
}

.skill-category h4 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.skill-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ===== Projects Section ===== */
.project-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

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

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

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

.project-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== Contact Section ===== */
.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.contact-item small {
    display: block;
    color: var(--gray-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.contact-item div {
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

.contact-form .form-control {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

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

/* ===== Footer ===== */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer .text-gray {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .hero {
        padding: 150px 0 80px;
    }
    
    .hero-image {
        transform: none;
        margin-top: 3rem;
    }
    
    .floating-elements {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .about-card,
    .skill-item {
        padding: 2rem;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .nav-link {
        margin: 0 0.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn-primary,
    .btn-outline {
        padding: 0.875rem 1.5rem;
        width: 100%;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .company-badge {
        width: 100%;
        text-align: center;
    }
}