/* ===== PHONE OVERFLOW FIXES ===== */
@media only screen and (max-width: 768px) {
    html {
        overflow-x: hidden;
        
    }
    
    body {
        overflow-x: hidden;
        position: relative;
    }
    
    .container {
        overflow-x: hidden;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
        overflow-x: hidden;
        overflow-y: hidden;
    }
    
    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Hero section phone fixes */
    .hero-section {
        overflow-x: hidden !important;
        width: 100vw;
        max-width: 100vw;
        position: relative;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .hero-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
        white-space: normal;
    }
    
    .hero-subtitle {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        white-space: normal;
        text-align: center !important;
        display: block;
        width: 100%;
        justify-content: center;
        align-items: center;
    }
    
    .hero-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        white-space: normal;
    }
    
    .hero-buttons {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .hero-buttons .btn {
        flex: 1;
        max-width: 150px;
        min-width: 130px;
        margin: 5px 0;
        padding: 10px 15px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .social-links {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        justify-content: center;
    }
    
    .image-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .image-container img {
        max-width: 100%;
        height: auto;
    }
    
    /* Center typing text on mobile */
    .typing-text {
        display: inline-block !important;
        text-align: center !important;
        width: 100%;
        margin: 0 auto;
    }
    
    .hero-content {
        text-align: center !important;
    }
}

/* ===== EXTRA SMALL PHONE FIXES ===== */
@media only screen and (max-width: 480px) {
    .hero-section {
        padding: 60px 0 30px;
        overflow-x: hidden !important;
    }
    
    .hero-content {
        padding: 0 10px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem;
        text-align: center;
        display: block;
        width: 100%;
    }
    
    .hero-description {
        font-size: 0.85rem !important;
        margin-bottom: 1.5rem;
        padding: 0 5px;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .hero-buttons .btn {
        flex: 1;
        max-width: 140px;
        min-width: 120px;
        padding: 8px 15px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .social-links {
        margin-top: 1rem;
        gap: 15px;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* ===== CUSTOM PROPERTIES ===== */
:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 15px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --text-color: #f9fafb;
    --text-light: #d1d5db;
    --bg-color: #111827;
    --bg-light: #1f2937;
    --bg-dark: #030712;
    --border-color: #374151;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: all var(--transition-normal);
}

/* ===== PRELOADER ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-slow);
}

.preloader-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    padding: 1rem 0;
}

[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.95);
}

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

.brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(99, 102, 241, 0.1);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-light) 100%);
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-dark) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    height: 100%;
    z-index: -1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    animation-delay: 1s;
}

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

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
}

.typing-text {
    color: var(--primary-color);
    border-right: 2px solid var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--primary-color); }
    51%, 100% { border-color: transparent; }
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.hero-buttons .btn {
    margin-right: 1rem;
    margin-bottom: 1rem;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

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

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

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

.hero-image {
    position: relative;
    z-index: 2;
}

.image-container {
    position: relative;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-large);
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(245, 158, 11, 0.3));
    mix-blend-mode: multiply;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-down {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
    transition: all var(--transition-fast);
}

.scroll-down:hover {
    background: var(--primary-color);
    color: white;
}

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

/* ===== SECTIONS ===== */
.section-padding {
    padding: var(--section-padding);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

/* ===== ABOUT SECTION ===== */
.about-content h3 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-color);
}

.about-content .lead {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-info {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--primary-color);
}

[data-theme="dark"] .about-info {
    background: var(--bg-dark);
}

.info-item {
    display: flex;
    margin-bottom: 1rem;
}

.info-item strong {
    min-width: 100px;
    color: var(--text-color);
}

.info-item span {
    color: var(--text-light);
}

.stats-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-medium);
}

[data-theme="dark"] .stats-container {
    background: rgba(31, 41, 55, 0.8);
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: var(--font-size-xl);
}

.stat-content h3 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

/* ===== SKILLS SECTION ===== */
.skill-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    margin-bottom: 1rem;
}

.skill-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.skill-info {
    display: flex;
    align-items: center;
}

.skill-icon {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}

.skill-name {
    font-weight: 600;
    color: var(--text-color);
}

.skill-percentage {
    font-weight: 700;
    color: var(--primary-color);
}

.progress {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* ===== PROJECTS SECTION ===== */
.project-card {
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal);
    height: 100%;
}

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

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

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

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

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

.project-link:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

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

/* ===== CONTACT SECTION ===== */
.contact-form {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-medium);
}

.form-group {
    position: relative;
}

.form-control {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
    color: var(--text-color);
}

