/* --- Base & Variables --- */
:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --primary-color: #58a6ff;
    --secondary-color: #21262d;
    --border-color: #30363d;
    --accent-color: #ff7b72;
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.3s;
    --bg-color-rgb: 13, 17, 23;
    --glass-bg: rgba(33, 38, 45, 0.8);
    --shadow-light: rgba(88, 166, 255, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #24292e;
    --primary-color: #0366d6;
    --secondary-color: #f6f8fa;
    --border-color: #e1e4e8;
    --accent-color: #d73a49;
    --bg-color-rgb: 255, 255, 255;
    --glass-bg: rgba(246, 248, 250, 0.8);
    --shadow-light: rgba(3, 102, 214, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Enhanced smooth scrolling */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    cursor: none; /* Hide default cursor */
    /* Enhanced smoothness */
    overscroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Custom Cursor --- */
.cursor {
    position: fixed;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--primary-color);
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    transform: translate(-50%, -50%);
    opacity: 0.8;
}

.cursor.hovering {
    width: 50px;
    height: 50px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    .cursor {
        display: none;
    }
}

/* --- Loader --- */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.pulsing-circle {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.5); opacity: 0.7; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5); opacity: 0.7; }
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem clamp(15px, 4vw, 5%);
    background: rgba(var(--bg-color-rgb), 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

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

.logo a {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

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

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

/* Theme Toggle */
.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: var(--primary-color);
    color: white;
}

/* Dynamic Icon display based on theme */
[data-theme="dark"] #sun-icon { display: none; }
[data-theme="light"] #moon-icon { display: none; }

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* --- Layout & Sections --- */
#main-content {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 80px clamp(15px, 4vw, 5%) 0;
    box-sizing: border-box;
}

.section {
    padding: 6rem 0;
    min-height: auto;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Buttons --- */
.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
}

.cta-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.4);
    border: 2px solid transparent;
}

.cta-primary::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.6s ease;
}

.cta-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(88, 166, 255, 0.6);
    color: #fff;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    position: relative;
}

.cta-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
    z-index: -1;
}

.cta-secondary:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.4);
}

.cta-secondary:hover::before {
    width: 100%;
}

.btn-show-all {
    margin-top: 2rem;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

/* --- Hero Section --- */
.welcome-section {
    /* Fit the hero neatly inside the viewport while accounting for fixed nav */
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    /* Responsive padding that adapts to screen size */
    padding: clamp(70px, 8vh, 80px) clamp(15px, 3vw, 40px) clamp(15px, 3vh, 30px);
    box-sizing: border-box;
    /* Ensure proper rendering on all devices */
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
    width: 100%;
}

.welcome-section::-webkit-scrollbar {
    width: 6px;
}

.welcome-section::-webkit-scrollbar-track {
    background: transparent;
}

.welcome-section::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.welcome-section::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

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

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float-orb 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(225deg, #ff7b72, #58a6ff);
    bottom: -10%;
    right: -10%;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(315deg, var(--accent-color), var(--primary-color));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    75% { transform: translate(30px, 50px) scale(1.05); }
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Floating Tech Logos */
.floating-logos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
    /* Ensure logos are always visible */
    visibility: visible;
    opacity: 1;
}

.floating-logo {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.5;
    animation: float-logo 15s infinite ease-in-out;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(88, 166, 255, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-logo:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.floating-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.6)) brightness(1.1);
    mix-blend-mode: normal;
}

/* Logo positioning - spread across the viewport */
.logo-1 { top: 15%; left: 10%; animation-delay: 0s; }
.logo-2 { top: 25%; right: 15%; animation-delay: 2s; }
.logo-3 { top: 60%; left: 8%; animation-delay: 4s; }
.logo-4 { top: 70%; right: 10%; animation-delay: 6s; }
.logo-5 { top: 35%; left: 85%; animation-delay: 1s; }
.logo-6 { top: 45%; left: 5%; animation-delay: 3s; }
.logo-7 { top: 80%; left: 50%; animation-delay: 5s; }
.logo-8 { top: 10%; right: 40%; animation-delay: 7s; }
.logo-9 { top: 50%; right: 5%; animation-delay: 1.5s; }
.logo-10 { top: 30%; left: 15%; animation-delay: 3.5s; }
.logo-11 { top: 65%; right: 20%; animation-delay: 5.5s; }
.logo-12 { top: 20%; left: 30%; animation-delay: 2.5s; }
.logo-13 { top: 75%; left: 25%; animation-delay: 4.5s; }
.logo-14 { top: 40%; right: 30%; animation-delay: 6.5s; }
.logo-15 { top: 55%; left: 70%; animation-delay: 1.8s; }
.logo-16 { top: 85%; right: 35%; animation-delay: 3.8s; }

