/* CSS Variables based on JSON theme */
:root {
    --background: #0F172A;
    --surface: #1E293B;
    --primary: #3B82F6;
    --secondary: #06B6D4;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --accent-blue: #1E40AF;
    --accent-green: #059669;
    --accent-red: #DC2626;
    --border-radius: 16px;
    --card-padding: 24px;
    --box-shadow: 0px 10px 15px -3px rgba(0,0,0,0.05);
    --button-bg: #5D65F9;
    --button-text: #FFFFFF;
    --button-radius: 12px;
    --button-padding: 12px 24px;
    --button-shadow: 0px 4px 6px -1px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Container for centering content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    font-size: 1rem;
    font-weight: 400;
}

/* Navigation */
.navbar {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

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

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

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

/* Hero Section */
.hero-section {
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

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

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

.hero-greeting {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

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

.hero-buttons {
    margin-top: 2rem;
}

.btn {
    padding: var(--button-padding);
    border-radius: var(--button-radius);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0px 8px 20px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0px 8px 20px rgba(59, 130, 246, 0.3);
}

.profile-placeholder {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--surface), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--box-shadow);
}

.profile-placeholder i {
    font-size: 8rem;
    color: var(--text-primary);
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 5px solid transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary)) padding-box,
                linear-gradient(135deg, var(--primary), var(--secondary)) border-box;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.code-background-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, var(--surface), var(--secondary));
    padding: 10px;
}

.code-background-image:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* About Section */
.about-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
}

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

.about-stats {
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-placeholder-large {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--surface), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--box-shadow);
}

.profile-placeholder-large i {
    font-size: 10rem;
    color: var(--text-primary);
}

