:root {
    /* Light Theme */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    --secondary-color: #06d6a0;
    --accent-color: #f59e0b;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-alt: #f1f5f9;
    --bg-card: #ffffff;
    
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --gradient-accent: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary-color: #34d399;
    --accent-color: #fbbf24;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-alt: #374151;
    --bg-card: #1f2937;
    
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
}

.theme-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-xl);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(var(--bg-primary), 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: 25px;
}

.nav-link:hover::before,
.nav-link.active::before {
    left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.1rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

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

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

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

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

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

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

.shape-4 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 20%;
    animation-delay: 6s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-text {
    animation: slideInLeft 0.8s ease-out;
}

.hero-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.title-line {
    display: block;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    animation: expandWidth 1s ease-out 1s forwards;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.stat {
    text-align: center;
}

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

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 0.8s ease-out;
}

.profile-card {
    width: 300px;
    height: 400px;
    perspective: 1000px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.profile-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.card-front {
    background: var(--gradient-primary);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-back {
    background: var(--bg-card);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.card-content {
    text-align: center;
    color: var(--text-primary);
}

.card-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

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

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    margin: 0 auto 0.5rem;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

.arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

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

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Sections */
.section {
    padding: 5rem 0;
    position: relative;
}

.bg-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* About Section */
.about-content {
    display: grid;
    gap: 4rem;
    align-items: center;
}

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

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.feature i {
    font-size: 2rem;
    color: var(--primary-color);
}

.feature h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

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

.image-container img {
    width: 300px;
    height: 400px;
    object-fit: cover;
    transition: var(--transition);
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: var(--transition);
}

.image-container:hover .image-overlay {
    opacity: 0;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

/* New professional skills list styles */
.skills-list-professional {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* Spacing between pills */
}

.skill-pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 20px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-pill:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

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

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

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

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

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

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.project-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Container for the link */
.project-link {
    margin-top: 1rem;
    display: block;
}

/* Actual link button */
/* make the button visually span the card width while preserving rounded corners and preventing overflow */
.project-link a,
a.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    /* keep the full-bleed effect but ensure predictable layout and clipping */
    width: calc(100%); /* include parent horizontal padding (1.5rem left + 1.5rem right) */
    margin: 0.5 -1.5rem; /* offset the parent .project-info padding so the button touches the card edges */
    box-sizing: border-box;
    /* preserve the card's rounded corners — only round the bottom corners if the button sits at the card bottom */
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    transition: var(--transition);
    gap: 0.35rem;
    overflow: hidden; /* ensure inner content doesn't overflow the rounded corners */
    -webkit-backface-visibility: hidden;
}

/* Hover / focus effect */
.project-link a:hover,
a.project-link:hover,
.project-link a:focus-visible,
a.project-link:focus-visible {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

/* Optional: small external-link arrow */
.project-link a::after,
a.project-link::after {
    content: '↗';
    font-size: 0.8em;
    opacity: 0.8;
}

/*------------------------------ End of Projects Section ------------------------------*/




/*______________________________ Certifications Section ______________________________ */
:root {
    --primary-color: #6366f1;
    --primary-glow: #818cf8;
    --bg-card: #ffffff;
    --bg-alt: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --neon-glow: 0 0 20px var(--primary-glow), 0 0 40px rgba(99, 102, 241, 0.3);
    --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="dark"] {
    --bg-card: #1e293b;
    --bg-alt: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.certifications-gallery {
    position: relative;
    padding: 0.5rem 0; /* Reduced padding */
    overflow: hidden;
    background: var(--bg-alt);
}

.gallery-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gallery-track {
    display: flex;
    align-items: center;
    transition: transform 0.5s ease;
    will-change: transform;
    height: 380px; /* Slightly reduced height */
}

.cert-item {
    position: relative;
    flex: 0 0 auto;
    height: 330px; /* Reduced height */
    width: auto;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.3s ease;
    cursor: pointer;
    opacity: 0.4;
}

.cert-item.active {
    opacity: 1;
    z-index: 20;
    border: 3px solid var(--primary-color);
}

.cert-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 0.8rem; /* Reduced padding */
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cert-item.active .item-overlay {
    transform: translateY(0);
}

.item-title {
    font-size: 0.75rem; /* Smaller font */
    font-weight: 700;
    text-align: center;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    margin: 0;
    line-height: 1.3;
}

.active-indicator {
    position: absolute;
    top: -8px; /* Adjusted position */
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.8rem; /* Smaller padding */
    border-radius: 20px;
    font-size: 0.7rem; /* Smaller font */
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-item.active .active-indicator {
    opacity: 1;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-3px);
    }
}

.navigation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem; /* Reduced gap */
    margin-top: 0.5rem; /* Reduced margin */
    position: relative;
    z-index: 30;
}

.nav-btn {
    width: 35px; /* Smaller buttons */
    height: 35px; /* Smaller buttons */
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: var(--shadow);
    color: var(--primary-color);
    font-size: 1rem; /* Smaller icon */
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.nav-btn:hover::before {
    opacity: 1;
}

.nav-btn:hover {
    transform: scale(1.1);
    color: white;
    border-color: transparent;
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn i {
    position: relative;
    z-index: 1;
}

.pagination-dots {
    display: flex;
    gap: 0.8rem; /* Reduced gap */
    align-items: center;
}

.pagination-dot {
    width: 8px; /* Smaller dots */
    height: 8px; /* Smaller dots */
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.4;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.pagination-dot.active {
    opacity: 1;
    background: var(--primary-color);
    transform: scale(1.3); /* Slightly smaller scale */
}

.pagination-dot.active::before {
    content: '';
    position: absolute;
    top: -3px; /* Smaller pulse area */
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 1px solid var(--primary-color); /* Thinner border */
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2); /* Smaller pulse */
        opacity: 0.5;
    }
}

/* Section header spacing */
.section-header {
    margin-bottom: 1.5rem; /* Reduced spacing below title */
}

.section-title {
    margin-bottom: 0.5rem; /* Reduced spacing between title and subtitle */
}

.section-subtitle {
    margin-bottom: 0; /* Remove extra margin */
}

/* Loading states */
.gallery-track.loading {
    opacity: 0.5;
}

.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-size: 1.5rem; /* Smaller spinner */
}

.gallery-container.loading .loading-spinner {
    display: block;
}

/* Error handling */
.cert-item.error img {
    display: none;
}

.cert-item.error::after {
    content: 'Image not available';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 0.8rem; /* Smaller font */
    text-align: center;
}

/* Responsive design */
@media (max-width: 1200px) {
    .gallery-container {
        padding: 0 3rem;
    }
    
    .cert-item {
        height: 300px;
    }
}

@media (max-width: 1024px) {
    .cert-item {
        height: 280px;
    }
    
    .item-title {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .certifications-gallery {
        padding: 1rem 0;
    }
    
    .gallery-container {
        padding: 0 2rem;
    }
    
    .cert-item {
        height: 240px;
    }
    
    .item-overlay {
        padding: 1rem 0.8rem 0.5rem;
    }
    
    .item-title {
        font-size: 0.65rem;
    }
    
    .navigation-controls {
        gap: 1.5rem;
        margin-top: 1rem;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        padding: 0 1rem;
    }
    
    .cert-item {
        height: 200px;
    }
    
    .item-overlay {
        padding: 0.8rem 0.6rem 0.4rem;
    }
    
    .item-title {
        font-size: 0.6rem;
    }
    
    .navigation-controls {
        gap: 1rem;
        margin-top: 0.8rem;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .pagination-dots {
        gap: 0.6rem;
    }
    
    .pagination-dot {
        width: 8px;
        height: 8px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-card: #1e293b;
        --bg-alt: #0f172a;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
}

body.dark-mode {
    --bg-card: #1e293b;
    --bg-alt: #0f172a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Performance optimizations */
.gallery-track {
    backface-visibility: hidden;
    perspective: 1000;
}

.cert-item {
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Category Filter Styles */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Category badges */
.category-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--gradient-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/*-------------------------End of Certifications Section-------------------------*/



/*___________________________ Contact Section ___________________________*/
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.contact-details h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-primary);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

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

.footer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-logo span {
    font-weight: 700;
    font-size: 1.2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-info p {
    color: var(--text-secondary);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

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

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

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

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

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

@keyframes expandWidth {
    to {
        transform: scaleX(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .certifications-slider {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-features {
        gap: 1rem;
    }
    
    .feature {
        padding: 1rem;
    }
    
    .profile-card {
        width: 250px;
        height: 350px;
    }
}