/* Ensure logos near profile picture are more visible */
.logo-1, .logo-2, .logo-5, .logo-8, .logo-12, .logo-14 {
    opacity: 0.55 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 22px rgba(88, 166, 255, 0.3) !important;
}

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

/* Hero Content */
.hero-content {
    max-width: 100%;
    width: 100%;
    z-index: 2;
    position: relative;
    padding: clamp(0.5rem, 2vw, 1.5rem) clamp(15px, 4vw, 2rem);
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Profile Container with Glow */
.hero-profile-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    animation: pulse-glow 3s infinite ease-in-out;
}

.hero-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(88, 166, 255, 0.6), 0 0 80px rgba(88, 166, 255, 0.3);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

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

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-badge i {
    color: var(--primary-color);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    line-height: 1.1;
}

.hero-subtitle-container {
    min-height: 50px;
    margin-bottom: 0.5rem;
}

.dynamic-text {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.2;
}

.hero-description {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    max-width: min(90%, 700px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    padding: 0 clamp(10px, 2vw, 20px);
    box-sizing: border-box;
}

/* Animated Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.8rem, 2vw, 1.5rem);
    margin-bottom: 1.5rem;
    padding: clamp(0.8rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    max-width: min(95%, 600px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

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

.stat-number {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border-color);
}

/* Projects Carousel */
.hero-projects-showcase {
    margin: 1rem 0;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 clamp(10px, 3vw, 20px);
}

.showcase-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.projects-carousel {
    overflow: hidden;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    animation: scroll-carousel 30s linear infinite;
}

.carousel-card {
    flex-shrink: 0;
    width: 280px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(88, 166, 255, 0.3);
}

.carousel-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.carousel-card-title {
    display: block;
    padding: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

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

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

/* Experience Marquee */
.experience-highlights {
    margin: 1rem 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 clamp(10px, 3vw, 20px);
}

.experience-marquee {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 1rem 0;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    gap: 3rem;
    animation: marquee 25s linear infinite;
    white-space: nowrap;
}

.experience-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.experience-item i {
    color: var(--primary-color);
}

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

/* CTA Buttons */
.cta-buttons {
    margin-bottom: 1.5rem;
    display: flex;
    gap: clamp(0.6rem, 2vw, 0.8rem);
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: min(95%, 600px);
    margin-left: auto;
    margin-right: auto;
    padding: 0 clamp(10px, 3vw, 20px);
    box-sizing: border-box;
}

.btn-glow {
    position: relative;
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(88, 166, 255, 0.4), 0 0 40px rgba(88, 166, 255, 0.2); }
    50% { box-shadow: 0 0 30px rgba(88, 166, 255, 0.6), 0 0 60px rgba(88, 166, 255, 0.3); }
}

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

.cta-outline:hover {
    border-color: var(--primary-color);
    background: var(--glass-bg);
}

/* Social Links with Tooltips */
.social-links {
    display: flex;
    justify-content: center;
    gap: clamp(0.8rem, 2vw, 1rem);
    margin-bottom: 1rem;
    width: 100%;
    flex-wrap: wrap;
    padding: 0 clamp(10px, 2vw, 20px);
    box-sizing: border-box;
}

.social-link {
    font-size: 1.5rem;
    color: var(--text-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
}

.social-tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover .social-tooltip {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-light);
    border-color: var(--primary-color);
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    animation: fade-bounce 2s infinite;
    margin-top: 0.5rem;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-color);
    border-radius: 20px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% { top: 8px; opacity: 1; }
    100% { top: 25px; opacity: 0; }
}

@keyframes fade-bounce {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-10px); }
}

.scroll-indicator span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease-out 0.4s backwards;
}

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

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

