/* Modern Color Scheme - Updated */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #1e40af;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px 0 rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 10px 28px 0 rgba(15, 23, 42, 0.15);
    --shadow-xl: 0 20px 40px 0 rgba(15, 23, 42, 0.2);
    --shadow-2xl: 0 30px 60px 0 rgba(15, 23, 42, 0.3);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-subtle: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --academic-blue: #3b82f6;
    --academic-gray: #475569;
    --success-green: #10b981;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15), transparent 40%),
                radial-gradient(circle at 80% 30%, rgba(255,255,255,0.1), transparent 35%),
                linear-gradient(135deg, #0b0f19 0%, #111827 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader.hidden + * {
    /* Ensure content below is accessible once loader is hidden */
    pointer-events: auto;
}

.loader-content {
    text-align: center;
    color: #f8fafc;
    padding: 2rem 2.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.loader-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 1.5rem;
}

.loader-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
    animation: dotBounce 1s ease-in-out infinite;
}

.loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.loader-dots span:nth-child(3) { animation-delay: 0.3s; }
.loader-dots span:nth-child(2) { background: #e5e7eb; }
.loader-dots span:nth-child(3) { background: #cbd5e1; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-10px); opacity: 1; }
}

.loader-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(59, 130, 246, 0.1);
    z-index: 9998;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Achievement Badge Animation */
.achievement-badge {
    position: relative;
}

.achievement-badge .counter {
    display: inline;
    font-weight: 700;
}

.counter-suffix {
    font-weight: 700;
    display: inline;
    margin-left: 0.15rem;
}

.achievement-badge.animated {
    animation: badgePop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dark Theme Variables - Modern */
[data-theme="dark"] {
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #475569;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 28px 0 rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px 0 rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 30px 60px 0 rgba(0, 0, 0, 0.7);
    --academic-blue: #60a5fa;
    --academic-gray: #cbd5e1;
    --success-green: #34d399;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.875rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-secondary);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
    letter-spacing: 0.03em;
}

.btn-primary:hover i {
    transform: scale(1.2);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover i {
    transform: scale(1.2);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.98) 50%,
        rgba(241, 245, 249, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, 
        transparent 0%,
        rgba(59, 130, 246, 0.2) 25%,
        rgba(139, 92, 246, 0.2) 75%,
        transparent 100%) 1;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(59, 130, 246, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .navbar {
    background: linear-gradient(135deg,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(30, 41, 59, 0.92) 100%);
    border-image: linear-gradient(90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.3) 50%,
        transparent 100%) 1;
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    position: relative;
}

.nav-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, 
        rgba(59, 130, 246, 0.03) 0%, 
        transparent 70%);
    pointer-events: none;
}

.nav-logo a {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, 
        var(--academic-blue) 0%,
        #8b5cf6 50%,
        #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.05em;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
}

.nav-logo a:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.925rem;
    letter-spacing: 0.01em;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.12) 0%,
        rgba(139, 92, 246, 0.12) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

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

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.nav-link.active {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.15) 0%,
        rgba(139, 92, 246, 0.15) 100%);
    color: var(--primary-color);
    box-shadow: 
        inset 0 1px 2px rgba(59, 130, 246, 0.2),
        0 2px 8px rgba(59, 130, 246, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 50%;
    height: 2.5px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--academic-blue) 50%,
        transparent 100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    background: linear-gradient(90deg,
        rgba(59, 130, 246, 0.5) 0%,
        var(--academic-blue) 50%,
        rgba(59, 130, 246, 0.5) 100%);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--academic-blue);
    color: white;
    transform: rotate(180deg);
    box-shadow: var(--shadow-sm);
}

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

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

/* Hero Section - Modern */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f3e8ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    position: relative;
    z-index: 2;
    max-width: 650px;
    transition: all 0.3s ease;
}

.hero-content:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.15);
    transform: translateY(-5px);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

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

.highlight::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--academic-gray);
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    max-width: 550px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease;
    position: relative;
    z-index: 2;
}

.profile-card {
    position: relative;
    width: 320px;
    height: 320px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    padding: 16px;
    box-shadow: var(--shadow-xl);
}

.profile-image {
    position: relative;
    z-index: 2;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--border-color);
    width: 100%;
    height: 100%;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.profile-card:hover .profile-image img {
    transform: scale(1.02);
}

.profile-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: 1;
    opacity: 0.1;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
}

/* Section Styles */
section {
    padding: 120px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    animation: slideInDown 0.6s ease-out;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    transition: width 0.3s ease, box-shadow 0.3s ease;
}