/* Education Section */
.education-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.education-item {
    background: rgba(30, 41, 59, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.education-item:hover::before {
    left: 100%;
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.education-item h4 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-item .institution {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.education-item .location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.education-item .period {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Experience Section */
.experience-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.experience-item {
    background: rgba(30, 41, 59, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.experience-item:hover::before {
    left: 100%;
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.experience-header h4 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.experience-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.experience-meta span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.experience-meta .company {
    color: var(--text-primary);
    font-weight: 500;
}

.experience-meta .period {
    color: var(--accent);
    font-weight: 500;
}

.responsibilities {
    list-style: none;
    padding: 0;
    margin: 0;
}

.responsibilities li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.responsibilities li::before {
    content: '▸';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Skills Section */
.skills-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.skill-category {
    background: rgba(30, 41, 59, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.skill-category:hover::before {
    left: 100%;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

.skill-tag {
    background-color: var(--primary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--accent-blue);
    transform: scale(1.05);
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.project-card {
    background: rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
}

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

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech {
    background-color: var(--surface);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--secondary);
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.contact-invitation {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.contact-info {
    background: rgba(30, 41, 59, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.contact-info:hover::before {
    left: 100%;
}

.contact-item {
    text-align: center;
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary);
}

/* New Contact Info Style */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info .contact-info {
    background: rgba(30, 41, 59, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info .contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.contact-info .contact-info:hover::before {
    left: 100%;
}

.contact-info .contact-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-info .contact-info i {
    font-size: 2rem;
    color: var(--primary);
    min-width: 50px;
}

.contact-info .contact-info h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info .contact-info p {
    color: var(--text-secondary);
    margin: 0;
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .profile-placeholder {
        width: 250px;
        height: 250px;
    }
    
    .profile-placeholder-large {
        width: 300px;
        height: 300px;
    }
    
    .profile-placeholder i {
        font-size: 6rem;
    }
    
    .profile-placeholder-large i {
        font-size: 8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .profile-placeholder {
        width: 200px;
        height: 200px;
    }
    
    .profile-placeholder-large {
        width: 250px;
        height: 250px;
    }
    
    .profile-placeholder i {
        font-size: 4rem;
    }
    
    .profile-placeholder-large i {
        font-size: 6rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
} 

/* Responsive Design Improvements */

/* Mobile First Approach - Completely Rewritten */
@media (max-width: 768px) {
    /* Reset and base styles */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding: 80px 0 40px 0 !important;
        min-height: auto !important;
        text-align: center;
    }
    
    .hero-section .row {
        flex-direction: column-reverse;
    }
    
    .hero-content {
        padding: 0 15px;
        text-align: center;
    }
    
    .hero-image {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-location {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-summary {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.5rem !important;
        text-align: left !important;
        padding: 0 10px;
    }
    
    .profile-image {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto !important;
    }
    
    /* Buttons Mobile */
    .hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100%;
        padding: 0 15px;
    }
    
    .hero-buttons .btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Sections Mobile */
    .about-section,
    .education-section,
    .experience-section,
    .skills-section,
    .projects-section,
    .contact-section {
        padding: 40px 0 !important;
    }
    
    /* Section Titles Mobile */
    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* About Section Mobile */
    .about-section .row {
        flex-direction: column-reverse;
    }
    
    .about-image {
        margin-top: 2rem;
        text-align: center;
    }
    
    .code-background-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .about-description {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        text-align: left !important;
    }
    
    .about-highlights {
        font-size: 0.9rem !important;
        padding-left: 1.5rem !important;
    }
    
    .about-highlights li {
        margin-bottom: 0.5rem !important;
    }
    
    /* Cards Mobile */
    .education-item,
    .experience-item,
    .project-card,
    .skill-category {
        margin-bottom: 1rem !important;
        padding: 1.25rem !important;
    }
    
    .education-item h4,
    .experience-item h3,
    .project-card h3 {
        font-size: 1.1rem !important;
    }
    
    .education-item p,
    .experience-item p,
    .project-card p {
        font-size: 0.9rem !important;
    }
    
    /* Skills Section Mobile */
    .skill-category h3 {
        font-size: 1.1rem !important;
    }
    
    .skill-tag {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.8rem !important;
        margin: 0.25rem !important;
    }
    
    /* Contact Info Mobile */
    .contact-section .contact-info {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }
    
    .contact-item {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    /* Navbar Mobile */
    .navbar {
        padding: 0.5rem 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    .navbar-collapse {
        background: var(--surface) !important;
        padding: 1rem !important;
        margin-top: 0.5rem !important;
        border-radius: 8px !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        text-align: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Footer Mobile */
    footer {
        padding: 2rem 1rem !important;
        text-align: center !important;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 3rem !important;
    }
    
    .profile-image {
        width: 280px !important;
        height: 280px !important;
    }
    
    .hero-buttons {
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        padding: 0.75rem 1.5rem;
    }
}

/* Large Screens */
@media (min-width: 1025px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-content {
        padding-right: 2rem;
    }
    
    .hero-image {
        padding-left: 2rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-location {
        font-size: 0.85rem !important;
    }
    
    .hero-summary {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    .profile-image {
        width: 180px !important;
        height: 180px !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .container {
        padding: 0 0.75rem !important;
    }
    
    .hero-buttons .btn {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
    }
    
    .about-description {
        font-size: 0.9rem !important;
    }
    
    .about-highlights {
        font-size: 0.85rem !important;
    }
    
    .education-item,
    .experience-item,
    .project-card {
        padding: 1rem !important;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .profile-image {
        width: 180px !important;
        height: 180px !important;
    }
}

/* Print Styles */
@media print {
    .hero-section {
        min-height: auto;
        background: white !important;
    }
    
    .profile-image {
        filter: grayscale(100%);
    }
    
    .btn {
        display: none !important;
    }
} 

/* Additional Responsive Improvements */

/* Mobile Typography Improvements */
@media (max-width: 768px) {
    /* Better text readability on mobile */
    .hero-summary {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
        text-align: justify;
        hyphens: auto;
    }
    
    .about-description {
        font-size: 1rem !important;
        line-height: 1.7 !important;
        text-align: justify;
    }
    
    /* Improve card spacing */
    .education-item,
    .experience-item,
    .project-card,
    .skill-category {
        margin-bottom: 1.5rem !important;
        padding: 1.25rem !important;
    }
    
    /* Better button spacing */
    .hero-buttons {
        gap: 1rem !important;
        margin-top: 2rem !important;
    }
    
    .hero-buttons .btn {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
    }
    
    /* Improve section spacing */
    .hero-section,
    .about-section,
    .education-section,
    .experience-section,
    .skills-section,
    .projects-section,
    .contact-section {
        padding: 3rem 0 !important;
    }
    
    /* Better navbar on mobile */
    .navbar {
        padding: 0.75rem 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
    }
    
    /* Improve contact info layout */
    .contact-info {
        padding: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .contact-info i {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Extra Small Mobile Improvements */
@media (max-width: 576px) {
    .hero-summary {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
    
    .about-description {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    .hero-buttons .btn {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
    }
    
    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .container {
        padding: 0 0.75rem !important;
    }
    
    /* Improve project cards */
    .project-card h3 {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .project-card p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    /* Improve skill tags */
    .skill-tag {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.8rem !important;
        margin: 0.25rem !important;
    }
}

/* Landscape Mobile Optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 1.5rem 0 !important;
        min-height: auto !important;
    }
    
    .hero-content {
        margin-top: 1rem !important;
    }
    
    .hero-image {
        margin-bottom: 1rem !important;
    }
    
    .profile-image {
        width: 150px !important;
        height: 150px !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .hero-summary {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-summary {
        font-size: 1.05rem !important;
        line-height: 1.7 !important;
    }
    
    .about-description {
        font-size: 1.1rem !important;
        line-height: 1.7 !important;
    }
    
    .hero-buttons {
        gap: 1.5rem !important;
    }
    
    .hero-buttons .btn {
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
    }
}

/* Performance Optimizations */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .fade-in {
        animation-duration: 0.6s !important;
    }
    
    /* Optimize background animation */
    #background-animation {
        opacity: 0.7 !important;
    }
    
    /* Improve touch targets */
    .nav-link,
    .btn {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Accessibility Improvements */
@media (max-width: 768px) {
    /* Better focus indicators */
    .btn:focus,
    .nav-link:focus {
        outline: 2px solid var(--primary) !important;
        outline-offset: 2px !important;
    }
    
    /* Improve color contrast */
    .hero-summary,
    .about-description {
        color: var(--text-primary) !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    }
} 

/* Final Mobile Optimizations */

/* Ensure proper viewport handling */
@media (max-width: 768px) {
    /* Force proper text rendering */
    .hero-summary,
    .about-description,
    .hero-title,
    .hero-subtitle {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
    
    /* Improve touch scrolling */
    .hero-section,
    .about-section,
    .education-section,
    .experience-section,
    .skills-section,
    .projects-section,
    .contact-section {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Better image handling */
    .profile-image {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    
    /* Improve button accessibility */
    .btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Better form elements */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hero-summary,
    .about-description {
        color: #F8FAFC !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .btn,
    .profile-image,
    .education-item,
    .experience-item,
    .project-card,
    .skill-category {
        animation: none !important;
        transition: none !important;
    }
    
    #background-animation {
        display: none !important;
    }
}

/* Print styles */
@media print {
    .hero-section {
        min-height: auto !important;
        page-break-after: always;
    }
    
    .profile-image {
        filter: grayscale(100%);
        max-width: 200px;
    }
    
    .btn {
        display: none !important;
    }
    
    #background-animation {
        display: none !important;
    }
    
    .navbar {
        display: none !important;
    }
}

/* Global Performance Optimizations */
html {
    scroll-behavior: auto; /* Changed to auto for faster scrolling */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed; /* Changed for better performance */
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden !important;
    width: 100%;
    /* Improve scrolling performance */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
}

/* Smooth Scrolling */
section {
    scroll-margin-top: 80px;
}

/* Hardware Acceleration - Optimized */
.btn,
.profile-image,
.education-item,
.experience-item,
.project-card,
.skill-category,
.navbar,
section {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

/* GPU Acceleration for sections */
section {
    will-change: scroll-position;
    contain: layout style paint;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent Horizontal Scroll */
.container-fluid,
.row {
    max-width: 100%;
    overflow-x: hidden;
}

/* Better Touch Response */
a,
button,
.btn,
.nav-link {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.3);
    cursor: pointer;
}

/* Smooth Transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

a, button {
    touch-action: manipulation;
}

/* Ultra Performance Mode */
#background-animation {
    will-change: opacity;
    transition: opacity 0.3s ease;
}

/* Optimize all animations */
.fade-in {
    animation-duration: 0.3s !important;
}

/* Remove unnecessary transitions during scroll */
.hero-section,
.about-section,
.education-section,
.experience-section,
.skills-section,
.projects-section,
.contact-section {
    transition: none;
}

/* Optimize Bootstrap containers */
.container,
.container-fluid {
    will-change: contents;
}

/* Reduce repaints */
.card,
.education-item,
.experience-item,
.project-card {
    isolation: isolate;
}

/* Critical CSS for instant rendering */
.hero-section {
    content-visibility: auto;
}

.about-section,
.education-section,
.experience-section,
.skills-section,
.projects-section,
.gallery-section,
.contact-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* Portfolio Gallery Section */
.gallery-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--background), var(--surface));
    position: relative;
    z-index: 1;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    aspect-ratio: 4/3;
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(6, 182, 212, 0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
    padding: 0 1rem;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.gallery-overlay i {
    font-size: 2rem;
    color: white;
    animation: pulse 2s infinite;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

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

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(59, 130, 246, 0.5);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.5); }
    to { transform: scale(1); }
}

/* Project Features List */
.project-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.project-features li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.project-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* New Projects Showcase Layout */
.projects-showcase {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.project-item:hover::before {
    left: 100%;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Project Visual */
.project-visual {
    flex: 0 0 300px;
    position: relative;
}

.project-image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    padding: 1rem;
}

.project-image-container img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 16px;
}

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

.project-item:hover .project-image-container img {
    transform: scale(1.05);
}

/* Project Content */
.project-content {
    flex: 1;
    padding-left: 1rem;
}

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

.project-header h3 {
    color: var(--primary);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.project-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.project-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Responsive Design for New Project Layout */
@media (max-width: 768px) {
    .projects-showcase {
        gap: 1.5rem;
    }
    
    .project-item {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .project-visual {
        flex: none;
        width: 100%;
        max-width: 300px;
    }
    
    .project-image-container img {
        height: 150px;
    }
    
    .project-content {
        padding-left: 0;
    }
    
    .project-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-header h3 {
        font-size: 1.3rem;
    }
    
    .project-stats {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .project-item {
        padding: 1rem;
    }
    
    .project-image-container img {
        height: 120px;
    }
    
    .project-header h3 {
        font-size: 1.2rem;
    }
    
    .project-stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
}

/* Project Actions */
.project-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.project-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-actions .btn i {
    font-size: 1rem;
}

.project-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Gallery Mobile Responsive */
@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-item {
        margin-bottom: 1rem;
    }
    
    .gallery-overlay h4 {
        font-size: 1rem;
    }
    
    .gallery-overlay p {
        font-size: 0.8rem;
    }
    
    .gallery-overlay i {
        font-size: 1.5rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 8px 15px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}