/* Pulse animation for profile image on mobile */
@media (max-width: 768px) {
    .hero-img {
        animation: profilePulse 3s infinite ease-in-out;
    }

    @keyframes profilePulse {
        0%, 100% {
            box-shadow: 0 0 40px rgba(88, 166, 255, 0.6), 0 0 80px rgba(88, 166, 255, 0.3);
        }
        50% {
            box-shadow: 0 0 60px rgba(88, 166, 255, 0.8), 0 0 100px rgba(88, 166, 255, 0.4);
        }
    }

    .profile-glow {
        animation: glowPulse 3s infinite ease-in-out;
    }

    @keyframes glowPulse {
        0%, 100% {
            opacity: 0.4;
            transform: translate(-50%, -50%) scale(1);
        }
        50% {
            opacity: 0.6;
            transform: translate(-50%, -50%) scale(1.1);
        }
    }

    /* Stagger animation for stat items */
    .stat-item:nth-child(1) { animation: statFadeIn 0.6s ease-out 0.2s backwards; }
    .stat-item:nth-child(3) { animation: statFadeIn 0.6s ease-out 0.4s backwards; }
    .stat-item:nth-child(5) { animation: statFadeIn 0.6s ease-out 0.6s backwards; }
    .stat-item:nth-child(7) { animation: statFadeIn 0.6s ease-out 0.8s backwards; }

    @keyframes statFadeIn {
        from {
            opacity: 0;
            transform: translateY(20px) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    /* Carousel card hover effect enhanced for mobile touch */
    .carousel-card {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .carousel-card:active {
        transform: translateY(-8px) scale(1.03);
        border-color: var(--primary-color);
        box-shadow: 0 12px 30px rgba(88, 166, 255, 0.4);
    }

    /* Button press animation for mobile */
    .btn:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }

    /* Social link tap animation */
    .social-link:active {
        transform: translateY(-3px) scale(0.95);
    }

    /* Add shimmer effect to hero title */
    .hero-title {
        background-size: 200% auto;
        animation: shimmer 3s linear infinite;
    }

    @keyframes shimmer {
        0% {
            background-position: 0% center;
        }
        100% {
            background-position: 200% center;
        }
    }

    /* Floating animation for tech logos on mobile */
    .floating-logo {
        animation: floatMobile 12s infinite ease-in-out;
    }

    @keyframes floatMobile {
        0%, 100% {
            transform: translate(0, 0) rotate(0deg);
            opacity: 0.45;
        }
        25% {
            transform: translate(-15px, -15px) rotate(3deg);
            opacity: 0.55;
        }
        50% {
            transform: translate(0, -20px) rotate(0deg);
            opacity: 0.45;
        }
        75% {
            transform: translate(15px, -10px) rotate(-3deg);
            opacity: 0.5;
        }
    }
}

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

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.9;
}

.tech-stack {
    flex: 1;
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.tech-stack::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.tech-stack h3 {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.skills-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skills-list li::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
}

/* --- Skills Section --- */
.skills-section {
    padding: 5rem 0;
}

/* --- Education Section --- */
.education-section {
    padding: 5rem 0;
    background: radial-gradient(circle at 50% 50%, rgba(88, 166, 255, 0.03) 0%, transparent 50%);
}

.education-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

.education-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
    position: relative;
    overflow: visible;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 0;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.education-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-dark), 0 0 20px var(--shadow-light);
    border-color: var(--primary-color);
    z-index: 10;
}

.education-logo {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.education-card:hover .education-logo {
    transform: scale(1.05) rotate(3deg);
}

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

.education-content {
    flex: 1;
}

.education-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.education-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    opacity: 0.9;
}

.education-location,
.education-duration {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.education-location i,
.education-duration i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.education-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.8rem;
}

.education-status.current {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    animation: pulse-glow 2s infinite;
}

.education-status.completed {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(88, 166, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(88, 166, 255, 0.8);
    }
}

/* Education Connector (Arrow Flow) */
.education-connector {
    position: relative;
    width: 100%;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.education-card:last-child .education-connector {
    display: none;
}

.connector-line {
    width: 3px;
    height: 40px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    position: relative;
    animation: flow-down 2s infinite;
}

.connector-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    animation: bounce-arrow 2s infinite;
    margin-top: -5px;
}