/* About Section */
.about {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    justify-items: stretch;
}

.about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.about-text p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
}

.stat {
    text-align: center;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(59, 130, 246, 0.12);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.stat:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.15);
}

.stat::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.stat:hover::before {
    opacity: 0.05;
}

.stat:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat h3 {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    word-spacing: 0.1em;
}

.stat p {
    color: var(--text-secondary);
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    /* Use object-fit and max-width for better control */
    object-fit: cover;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* Skills Section */
/* Skills Logo Slideshow - Subtle Design */
.skills-slideshow {
    margin: 3rem 0 4rem;
    overflow: hidden;
    background: rgba(59, 130, 246, 0.02);
    border-radius: 16px;
    padding: 2.5rem 0;
    position: relative;
}

.skills-slideshow::before,
.skills-slideshow::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.skills-slideshow::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-secondary) 0%, transparent 100%);
}

.skills-slideshow::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg-secondary) 0%, transparent 100%);
}

.slideshow-track {
    display: flex;
    gap: 2rem;
    animation: scroll 40s linear infinite;
    width: max-content;
}

.slideshow-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.skill-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 120px;
    padding: 1.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.04);
}

.skill-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.06) 0%, 
        rgba(139, 92, 246, 0.06) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-logo:hover::before {
    opacity: 1;
}

.skill-logo i {
    font-size: 2.75rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    opacity: 0.85;
}

.skill-logo span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

.skill-logo:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.15);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.08);
}

.skill-logo:hover i {
    opacity: 1;
    transform: scale(1.08);
}

.skill-logo:hover span {
    color: var(--text-primary);
    opacity: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--academic-blue);
}

.skill-category h3 {
    color: var(--academic-blue);
    margin-bottom: 1.25rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.75rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(59, 130, 246, 0.12);
    border-radius: 18px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.skill-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.skill-item:hover::before {
    opacity: 1;
}

.skill-item:hover {
    color: white;
    transform: translateY(-10px) scale(1.08);
    box-shadow: 0 16px 32px rgba(59, 130, 246, 0.3);
    border-color: var(--primary-color);
}

.skill-item i {
    font-size: 2.2rem;
    margin-bottom: 0.85rem;
    color: var(--primary-color);
    transition: all 0.35s ease;
}

.skill-item:hover i {
    color: white;
    transform: rotate(-12deg) scale(1.25);
}

.skill-item span {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.01em;
}

/* Experience Section */
.experience {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 120px 0;
}

.experience-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
    border-radius: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3.5rem;
    padding-left: 100px;
    animation: fadeInUp 0.8s ease-out both;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.4s;
}

.timeline-marker {
    position: absolute;
    left: 13px;
    top: 0;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: 50%;
    border: 4px solid var(--bg-secondary);
    z-index: 2;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.15);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
    background: var(--gradient-secondary);
}

.timeline-content {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

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

.timeline-item:hover .timeline-content::before {
    left: 0;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.15);
    border-color: var(--academic-blue);
}

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

.timeline-date {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.timeline-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    color: var(--primary-color);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.timeline-content h4 {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-content h4 i {
    color: var(--primary-color);
    font-size: 0.95rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tag {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
}

.timeline-item:hover .skill-tag {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* Certifications Section */
.certifications {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 100px 0;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: left 0.3s ease;
}

.cert-card:hover::before {
    left: 0;
}

.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

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

.cert-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cert-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.cert-issuer {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.5rem 0 0.25rem 0;
}

.cert-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

.cert-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.cert-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    color: #3b82f6;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.cert-card:hover .cert-tag {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-color: transparent;
}

.cert-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.cert-link:hover {
    color: #8b5cf6;
    transform: translateX(4px);
}

/* Coding Profiles Section */
.profiles {
    background: var(--bg-primary);
    padding: 100px 0;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.profiles .profile-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

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

.profiles .profile-card:hover::before {
    left: 0;
}

.profiles .profile-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--academic-blue);
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.platform-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--academic-blue);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.profile-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.profiles .profile-card:hover .profile-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-secondary);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.3);
}

.profiles .profile-card h3 {
    color: var(--text-primary);
    margin: 0.75rem 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.profiles .profile-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
    flex-grow: 1;
}

.profile-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--gradient-primary);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: 2px solid transparent;
    width: fit-content;
    margin: 0 auto;
    font-size: 0.95rem;
}

