/* ===========================
   Custom CSS Variables
=========================== */
:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --tertiary-bg: #2a2a2a;
    --brand-color: #4F98CA;
    --brand-gradient: linear-gradient(135deg, #4F98CA 0%, #3A7BA8 100%);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #333333;
    --shadow-light: rgba(79, 152, 202, 0.1);
    --shadow-medium: rgba(79, 152, 202, 0.2);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --section-padding: 100px 0;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ===========================
   Utility Classes
=========================== */
.text-brand {
    color: var(--brand-color) !important;
}

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

.section-padding {
    padding: var(--section-padding);
}

/* ===========================
   Navigation Styles
=========================== */
.navbar {
    background-color: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.98) !important;
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px var(--shadow-dark);
}

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

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

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-gradient);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

/* Hire Me CTA Button in Navbar */
.hire-me-btn {
    border-radius: 25px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    margin-left: 0.5rem;
    font-size: 0.9rem !important;
}

.hire-me-btn:hover {
    background: var(--text-primary) !important;
    border-color: var(--text-primary) !important;
    color: #000000 !important;
    /* Black text for contrast */
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

/* Remove underline effect for hire me button */
.hire-me-btn::after {
    display: none !important;
}

.navbar-toggler {
    border: none !important;
    padding: 0.25rem 0.5rem;
}

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

/* ===========================
   Hero Section Styles
=========================== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(79, 152, 202, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(79, 152, 202, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(79, 152, 202, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

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

/* Initially hide hero elements to prevent flash */
.hero-subtitle,
.hero-title,
.hero-profession,
.hero-description {
    opacity: 0;
    transform: translateY(30px);
}

.hero-buttons .btn {
    opacity: 0;
    transform: translateY(30px);
}

.hero-social .social-link {
    opacity: 0;
    transform: scale(0);
}

.hero-image-wrapper {
    opacity: 0;
    transform: scale(0.9);
    /* Changed from 0.8 to 0.9 for smoother animation */
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-profession {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.hero-description {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.1rem);
    max-width: 600px;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-brand {
    background: var(--brand-gradient);
    border: none;
    color: var(--primary-bg);
}

.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-medium);
    color: var(--primary-bg);
}

.btn-outline-light {
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--text-primary);
    color: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.hero-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--tertiary-bg);
    color: var(--text-primary);
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1.2rem;
}

.hero-social .social-link:hover {
    background: var(--brand-color);
    color: var(--primary-bg);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

/* Hero Image Styles */
.hero-image-container {
    position: relative;
    max-width: 280px;
    margin: 0 auto;
    overflow: visible;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 50%;
    aspect-ratio: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--brand-color);
    /* Thinner border */
    transition: var(--transition);
}