@keyframes flow-down {
    0%, 100% {
        opacity: 0.5;
        transform: scaleY(0.8);
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

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

/* --- Skills Section --- */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    /* Debug: Ensure all 8 skills are visible */
    min-height: auto;
    overflow: visible;
}

/* For smaller screens, use 2 rows of 4 */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.skill-card {
    background: var(--glass-bg);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.skill-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 15px 30px var(--shadow-dark), 0 0 20px var(--shadow-light);
    border-color: var(--primary-color);
}

.skill-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px var(--shadow-light));
}

.skill-card:hover img {
    transform: scale(1.1) rotate(5deg);
}

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

/* --- Journey Section (Timeline) --- */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-container {
    padding: 15px 40px;
    position: relative;
    width: 50%;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: 4px solid var(--bg-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--shadow-light);
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -12.5px;
}

.timeline-content {
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--shadow-dark);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-date {
    display: block;
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 15px;
    font-weight: 500;
}

.timeline-content ul {
    padding-left: 20px;
    list-style: none;
}

.timeline-content li {
    margin-bottom: 8px;
    font-size: 1rem;
    position: relative;
    padding-left: 15px;
}

.timeline-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

/* --- Projects Section --- */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--glass-bg);
    color: var(--text-color);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    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);
}

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

.project-tile {
    background: var(--glass-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border-color);
    display: block;
    position: relative;
    backdrop-filter: blur(20px);
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    width: 100%;
    max-width: 380px;
}

.project-tile.hidden {
    display: none;
}

.project-tile:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-dark), 0 0 20px var(--shadow-light);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.project-info {
    padding: 2rem;
    position: relative;
}

.project-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.4;
}

.project-skills {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.project-skills i {
    font-size: 1.4rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.project-tile:hover .project-skills i {
    color: var(--accent-color);
}

/* --- Contact Section --- */
.contact-section {
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(88, 166, 255, 0.03) 0%, transparent 50%);
}

.contact-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--glass-bg);
    padding: 4rem;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.contact-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.contact-container p {
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.contact-btn {
    position: relative;
    overflow: hidden;
}

.contact-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.6s ease;
}

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

.contact-info {
    font-size: 1rem;
    opacity: 0.8;
}

.contact-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.contact-info i {
    color: var(--primary-color);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    color: var(--text-color);
}

footer .fa-heart {
    color: var(--accent-color);
}

/* --- Scroll Progress Indicator --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    z-index: 9998;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.6), 0 0 30px rgba(88, 166, 255, 0.3);
    animation: progress-shine 3s linear infinite;
}

@keyframes progress-shine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* --- Final Showcase Section --- */
.final-showcase-section {
    position: relative;
    min-height: 100vh;
    padding: 6rem 0;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(88, 166, 255, 0.05) 0%, transparent 70%);
}

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

.showcase-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: showcase-orb-float 25s infinite ease-in-out;
}

.showcase-gradient-orb.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.showcase-gradient-orb.orb-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(225deg, #ff7b72, #58a6ff);
    bottom: -20%;
    right: -10%;
    animation-delay: 8s;
}

.showcase-gradient-orb.orb-3 {
    width: 450px;
    height: 450px;
    background: linear-gradient(315deg, var(--accent-color), var(--primary-color));
    top: 50%;
    right: 20%;
    animation-delay: 15s;
}

@keyframes showcase-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 50px) scale(0.9); }
}

.showcase-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
    position: relative;
    z-index: 1;
}

.showcase-main-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-shift 5s linear infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.showcase-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-color);
    opacity: 0.9;
    font-weight: 300;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.achievement-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

.achievement-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px var(--shadow-dark), 0 0 30px var(--shadow-light);
    border-color: var(--primary-color);
}

.achievement-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.4);
    transition: transform 0.4s ease;
}

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