.profile-link:hover {
    background: var(--gradient-secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    color: white;
}

.profile-link i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.profile-link:hover i {
    transform: translateX(4px);
}


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

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

.contact-info p {
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.contact-methods {
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
}

.contact-method h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
}

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

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

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

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

.contact-form {
    background: var(--bg-primary);
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.embedded-form {
    width: 100%;
    height: 520px;
    border: 0;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--academic-blue);
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
/* ========================================
   MINIMAL FOOTER STYLES
======================================== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 100%;
}

/* Footer Top */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
}

.footer-brand {
    flex: 1;
}

.footer-logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
}

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

/* Footer Social */
.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Footer Divider */
.footer-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.footer-visitor {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-visitor i.fa-users {
    color: var(--primary-color);
    font-size: 1rem;
}

.footer-visitor span {
    font-weight: 500;
}

#footer-visitor-count {
    color: var(--primary-color);
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

#footer-visitor-count i.fa-spinner {
    color: var(--primary-color);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 0 1.25rem;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding-bottom: 1.25rem;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        padding-top: 1.25rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 1.25rem 0 1rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

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

    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .footer-copyright,
    .footer-visitor {
        font-size: 0.8rem;
    }
}

/* Animations */
/* Grouping animations to reduce repetition */
.hero-content,
.hero-image,
.profile-card,
.stat,
.skill-category,
.timeline-content,
.profiles .profile-card,
.social-link {
    transition: all 0.3s ease;
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    to {
        transform: rotate(360deg);
    }
}