.hero-image-bg {
    position: absolute;
    top: -15px;
    /* Reduced from -20px */
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: var(--brand-gradient);
    border-radius: 50%;
    z-index: -1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Floating Tech Items */
.floating-tech-items {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.tech-item {
    position: absolute;
    background: var(--brand-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(79, 152, 202, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation-duration: 4s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    opacity: 1;
    visibility: visible;
}

.tech-nlp {
    top: 5%;
    left: -60px;
    animation-name: floatNLP;
    animation-delay: 0s;
}

.tech-ml {
    bottom: 15%;
    left: -70px;
    animation-name: floatML;
    animation-delay: 1.5s;
}

.tech-dl {
    top: 30%;
    right: -60px;
    animation-name: floatDL;
    animation-delay: 3s;
}

@keyframes floatNLP {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }

    50% {
        transform: translate(8px, -12px) scale(1.05);
        opacity: 1;
    }
}

@keyframes floatML {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }

    50% {
        transform: translate(-5px, -15px) scale(1.05);
        opacity: 1;
    }
}

@keyframes floatDL {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }

    50% {
        transform: translate(-10px, -8px) scale(1.05);
        opacity: 1;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-link {
    display: block;
    color: var(--text-secondary);
    font-size: 1.5rem;
    text-decoration: none;
    animation: bounce 2s infinite;
    transition: var(--transition);
}

.scroll-link:hover {
    color: var(--brand-color);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* ===========================
   Section Styles
=========================== */
.section-header {
    margin-bottom: 4rem;
}

.section-subtitle {
    color: var(--brand-color);
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--brand-gradient);
    border-radius: 2px;
}

/* ===========================
   About Section Styles
=========================== */
.about-content h3 {
    color: var(--brand-color);
    font-weight: 600;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.stat-item {
    padding: 1.5rem;
    background: var(--tertiary-bg);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-light);
    border-color: var(--brand-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-info {
    padding: 2rem;
    background: var(--tertiary-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.info-item {
    align-items: center;
    color: var(--text-secondary);
}

.info-item i {
    font-size: 1.2rem;
}

.info-item strong {
    color: var(--text-primary);
}

/* ===========================
   Skills Section Styles
=========================== */
.skill-category h4 {
    color: var(--brand-color);
    font-weight: 600;
    margin-bottom: 2rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-item span {
    color: var(--text-secondary);
    font-weight: 500;
}

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

.progress-bar {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 4px;
    width: 0%;
    transition: width 1.5s ease-in-out;
}

/* ===========================
   Projects Section Styles
=========================== */
.project-card {
    background: var(--tertiary-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-light);
    border-color: var(--brand-color);
}

.project-image {
    height: 200px;
    background: var(--brand-gradient);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Different gradient for each project card */
.project-card:nth-child(1) .project-image {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
}

.project-card:nth-child(2) .project-image {
    background: linear-gradient(135deg, #0099cc 0%, #006699 100%);
}

.project-card:nth-child(3) .project-image {
    background: linear-gradient(135deg, #006699 0%, #004466 100%);
}

.project-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 1;
    transition: var(--transition);
    width: 80px;
    /* Fixed width for consistency */
    height: 80px;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card:hover .project-icon {
    transform: translate(-50%, -50%);
    /* Removed scale for consistent sizing */
    opacity: 0;
    /* Hide background icon on hover to avoid conflict */
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    /* Slightly darker for better contrast */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

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

.project-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.project-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
}

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

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 152, 202, 0.3);
}

.project-content {
    padding: 1.5rem;
}

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

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.tech-tag {
    background: var(--brand-color);
    color: var(--primary-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===========================
   Services Section Styles
=========================== */
.service-card {
    background: var(--tertiary-bg);
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-light);
    border-color: var(--brand-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--brand-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
    color: var(--primary-bg);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(360deg);
}

.service-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===========================
   Contact Section Styles
=========================== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-item {
    padding: 1.5rem;
    background: var(--tertiary-bg);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-light);
    border-color: var(--brand-color);
}

.contact-item i {
    font-size: 2.5rem;
    display: block;
}

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

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

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

.contact-social {
    margin-top: 2rem;
}

.social-link-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--tertiary-bg);
    color: var(--text-primary);
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
}

.social-link-large:hover {
    background: var(--brand-color);
    color: var(--primary-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-medium);
    border-color: var(--brand-color);
}

/* ===========================
   Footer Styles
=========================== */
.footer {
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.footer .bi-heart-fill {
    color: var(--brand-color);
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Mobile footer centering */
@media (max-width: 767.98px) {
    .footer .row>div {
        text-align: center !important;
        margin-bottom: 0.5rem;
    }

    .footer .col-md-6:last-child {
        margin-bottom: 0;
    }

    .footer p {
        font-size: 0.85rem;
    }
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ===========================
   Responsive Design
=========================== */

/* Large screens (laptops/desktops) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .hero-section {
        padding-top: 0;
    }

    .hero-image-container {
        max-width: 320px;
        /* Reduced from 350px */
    }
}

/* Medium screens (tablets) */
@media (max-width: 991.98px) {

    /* Mobile navbar hire me button */
    .hire-me-btn {
        margin-left: 0 !important;
        margin-top: 0.5rem;
        display: inline-block;
        text-align: center;
        border-radius: 20px !important;
        width: 100%;
    }

    .hero-section {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-content {
        text-align: center;
        margin-bottom: 3rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

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

    .hero-image-container {
        max-width: 220px;
        /* Smaller for better tablet balance */
        margin-bottom: 2rem;
    }

    /* Adjust floating tech items for tablet */
    .tech-item {
        font-size: 0.75rem;
        padding: 0.5rem 0.9rem;
        border-width: 1.5px;
    }

    .tech-nlp {
        top: 5%;
        left: -60px;
    }

    .tech-ml {
        bottom: 20%;
        left: -70px;
    }

    .tech-dl {
        top: 35%;
        right: -60px;
    }

    .section-padding {
        padding: 80px 0;
    }

    /* Consistent section padding for tablet */
    .section-padding .container-fluid {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    .about-info {
        margin-top: 2rem;
        padding: 1.8rem;
        /* Moderate padding for tablet */
    }
}

/* Small screens (mobile phones) */
@media (max-width: 767.98px) {
    .hero-section {
        padding: 100px 0 60px;
        /* Increased top padding to prevent nav overlap */
    }

    .hero-section .row {
        min-height: auto;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1.5rem !important;
    }

    .hero-profession {
        font-size: 1.2rem;
        margin-bottom: 1.5rem !important;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem !important;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        margin-bottom: 2rem !important;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        margin-bottom: 0.5rem;
    }

    /* Project button mobile responsiveness */
    .project-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .project-links {
        gap: 0.5rem;
    }

    .hero-image-container {
        max-width: 160px;
        /* Reduced to prevent nav overlap */
        margin-bottom: 3rem;
        /* Increased margin */
        margin-top: 2rem;
        /* Added top margin for separation */
    }

    /* Adjust floating tech items for mobile */
    .tech-item {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        border-width: 1px;
    }

    .tech-nlp {
        top: 0%;
        left: -50px;
    }

    .tech-ml {
        bottom: 15%;
        left: -60px;
    }

    .tech-dl {
        top: 30%;
        right: -50px;
    }

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

    .section-padding {
        padding: 60px 0;
    }

    /* Consistent section padding for mobile */
    .section-padding .container-fluid {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Skills section specific fixes */
    .skill-category {
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }

    /* Project and service cards */
    .project-card,
    .service-card {
        margin-bottom: 1.5rem;
    }

    /* Contact section balance */
    .contact-info .col-md-4 {
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }

    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        margin: 0;
    }

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

    .stat-item {
        padding: 1rem;
    }

    .about-info {
        padding: 1.5rem;
        /* Reduced padding for mobile */
        margin-top: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .contact-info .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 80px 0 40px;
    }

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

    .section-padding {
        padding: 50px 0;
    }

    /* Extra consistent padding for very small screens */
    .section-padding .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .service-card,
    .project-card {
        margin-bottom: 1.5rem;
    }

    .hero-image-container {
        max-width: 180px;
        /* Reduced from 200px */
    }

    .project-content {
        padding: 1rem;
    }

    .service-card {
        padding: 2rem 1rem;
    }
}

/* ===========================
   Animation Classes
=========================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
}

/* ===========================
   Custom Scrollbar
=========================== */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-color);
}

/* ===========================
   Loading Animation
=========================== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--tertiary-bg);
    border-top: 3px solid var(--brand-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* ===========================
   Print Styles
=========================== */
@media print {

    .navbar,
    .hero-buttons,
    .hero-social,
    .scroll-indicator,
    .footer {
        display: none !important;
    }

    .hero-section {
        min-height: auto;
        page-break-after: always;
    }

    .section-padding {
        padding: 2rem 0;
    }
}

/* ===========================
   Focus Styles for Accessibility
=========================== */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
}

/* ===========================
   High Contrast Mode Support
=========================== */
@media (prefers-contrast: high) {
    :root {
        --brand-color: #00ffff;
        --text-secondary: #cccccc;
        --border-color: #555555;
    }
}

/* ===========================
   Reduced Motion Support
=========================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-image-bg {
        animation: none;
    }

    .scroll-link {
        animation: none;
    }
}

/* ===========================
   Section Visibility Fix
=========================== */

/* Ensure all main content sections are visible immediately */
.section-header h2,
.section-header p,
.about-content,
.about-info,
.stat-item,
.skill-category,
.project-card,
.service-card,
.contact-item,
.social-link-large {
    opacity: 1 !important;
    transform: none !important;
}

/* ===========================
   Hero Section Responsive Fixes
=========================== */
@media (max-width: 991.98px) {
    .hero-section .row {
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-subtitle {
        margin-top: 2rem !important;
    }

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

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

/* ===========================
   Contact Section Fixes
=========================== */
.contact-text {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.contact-text a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    word-break: normal;
    /* Changed from break-all */
    white-space: nowrap;
    /* Prevent wrapping on larger screens */
}

/* Laptop specific contact improvements */
@media (min-width: 992px) {
    .contact-content {
        max-width: 1300px;
        /* Slightly reduced for better fit */
        margin: 0 auto;
    }

    .contact-info {
        max-width: 1100px;
        /* Reduced for tighter layout */
        margin: 0 auto;
        /* Bootstrap g-4 handles gaps */
    }

    .contact-text a {
        font-size: 0.85rem;
        /* Smaller font to fit better */
        white-space: normal;
        word-break: break-word;
        /* Break long email if needed */
        line-height: 1.3;
        display: block;
    }

    .contact-item {
        padding: 1.5rem 1.2rem;
        /* Reduced padding for tighter fit */
        min-height: 150px;
        /* Reduced height */
    }

    /* Single row layout for laptops - all 3 cards in one row */
    .contact-info .col-md-4 {
        flex: 0 0 calc(33.333% - 1rem);
        /* Three equal cards with gap */
        max-width: calc(33.333% - 1rem);
    }
}

@media (max-width: 767.98px) {
    .contact-text a {
        word-break: break-all;
        /* Only break on mobile */
        white-space: normal;
        font-size: 0.8rem;
    }
}

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

/* Project Card Hover Fixes - Enhanced */
.project-card {
    overflow: hidden;
    position: relative;
}

.project-card .project-icon {
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
    z-index: 3;
}

.project-card:hover .project-icon {
    transform: scale(1.2);
    opacity: 1;
    color: var(--brand-color);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

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

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

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--brand-color);
    color: var(--primary-bg);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    z-index: 7;
}

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

/* ===========================
   Full Width Layout for Laptops
=========================== */
@media (min-width: 992px) {
    .container-fluid.px-lg-5 {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
        max-width: none;
    }

    /* Better content distribution */
    .hero-content {
        padding-right: 3rem;
    }

    .hero-image-container {
        padding-left: 2rem;
    }

    /* Optimize grid layouts for full width */
    .about-content {
        padding-right: 2rem;
        /* Add right padding for separation */
    }

    .about-info {
        padding: 2rem;
        /* Restore original padding */
    }

    /* Better spacing for project cards */
    .project-card,
    .service-card {
        margin-bottom: 2rem;
    }
}

@media (min-width: 1200px) {
    .container-fluid.px-lg-5 {
        padding-left: 6rem !important;
        padding-right: 6rem !important;
    }

    .hero-content {
        padding-right: 4rem;
    }
}

@media (min-width: 1400px) {
    .container-fluid.px-lg-5 {
        padding-left: 8rem !important;
        padding-right: 8rem !important;
    }

    /* Ultra-wide screen optimizations */
    .hero-content {
        padding-right: 6rem;
    }

    .section-padding {
        padding: 120px 0;
    }
}

/* ===========================
   Professional Animations & Interactions - Simplified
=========================== */

/* Enhanced card hover animations */
.project-card,
.service-card,
.stat-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(79, 152, 202, 0.2);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(79, 152, 202, 0.15);
}

/* Enhanced button animations */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Enhanced social link animations */
.social-link,
.social-link-large {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover,
.social-link-large:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(79, 152, 202, 0.3);
}

/* Navbar scroll effect */
.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(79, 152, 202, 0.1);
}

/* Floating animation for scroll indicator */
.scroll-link {
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}