.achievement-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achievement-card p {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

/* Featured Experiences */
.featured-experiences {
    margin-bottom: 5rem;
}

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

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

.experience-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.experience-card:hover::before {
    transform: scaleY(1);
}

.experience-card:hover {
    transform: translateX(10px);
    box-shadow: 0 20px 40px var(--shadow-dark), 0 0 25px var(--shadow-light);
    border-color: var(--primary-color);
}

.experience-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.experience-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.experience-period {
    display: block;
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.experience-card p {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

/* Top Projects Showcase */
.top-projects-showcase {
    margin-bottom: 5rem;
}

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

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

.top-project-card {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    transition: all 0.4s ease;
}

.top-project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.top-project-card:hover img {
    transform: scale(1.15);
}

.top-project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(13, 17, 23, 0.95), transparent);
    padding: 2.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.top-project-card:hover .top-project-overlay {
    transform: translateY(0);
    opacity: 1;
}

.top-project-overlay h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.top-project-overlay p {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Final CTA */
.final-cta {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.final-cta h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.final-cta p {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 2.5rem;
}

.final-cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design for Final Showcase */
@media (max-width: 768px) {
    .final-showcase-section {
        padding: 4rem 0;
    }

    .showcase-main-title {
        font-size: 2.5rem;
    }

    .showcase-subtitle {
        font-size: 1.2rem;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .achievement-card {
        padding: 2rem 1.5rem;
    }

    .experiences-timeline {
        grid-template-columns: 1fr;
    }

    .top-projects-grid {
        grid-template-columns: 1fr;
    }

    .final-cta {
        padding: 3rem 1.5rem;
    }

    .final-cta h3 {
        font-size: 2rem;
    }

    .final-cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .final-cta-buttons .btn {
        width: 100%;
    }
}

/* --- GSAP Reveal Animations --- */
.gs_reveal {
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
}

/* Ensure project tiles are always visible by default */
.project-tile {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
}

/* Projects grid should be visible but can animate in */
.projects-grid.gs_reveal {
    opacity: 0;
    visibility: hidden;
}

/* Only hide when explicitly filtered */
.project-tile.hidden {
    opacity: 0 !important;
    transform: scale(0.8) !important;
    pointer-events: none;
    transition: all 0.3s ease;
    visibility: hidden !important;
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    #main-content {
        padding: 80px clamp(15px, 4vw, 5%) 0;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .resume-btn {
        margin-bottom: 2rem;
    }
    .hero-title {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
    }
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        justify-items: center;
        padding: 0 clamp(10px, 3vw, 20px);
    }
    /* Education Section Medium Screens */
    .education-timeline {
        max-width: min(95%, 600px);
        padding: 0 clamp(15px, 4vw, 20px);
    }
    
    .education-card {
        padding: clamp(1.5rem, 3vw, 2rem);
    }

    /* Hero Section Tablet */
    .floating-logo {
        width: 50px;
        height: 50px;
        opacity: 0.45;
    }

    .hero-stats {
        gap: clamp(1rem, 2vw, 1.5rem);
        padding: clamp(1rem, 2vw, 1.5rem);
        max-width: min(95%, 600px);
    }

    .stat-number {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }

    .carousel-card {
        width: clamp(200px, 30vw, 240px);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .welcome-section {
        /* On shorter mobile viewports, further compress spacing */
        min-height: 100vh;
        max-height: 100vh;
        padding: clamp(60px, 10vh, 70px) clamp(10px, 4vw, 15px) clamp(15px, 3vh, 20px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        /* Ensure content is always visible */
        position: relative;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        width: 100%;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 0.5rem clamp(10px, 3vw, 1rem);
    }

    /* Ensure floating logos container is visible on mobile */
    .floating-logos {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
        letter-spacing: -1px;
        line-height: 1.1;
        margin-bottom: 0.3rem;
    }

    .hero-img {
        width: clamp(120px, 25vw, 160px);
        height: clamp(120px, 25vw, 160px);
        margin-bottom: 0.8rem;
    }

    .profile-glow {
        width: clamp(180px, 30vw, 220px);
        height: clamp(180px, 30vw, 220px);
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        margin-bottom: 0.8rem;
    }

    .dynamic-text {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
        min-height: 40px;
        line-height: 1.2;
    }

    .hero-subtitle-container {
        min-height: 40px;
        margin-bottom: 0.3rem;
    }

    .hero-description {
        font-size: clamp(0.85rem, 3vw, 1rem);
        padding: 0 clamp(10px, 3vw, 20px);
        line-height: 1.5;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: clamp(0.5rem, 2vw, 0.8rem);
        padding: clamp(0.8rem, 2vw, 1rem) clamp(0.8rem, 3vw, 1rem);
        margin-bottom: 1rem;
        width: 95%;
        max-width: 95%;
        box-sizing: border-box;
    }

    .stat-item {
        flex: 1 1 45%;
        min-width: 120px;
    }

    .stat-divider {
        display: none;
    }

    .stat-number {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 0.2rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .showcase-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .carousel-card {
        width: 220px;
    }

    .carousel-card img {
        height: 140px;
    }

    .carousel-card-title {
        font-size: 0.9rem;
        padding: 0.9rem;
    }

    .experience-highlights {
        margin: 2.5rem 0;
    }

    .experience-item {
        font-size: 0.85rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: clamp(0.5rem, 2vw, 0.6rem);
        padding: 0 clamp(10px, 3vw, 15px);
        margin-bottom: 1rem;
        width: 95%;
        max-width: 95%;
        box-sizing: border-box;
    }

    .btn {
        width: 100%;
        max-width: 100%;
        padding: clamp(0.7rem, 2vw, 0.8rem) clamp(1rem, 3vw, 1.2rem);
        font-size: clamp(0.85rem, 2.5vw, 0.9rem);
        box-sizing: border-box;
    }

    .floating-logo {
        width: 50px;
        height: 50px;
        opacity: 0.45;
        padding: 6px;
        background: rgba(0, 0, 0, 0.4);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 15px rgba(88, 166, 255, 0.3);
    }

    .floating-logo img {
        filter: drop-shadow(0 0 6px rgba(88, 166, 255, 0.7)) brightness(1.2);
    }

    .gradient-orb {
        filter: blur(60px);
        opacity: 0.25;
    }

    .orb-1 {
        width: 350px;
        height: 350px;
    }

    .orb-2 {
        width: 300px;
        height: 300px;
    }

    .orb-3 {
        width: 280px;
        height: 280px;
    }

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

    .project-filters {
        gap: 0.5rem;
        padding: 0 10px;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

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

    /* Education Section Mobile */
    .education-timeline {
        max-width: 100%;
    }
    
    .education-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .education-logo {
        width: 80px;
        height: 80px;
    }

    .education-connector {
        height: 50px;
    }

    .connector-line {
        height: 30px;
    }

    .contact-container {
        padding: 2.5rem;
        margin: 0 1rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Mobile Menu */
    .menu-toggle {
        display: block;
        background: var(--glass-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.5rem;
        backdrop-filter: blur(10px);
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px var(--shadow-dark);
        z-index: -1;
        border-left: 1px solid var(--border-color);
    }

    .nav-list.open {
        right: 0;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 1rem;
    }

    /* Timeline responsiveness */
    .timeline::after {
        left: 30px;
    }

    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .left::after, .right::after {
        left: 20px;
    }

    .right {
        left: 0%;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .social-links {
        gap: 1rem;
        margin-bottom: 0.8rem;
    }

    .social-link {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .scroll-indicator {
        display: none;
    }

    /* Enhanced mobile card animations */
    .hero-stats,
    .hero-projects-showcase,
    .experience-highlights {
        animation: fadeInUp 0.8s ease-out;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-img {
        width: 120px;
        height: 120px;
    }

    .profile-glow {
        width: 180px;
        height: 180px;
    }

    .hero-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .dynamic-text {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-stats {
        padding: 1rem;
    }

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

    .showcase-title {
        font-size: 1.2rem;
    }

    .carousel-card {
        width: 180px;
    }

    .carousel-card img {
        height: 110px;
    }

    .carousel-card-title {
        font-size: 0.85rem;
        padding: 0.8rem;
    }

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

    .section {
        padding: 4rem 0;
    }

    #main-content {
        padding: 80px 3% 0;
    }

    .nav {
        padding: 1rem 3%;
    }

    .tech-stack {
        padding: 1.5rem;
    }

    .contact-container {
        padding: 2rem;
    }

    /* Education Section Extra Small Screens */
    .education-card {
        padding: 1.5rem;
    }

    .education-content h3 {
        font-size: 1.2rem;
    }

    .education-content h4 {
        font-size: 1rem;
    }

    .skill-card {
        padding: 1.5rem 1rem;
    }

    .skill-card img {
        width: 50px;
        height: 50px;
    }

    .floating-logo {
        width: 40px;
        height: 40px;
        opacity: 0.4;
        padding: 5px;
        background: rgba(0, 0, 0, 0.5);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), 0 0 12px rgba(88, 166, 255, 0.4);
    }

    .floating-logo img {
        filter: drop-shadow(0 0 5px rgba(88, 166, 255, 0.8)) brightness(1.3);
    }

    .orb-1, .orb-2, .orb-3 {
        width: 300px;
        height: 300px;
        filter: blur(50px);
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .welcome-section {
        min-height: 100vh;
        max-height: 100vh;
        padding: clamp(50px, 8vh, 60px) clamp(10px, 3vw, 15px) clamp(10px, 2vh, 15px);
        overflow-y: auto;
        width: 100%;
    }

    .hero-content {
        width: 100%;
        padding: 0.3rem clamp(10px, 2vw, 1rem);
    }

    .hero-description {
        max-width: 95%;
    }

    .hero-stats {
        max-width: 95%;
    }

    /* Ensure logos visible in landscape */
    .floating-logos {
        display: block !important;
        visibility: visible !important;
    }

    .floating-logo {
        opacity: 0.5;
        width: 45px;
        height: 45px;
    }

    .hero-img {
        width: 90px;
        height: 90px;
        margin-bottom: 0.5rem;
    }

    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2rem);
        margin-bottom: 0.2rem;
    }

    .dynamic-text {
        font-size: clamp(1.1rem, 4vw, 1.3rem);
    }

    .hero-description {
        margin-bottom: 0.8rem;
    }

    .hero-stats {
        margin: 0.8rem auto;
        padding: 0.8rem;
    }

    .hero-projects-showcase {
        margin: 1rem 0;
    }

    .cta-buttons {
        margin-bottom: 0.8rem;
    }

    .social-links {
        margin-bottom: 0.5rem;
    }
}

/* Tablet and medium screen sizes */
@media (min-width: 481px) and (max-width: 992px) {
    .welcome-section {
        padding: clamp(70px, 8vh, 80px) clamp(20px, 4vw, 40px) clamp(20px, 3vh, 30px);
    }

    .hero-content {
        width: 100%;
        padding: 1rem clamp(20px, 4vw, 2rem);
    }

    .hero-description {
        max-width: min(90%, 700px);
    }

    .hero-stats {
        max-width: min(95%, 600px);
    }

    .floating-logo {
        opacity: 0.5;
        width: 55px;
        height: 55px;
        background: rgba(0, 0, 0, 0.35);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 18px rgba(88, 166, 255, 0.25);
    }

    .floating-logo img {
        filter: drop-shadow(0 0 7px rgba(88, 166, 255, 0.65)) brightness(1.15);
    }
}

/* Extra small screens */
@media (max-height: 600px) {
    .welcome-section {
        padding: clamp(50px, 8vh, 60px) clamp(10px, 3vw, 15px) clamp(10px, 2vh, 15px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .hero-content {
        width: 100%;
        padding: 0.3rem clamp(10px, 3vw, 1rem);
    }

    .hero-description {
        max-width: 95%;
        padding: 0 clamp(10px, 2vw, 15px);
    }

    .hero-stats {
        max-width: 95%;
    }

    /* Ensure logos visible on small screens */
    .floating-logos {
        display: block !important;
        visibility: visible !important;
    }

    .floating-logo {
        width: 35px;
        height: 35px;
        opacity: 0.45;
        padding: 4px;
        background: rgba(0, 0, 0, 0.6);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(88, 166, 255, 0.5);
    }

    .hero-img {
        width: 100px;
        height: 100px;
        margin-bottom: 0.5rem;
    }

    .hero-profile-container {
        margin-bottom: 0.5rem;
    }

    .hero-badge {
        margin-bottom: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .hero-title {
        margin-bottom: 0.3rem;
    }

    .hero-subtitle-container {
        margin-bottom: 0.3rem;
        min-height: 35px;
    }

    .hero-description {
        margin-bottom: 0.8rem;
        font-size: 0.85rem;
    }

    .hero-stats {
        margin-bottom: 0.8rem;
        padding: 0.8rem;
        gap: 0.6rem;
    }

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

    .experience-highlights {
        margin: 0.5rem 0;
    }

    .cta-buttons {
        margin-bottom: 0.8rem;
        gap: 0.5rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .social-links {
        margin-bottom: 0.5rem;
        gap: 0.8rem;
    }

    .scroll-indicator {
        display: none;
    }
}