@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 float {

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

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

@keyframes underline {

    0%,
    100% {
        width: 0;
    }

    50% {
        width: 100%;
    }
}

/* Responsive Design - No changes, this is already well-structured and follows best practices */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

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

    .nav-toggle {
        display: flex;
    }

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

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

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

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        padding: 1.75rem;
    }

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

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

    .profile-card {
        width: 260px;
        height: 260px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-slideshow {
        margin: 2.5rem 0 3rem;
        padding: 2.5rem 0;
        border-radius: 20px;
    }

    .slideshow-track {
        gap: 2rem;
    }

    .skill-logo {
        min-width: 120px;
        padding: 1.5rem 1.25rem;
    }

    .skill-logo i {
        font-size: 3rem;
    }

    .skill-logo span {
        font-size: 0.85rem;
    }

    .skill-logo:hover {
        transform: translateY(-12px) scale(1.12) rotate(-2deg);
    }

    .about-text {
        text-align: center;
        align-items: center;
    }

    .about-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .stat {
        padding: 1.5rem;
        min-height: 140px;
    }

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

    .stat p {
        font-size: 0.9rem;
    }

    .skill-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .skill-item {
        padding: 1.25rem;
        min-height: auto;
    }

    .skill-item i {
        font-size: 1.5rem;
    }

    .skill-item span {
        font-size: 0.85rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .skill-category h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .experience-timeline {
        padding-left: 20px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-marker {
        left: 10px;
    }

    .experience-timeline::before {
        left: 20px;
    }

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

    .skills-slideshow {
        margin: 2rem 0 2.75rem;
        padding: 2rem 0;
        border-radius: 18px;
    }

    .slideshow-track {
        gap: 1.75rem;
    }

    .skill-logo {
        min-width: 100px;
        padding: 1.25rem 1rem;
    }

    .skill-logo i {
        font-size: 2.75rem;
    }

    .skill-logo span {
        font-size: 0.8rem;
    }

    .skill-logo:hover {
        transform: translateY(-10px) scale(1.08) rotate(-1deg);
    }

    .profiles-grid {
        display: flex;
        /* Using flexbox for better mobile control */
        flex-direction: column;
        /* Stack cards vertically */
        gap: 1.5rem;
        /* Add consistent spacing */
        margin-top: 2rem;
    }

    .profiles .profile-card {
        /* Override grid-based styling to fit flexbox model */
        width: 100%;
        /* Reset minmax for mobile */
        padding: 1.5rem;
        /* Adjust padding for mobile screens */
        box-shadow: var(--shadow-md);
    }

    .profile-link {
        margin-top: auto;
        /* Pushes the button to the bottom */
    }

    .skill-items {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

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

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

    html {
        font-size: 14px;
    }

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

    .hero-content {
        padding: 1.25rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: none;
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    /* About Section Mobile */
    .about {
        padding: 40px 0;
    }

    .about-text {
        text-align: center;
    }

    .about-text p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .stat {
        padding: 1.25rem 1rem;
        min-height: 120px;
    }

    .stat h3 {
        font-size: 1.75rem;
    }

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

    /* Skills Section Mobile */
    .skills {
        padding: 40px 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .skill-category {
        padding: 1rem;
        border-radius: 8px;
    }

    .skill-category h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .skill-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .skill-item {
        padding: 0.75rem;
        min-height: auto;
        border-radius: 12px;
    }

    .skill-item i {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .skill-item span {
        font-size: 0.7rem;
        font-weight: 600;
    }

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

/* New CSS to fix the mobile layout issues */

/* Fix for profile-card overlap */
.profiles .profile-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.profile-link {
    margin-top: auto;
}

/* Ensure the nav toggle is styled correctly */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
}

/* ==================== PROJECTS SECTION ==================== */
.projects {
    background-color: var(--bg-secondary);
    padding: 80px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(59, 130, 246, 0.08);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

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

.project-card:hover::before {
    left: 0;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 24px 48px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

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

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

.project-card h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.25rem;
}

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

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

.tech-tag {
    display: inline-block;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.tech-tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transition: all 0.2s ease;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid var(--primary-color);
}

.project-link:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateX(2px);
}

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

/* Dark theme adjustments for projects */
[data-theme="dark"] .project-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .tech-tag {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .tech-tag:hover {
    background-color: var(--academic-blue);
    color: white;
    border-color: var(--academic-blue);
}

[data-theme="dark"] .project-link {
    background-color: var(--academic-blue);
    border-color: var(--academic-blue);
}

[data-theme="dark"] .project-link:hover {
    background-color: transparent;
    color: var(--academic-blue);
}

/* Responsive adjustments for projects */
@media (max-width: 768px) {
    .projects {
        padding: 60px 0;
    }

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

    .project-card {
        padding: 1.5rem;
    }

    .project-links {
        flex-direction: column;
    }

    .project-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .projects {
        padding: 40px 0;
    }

    .project-card h3 {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .project-tech {
        gap: 0.35rem;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .project-links {
        gap: 0.5rem;
    }

    .project-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Experience Section Responsive */
@media (max-width: 768px) {
    .experience {
        padding: 60px 0;
    }

    .timeline-item {
        padding-left: 80px;
        margin-bottom: 2.5rem;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        left: 10px;
    }

    .experience-timeline::before {
        left: 31px;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .timeline-content h3 {
        font-size: 1.25rem;
    }

    .timeline-content h4 {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .experience {
        padding: 40px 0;
    }

    .timeline-item {
        padding-left: 70px;
        margin-bottom: 2rem;
    }

    .timeline-marker {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        left: 6px;
    }

    .experience-timeline::before {
        left: 26px;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-date {
        font-size: 0.85rem;
    }

    .timeline-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .timeline-content h3 {
        font-size: 1.15rem;
        margin-bottom: 0.4rem;
    }

    .timeline-content h4 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .timeline-content p {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .timeline-skills {
        gap: 0.4rem;
    }

    .skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Profiles Section Responsive */
@media (max-width: 768px) {
    .profiles {
        padding: 60px 0;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-card {
        padding: 1.5rem;
    }

    .profile-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    .profile-header {
        margin-bottom: 1.25rem;
    }

    .platforms h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .profiles {
        padding: 40px 0;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-card {
        padding: 1.25rem;
    }

    .profile-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .profile-header {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .platform-badge {
        padding: 0.35rem 0.75rem;
        font-size: 0.7rem;
    }

    .profiles .profile-card h3 {
        font-size: 1.25rem;
        margin: 0.5rem 0 0.75rem;
    }

    .profiles .profile-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.6;
    }

    .profile-meta {
        gap: 0.75rem;
        padding: 0.5rem 0;
        margin-bottom: 1rem;
    }

    .meta-item {
        font-size: 0.8rem;
    }

    .profile-link {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .profiles h2 {
        font-size: 1.5rem;
    }
}

/* ==================== MODERN ANIMATIONS & UTILITY CLASSES ==================== */

/* Fade & Slide Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

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

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

/* Hero Badge */
.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(59, 130, 246, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Profile Badge */
.profile-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    animation: pulse-badge 2s ease-in-out infinite;
    gap: 4px;
    text-align: center;
    padding: 8px;
    line-height: 1.2;
    z-index: 10;
    border: 3px solid var(--bg-primary);
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 10px 40px rgba(59, 130, 246, 0.5);
    }
}

/* Logo Icon */
.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 8px;
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
    margin-right: 0.75rem;
}

.logo-link {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Category Header */
.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.category-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.category-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Contact Improvements */
.contact-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.method-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.method-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.method-content a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Social Links Enhancement */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.3);
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