.form-control:focus {
    background: var(--bg-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

[data-theme="dark"] .footer {
    background: var(--bg-color);
    color: var(--text-color);
}

.footer-content h4 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .footer-content p {
    color: var(--text-light);
}

.footer .social-links {
    justify-content: center;
    margin-bottom: 2rem;
}

.footer .social-link {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

[data-theme="dark"] .footer .social-link {
    background: var(--bg-light);
    color: var(--text-color);
}

.footer .social-link:hover {
    background: var(--primary-color);
    color: white;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: var(--font-size-sm);
}

[data-theme="dark"] .copyright {
    color: var(--text-light);
}

/* ===== UTILITIES ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
        
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .stats-container {
        margin-top: 3rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
        height: 40px;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }
    
    .theme-toggle {
        margin: 1rem auto 0;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }
    
    .stat-content h3 {
        font-size: var(--font-size-2xl);
    }
}

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

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

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

/* ===== GLASSMORPHISM EFFECTS ===== */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .glass {
    background: rgba(31, 41, 55, 0.25);
    border: 1px solid rgba(75, 85, 99, 0.18);
}

/* ===== SCROLLBAR STYLES ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: var(--primary-color);
    color: white;
}

/* ===== PRELOADER STYLES ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.preloader-content h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    /* Preloader mobile styles */
    #preloader {
        padding: 1rem;
    }
    
    .preloader-content {
        padding: 1rem;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .preloader-content h4 {
        font-size: 1rem;
    }
    
    /* Hero section mobile improvements */
    .hero-section {
        min-height: 100vh;
        padding: 80px 0 40px;
       
    }
    
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem !important;
        height: 40px;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
    
    .hero-buttons {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .hero-buttons .btn {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 200px;
    }
    
    .social-links {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .floating-shapes .shape {
        display: none;
    }
    
    .hero-content {
        text-align: center;
        padding: 0 15px;
    }
    
    .image-container {
        margin-top: 2rem;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Additional mobile fixes */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .col-lg-6, .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Fix navbar on mobile */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
        padding: 0;
    }
    
    /* Hero content adjustments */
    .hero-content {
        padding: 0 10px;
        margin-top: 20px;
    }
    
    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.1;
        word-break: break-word;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        height: auto;
        min-height: 35px;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Small devices (portrait tablets and large phones, 600px to 768px) */
@media only screen and (min-width: 600px) and (max-width: 768px) {
    .hero-title {
        font-size: 3rem !important;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.4rem !important;
        height: 50px;
    }
    
    .hero-description {
        font-size: 1.1rem;
        max-width: 90%;
    }
    
    .hero-content {
        text-align: center;
        padding: 0 20px;
    }
    
    .image-container {
        margin-top: 2rem;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Medium devices (landscape tablets, 768px to 992px) */
@media only screen and (min-width: 768px) and (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.6rem !important;
    }
    
    .hero-content {
        padding: 0 30px;
    }
}

/* Navigation responsive fixes */
@media only screen and (max-width: 768px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.8rem 1rem;
        text-align: center;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
        margin-left: 0.5rem;
    }
}


/* ===== NAVBAR TOGGLER ICON FIX ===== */
/* Font Awesome navbar toggler icon */
.navbar-toggler {
    border: 1px solid var(--text-color);
    border-radius: 4px;
    padding: 6px 8px;
    background: transparent;
    outline: none;
    transition: all var(--transition-fast);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    border-color: var(--primary-color);
    outline: none;
}

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

.navbar-toggler i {
    color: var(--text-color) !important;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    display: block;
}

.navbar-toggler:hover i {
    color: var(--primary-color) !important;
    transform: scale(1.1);
}

.navbar-toggler:focus i {
    color: var(--primary-color) !important;
}

/* Animation when toggler is active/expanded */
.navbar-toggler[aria-expanded="true"] i {
    color: var(--primary-color) !important;
    transform: rotate(90deg);
}

/* Ensure visibility in both themes */
[data-theme="light"] .navbar-toggler {
    border-color: #333;
}

[data-theme="light"] .navbar-toggler i {
    color: #333 !important;
}

[data-theme="dark"] .navbar-toggler {
    border-color: #fff;
}

[data-theme="dark"] .navbar-toggler i {
    color: #fff !important;
}

/* ===== HOME SECTION MOBILE RESPONSIVE FIXES ===== */

/* Extra small devices (phones, 320px to 480px) */
@media only screen and (max-width: 480px) {
    #home {
        padding: 70px 0 30px;
        min-height: 100vh;
        
    }
    
    .hero-section {
        padding: 70px 0 30px;
        min-height: calc(100vh - 70px);
        overflow-x: hidden;
        overflow-y: hidden;
        overflow: hidden;
    }
    
    .hero-content {
        text-align: center;
        padding: 0 10px;
        margin-top: 10px;
        
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.1;
        margin-bottom: 0.5rem;
        word-break: break-word;
        hyphens: auto;
        overflow-x: hidden;
        overflow-y: hidden;
        overflow: hidden;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        height: auto;
        min-height: 30px;
        margin-bottom: 0.8rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1.2rem;
        padding: 0 5px;
    }
    
    .hero-buttons {
        margin-bottom: 1.2rem;
        text-align: center;
    }
    
    .hero-buttons .btn {
        font-size: 0.85rem;
        padding: 8px 16px;
        margin: 0.3rem;
        width: auto;
        min-width: 120px;
        max-width: 180px;
    }
    
    .social-links {
        justify-content: center;
        gap: 0.6rem;
        margin-top: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .image-container {
        margin-top: 1.5rem;
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Navbar improvements for small screens */
    .navbar {
        padding: 0.3rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-toggler {
        padding: 4px 6px;
        border: 1px solid var(--text-color);
        border-radius: 4px;
    }
    
    .navbar-toggler i {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
    }
}

/* Small phones (320px to 375px) */
@media only screen and (max-width: 375px) {
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
    }
    
    .hero-description {
        font-size: 0.85rem;
    }
    
    .hero-buttons .btn {
        font-size: 0.8rem;
        padding: 7px 14px;
        min-width: 110px;
        max-width: 160px;
    }
    
    .social-link {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
    
    .image-container {
        max-width: 220px;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Medium phones (375px to 480px) */
@media only screen and (min-width: 375px) and (max-width: 480px) {
    .hero-title {
        font-size: 2.1rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.05rem !important;
    }
    
    .image-container {
        max-width: 260px;
    }
}

/* Landscape phones */
@media only screen and (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 60px 0 20px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
        margin-bottom: 0.3rem;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 0.5rem;
        height: auto;
        min-height: 25px;
    }
    
    .hero-description {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-buttons {
        margin-bottom: 0.8rem;
    }
    
    .hero-buttons .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .image-container {
        max-width: 200px;
        margin-top: 1rem;
    }
}