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

:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;

}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

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

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

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

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

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    color: white;
}


.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-xl);
}

.image-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
}

.scroll-arrow {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(15px); opacity: 0.3; }
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.about-content {
    display: block;
    max-width: 900px;
    margin: 0 auto;
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}



/* Experience Section */
.experience {
    padding: var(--space-3xl) 0;
    background: var(--bg-primary);
}



/* Projects Section */
.projects {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

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

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

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

.project-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

.project-link {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-normal);
}

.project-link:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.project-content {
    padding: var(--space-xl);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tech-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: var(--space-3xl) 0;
    background: var(--bg-primary);
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
}


.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.contact-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.contact-details p {
    color: var(--text-secondary);
}

.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}


/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: var(--space-xl) 0;
}

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

.footer-social {
    display: flex;
    gap: var(--space-md);
}

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

.social-link:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: var(--space-lg);
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xl);
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    /* Navigation improvements */
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        transition: left 0.3s ease;
        z-index: 1000;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border-color);
        display: block;
        text-align: center;
    }
    
    .nav-toggle {
        display: block;
    }
    
    /* Hero section improvements */
    .hero {
        padding: 6rem 0 2rem 0 !important;
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    .hero-container {
        padding-top: 1rem !important;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 0.5rem !important;
        height: auto;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-top: -1.5rem !important;
        margin-bottom: 2rem !important;
        line-height: 1.5 !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        padding: 1rem 2rem;
    }
    
    /* About section improvements */
    .about-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .about-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    /* Experience section improvements */
    .experience {
        padding: 2rem 0;
    }
    
    .experience-full-width {
        padding: 0 1rem;
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .experience-item {
        display: block !important;
        flex-direction: column !important;
        text-align: left;
        padding: 1.5rem;
        margin-bottom: 2rem;
        max-width: 100% !important;
        width: 100% !important;
        background: var(--bg-secondary);
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .experience-visual {
        display: block !important;
        margin-bottom: 1rem;
        width: 100% !important;
        flex: none !important;
    }
    
    .experience-image {
        height: 200px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 8px;
        display: block;
        margin: 0 auto;
    }
    
    .experience-content {
        display: block !important;
        text-align: left;
        width: 100% !important;
        margin-top: 1rem;
    }
    
    .experience-header {
        margin-bottom: 1rem;
    }
    
    .experience-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .experience-company {
        font-size: 1.1rem;
        color: var(--accent-color);
        margin-bottom: 0.5rem;
    }
    
    .experience-period {
        font-size: 0.9rem;
        color: var(--text-light);
        margin-bottom: 1rem;
    }
    
    .experience-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .experience-tech {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .tech-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Force single column layout on mobile */
    .experience-item.experience-left,
    .experience-item.experience-right {
        flex-direction: column !important;
        display: block !important;
    }
    
    /* Override any inline styles that might be causing issues */
    .experience-item * {
        max-width: 100% !important;
    }
    
    /* Projects grid improvements */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .project-card {
        margin-bottom: 1rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-link {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    /* Contact section improvements */
    .contact-content {
        padding: 0 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-icon {
        margin-bottom: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .contact-details h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .contact-details p {
        font-size: 0.9rem;
    }
    
    /* General mobile improvements */
    .container {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-container {
        padding: 2rem 1rem;
    }
    
    /* Typography improvements */
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
    }
    
    p {
        line-height: 1.6;
    }
    
    /* Touch targets */
    .project-link, .nav-link, .btn, .contact-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Image optimizations */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Spacing adjustments */
    .section {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 2rem 0;
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-container {
        padding: 1.5rem 0.5rem;
    }
    
    .experience-item, .contact-item {
        padding: 1rem;
    }
    
    .experience-full-width {
        padding: 0 0.5rem;
    }
    
    .experience-item {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .experience-image {
        height: 150px !important;
    }
    
    .experience-title {
        font-size: 1.2rem;
    }
    
    .experience-company {
        font-size: 1rem;
    }
    
    .experience-description {
        font-size: 0.9rem;
    }
}